Skip to content

Websocket Server Requests

Nathan edited this page May 24, 2021 · 2 revisions

Requests can be made to the server, in JSON format, the basic format for a request is as follows:

{
  "request": "<request>",
  "id": "<id>"
}

Get Actions (0.41)

This request will get you a list of all the actions you currently have.

Response:

{
  "id": "<message id>",
  "count": 00,
  "actions": [
    {
      "id": "<action guid>",
      "name": "<action name>"
    },
  ],
  "status": "ok"
}

DoAction (0.41)

This request will trigger an action that you provide

{
  "request": "<request>",
  "action": {
    "id": "<guid>",
    "name": "<name>"
  },
  "args": {
    "key": "value",
  },
  "id": "<id>"
}

If the action is not found, an error will be returned, if the action was dispatched it will return success.

{
  "id": "<id>",
  "status": "ok"
}

Clone this wiki locally