Slots
See how much capacity is held, taken, or free in each time bucket for a resource.
Paths are relative to https://api.agentpost.tools/v1/resources. Who may call explains each credential.
List slots
GET /slots
Lists the buckets that start in [from, to) for one resource and have capacity or claims. Each gives its local time in the resource’s bucket time zone, its capacity, what is taken and held, and what is free, never below 0. Send placeId for a resource kept by place, and condition to select a label there. Omitting condition selects the unlabeled scope. On a resource with identity: instance, send the unit’s instanceId: each bucket holds the unit or nothing. A bucket over capacity is listed with its claims’ total above its capacity. A hold past its expiry no longer counts. At most 2,000 buckets per request.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.slots.list(query)
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
resourceId |
string |
Yes | 1–256 characters. |
placeId |
string |
No | 1–256 characters. |
condition |
string |
No | 1–64 characters. |
instanceId |
string |
No | 1–256 characters. |
from |
string |
Yes | An ISO 8601 date and time. |
to |
string |
Yes | An ISO 8601 date and time. |
Response
200 OK, with SlotsResponse.
Errors
invalid_request(400)not_found(404)
Any operation can also answer with the codes Conventions lists.
The SlotsResponse object
| Name | Type | Present | Description |
|---|---|---|---|
slots |
Slot array |
Always |
The Slot object
One bucket a claim can take, or one over capacity, with what it holds and what is free. A bucket with no capacity is not a slot unless claims are still in it. Where a daylight-saving change repeats an hour, both of its buckets are slots with the same local time.
| Name | Type | Present | Description |
|---|---|---|---|
start |
string |
Always | An ISO 8601 date and time. |
end |
string |
Always | An ISO 8601 date and time. |
timeZone |
string |
Always | The resource’s bucket time zone. |
local |
object |
Always | Where the slot starts, on the local calendar and clock. |
local. |
string |
Always | |
local. |
string |
Always | |
capacity |
number |
Always | What the schedule gives the bucket. |
taken |
number |
Always | What bookings took. |
held |
number |
Always | What holds not past their expiry hold. |
available |
number |
Always | Capacity less what is held and taken, and never below 0: the bucket is over capacity when taken and held come to more than capacity. |