{ "openapi": "3.0.0", "info": { "title": "Equipment service", "description": "Service that works with different equipment such as switches", "version": "3.0.0" }, "servers": [ { "url": "https://127.0.0.1/api/eservice/v3" } ], "tags": [ { "name": "equipment", "description": "equipment" }, { "name": "pdu", "description": "pdu" }, { "name": "switch", "description": "Switch" }, { "name": "grafana", "description": "Grafana" }, { "name": "statistic", "description": "Statistic" }, { "name": "report", "description": "Report" }, { "name": "ipmi", "description": "IPMI" }, { "name": "ups", "description": "ups" }, { "name": "vpu", "description": "VPU" }, { "name": "custom_equipment", "description": "Custom equipment" } ], "components": { "securitySchemes": { "cookieAuth": { "type": "apiKey", "in": "cookie", "name": "ses6" }, "headerHost": { "type": "apiKey", "in": "header", "name": "host" } } }, "security": [ { "cookieAuth": [], "headerHost": [] } ], "paths": { "/supported_switch": { "get": { "operationId": "supported_switch", "responses": { "200": { "description": "Supported device handlers received", "content": { "application/json": { "schema": { "type": "array", "description": "List of supported device handlers", "items": { "type": "object", "properties": { "handler": { "description": "Device type", "type": "string", "example": "cisco_snmp" }, "name": { "type": "string", "description": "Handler name" }, "protocol": { "description": "Protocols for device management", "type": "array", "items": { "type": "string" } }, "features": { "description": "Features is provided by the device", "type": "array", "items": { "type": "string", "enum": [ "port_aggregation", "collect_mac" ] } } } } } } } }, "default": { "description": "Supported device handlers not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "List of supported device handlers", "tags": [ "switch" ] } }, "/supported_pdu": { "get": { "operationId": "supported_pdu", "responses": { "200": { "description": "Supported device handlers received", "content": { "application/json": { "schema": { "type": "array", "description": "List of supported device handlers", "items": { "type": "object", "properties": { "handler": { "description": "Device type", "type": "string", "example": "cisco_snmp" }, "name": { "type": "string", "description": "Handler name" }, "protocol": { "description": "Protocols for device management", "type": "array", "items": { "type": "string" } }, "features": { "description": "Features is provided by the device", "type": "array", "items": { "type": "string", "enum": [ "port_aggregation", "collect_mac" ] } } } } } } } }, "default": { "description": "Supported device handlers not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "List of supported device handlers", "tags": [ "pdu" ] } }, "/supported_ups": { "get": { "operationId": "supported_ups", "responses": { "200": { "description": "Supported device handlers received", "content": { "application/json": { "schema": { "type": "array", "description": "List of supported device handlers", "items": { "type": "object", "properties": { "handler": { "description": "Device type", "type": "string", "example": "cisco_snmp" }, "name": { "type": "string", "description": "Handler name" }, "protocol": { "description": "Protocols for device management", "type": "array", "items": { "type": "string" } }, "features": { "description": "Features is provided by the device", "type": "array", "items": { "type": "string", "enum": [ "port_aggregation", "collect_mac" ] } } } } } } } }, "default": { "description": "Supported device handlers not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "List of supported device handlers", "tags": [ "ups" ] } }, "/supported_vpu": { "get": { "operationId": "supported_vpu", "responses": { "200": { "description": "Supported device handlers for VPU received", "content": { "application/json": { "schema": { "type": "array", "description": "List of supported device handlers", "items": { "type": "object", "properties": { "handler": { "description": "Device type", "type": "string", "example": "cisco_snmp" }, "name": { "type": "string", "description": "Handler name" }, "protocol": { "description": "Protocols for device management", "type": "array", "items": { "type": "string" } }, "features": { "description": "Features is provided by the device", "type": "array", "items": { "type": "string", "enum": [ "port_aggregation", "collect_mac" ] } } } } } } } }, "default": { "description": "Supported device handlers not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "List of supported device handlers for VPU module", "tags": [ "vpu" ] } }, "/supported_ipmi": { "get": { "operationId": "supported_ipmi", "responses": { "200": { "description": "Supported device handlers for IPMI received", "content": { "application/json": { "schema": { "type": "array", "description": "List of supported device handlers", "items": { "type": "object", "properties": { "handler": { "description": "Device type", "type": "string", "example": "cisco_snmp" }, "name": { "type": "string", "description": "Handler name" }, "protocol": { "description": "Protocols for device management", "type": "array", "items": { "type": "string" } }, "features": { "description": "Features is provided by the device", "type": "array", "items": { "type": "string", "enum": [ "port_aggregation", "collect_mac" ] } } } } } } } }, "default": { "description": "Supported device handlers not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "List of supported device handlers for IPMI module", "tags": [ "ipmi" ] } }, "/validate": { "post": { "operationId": "validate", "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "additionalProperties": true, "type": "object", "required": [ "device", "connection_params" ], "properties": { "device": { "type": "string", "description": "Type of the device" }, "connection_params": { "additionalProperties": false, "type": "object", "properties": { "snmp_params": { "oneOf": [ { "required": [ "hostname", "version", "community" ], "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "The equipment community", "type": "string" } } }, { "required": [ "hostname", "version", "security_username", "security_level" ], "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } } ] } }, "required": [ "snmp_params" ] } } }, { "additionalProperties": true, "type": "object", "properties": { "device": { "type": "string", "description": "The device SSH params" }, "ssh_params": { "required": [ "ip", "ssh_port", "ssh_user" ], "type": "object", "description": "SSH params for connection", "properties": { "ip": { "type": "string", "description": "The equipment IP address", "example": "127.0.0.1", "format": "ipv4" }, "ssh_port": { "type": "integer", "description": "SSH port", "example": 22, "maximum": 65535, "minimum": 1 }, "ssh_user": { "type": "string", "description": "SSH user", "example": "root" } } } }, "required": [ "device", "ssh_params" ] }, { "additionalProperties": true, "type": "object", "properties": { "device": { "type": "string", "description": "The device SNMP params" }, "snmp_params": { "oneOf": [ { "required": [ "hostname", "version", "community" ], "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "community": { "description": "The equipment community", "type": "string" } } }, { "required": [ "hostname", "version", "security_username", "security_level" ], "description": "SNMP connection parameters", "type": "object", "properties": { "hostname": { "description": "Equipment address", "type": "string", "format": "ipv4", "example": "127.0.0.1" }, "version": { "description": "SNMP version", "type": "string", "enum": [ "snmp_v1", "snmp_v2c", "snmp_v3" ] }, "security_username": { "description": "Username for SNMP access", "type": "string", "minLength": 1, "example": "root", "pattern": "^[^ ]" }, "security_level": { "description": "Authentication level", "type": "string", "enum": [ "no_auth_or_privacy", "auth_without_privacy", "auth_with_privacy" ] }, "auth_protocol": { "description": "Authentication protocol", "type": "string", "enum": [ "MD5", "SHA" ] }, "auth_password": { "description": "Authentication protocol pass phrase", "type": "string" }, "privacy_protocol": { "description": "Privacy protocol", "type": "string", "enum": [ "DES", "AES" ] }, "privacy_password": { "description": "Privacy protocol pass phrase", "type": "string" } } } ] } }, "required": [ "device", "snmp_params" ] }, { "description": "NETCONF connection parameters", "type": "object", "additionalProperties": true, "required": [ "device", "netconf_params" ], "properties": { "device": { "type": "string", "description": "The device eAPI params" }, "netconf_params": { "type": "object", "additionalProperties": true, "required": [ "username", "password" ], "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "port": { "description": "NETCONF access ports", "example": 830, "maximum": 65535, "minimum": 1, "type": "integer" }, "device_params": { "description": "NETCONF device parameters", "type": "object", "properties": { "name": { "description": "OS name", "type": "string", "enum": [ "junos" ], "default": "junos" } } } } } } }, { "additionalProperties": true, "type": "object", "properties": { "device": { "type": "string", "description": "The device eAPI params" }, "eapi_params": { "required": [ "username", "password" ], "type": "object", "description": "eAPI params for connection", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" } } } }, "required": [ "device", "eapi_params" ] }, { "additionalProperties": true, "type": "object", "properties": { "device": { "type": "string", "description": "The device NxApi params" }, "nxapi_params": { "required": [ "username", "password", "port", "protocol" ], "type": "object", "description": "eAPI params for connection", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "port": { "description": "NxApi access ports", "example": 8181, "maximum": 65535, "minimum": 1, "type": "integer" }, "protocol": { "description": "Protocol (http/https)", "type": "string", "enum": [ "http", "https" ] } } } }, "required": [ "device", "nxapi_params" ] }, { "additionalProperties": true, "type": "object", "properties": { "device": { "type": "string", "description": "The device RouterOS API params" }, "mikrotik_params": { "required": [ "username", "password", "port", "ssl" ], "type": "object", "description": "RouterOS API params for connection", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "port": { "description": "RouterOS API access ports", "example": 8728, "maximum": 65535, "minimum": 1, "type": "integer" }, "ssl": { "description": "SSL usage", "type": "boolean" } } } }, "required": [ "device", "mikrotik_params" ] }, { "additionalProperties": true, "type": "object", "properties": { "device": { "type": "string", "description": "The device custom protocol" }, "custom_params": { "description": "Custom protocol connection parameters", "type": "object" } }, "required": [ "device", "custom_params" ] }, { "additionalProperties": true, "type": "object", "properties": { "device": { "type": "string", "description": "The device http params" }, "http_params": { "required": [ "username", "password", "hostname", "ssl", "port" ], "type": "object", "description": "Http params for connection", "properties": { "username": { "description": "Username", "type": "string" }, "password": { "description": "Password", "type": "string" }, "hostname": { "type": "string", "description": "The equipment IP address", "example": "127.0.0.1", "format": "ipv4" }, "ssl": { "description": "SSL usage", "type": "boolean" }, "port": { "description": "Http service port", "type": "integer" } } } }, "required": [ "device", "http_params" ] } ] } } } }, "responses": { "200": { "description": "Successfully validated", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "description": "Validation result", "example": "ok" } }, "type": "object" } } } }, "default": { "description": "Validation error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Equipment protocol validation", "tags": [ "equipment" ] } }, "/flow/report": { "post": { "operationId": "report", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "date_from": { "type": "string", "description": "Start date for searching NetFlow data", "example": "2020-07-01 00:37:40" }, "date_to": { "type": "string", "description": "End date for searching NetFlow data", "example": "2020-07-01 00:37:40" }, "src_ip": { "oneOf": [ { "format": "ipv4", "type": "string" }, { "format": "ipv6", "type": "string" } ], "description": "Ipv4 source address. If the field is not passed, all available addresses are considered.", "example": "127.0.0.1" }, "dst_ip": { "oneOf": [ { "format": "ipv4", "type": "string" }, { "format": "ipv6", "type": "string" } ], "description": "Ipv4 destination address. If the field is not passed, all available addresses are considered.", "example": "127.0.0.1" }, "src_port": { "type": "integer", "minimum": 1, "maximum": 65535, "description": "Source port. If the field is not passed, all available ports are considered.", "example": 8080 }, "dst_port": { "type": "integer", "minimum": 1, "maximum": 65535, "description": "Destination port. If the field is not passed, all available ports are considered.", "example": 8080 }, "report_type": { "type": "string", "description": "Output format of report.", "enum": [ "csv" ] } }, "required": [ "date_from", "date_to" ] } } } }, "responses": { "200": { "description": "Generated successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "description": "The report identifier", "example": 1 } }, "type": "object" } } } }, "default": { "description": "Report generation error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Building a NetFlow report", "tags": [ "report" ] }, "get": { "operationId": "reports_get", "responses": { "200": { "description": "List of reports", "content": { "application/json": { "schema": { "properties": { "list": { "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The report identifier" }, "name": { "type": "string", "description": "The report unique name to identify it in filesystem" }, "date_from": { "type": "string", "description": "Start date for searching NetFlow data" }, "date_to": { "type": "string", "description": "End date for searching NetFlow data" }, "src_ip": { "type": "string", "description": "Ipv4 source address. If the field is not passed, all available addresses are considered." }, "dst_ip": { "type": "string", "description": "Ipv4 destination address. If the field is not passed, all available addresses are considered." }, "src_port": { "type": "integer", "description": "Source port. If the field is not passed, all available ports are considered." }, "dst_port": { "type": "integer", "description": "Destination port. If the field is not passed, all available ports are considered." }, "report_type": { "type": "string", "description": "Output format of report." }, "status": { "type": "string", "description": "Report generation status." }, "status_info": { "type": "object", "enum": [ "csv" ], "description": "Report generation detailed information." } } }, "type": "array" } }, "type": "object" } } } }, "default": { "description": "Reports query error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "List of reports", "tags": [ "report" ] } }, "/flow/report/{report_id}": { "delete": { "operationId": "report_id_delete", "parameters": [ { "description": "Report unique identifier", "in": "path", "name": "report_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Report has been deleted successfully", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error deleting report", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Delete report", "tags": [ "report" ] } }, "/flow/report/{report_id}/download": { "get": { "operationId": "report_id_download", "parameters": [ { "description": "Report unique identifier", "in": "path", "name": "report_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Report file", "content": { "application/csv": { "schema": { "type": "string", "format": "binary" } } } }, "default": { "description": "Report download error", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Download generated report", "tags": [ "report" ] } }, "/instance/{instance_id}/dashboards": { "get": { "operationId": "instance_id_dashboards", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The Grafana dashboards for instance has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "array", "description": "List of Grafana dashboards", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The dashboard identifier" }, "uid": { "type": "string", "description": "The dashboard unique identifier in Grafana" }, "title": { "type": "string", "description": "The dashboard title" }, "tags": { "type": "array", "description": "The dashboard tags", "items": { "type": "string" } }, "panels": { "type": "array", "description": "The dashboard panels", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The panel identifier" }, "url": { "type": "string", "description": "The panel url" } } } } } } } } } } } }, "default": { "description": "There is no Grafana dashboards for requested instance", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "List of grafana dashboards", "tags": [ "grafana" ] } }, "/ipmi/{ipmi_id}/sensor_value": { "post": { "operationId": "ipmi_id_sensor_value_post", "parameters": [ { "description": "The BMC unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Getting The BMC sensors values task has been started", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "ok" } } } } } }, "default": { "description": "Failed to start receiving BMC sensors values task", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The ipmi sensors values", "tags": [ "ipmi" ] }, "get": { "operationId": "ipmi_id_sensor_value", "parameters": [ { "description": "The ipmi unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The ipmi sensors values has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "ipmi_id": { "type": "integer", "example": 10, "description": "The BMC identifier" }, "update_time": { "type": "string", "example": "2021-11-22T23:38:46", "description": "The time of last BMC sensors update", "nullable": true }, "sensors_info": { "type": "array", "description": "The IPMI sensors info in JSON format", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Sensor name" }, "value": { "type": "string", "description": "Sensor value" }, "measure": { "type": "string", "description": "Sensor measure" }, "status": { "type": "string", "description": "Sensor status" } } } } } } } } }, "default": { "description": "Error receiving values of ipmi sensors", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The ipmi sensors values", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/update_sensor_values": { "post": { "operationId": "ipmi_id_update_sensor_values_post", "parameters": [ { "description": "The BMC unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "sensors_info": { "type": "object", "description": "The BMC new sensor info" } } } } } }, "responses": { "200": { "description": "Updating The BMC sensors values task has been done", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "ok" } } } } } }, "default": { "description": "Failed to update BMC sensors values", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "Update the ipmi sensors values", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/log": { "get": { "operationId": "ipmi_id_log", "parameters": [ { "description": "The ipmi unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } }, { "description": "The ipmi log output format", "in": "query", "name": "log_format", "schema": { "type": "string", "default": "text", "enum": [ "text", "json" ] }, "allowReserved": true } ], "responses": { "200": { "description": "The ipmi logs has been received", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "properties": { "log": { "type": "string", "description": "The IPMI logs" } } }, { "type": "object", "properties": { "list": { "type": "array", "description": "The IPMI log records", "items": { "type": "object", "description": "The IPMI log one record", "properties": { "id": { "type": "string", "description": "The IPMI log record ID" }, "date_time": { "type": "string", "description": "The IPMI log record created time" }, "message": { "type": "string", "description": "The IPMI log message" }, "severity": { "type": "string", "description": "The IPMI log severity" } } } }, "size": { "type": "integer", "description": "The IPMI log records count" }, "last_notify": { "type": "integer", "description": "Stub", "default": 0 } } } ] } } } }, "default": { "description": "Error receiving ipmi logs", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The ipmi logs", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/fru": { "post": { "operationId": "ipmi_id_fru_post", "parameters": [ { "description": "The BMC unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Getting The BMC FRU info task has been started", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "ok" } } } } } }, "default": { "description": "Failed to start receiving BMC FRU task", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The ipmi sensors values", "tags": [ "ipmi" ] }, "get": { "operationId": "ipmi_id_fru", "parameters": [ { "description": "The ipmi unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The ipmi fru info has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "description": "The IPMI fru info", "properties": { "ipmi_id": { "type": "integer", "example": 10, "description": "The BMC identifier" }, "update_time": { "type": "string", "example": "2021-11-22T23:38:46", "description": "The time of last BMC FRU update", "nullable": true }, "device": { "description": "Device info", "type": "object", "properties": { "name": { "description": "Device name", "type": "string", "example": "Builtin FRU Device" }, "id": { "description": "Device id", "type": "string", "example": 4 } } }, "chassis": { "description": "Chassis info", "type": "object", "properties": { "type": { "description": "Chassis type", "type": "string", "example": "Expansion Chassis" }, "part_number": { "description": "Chassis Part Number", "type": "string", "example": "68-5999-02" }, "serial": { "description": "Chassis Serial Number", "type": "string", "example": "GOX1586GKKU" }, "extra": { "description": "Chassis extra info", "type": "string", "example": "Cisco Systems Inc" } } }, "board": { "description": "Board info", "type": "object", "properties": { "manufacture_date": { "description": "Board manufacture date", "type": "string", "example": "Mon Aug 18 09:13:00 1997" }, "manufacture": { "description": "Board manufacture", "type": "string", "example": "Cisco Systems Inc" }, "part_number": { "description": "Board part number", "type": "string", "example": "55-14658-09" }, "serial": { "description": "Board serial", "type": "string", "example": "JGU1457J555" }, "product": { "description": "Board product", "type": "string", "example": "UCSB-MLOM-PT-01" } } }, "product": { "description": "Product info", "type": "object", "properties": { "name": { "description": "Product Name", "type": "string", "example": "VEGMAN_S320_Server" }, "manufacture": { "description": "Product Model", "type": "string", "example": "YADRO" }, "model": { "description": "Product Manufacturer", "type": "string", "example": "VEGMAN S320 Server" }, "part_number": { "description": "Product Part Number", "type": "string", "example": "ASYUEG68599A" }, "version": { "description": "Product Version", "type": "string", "example": "Unknown" }, "serial": { "description": "Product Serial", "type": "string", "example": 834588243 }, "assert_tag": { "description": "Product Asset Tag", "type": "string", "example": "TISserver" } } }, "firmware": { "description": "Firmware versions info", "type": "object", "properties": { "bios": { "description": "BIOS version", "type": "string", "example": "1.4-ge8ed40" }, "bmc": { "description": "BMC version", "type": "string", "example": "v1.4rc43e3b" } } } } } } } } } }, "default": { "description": "Error receiving ipmi fru info", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The ipmi fru info", "tags": [ "ipmi" ] } }, "/ipmi/{ipmi_id}/info": { "post": { "operationId": "ipmi_id_info_post", "parameters": [ { "description": "The BMC unique identifier", "in": "path", "name": "ipmi_id", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "model": { "type": "string", "description": "Model of the BMC" } } } } } }, "responses": { "200": { "description": "Update BMC info is succesful", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "ok" } } } } } }, "default": { "description": "Failed to update BMC info", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The BMC extra info", "tags": [ "ipmi" ] } }, "/ipmi/model": { "get": { "operationId": "ipmi_model", "responses": { "200": { "description": "The list of BMC models", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "default": { "description": "Error receiving BMC models list", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The BMC models list", "tags": [ "ipmi" ] } }, "/instance/{instance_id}/server/{server_id}/statistic": { "get": { "operationId": "instance_id_server_id_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The server statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "sum_volume_rx": { "type": "string", "description": "The total sum of received traffic for the period in bytes" }, "sum_volume_tx": { "type": "string", "description": "The total sum of transmitted traffic for the period" }, "avg_load_rx": { "type": "string", "description": "The average of received load for the period" }, "avg_load_tx": { "type": "string", "description": "The average of transmitted load for the period" }, "sum_volume_rx_converted": { "type": "string", "description": "The formatted total sum of received traffic for the period" }, "sum_volume_tx_converted": { "type": "string", "description": "The formatted total sum of transmitted traffic for the period" }, "avg_load_rx_converted": { "type": "string", "description": "The formatted average of received load for the period" }, "avg_load_tx_converted": { "type": "string", "description": "The formatted average of transmitted load for the period" }, "max_burstable_rx": { "type": "integer", "description": "The burstable of received load" }, "max_burstable_tx": { "type": "integer", "description": "The burstable of transmitted load" } } } } } }, "default": { "description": "Server statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The server statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/server/{server_id}/netflow_statistic": { "get": { "operationId": "instance_id_server_id_netflow_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The server netflow statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "sum_volume_rx": { "type": "string", "description": "The total sum of received traffic for the period in bytes" }, "sum_volume_tx": { "type": "string", "description": "The total sum of transmitted traffic for the period" }, "avg_load_rx": { "type": "string", "description": "The average of received load for the period" }, "avg_load_tx": { "type": "string", "description": "The average of transmitted load for the period" }, "sum_volume_rx_converted": { "type": "string", "description": "The formatted total sum of received traffic for the period" }, "sum_volume_tx_converted": { "type": "string", "description": "The formatted total sum of transmitted traffic for the period" }, "avg_load_rx_converted": { "type": "string", "description": "The formatted average of received load for the period" }, "avg_load_tx_converted": { "type": "string", "description": "The formatted average of transmitted load for the period" }, "max_burstable_rx": { "type": "integer", "description": "The burstable of received load" }, "max_burstable_tx": { "type": "integer", "description": "The burstable of transmitted load" } } } } } }, "default": { "description": "Server netflow statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The server netflow statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/server/{server_id}/raw_netflow_statistic": { "get": { "operationId": "instance_id_server_id_raw_netflow_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The server raw netflow statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "metric_rx_volume": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total received traffic for the period" }, "metric_tx_volume": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total transmitted traffic for the period" }, "metric_rx_load": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total received load for the period" }, "metric_tx_load": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total transmitted load for the period" } } } } } }, "default": { "description": "Server raw netflow statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The server raw netflow statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/server/{server_id}/ip/{ip_address}/raw_netflow_statistic": { "get": { "operationId": "instance_id_server_id_ip_address_raw_netflow_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "The IP unique address", "in": "path", "name": "ip_address", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The server raw netflow statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "metric_rx_volume": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total received traffic for the period" }, "metric_tx_volume": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total transmitted traffic for the period" }, "metric_rx_load": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total received load for the period" }, "metric_tx_load": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total transmitted load for the period" } } } } } }, "default": { "description": "Server raw netflow statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The server raw netflow statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/server/{server_id}/port/{port_id}/statistic": { "get": { "operationId": "instance_id_server_id_port_id_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "The port unique identifier", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The server statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "sum_volume_rx": { "type": "string", "description": "The total sum of received traffic for the period in bytes" }, "sum_volume_tx": { "type": "string", "description": "The total sum of transmitted traffic for the period" }, "avg_load_rx": { "type": "string", "description": "The average of received load for the period" }, "avg_load_tx": { "type": "string", "description": "The average of transmitted load for the period" }, "sum_volume_rx_converted": { "type": "string", "description": "The formatted total sum of received traffic for the period" }, "sum_volume_tx_converted": { "type": "string", "description": "The formatted total sum of transmitted traffic for the period" }, "avg_load_rx_converted": { "type": "string", "description": "The formatted average of received load for the period" }, "avg_load_tx_converted": { "type": "string", "description": "The formatted average of transmitted load for the period" }, "max_burstable_rx": { "type": "integer", "description": "The burstable of received load" }, "max_burstable_tx": { "type": "integer", "description": "The burstable of transmitted load" } } } } } }, "default": { "description": "Server statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The server statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/server/{server_id}/raw_statistic": { "get": { "operationId": "instance_id_server_id_raw_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The server raw statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "metric_rx_volume": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total received traffic for the period" }, "metric_tx_volume": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total transmitted traffic for the period" }, "metric_rx_load": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total received load for the period" }, "metric_tx_load": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total transmitted load for the period" } } } } } }, "default": { "description": "Server raw statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The server raw statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/server/{server_id}/port/{port_id}/raw_statistic": { "get": { "operationId": "instance_id_server_id_port_id_raw_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The server unique identifier", "in": "path", "name": "server_id", "required": true, "schema": { "type": "integer" } }, { "description": "The port unique identifier", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The server raw statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "metric_rx_volume": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total received traffic for the period" }, "metric_tx_volume": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total transmitted traffic for the period" }, "metric_rx_load": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total received load for the period" }, "metric_tx_load": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The total transmitted load for the period" } } } } } }, "default": { "description": "Server raw statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The server raw statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/pdu/{pdu_id}/raw_statistic": { "get": { "operationId": "instance_id_pdu_id_raw_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The PDU unique identifier", "in": "path", "name": "pdu_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The PDU raw statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "metric_consumption": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The PDU consumption values by timestamp" }, "metric_phase": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The PDU phase load by timestamp" } } } } } }, "default": { "description": "PDU raw statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The PDU raw statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/pdu/{pdu_id}/phase/{phase_id}/raw_statistic": { "get": { "operationId": "instance_id_pdu_id_phase_id_raw_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The PDU unique identifier", "in": "path", "name": "pdu_id", "required": true, "schema": { "type": "integer" } }, { "description": "The PDU phase unique identifier", "in": "path", "name": "phase_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The PDU raw statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "metric_consumption": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The PDU consumption values by timestamp" }, "metric_phase": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The PDU phase load by timestamp" } } } } } }, "default": { "description": "PDU raw statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The PDU raw statistic", "tags": [ "statistic" ] } }, "/instance/{instance_id}/ups/{ups_id}/raw_statistic": { "get": { "operationId": "instance_id_ups_id_raw_statistic", "parameters": [ { "description": "The instance unique identifier", "in": "path", "name": "instance_id", "required": true, "schema": { "type": "integer" } }, { "description": "The UPS unique identifier", "in": "path", "name": "ups_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The UPS raw statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "metric_load_percentage": { "type": "array", "items": { "type": "array", "items": { "type": "integer" } }, "description": "The UPS load percentage values by timestamp" }, "metric_charge_time": { "type": "array", "items": { "type": "array", "items": { "type": "integer" } }, "description": "The UPS charge time values by timestamp" }, "metric_input_power": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The UPS input power values by timestamp" }, "metric_output_power": { "type": "array", "items": { "type": "array", "items": { "format": "float", "type": "number" } }, "description": "The UPS output power values by timestamp" } } } } } }, "default": { "description": "UPS raw statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The UPS raw statistic", "tags": [ "statistic" ] } }, "/switch/{switch_id}/port/{port_id}/statistic": { "get": { "operationId": "switch_id_port_id_statistic", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } }, { "description": "The port unique identifier", "in": "path", "name": "port_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The switch statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "sum_volume_rx": { "type": "integer", "description": "The total sum of received traffic for the period in bytes" }, "sum_volume_tx": { "type": "integer", "description": "The total sum of transmitted traffic for the period" }, "avg_load_rx": { "type": "integer", "description": "The average of received load for the period" }, "avg_load_tx": { "type": "integer", "description": "The average of transmitted load for the period" }, "sum_volume_rx_converted": { "type": "string", "description": "The formatted total sum of received traffic for the period" }, "sum_volume_tx_converted": { "type": "string", "description": "The formatted total sum of transmitted traffic for the period" }, "avg_load_rx_converted": { "type": "string", "description": "The formatted average of received load for the period" }, "avg_load_tx_converted": { "type": "string", "description": "The formatted average of transmitted load for the period" }, "max_burstable_rx": { "type": "integer", "description": "The burstable of received load" }, "max_burstable_tx": { "type": "integer", "description": "The burstable of transmitted load" } } } } } }, "default": { "description": "Switch statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The switch statistic", "tags": [ "statistic" ] } }, "/switch/{switch_id}/statistic": { "get": { "operationId": "switch_id_statistic", "parameters": [ { "description": "The switch unique identifier", "in": "path", "name": "switch_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The switch statistic has been received", "content": { "application/json": { "schema": { "type": "object", "properties": { "sum_volume_rx": { "type": "integer", "description": "The total sum of received traffic for the period in bytes" }, "sum_volume_tx": { "type": "integer", "description": "The total sum of transmitted traffic for the period" }, "avg_load_rx": { "type": "integer", "description": "The average of received load for the period" }, "avg_load_tx": { "type": "integer", "description": "The average of transmitted load for the period" }, "sum_volume_rx_converted": { "type": "string", "description": "The formatted total sum of received traffic for the period" }, "sum_volume_tx_converted": { "type": "string", "description": "The formatted total sum of transmitted traffic for the period" }, "avg_load_rx_converted": { "type": "string", "description": "The formatted average of received load for the period" }, "avg_load_tx_converted": { "type": "string", "description": "The formatted average of transmitted load for the period" }, "max_burstable_rx": { "type": "integer", "description": "The burstable of received load" }, "max_burstable_tx": { "type": "integer", "description": "The burstable of transmitted load" } } } } } }, "default": { "description": "Switch statistic not found", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } }, "summary": "The switch statistic", "tags": [ "statistic" ] } }, "/custom_equipment": { "post": { "operationId": "custom_equipment_post", "summary": "Create custom equipment handler", "tags": [ "custom_equipment" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "handler", "protocol", "device_type" ], "properties": { "name": { "type": "string", "description": "The human readable custom equipment handler name", "example": "Custom Cisco Catalyst" }, "handler": { "type": "string", "description": "The internal handler name for DCImanager", "example": "custom_cisco_catalyst", "pattern": "^\\w+$" }, "device_type": { "type": "string", "description": "The equipment handler type", "example": "switch", "enum": [ "switch", "pdu", "vpu" ] }, "protocol": { "type": "array", "description": "The protocol of your handler", "minItems": 1, "maxItems": 1, "items": { "type": "string", "enum": [ "snmp", "nxapi", "eapi", "netconf", "routerosapi", "custom" ], "example": "snmp" } }, "features": { "type": "array", "description": "The features, available in your handlers", "example": [ "collect_mac" ], "default": [], "items": { "type": "string", "description": "port_aggregation available for switch handler. statistic_per_port - for PDU handlers. collect_mac - available for switch handler which can collect info about mac address on port", "enum": [ "port_aggregation", "statistic_per_port", "collect_mac" ] } } } } } } }, "responses": { "200": { "description": "The custom equipment handler has been successfully created", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error creating custom equipment handler", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "get": { "operationId": "custom_equipment_get", "summary": "List custom equipment handlers", "tags": [ "custom_equipment" ], "responses": { "200": { "description": "Got list of equipment handlers", "content": { "application/json": { "schema": { "type": "object", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "The equipment handler ID", "example": 1 }, "name": { "type": "string", "description": "The human readable custom equipment handler name", "example": "Custom Cisco Catalyst" }, "device_type": { "type": "string", "description": "The equipment handler type", "example": "switch", "enum": [ "switch", "pdu", "ups", "vpu", "ipmi" ] }, "version": { "type": "string", "description": "The equipment handler version", "example": "2021.08.1629980241282" }, "update_time": { "type": "string", "description": "The equipment handler create or update time", "example": "2021-08-26T12:17:21" }, "handler": { "type": "string", "description": "The internal handler name for DCImanager", "example": "custom_cisco_catalyst" }, "handler_import": { "type": "string", "description": "The relative python handler path to you custom handler inside your archive", "example": "custom_cisco_catalyst.main" }, "protocol": { "type": "array", "description": "The protocol of your handler", "minItems": 1, "maxItems": 1, "items": { "type": "string", "enum": [ "snmp", "nxapi", "eapi", "netconf", "routerosapi", "custom" ], "example": "snmp" } }, "features": { "type": "array", "description": "The features, available in your handlers", "example": [], "default": [], "items": { "type": "string", "description": "port_aggregation available for switch handler. statistic_per_port - for PDU handlers. collect_mac - available for switch handler which can collect info about mac address on port", "enum": [ "port_aggregation", "statistic_per_port", "collect_mac" ] } } } } } } } } } }, "default": { "description": "Error getting list of custom equipment handlers", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/custom_equipment/{custom_equipment_id}": { "post": { "operationId": "custom_equipment_id_post", "summary": "Edit custom equipment handler", "tags": [ "custom_equipment" ], "parameters": [ { "description": "The custom equipment handler identifier or internal name", "in": "path", "name": "custom_equipment_id", "required": true, "schema": { "oneOf": [ { "type": "integer" }, { "type": "string" } ] } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The human readable custom equipment handler name", "example": "Custom Cisco Catalyst" }, "features": { "type": "array", "description": "The features, available in your handlers", "example": [ "collect_mac" ], "items": { "type": "string", "description": "port_aggregation available for switch handler. statistic_per_port - for PDU handlers. collect_mac - available for switch handler which can collect info about mac address on port", "enum": [ "port_aggregation", "statistic_per_port", "collect_mac" ] } } } } } } }, "responses": { "200": { "description": "The custom equipment handler has been successfully edited", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error editing custom equipment handler", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "delete": { "operationId": "custom_equipment_id_delete", "summary": "Remove custom equipment handler", "tags": [ "custom_equipment" ], "parameters": [ { "description": "The custom equipment handler identifier", "in": "path", "name": "custom_equipment_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "The custom equipment handler has been successfully removed", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error removing custom equipment handler", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "get": { "operationId": "custom_equipment_id_get", "summary": "Getting the custom equipment handler", "tags": [ "custom_equipment" ], "parameters": [ { "description": "The custom equipment handler identifier", "in": "path", "name": "custom_equipment_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Got the custom equipment handler", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "description": "The equipment handler ID", "example": 1 }, "name": { "type": "string", "description": "The human readable custom equipment handler name", "example": "Custom Cisco Catalyst" }, "device_type": { "type": "string", "description": "The equipment handler type", "example": "switch", "enum": [ "switch", "pdu", "ups", "vpu", "ipmi" ] }, "version": { "type": "string", "description": "The equipment handler version", "example": "2021.08.1629980241282" }, "update_time": { "type": "string", "description": "The equipment handler create or update time", "example": "2021-08-26T12:17:21" }, "handler": { "type": "string", "description": "The internal handler name for DCImanager", "example": "custom_cisco_catalyst" }, "handler_import": { "type": "string", "description": "The relative python handler path to you custom handler inside your archive", "example": "custom_cisco_catalyst.main" }, "protocol": { "type": "array", "description": "The protocol of your handler", "minItems": 1, "maxItems": 1, "items": { "type": "string", "enum": [ "snmp", "nxapi", "eapi", "netconf", "routerosapi", "custom" ], "example": "snmp" } }, "features": { "type": "array", "description": "The features, available in your handlers", "example": [], "default": [], "items": { "type": "string", "description": "port_aggregation available for switch handler. statistic_per_port - for PDU handlers. collect_mac - available for switch handler which can collect info about mac address on port", "enum": [ "port_aggregation", "statistic_per_port", "collect_mac" ] } } } } } } }, "default": { "description": "Error getting custom equipment handler", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } }, "/custom_equipment/{custom_equipment_id}/content": { "post": { "operationId": "custom_equipment_id_content_post", "summary": "Update custom equipment handler content", "tags": [ "custom_equipment" ], "parameters": [ { "description": "The custom equipment handler identifier or internal name", "in": "path", "name": "custom_equipment_id", "required": true, "schema": { "oneOf": [ { "type": "integer" }, { "type": "string" } ] } } ], "responses": { "200": { "description": "The custom equipment handler content has been successfully updated", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer" } }, "type": "object" } } } }, "default": { "description": "Error updating custom equipment handler content", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } }, "get": { "operationId": "custom_equipment_id_content_get", "summary": "Getting the custom equipment handler content", "tags": [ "custom_equipment" ], "parameters": [ { "description": "The custom equipment handler identifier", "in": "path", "name": "custom_equipment_id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Got the custom equipment handler content", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "description": "The equipment handler archive in \"tar.gz\" format" } } } }, "default": { "description": "Error getting custom equipment handler content", "content": { "application/json": { "schema": { "properties": { "error": { "properties": { "code": { "type": "integer" }, "msg": { "type": "string" }, "value": { "type": "string" } }, "type": "object" } }, "type": "object" } } } } } } } } }