Skip to main content
POST
/
rule
/
create
create a game rule
curl --request POST \
  --url http://localhost:3917/rule/create \
  --header 'Content-Type: application/json' \
  --data '
{
  "actions": [
    "<string>"
  ],
  "filter": "<string>",
  "when": "<string>"
}
'
{
  "ok": true,
  "rule_id": 0,
  "when": "health-below:50"
}

Body

application/json

Request body for POST /rule/create.

actions
string[]
required

Actions to run when the condition fires.

filter
string
required

Entity selector the rule applies to, e.g. "any" or "team:1".

when
string
required

Trigger condition, e.g. "health-below:50".

Response

200 - application/json

Rule registered.