API reference
Access
Base address: https://trust.fed.bichart.ai. Every request needs a token:
Authorization: Bearer bct_…
- Create a token on the trust center page after signing in. It is shown once.
- A token is valid until you revoke it, or until your access to the trust center ends. There is no approval per request.
- Without a valid token every endpoint answers
401.
Endpoints
| Method and path | Returns |
|---|---|
GET /v1/documents | The package: id, title, version, date, and for each format an address, size in bytes and SHA-256 |
GET /v1/documents/{id}/{file} | 302 to the file. The link in Location works for five minutes; follow it without the Authorization header |
GET /v1/snapshots | The dates on which the package was frozen with a quarterly report |
GET /v1/snapshots/{date} | The documents of one snapshot, in the same shape as /v1/documents |
GET /v1/snapshots/{date}/{id}/{file} | 302 to the file as it was in that snapshot |
GET /v1/access/mine | What you retrieved: time, document, version, API or browser, address. Kept six months |
GET /v1/me | The address and organization the token belongs to |
Examples
# the package as JSON
curl -fsS -H "Authorization: Bearer $TOKEN" https://trust.fed.bichart.ai/v1/documents
# download one file (curl follows the redirect and drops the header for the other host)
curl -fsSL -H "Authorization: Bearer $TOKEN" -O https://trust.fed.bichart.ai/v1/documents/security-decision-record/security-decision-record.json
# every file of the current package
curl -fsS -H "Authorization: Bearer $TOKEN" https://trust.fed.bichart.ai/v1/documents \
| jq -r '.documents[].formats[].href' \
| while read -r path; do curl -fsSL -H "Authorization: Bearer $TOKEN" -O "https://trust.fed.bichart.ai$path"; done
Behaviour
- The address of a document stays the same; it always returns the current version. A snapshot never changes.
- Human-readable files (Markdown, HTML, PDF) and machine-readable files (JSON) are reached the same way.
- Every list and download is recorded with the time, the document and the address it came from.
- Errors are JSON:
{"error": "…"}with status400,401,403or404. - Limit: 20 requests per second.