Skip to main content
POST
Draw documents to label

Authorizations

Authorization
string
header
required

An organization API key. Keys carry a role (read_write or read_only) and may be restricted to a namespace prefix such as acme/*, or to one namespace such as acme/prod/tenant_1. A prefix matches on a / boundary: acme/prod/tenant_1* covers acme/prod/tenant_1 and everything under acme/prod/tenant_1/, never acme/prod/tenant_12.

Headers

Idempotency-Key
string

One key per logical request, reused only on its retries. A key belongs to one request: within your organization, the same method, path, query and body. For 24 hours after a successful response, a request with the key and the same body gets that response back verbatim, with Idempotent-Replayed: true, and runs nothing. Only a successful response is kept, so the retry of a request that failed runs again. While the first request runs or its response is kept, the key with a different request is idempotency_key_reused (422). A request sent while one with its key is still running is rate_limited with Retry-After: 1, without running: retry it to get the first one's response. In the rare case the key can't be checked, the request runs as if it had none.

Required string length: 1 - 255

Path Parameters

ns
string
required

The namespace name, with any / sent as %2F. Up to 256 bytes. / separates levels of the hierarchy, as in acme/prod/tenant_123. Never exactly . or .., which a URL path can't carry.

Required string length: 1 - 256
Pattern: ^(?!\.\.?$)[A-Za-z0-9._:/-]+$
name
string
required

A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$

Body

application/json
count
integer
default:50

How many documents to hand out at most.

Required range: 1 <= x <= 200
seed
integer<int64>
default:0

Fixes each band's random order. The same state and seed give the same items.

Required range: x >= 0

Response

The items drawn and leased; none when nothing is available.

Documents drawn from the labelling queue and leased.

judgment
string
required

A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
version
integer<int32>
required
Required range: x >= 1
engine
string | null
required
engine_version
string | null
required

The epoch drawn from. Null while the version has no answers.

seed
integer<int64>
required
Required range: x >= 0
lease_expires_at
string<date-time> | null
required

When the items go back into the queue if not labelled. Null when nothing was drawn.

items
object[]
required

Lowest band first; within a band, in the seed's order.

Maximum array length: 200