Movements
Read the movements that record changes to balances.
Paths are relative to https://api.agentpost.tools/v1/resources. Who may call explains each credential.
List movements
GET /movements
Lists movements in sequence, oldest first by default or newest first with order=desc. Filter by resource, place, holder, batch, or unit to read its history.
- Who may call: Your server, with your project’s secret key or a signed-in principal, with a user token for their own
principal:<principal>holder. - Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.movements.list(query) - Pages:
limit, 1 to 500, default 100. A feed: every answer hasnext, to send asafter. Lists has the rule.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
resourceId |
string |
No | 1–256 characters. |
placeId |
string |
No | 1–256 characters. |
holderRef |
string |
No | 1–256 characters. |
batchId |
string |
No | 1–256 characters. |
instanceId |
string |
No | 1–256 characters. |
order |
"asc" or "desc" |
No | asc is oldest first by default. desc is newest first. |
after |
integer |
No | Pass next from a page with the same order and filters. Use 0 to start; at least 0; default 0. |
limit |
integer |
No | 1–500; default 100. |
Response
200 OK, with MovementsPage.
Errors
invalid_request(400)
Any operation can also answer with the codes Conventions lists.
Get a movement
GET /movements/:id
Reads a movement. A caller constrained to one holder reads only its own.
- Who may call: Your server, with your project’s secret key or a signed-in principal, with a user token for their own
principal:<principal>holder. - Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.movements.get(id)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | Movement ID, mov_…. The id of a Movement. |
Response
200 OK, with MovementResponse.
Errors
not_found(404)
Any operation can also answer with the codes Conventions lists.
The MovementsPage object
| Name | Type | Present | Description |
|---|---|---|---|
movements |
Movement array |
Always | |
next |
number |
Always | Pass as after to continue. The last movement’s seq, or after on an empty page. |
The MovementResponse object
| Name | Type | Present | Description |
|---|---|---|---|
movement |
Movement |
Always |