Discover Controllers
This command discovers available controllers in the agent and publishes it to the cloud. Some protocols don't support controller discovery. Instead they can be added by add controller command.
#
Command- Sample
- Schema
{ "agent": "agent-name", "command": 151, "msgid": 1000, "type": 1}
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "agent": { "type": "string", "description": "Name of the agent" }, "command": { "type": "integer", "description": "Command enum", "const": 151 }, "msgid": { "type": "integer", "description": "Message ID , will be used to send the ACKs" },
"controllerType": { "type": "integer", "description": "Controller Type enum", "const": 0 }, "publishType": { "type": "integer", "description": "Publish Type enum", "const": 4 } }, "required": ["agent", "command", "msgid", "type", "publishType"]}
#
Agent Response- Sample
- Schema
{ "agent": "agent-name", "data": [ { "controller": { "name": "controller-name-1" }, "controllerType": 0 }, { "controller": { "name": "controller-name-2" }, "controllerType": 0 } ], "publishType": 7}
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "agent": { "type": "string", "description": "Name of the agent" }, "data": { "type": "array", "items": [ { "type": "object", "properties": { "controller": { "type": "string", "description": "controller object of the specific controller type" } }, "required": ["controller", "controllerType"] } ] }, "controllerType": { "type": "integer", "description": "Controller Type enum", "const": 0 }, "publishType": { "type": "integer", "description": "Publish Type enum", "const": 7 } }, "required": ["agent", "data", "controllerType", "publishType"]}