How to send a discovery command
Sending a discovery command with an example.
You may send commands either as
- entirely as a
POSTrequest, - as
GETfor those commands without required parameters - or, as a combination with the command name in the URL.
The following two commands are equivalent
GET https://server/Api/System/discovery
POST https://server/Api/System
BODY: { "discovery": {} }
Example- result of a discovery response for the System API
To aid processing of results a command will always echo its name in the result object
{
"discovery": {
"commands": [
{
"command": "discovery",
"description": "Discover available commands.",
"parameters": [
{
"name": "tag",
"description": "A label to identify the request.",
"required": false,
"format": "object"
}
]
},
{
"command": "getLog",
"description": "Gets system logs.",
"parameters": [
{
"name": "count",
"description": "The number of logs to return. Default value is 5.",
"required": false,
"format": "number"
},
{
"name": "errorsOnly",
"description": "Specifies whether logs with Error level only should be returned.",
"required": false,
"format": "bool"
},
{
"name": "tag",
"description": "A label to identify the request.",
"required": false,
"format": "object"
}
]
},
{
"command": "getAlertList",
"description": "Gets system status.",
"parameters": [
{
"name": "tag",
"description": "A label to identify the request.",
"required": false,
"format": "object"
}
]
}
]
}
}