Skip to main content
POST
Write documents (upsert, patch, append, delete)

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

Returns the original response verbatim while the node still caches it. Correctness never depends on it.

Minimum string length: 1

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.

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

Body

application/json

At most 1,000 documents and 64 MB per request, across all operations.

upsert
object[]
required
Maximum array length: 1000
patch
object[]
Maximum array length: 1000
append
object[]
Maximum array length: 1000
delete
string[]
Maximum array length: 1000

Up to 128 bytes.

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

Block until every named judgment has an answer for a revision at or after the one this write created. An empty list is the same as leaving it out. The first 16 documents of the write are judged at interactive priority; the rest go to ordinary catch-up and usually come back pending (§7.3.2).

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_-]+$
wait_timeout_ms
integer
default:5000

How long wait_for waits, in milliseconds. A value above 10,000 is lowered to 10,000.

Required range: x >= 0

Response

The write is durable in object storage. With wait_for, answers are included; on timeout the write is still committed and those answers are pending, meaning only that they were not ready within the wait. A get works freshness out from the stored answer, so it can report the same answer as unavailable (never judged in this incarnation) or stale (a policy that will not judge this revision on its own).

results
object[]
required
usage
object
required

What this response billed (§6.1).