Skip to main content
POST
/
assert
/
create
define a new assertion
curl --request POST \
  --url http://localhost:3917/assert/create \
  --header 'Content-Type: application/json' \
  --data '
{
  "condition": "entity-count",
  "filter": "role:hero",
  "min": 1,
  "name": "hero-exists",
  "severity": "error"
}
'
{
  "entity_id": 5,
  "name": "hero-exists",
  "ok": true
}

Body

application/json

A name, a condition (shorthand string or structured object), and an optional severity.

The body is of type any.

Response

200 - application/json

Assertion entity created; returns its entity_id. Returns ok:false with an error when name or condition is missing or invalid.