{"revision":"0ed62d2c742f8e20","language":"en","entry":{"id":"log-state","kind":"endpoint","group":"log","title":"Read the directory’s log state","method":"GET","path":"/v1/log","paths":[],"summary":"Identify the active log and read the checkpoint and witness state seen by the server.","response":"origin, size, root, checkpoint, witnesses, quorum, quorumMet, freshness and consistency information. These are the server’s checks.","parameters":[],"sample":"/v1/log","access":"public","base":"directory","notes":[],"errors":["401 invalid_api_key","403 api_key_scope","403 api_key_suspended","403 developer_suspended","429 rate_limited","500 internal_error","503 busy","503 log_unavailable"],"related":[],"sections":[{"kind":"code","language":"shell","code":"curl -fsS 'https://veil.rip/v1/log'"},{"kind":"code","language":"javascript","code":"const response = await fetch(\"https://veil.rip/v1/log\");\nconst result = await response.json();"}],"verify":"Pin the expected log and witness policy for independent verification. A different log is not an interchangeable history.","live":true,"responses":[{"status":200,"contentType":"application/json","description":"origin, size, root, checkpoint, witnesses, quorum, quorumMet, freshness and consistency information. These are the server’s checks.","fields":[{"name":"origin","type":"string","description":"Log origin."},{"name":"size","type":"integer","description":"Current tree size."},{"name":"root","type":"string","description":"Signed root hash in base64."},{"name":"logSignatureOk","type":"boolean","description":"Server check of the log signature."},{"name":"rootOk","type":"boolean","description":"Server check of checkpoint consistency."},{"name":"quorum","type":"integer","description":"Required witness signatures."},{"name":"signed","type":"integer","description":"Valid witness signatures on the current size."},{"name":"of","type":"integer","description":"Number of configured witnesses."},{"name":"quorumMet","type":"boolean","description":"Whether the current checkpoint meets the quorum."},{"name":"witnesses","type":"array<object>","description":"Each row has id, name, size, signedAt (Unix seconds or null), ok, current, error, operator, kind, logo and initials."},{"name":"checkpoint","type":"string","description":"Full signed note."},{"name":"checkedAt","type":"string","description":"Server check time in ISO 8601 UTC."},{"name":"newestCosignatureAt","type":"integer | null","description":"Newest valid cosignature time in Unix seconds."},{"name":"fresh","type":"boolean","description":"Whether the checkpoint is within freshSeconds."},{"name":"freshSeconds","type":"integer","description":"Freshness threshold in seconds."},{"name":"consistency","type":"object","description":"from, fromRoot, proof, ok, firstUse, behind and error describe comparison with the accepted checkpoint."},{"name":"accepted","type":"object | null","description":"Last accepted size, root and at, plus firstSize and firstAt where its chain began."},{"name":"format","type":"integer | optional","description":"The log’s format when it is not 1: 2 for labels, bodies and the index."},{"name":"staffOrg","type":"string | optional","description":"Format 2: the token of the Veil organisation, the parameter of the index. Absent in format 1 and while the server has no Veil organisation. A browser refuses a format 2 log that does not give it."}]}],"responseObjects":[],"errorFormat":"json","errorDetails":[{"status":401,"code":"invalid_api_key","description":"The bearer credential is malformed, unknown, expired or revoked.","action":"Use an active key. To use anonymous public access, remove `Authorization` entirely. Invalid credentials never fall back automatically.","scope":"optional-api-key"},{"status":403,"code":"api_key_scope","description":"The API key lacks read or verify scope, or the endpoint does not accept bearer keys.","action":"Use the correct scope. Identity writes and key management still require a device signature.","scope":"optional-api-key"},{"status":403,"code":"api_key_suspended","description":"This API key is suspended.","action":"Ask staff to restore it; another key cannot lift an account suspension.","scope":"optional-api-key"},{"status":403,"code":"developer_suspended","description":"The owner’s API account is suspended or the owner card is unavailable.","action":"Check the owner account and any staff restriction. Creating another key does not bypass suspension.","scope":"optional-api-key"},{"status":429,"code":"rate_limited","description":"An anonymous, signed-request or API-key allowance was exceeded.","action":"Wait at least `Retry-After` seconds. Share a queue and retry budget across your workers.","scope":"common"},{"status":500,"code":"internal_error","description":"An unexpected server error occurred. Internal details are not returned.","action":"Retry reads with bounded backoff. Check write results before sending a new signed operation.","scope":"common"},{"status":503,"code":"busy","description":"The application has reached a temporary concurrency or database limit.","action":"Wait `Retry-After` seconds and retry with bounded backoff.","scope":"common"},{"status":503,"code":"log_unavailable","description":"The public log cannot currently be read, verified or used for publication.","action":"For reads, keep the result unverified and try later. Before retrying a write, read the card to check whether publication completed.","scope":"endpoint"}],"responseHeaders":[{"name":"Content-Type","value":"application/json","description":"Use the declared media type before choosing a parser."},{"name":"Date","value":"HTTP date","description":"Server time. Compare it with your clock when signing requests."},{"name":"Retry-After","value":"integer seconds, on rate_limited or busy","description":"Wait at least this long before retrying. Other 429/503 codes do not necessarily include it."}],"documentationUrl":"https://veil.rip/docs/log-state","supportsBrowserFetch":true,"browserMode":"fetch"}}