GET/documents/{documentId}/writer-projection
Get a document writer projection
Operation documents.writerProjection.get
Description
Returns everything a client needs to read and write a document: its document link-set manifest history, the authorizing container paths with their KEK wraps and keyrings, and the key targets. Requires current read access; write authority is checked again when a write commits. A vanished container is reported as 409, never 404, because 404 here means the document itself was deleted.
Authentication
Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
documentId | path | string | required |
x-known-manifests | header | string | optional
Comma-separated typed digests the device holds verified: m:<manifest hash> for an access-manifest bundle, k:<level digest> for a container KEK level; at most 48, unique |
Responses
200 OK
application/jsonDocumentWriterProjectionWireResponse
A document writer projection: its link-set history, authorizing container paths with KEK levels, and key targets. Every manifest is carried once in bundles and cited by hash.
12 fields
Signed manifest bundles keyed by manifest hash.
omittedBundleslist of stringrequired- each item: not empty
Cited hashes left out because the request said the client holds them.
Public principal policy history the cited manifests depend on.
authorizingContainerPathslist of objectrequired- at least 1 item
Each linked container's path from the root, with one KEK level per manifest.
4 fields
containerIdstringrequired- object
12 fields
accessManifestHashstringrequired- not empty
containerIdstringrequiredcontainerKeyEpochintegerrequired- greater than 0
containerKeyEpochIdstringrequired- not empty
containerManifestHistorylist of stringrequired- each item: not empty
keyEpochobject with any fieldsrequiredkeyEpochHashstringrequired- not empty
keyTargetHashstringrequired- not empty
parentContainerKeyEpochIdstringrequirednullablerecipientTargetslist of object with any fieldsrequired- at least 1 item
wrapslist of object with any fieldsrequired- at least 1 item
Other fields are allowed.
organizationIdstringrequiredpathlist of stringrequired- at least 1 item
- each item: not empty
Other fields are allowed.
contentKeyBundleStalebooleanoptional- always
true
Present only when the stored content-key bundle targets superseded KEKs and must be rewrapped.
- always
documentContainerManifestHistorylist of stringrequired- each item: not empty
documentIdstringrequireddocumentManifeststringrequired- not empty
Hash of the current document link-set manifest.
documentManifestContainerPathslist of list of stringrequired- each item: each item: not empty
documentManifestHistorylist of stringrequired- each item: not empty
Hashes of earlier document link-set manifests.
Other fields are allowed.
202 Accepted
application/jsonPrincipalHistoryPreparationResponse
A 202: the operation rolled back while the server prepares principal history. Retry the identical request.
3 fields
codestringrequired- always
principal_history_preparation_pending
- always
committedbooleanrequired- always
false
- always
progressTokenstringrequired- exactly 64 characters
- lowercase hexadecimal
Changes when preparation advances; clients stop after three identical tokens in a row.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 403 | Forbidden |
|
| 404 | Not Found |
|
| 409 | Conflict |
|
| 500 | Internal Server Error |
|
| 503 | Service Unavailable |
|
Additional rules
The server also enforces these rules, which the schema above cannot express.
containerKeksmust contain exactly one entry for every manifest in path.A container response keyring is null exactly for container key epoch 1.
Every cited manifest hash names one bundles entry, every bundles key equals its bundle's
manifestHash, and every bundle is cited.X-known-manifests must list at most 48 unique typed digests, each m: or k: followed by a lowercase SHA-256 hex digest.