The Architect Agent comes with an integrated WebSocket API. The API is used by Architect Manager internally and may be accessed by you through custom scripts.
To access the API, you need to create a WebSocket connection to your Agent by connecting through `ws` or `wss` to your Agents public ip, on the configured listening port.
Whether you need to connect to `ws` or `wss` (SSL) depends on your Agents SSL setting. By default, SSL is turned on with self signed certificates.
To programmatically authenticate against an Agent, you need to initiate the connection with a header
Sec-Websocket-Protocol: SMP1.0, {username}, {password}
Any connection, without providing the authentication header will be blocked.
Once connected, commands can be sent as JSON formatted payload. It is following this struct pattern:
{
action: <str>
parameters: <map>
}
You are able to retrieve all commands supported by your Agent version by sending the following
{
action: "list_actions",
parameters: {}
}
You will receive a list of supported actions, their required parameters and data types.