Attestra
Endpoints

Attestation

Read an attestation back out of the target chain's own storage.

GET /v1/attestation/{did}/{credentialId}

This endpoint reads an attestation back out of the target chain's own storage, so a caller can confirm that a push actually landed rather than take Attestra's word for it. It is the endpoint to reach for after a POST /v1/push returns 502: a 502 from push does not mean the write failed, only that the oracle could not confirm it, so read the record back from the chain and decide from that.

Read-back is implemented by Hyperledger Fabric only. Neither eIDChain nor Ethereum implement the reader this endpoint needs, so ?chain=eid and ?chain=ethr both return 501. That is why the endpoint defaults to chain=fabric.

Parameters

NameInRequiredDefaultDescription
didpathyesThe subject DID of the attestation.
credentialIdpathyesThe credential hash to read back.
chainquerynofabricThe chain to read from. Only fabric is implemented.

Request

curl "https://<host>/v1/attestation/did:eid:4tARKz6hK5GuWr9fkdzsG1Bf9X3b3agzh7RPBdjdpLWapHRh/0xfb898d4079eed14603bbca2a245278b45af1d2acad278c6c690e067bc9eaae2c?chain=fabric" \
  -H "Authorization: Bearer idc_live_..."

Response

{
  "did": "did:eid:...",
  "credentialId": "0x...",
  "credType": "KYCVerified",
  "issuer": "0x...",
  "status": "valid",
  "sourceChain": "eid",
  "issuedAt": 1751360400,
  "expiresAt": 1751360700,
  "nonce": "0x...",
  "signature": "0x...",
  "exists": true
}

This type, unlike the signed attestation returned by Status, is JSON-tagged: its keys are lowercase, and nonce here really is a hex string, not an array of 32 numbers.

exists is always true on a returned record. This path never reports absence as exists: false; client code must not branch on this field. Absence is reported as an error instead, for a specific reason: a failed read and a genuinely absent record are indistinguishable at this seam, so the response uses distinct status codes rather than a boolean, described below.

Status codes

CodeMeaning
200The attestation was read back successfully; exists is true.
400Unknown chain in the chain parameter. The caller's mistake.
501That chain does not implement read-back (eid or ethr).
502The read failed. This is used instead of 404, because absence and an unreachable chain cannot be told apart here: a 404 would assert "this chain does not hold this fact," when the truth may only be "this chain did not answer."

On this page