Endpoints
Upload lifecycle
1
Create an upload intent
Send a The
POST to the trust uploads endpoint with the release subject, attachment category, format metadata, and declared digest. The bibliotheca returns an uploadId and opaque upload instructions.201 Created response mirrors the schema-backed intent record, including the bound subject, attachment metadata,
declared digest, upload instructions, expiration time, and intent state:2
Upload the attachment bytes
PUT the raw attachment bytes to the
upload.url returned in step 1. Include any headers specified in upload.headers.3
Finalize the upload
Call the finalize endpoint with the The
uploadId. The bibliotheca verifies the digest, validates subject binding, and makes the attachment available through trust discovery.201 Created response includes the finalized attachment identity, bound subject, artifact digest, status, and detail
URL:Upload intent request fields
object
required
The release subject this attachment is bound to. Must match the release’s published identity exactly.
object
required
Metadata describing the trust attachment you are uploading.
string
required
sha256:<hex> digest of the attachment bytes you will upload. The bibliotheca verifies the uploaded bytes match this value during finalize.integer
Optional declared byte length of the attachment.
Idempotency
Pass anIdempotency-Key header or a idempotencyKey body field (not both, or they must match exactly) to make the intent creation idempotent.
409 Conflict with the idempotency-conflict problem type.
Upload intent state lifecycle
The http-put upload profile
Every write-capable v0.1 bibliotheca that supports trust attachment uploads must implement the http-put upload profile:
upload.instructionType = "http-put"upload.urlis the opaque byte-transfer targetupload.methodis"PUT"when present; default toPUTwhen omittedupload.headerscontains headers you must include on the PUT request
What the bibliotheca verifies at finalize
During finalize, the bibliotheca:- Verifies the uploaded bytes match the
declaredDigest(anddeclaredSizewhen provided) - Validates the release-subject binding — the attachment must bind to the intended release
- Checks attachment metadata consistency
- Confirms the caller remains authorized
After finalization
After a successful finalize, the attachment appears in the trust detail view withstatus.state = "active". From that point on, the attachment follows the same append-only lifecycle as all trust attachments — it can transition to revoked, superseded, or invalid, but it is never deleted.
Trust attachments are append-only. Previously published attachments are never silently replaced or
deleted — they remain in the append-only record and are represented through status metadata
changes.