Authorization header. A personal access token (pat_) also needs the X-Anyreach-Org header. See Authentication.
List agents and workflows
GET /core/agents and GET /workflow/workflows each have two modes.
A
cursor can’t be combined with sort or offset. The request is rejected with 400.Sorting
The default sort is
created_at, newest first. Rows with no value sort last in either direction. Every sort ends with the id, so pages never overlap or skip a row.
Filters
The
labels parameter is a URL-encoded JSON object. Each key maps to a value, a list of values, or null:
Paging and the total
The total is counted only on the first page, so request
offset=0 first when you need it.
labels object:
Collect every matching id
To act on everything a filter matches, page through the ids instead of the full rows:
They take the same
search, sort, dir, labels and filter parameters as the lists, plus offset and limit (up to 1,000, the default). Ids come back in list order. Page until you have total ids. A page past the end is empty, with the current total.
Label many entities at once
PATCH /core/agents/labels and PATCH /workflow/workflows/labels apply one change to up to 500 entities:
At least one of
set, add, remove or clear is required. They apply in the order clear, set, add, remove. The response is { "updated": N }, the number of entities whose labels changed.
Labelling agents needs agents:manage; labelling workflows needs workflows:manage. A value that the key doesn’t allow, or an unknown key, is rejected with 400 and nothing changes.
Manage label keys
Label keys live under/core/label-keys. Reading them needs read access to agents or workflows; every change needs agents:manage.
Removing values that are in use
APATCH whose values list drops a value some agent or workflow still uses is refused with 409, and nothing changes:
?force=true to remove those values from every agent, workflow and saved view and save the new list. The whole edit happens in one transaction: it applies completely or not at all, and a label write arriving at the same moment waits for it.

