API Reference

Evidence & signatures

Download evidence objects by SHA-256 digest, read execution attestations, and verify signatures.

CiteArk evidence objects and execution attestations are both content-addressed. The digest path parameter of both endpoints is 64 lowercase hex characters (without the sha256: prefix); malformed digests return 400.

Authentication

  • Objects and attestations of public repositories are directly accessible without signing in.
  • Objects and attestations of private repositories require a browser session or x-api-key with read permission; otherwise 403.

GET /api/objects/{digest}

Download evidence, or objects whose license permits redistribution, by content digest. Paper PDFs whose license does not allow redistribution can only be downloaded by the owner / organization members; everyone else gets 451 {"error": "the paper license does not allow CiteArk to redistribute it; please visit the original source"}.

Example

curl -OJ https://citeark.com/api/objects/<64-char-hex-digest>

Response

200 returns a binary stream with headers:

HeaderDescription
content-typeThe object's original mediaType
content-lengthLength in bytes
content-dispositionattachment, with filename <hex>.pdf or <hex>.bin
etag"<hex>", identical to the digest
x-content-sha256sha256:<hex>; can be used to verify download integrity
x-content-type-optionsnosniff
cache-controlPublic objects: public, max-age=31536000, immutable; private objects: private, no-store

Conditional requests with If-None-Match are supported: when the ETag matches, returns 304.

Errors

CodeMeaning
400Invalid digest format
403No permission to read this object
404Object does not exist
451Paper license does not allow redistribution
502Object integrity check failed

GET /api/attestations/{digest}

Read the execution attestation of a run by statement digest; the server re-verifies the signature.

Example

curl https://citeark.com/api/attestations/<64-char-hex-digest>

Response

200 returns { "attestation": { ... }, "verified": true, "verificationMethod": "…" }:

FieldDescription
attestation.statementDigestStatement digest (sha256: prefixed)
attestation.nodeIdSigning node ID
attestation.keyIdSigning key ID
attestation.algorithmed25519 / ecdsa-p256 / pending
attestation.signatureSignature value
attestation.publicKeyPemSigning public key (PEM)
attestation.statementThe signed statement content
attestation.signedAtSigning time (ISO 8601)
attestation.transparencyLogTransparency Log position: index, entryDigest, previousEntryDigest
verifiedResult of the server's live signature verification
verificationMethodAlways ECDSA P-256 over CiteArk canonical JSON
{
  "attestation": {
    "statementDigest": "sha256:…",
    "nodeId": "…",
    "keyId": "…",
    "algorithm": "ecdsa-p256",
    "signature": "…",
    "publicKeyPem": "…",
    "statement": { "…": "…" },
    "signedAt": "…",
    "transparencyLog": { "index": 12, "entryDigest": "sha256:…", "previousEntryDigest": "sha256:…" }
  },
  "verified": true,
  "verificationMethod": "ECDSA P-256 over CiteArk canonical JSON"
}

Caching: public repositories public, max-age=300; private repositories private, no-store.

Errors

CodeMeaning
400Invalid digest format
403No permission to read this attestation
404Attestation does not exist

Notes

  • Both x-content-sha256 and the ETag come from the digest registered when the server stored the object. After downloading, you can recompute the SHA-256 yourself and compare, confirming that transfer and storage were not tampered with.
  • The attestation's verified field is the server's verification result; for independent verification, extract publicKeyPem, signature, and statement and verify the signature yourself.