mirror of
https://github.com/kerberos-io/agent.git
synced 2025-10-29 10:52:28 +08:00
document more swagger endpoints + cleanup source
This commit is contained in:
@@ -293,6 +293,75 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/config": {
|
||||
"get": {
|
||||
"description": "Get the current configuration.",
|
||||
"tags": [
|
||||
"general"
|
||||
],
|
||||
"summary": "Get the current configuration.",
|
||||
"operationId": "config",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "Update the current configuration.",
|
||||
"tags": [
|
||||
"general"
|
||||
],
|
||||
"summary": "Update the current configuration.",
|
||||
"operationId": "config",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Configuration",
|
||||
"name": "config",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Config"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/dashboard": {
|
||||
"get": {
|
||||
"description": "Get all information showed on the dashboard.",
|
||||
"tags": [
|
||||
"general"
|
||||
],
|
||||
"summary": "Get all information showed on the dashboard.",
|
||||
"operationId": "dashboard",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/days": {
|
||||
"get": {
|
||||
"description": "Get all days stored in the recordings directory.",
|
||||
"tags": [
|
||||
"general"
|
||||
],
|
||||
"summary": "Get all days stored in the recordings directory.",
|
||||
"operationId": "days",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/hub/verify": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -302,7 +371,7 @@ const docTemplate = `{
|
||||
],
|
||||
"description": "Will verify the hub connectivity.",
|
||||
"tags": [
|
||||
"config"
|
||||
"general"
|
||||
],
|
||||
"summary": "Will verify the hub connectivity.",
|
||||
"operationId": "verify-hub",
|
||||
@@ -327,6 +396,32 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/latest-events": {
|
||||
"post": {
|
||||
"description": "Get the latest recordings (events) from the recordings directory.",
|
||||
"tags": [
|
||||
"general"
|
||||
],
|
||||
"summary": "Get the latest recordings (events) from the recordings directory.",
|
||||
"operationId": "latest-events",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Event filter",
|
||||
"name": "eventFilter",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.EventFilter"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/login": {
|
||||
"post": {
|
||||
"description": "Get Authorization token.",
|
||||
@@ -365,7 +460,7 @@ const docTemplate = `{
|
||||
],
|
||||
"description": "Will verify the ONVIF connectivity.",
|
||||
"tags": [
|
||||
"config"
|
||||
"general"
|
||||
],
|
||||
"summary": "Will verify the ONVIF connectivity.",
|
||||
"operationId": "verify-onvif",
|
||||
@@ -399,7 +494,7 @@ const docTemplate = `{
|
||||
],
|
||||
"description": "Will verify the persistence.",
|
||||
"tags": [
|
||||
"config"
|
||||
"general"
|
||||
],
|
||||
"summary": "Will verify the persistence.",
|
||||
"operationId": "verify-persistence",
|
||||
@@ -685,6 +780,20 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.EventFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"number_of_elements": {
|
||||
"type": "integer"
|
||||
},
|
||||
"timestamp_offset_end": {
|
||||
"type": "integer"
|
||||
},
|
||||
"timestamp_offset_start": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.IPCamera": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user