Skip to content

Latest commit

 

History

History
97 lines (66 loc) · 1.33 KB

Aitum.md

File metadata and controls

97 lines (66 loc) · 1.33 KB

Aitum API Methods

The base of Aitum related calls is http://localhost:7777/aitum.

Rule related

Methods relating to Aitum's rules!

Methods

Get Rules

For getting a list of rules and their IDs.

Call

GET /aitum/rules/

Successful Response

Keys in the response refer to their name within Aitum, and the value as their internal ID.

{
  "status": "OK",
  "data": {
    "Test": "TqpYRQEcpXv5hdux"
  }
}

Trigger Rule

For triggering a rule in Aitum by its ID.

Call

GET /aitum/rules/:ruleid

Successful Response

Nothing interesting returned, but this indicates a successful run.

{
  "status": "OK",
  "data": "OK"
}

State related

Methods relating to Aitum's state system!

Methods

Get State Variables

For getting a list of state variables and their attached information.

Call

GET /aitum/state/

Successful Response

An array of state variables.

Type values are as follows:

Type Value
Integer 0
Float 1
String 2
Boolean 3
{
  "status": "OK",
  "data": [
    {
      "_id": "Zw1cP6R3wrHVA0gZ",
      "name": "test3",
      "type": 2,
      "value": "asdasd"
    },
    {
      "_id": "o89r2sVwAYufiGnt",
      "name": "test",
      "type": 2,
      "value": "123"
    }
  ]
}