POST/documents/pulls/query
Query read-only document pulls in batch
Operation documents.pulls.query
Description
Returns bounded read-only paginated Loro update pull pages for up to 32 unique documents in one database snapshot, sharing container path access checks, current-epoch KEK resolution, and commit LSN evaluation. Per-document existence, access, billing, or sync-state conflicts report per item while sibling documents still resolve; replica lag returns 503 for the batch, and 413 means the serialized request exceeds the document sync byte limit.
Authentication
Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.
Request body
application/jsonQueryDocumentPullsRequest
Batch request for up to 32 pure read-only paginated document pulls.
1 field
- 1 to 32 items
Unique document pull requests evaluated in one shared snapshot.
Responses
200 OK
application/jsonQueryDocumentPullsResponse
Batched read-only document pull responses in request order.
1 field
- 1 to 32 items
Per-document pull response or failure in request order.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 413 | Serialized document pull batch requests are limited to 16777216 bytes |
|
| 500 | Internal Server Error |
|
| 503 | Service Unavailable |
|
Additional rules
The server also enforces these rules, which the schema above cannot express.
Items must not repeat a
documentId.historyMode"raw" requireslocalVersionVectorto be null so the complete retained history is requested.processedThroughUpdateIdrequires a non-nulllocalVersionVector, so a raw-history pull carries none.Results must not repeat a
documentId.baselineIdandbaselineSegmentIndexmust be absent together or both present;baselineSegmentCountandbaselineSegmentsDigestappear only together and only with them, marking a baseline's final segment; only a final segment may carrycoversThroughUpdateId.commitLsnMode"untracked" requires thecommitLsn"0/0" sentinel.commitLsn"0/0" requirescommitLsnMode"untracked" in the same response.pullPage.hasMoreis true exactly whenpullPage.nextCursoris non-null.pullPage.throughUpdateIdis null exactly whenpullPage.throughUpdateCountis 0.contentKeyBundlescarries each content-key epoch at most once.