PUT/documents/{documentId}/baseline-stages/{baselineId}/segments/{segmentIndex}/write-header
Re-sign a staged segment's write header
Operation documents.baselineStages.segments.resign
Description
Replaces a staged segment's signed write header without uploading its ciphertext again, for a writer whose staged headers name a manifest, key-target set or signing key that has since changed. The new header must sign the same content record, metadata and ciphertext hashes at the stage's epoch. The stage's byte count moves by the difference between the two headers, and a header that would take it past the stage's bound returns 409 document_baseline_stage_too_large.
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
|
baselineId | path | string | required
|
segmentIndex | path | integer | required
|
Request body
application/jsonDocumentBaselineStageWriteHeaderRequest
A staged segment's write header signed again, for the same ciphertext.
1 field
writeHeaderobject with any fieldsrequiredThe new signed write header. It must name the staged segment's content record, metadata hash, ciphertext hash and nonce domain at the stage's epoch.
Other fields are allowed.
Responses
200 OK
application/jsonDocumentBaselineStageStatusResponse
A rotation baseline stage as the server holds it.
7 fields
baselineIdstringrequired- lowercase UUID v4
The staged baseline's id.
contentKeyCommitmentstringrequired- exactly 64 characters
- lowercase hexadecimal
Commitment of the content key the stage is for.
contentKeyEpochintegerrequired- greater than 0
Content-key epoch the stage is for.
expiresAtstringrequired- not empty
When the stage expires unless another segment or header arrives first, as an ISO 8601 instant.
nextSegmentIndexintegerrequired- 0 to 4,095
Index the next staged segment must carry, and the index of the final segment a rotating request sends to commit the stage now.
segmentsDigeststringrequired- exactly 64 characters
- lowercase hexadecimal
The baseline digest over the segments staged so far: what a final segment sent now must sign as
baselineSegmentsDigest.stagedBytesintegerrequired- at least 0
Bytes the stage stores so far: each staged segment's ciphertext, signed vectors, plaintext hash and write header. A stage holds at most 1 GiB.
Other fields are allowed.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 402 | Payment Required |
|
| 403 | Forbidden |
|
| 404 | Not Found |
|
| 409 | Conflict |
|
| 413 | A serialized write header request is limited to 524288 bytes |
|
| 500 | Internal Server Error |
|
| 503 | Service Unavailable |
|