Система API 1.7.0
Методы API для работы с разделом «Система».
Базовый путь: https://{IP_контроллера}/api/v1.
Версия описания API: 1.7.0.
Примеры используют placeholder-значения для паролей, token, UUID, адресов и секретов. Перед выполнением запроса замените их на значения вашего контроллера.
Методы раздела
| Метод | Путь |
|---|---|
POST | /system/call |
GET | /system/monitor |
POST /system/call
Раздел: Система.
Формирует диагностический снимок системы.
Параметры и ответы по OpenAPI
{
"description": "Snap debug method",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"caller": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully returned call response",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X POST "https://{IP_контроллера}/api/v1/system/call" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"caller": "string"
}'
Пример тела запроса
{
"caller": "string"
}
Пример ответа
"string"
GET /system/monitor
Раздел: Система.
Возвращает список системных процессов.
Параметры и ответы по OpenAPI
{
"description": "Returns system process list",
"parameters": [
{
"name": "controller",
"in": "query",
"description": "Controller to filter the system process list.",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully returned process list",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"cpu": {
"type": "number",
"description": "CPU utilization as a percentage.",
"example": 10.6
},
"memPerc": {
"type": "number",
"description": "Memory utilization as a percentage.",
"example": 1.2
},
"memAbsMB": {
"type": "number",
"description": "Absolute memory utilization in megabytes.",
"example": 197.50390625
},
"count": {
"type": "integer",
"description": "Number of instances of the process.",
"example": 1
}
}
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X GET "https://{IP_контроллера}/api/v1/system/monitor" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"cpu": 10.6,
"memPerc": 1.2,
"memAbsMB": 197.50390625,
"count": 1
}