Skip to content

List States

GET/states

List all states, optionally filtered by query parameters.

Query ParametersExpand Collapse
agent_id: optional string

Agent ID

limit: optional number

Limit

minimum1
order_by: optional string

Field to order by

order_direction: optional string

Order direction (asc or desc)

page_number: optional number

Page number

minimum1
task_id: optional string

Task ID

ReturnsExpand Collapse
id: string

The task state’s unique id

agent_id: string
created_at: string

The timestamp when the state was created

formatdate-time
state: map[unknown]
task_id: string
updated_at: optional string

The timestamp when the state was last updated

formatdate-time

List States

curl http://localhost:5003/states \
    -H "Authorization: Bearer $AGENTEX_SDK_API_KEY"
[
  {
    "id": "id",
    "agent_id": "agent_id",
    "created_at": "2019-12-27T18:11:19.117Z",
    "state": {
      "foo": "bar"
    },
    "task_id": "task_id",
    "updated_at": "2019-12-27T18:11:19.117Z"
  }
]
Returns Examples
[
  {
    "id": "id",
    "agent_id": "agent_id",
    "created_at": "2019-12-27T18:11:19.117Z",
    "state": {
      "foo": "bar"
    },
    "task_id": "task_id",
    "updated_at": "2019-12-27T18:11:19.117Z"
  }
]