log — API reference
log — API reference
Section titled “log — API reference”The contract is declared once, on the handlers of unidpp-log, and committed as its openapi.yaml; this page renders that document.
A running service serves the same contract at /openapi.json and /openapi.yaml, and browses it live at /docs (Swagger UI). The deployment consumes 7 environment variables (x-unidpp-env-keys).
The transparency-log surface: discovery, commitment sequencing, signed tree heads, consistency proofs and receipts
Serve the discovery document.
Responses
200— The discovery document: the log identity and version, the operator public key with its key id and fingerprint, the endpoint references, the receipt-verification steps, the sequencing and enumeration invariants, and the quorum posture
POST /commitments
Section titled “POST /commitments”Sequence a subject commitment and return the signed inclusion receipt.
Request body: {{"subject": ..., "commitment": <64-character hex SHA-256 value>, "salt_ref": <unsigned integer, optional>}}
Responses
201— The commitment is sequenced and the signed inclusion receipt is stated: leaf index, Merkle path and the append-time signed tree head, verifiable against the operator public key published in the discovery document400— Invalid JSON, a missing or oversizedsubject, a commitment that is not a 64-character hex SHA-256 value, or asalt_refthat is not an unsigned integer401— An append token is configured and the request does not carry it500— The journal rejected the append (a storage failure)
GET /healthz
Section titled “GET /healthz”Liveness probe.
Responses
200— The service is serving
GET /receipt/{seq}
Section titled “GET /receipt/{seq}”Re-serve a receipt byte-identically (derived state, deterministic under journal replay).
Parameters
| Name | In | Description |
|---|---|---|
seq |
path | The sequence number of the receipt (an unsigned integer) |
Responses
200— The receipt, byte-identical to the one returned by the append that produced the sequence number400— The sequence number is not an unsigned integer404— No receipt exists for the sequence number
GET /tree/consistency
Section titled “GET /tree/consistency”The consistency proof from a pinned prefix to the current head (what lets a receipt stay valid as the tree grows).
Parameters
| Name | In | Description |
|---|---|---|
from |
query | The pinned prefix size (an unsigned integer); the proof ties that prefix to the current head |
Responses
200— The consistency proof: the old and new sizes and roots and the audit path, verifiable against a previously pinned root and the current head’s root400— A missingfrom, afromthat is not an unsigned integer, or afromlarger than the current tree size
GET /tree/head
Section titled “GET /tree/head”The latest signed tree head (append-time checkpoint, monotonic in size, byte-identical across restarts).
Responses
200— The latest signed tree head with its external RFC 3161 anchor state; for an empty log the head carries tree size zero and null timestamp, root and signature