Read the chain of statements
Page through a card's counted staff statements after the first page in index.statements.
/v1/identities/{n}/statements- Access
- Public; API key optional
- Client
- Browser fetch supported
Parameters#
| Name | Location | Meaning |
|---|---|---|
nRequired | Path | Permanent positive card number. |
fromRequired | Query | The log position to start from: prev of the last statement of the page before. |
sizeRequired | Query | The size of the checkpoint the card's index bundle is about: the inclusion proofs are in that tree. |
Request examples#
curl -fsS 'https://veil.rip/v1/identities/1/statements?from=11&size=412'const response = await fetch("https://veil.rip/v1/identities/1/statements?from=11&size=412");
const result = await response.json();Response#
statements is ordered newest first. Follow statementsNext until it is null.
| Field | Type | Meaning |
|---|---|---|
n | integer | The card number. |
statements | array<StatementEntry> | Up to 200 statement entries, each with i, entry, inclusion and an optional by. |
statementsNext | string | null | The URL of the next page; null ends the chain. |
size | integer | The tree size of the inclusion proofs. |
Expand a nested object for its fields. Types ending in null allow a null value; optional fields may be absent. Other fields are present in that object.
Statement entry StatementEntry
| Field | Type | Meaning |
|---|---|---|
i | integer | The entry’s position in the log. |
entry | string | The entry text as the log holds it, signature included. |
inclusion | array<string> | Inclusion proof in hex, deepest sibling first, on the checkpoint of the card’s index bundle. |
by | integer, optional | Card number of the staff member who signed. A hint for display: the signer in the entry is what counts. |
Response headers#
| Header | Value | Meaning |
|---|---|---|
Content-Type | application/json | Use the declared media type before choosing a parser. |
Date | HTTP date | Server time. Compare it with your clock when signing requests. |
Retry-After | integer seconds, on rate_limited or busy | Wait at least this long before retrying. Other 429/503 codes do not necessarily include it. |
What to verify#
Each entry is included in the tree of size entries the card's checkpoint verified, is a statement about the card, and its prev is the i of the next one.
Usage notes#
- Only on a log in format 2 (GET /v1/log says format 2). A log in format 1 answers 400 wrong_format.
Errors#
API errors return an error object. Use error.code for program logic; error.message is English text for people and can change. Response and error guide
| HTTP | Code | Meaning and next step |
|---|---|---|
| 400 | invalid_parameter | A path, query or body field is missing, malformed or outside its accepted range. Correct the field named in |
| 400 | wrong_format | The request or the read belongs to the other log format than this server’s: a v1 record on a format 2 log, or a format 2 read on a format 1 log. Read |
| 404 | not_found | The requested card, key, alias, code or resource was not found. Check the identifier. Temporary codes and previews may already have expired or been used. |
| 503 | log_unavailable | The public log cannot currently be read, verified or used for publication. For reads, keep the result unverified and try later. Before retrying a write, read the card to check whether publication completed. |
When using an optional API key
| HTTP | Code | Meaning and next step |
|---|---|---|
| 401 | invalid_api_key | The bearer credential is malformed, unknown, expired or revoked. Use an active key. To use anonymous public access, remove |
| 403 | api_key_scope | The API key lacks read or verify scope, or the endpoint does not accept bearer keys. Use the correct scope. Identity writes and key management still require a device signature. |
| 403 | api_key_suspended | This API key is suspended. Ask staff to restore it; another key cannot lift an account suspension. |
| 403 | developer_suspended | The owner’s API account is suspended or the owner card is unavailable. Check the owner account and any staff restriction. Creating another key does not bypass suspension. |
Shared request errors
| HTTP | Code | Meaning and next step |
|---|---|---|
| 429 | rate_limited | An anonymous, signed-request or API-key allowance was exceeded. Wait at least |
| 500 | internal_error | An unexpected server error occurred. Internal details are not returned. Retry reads with bounded backoff. Check write results before sending a new signed operation. |
| 503 | busy | The application has reached a temporary concurrency or database limit. Wait |