Tearleads

GET/documents/{documentId}/baseline-stages/{baselineId}

Get rotation baseline stage status

Operation documents.baselineStages.get

Description

Returns the caller's stage: the next segment index it expects, the digest of the segments staged so far, and when it expires, so a writer can resume an interrupted upload. Only the exact 404 document_baseline_stage_not_found or 409 document_baseline_stage_expired responses prove the stage is gone; any other failure means the writer keeps it.

Authentication

Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.

Parameters

NameInTypeDetails
documentIdpathstringrequired
  • pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
baselineIdpathstringrequired
  • lowercase UUID v4

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

StatusMeaningBody
400Bad Request

application/jsonErrorResponse

401Unauthorized

application/jsonSessionFailureResponse

402Payment Required

application/jsonPaymentRequiredErrorResponse

403Forbidden

application/jsonErrorResponse

404Not Found

application/jsonDocumentBaselineStageNotFoundErrorResponse

409Conflict

application/jsonDocumentBaselineStageConflictErrorResponse

500Internal Server Error

application/jsonErrorResponse

503Service Unavailable

application/jsonErrorResponse