API reference

Queue

Queued tasks per label set, which worker factories poll to start instances.

GET/v1/ci/queue/depth

Get the queue depth

Queued tasks per label set, what factories poll.

Permission: ci:queue.read

Parameters

NameTypeRequiredDescription
factoryquerystringOptional
soon_secsquerystringOptional
wait_secsquerystringOptional

Response200 OK

rowsarray of objectsRequired
rows[].expected_ms_suminteger or null
the queued tasks' expected_ms summed: the row's work in time, what a factory starts members by; absent from an older cell, whose rows keep the count rule
rows[].labelsmap of stringRequired
rows[].oldest_created_atstring (date-time) or null
rows[].queuedintegerRequired
rows[].requestedobject or null
what the queued tasks of this row ask for together and at most; absent from an older cell
rows[].requested.maxobjectRequired
what a worker has (its capacity, advertised at registration) or has left (free, in every poll and heartbeat): the same four axes as Resources, every one present. disk_bytes and tmp_bytes are the volumes' free space minus the worker's floors
rows[].requested.max.cpusintegerRequired
rows[].requested.max.disk_bytesintegerRequired
rows[].requested.max.memory_bytesintegerRequired
rows[].requested.max.tmp_bytesintegerRequired
rows[].requested.sumobjectRequired
what a worker has (its capacity, advertised at registration) or has left (free, in every poll and heartbeat): the same four axes as Resources, every one present. disk_bytes and tmp_bytes are the volumes' free space minus the worker's floors
rows[].requested.sum.cpusintegerRequired
rows[].requested.sum.disk_bytesintegerRequired
rows[].requested.sum.memory_bytesintegerRequired
rows[].requested.sum.tmp_bytesintegerRequired
rows[].sooninteger or null
queued tasks not yet ready whose every unfinished dependency is leased or running, expected to end within soon_secs and unlikely to fail: work a member started now would be ready for; absent from an older cell
rows[].soon_ms_suminteger or null
their expected_ms summed
rows[].truststringRequired
tiers, with no order on purpose (amendment 2026-10-27): trusted_ci is protected-branch automation and the cache writer every tier reads, trusted_interactive a person's own work, and neither is "below" the other, so every rule over tiers names the tiers it meansOne of untrusted, trusted_ci, trusted_interactive
running_endsarray of objects or null
with ?factory=: each task leased or running on that factory's online workers whose process has not ended, what the start rule forecasts freed slots from; absent without it and from an older cell
running_ends[].left_msintegerRequired
running_ends[].slotsintegerRequired
running_ms_leftinteger or null
with ?factory=: the expected time left, in milliseconds, of the tasks leased or running on that factory's workers; absent without it and from an older cell
curl "$CIRESK_API/v1/ci/queue/depth" \
  -H "Authorization: Bearer $CIRESK_KEY"