API reference
Audit archive
The audit trail's sealed segments, each downloadable for a short time.
- GET
/v1/audit_archiveList the archived segments of the audit trail - GET
/v1/audit_archive/{sequence}/linkGet a short-lived link to one archived segment
Guides: See who changed what
List the archived segments of the audit trail
GET/v1/audit_archive
client.auditArchive.list()
The archived segments of these books' audit trail, newest first — those whose bytes have landed. Each names its hash and the hash of the one before, so the chain can be checked against the files themselves.
Parameters
| Name | Type | Description |
|---|---|---|
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/audit_archive" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Get a short-lived link to one archived segment
GET/v1/audit_archive/{sequence}/link
client.auditArchive.link()
A short-lived link to read one segment of the archive.
Parameters
| Name | Type | Description |
|---|---|---|
sequencePath · Required | integer |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/audit_archive/{sequence}/link" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
AuditArchiveSegmentPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of AuditArchiveSegmentOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
AuditArchiveLink
| Name | Type | Description |
|---|---|---|
sha256Required | string | What the bytes behind the link hash to. |
urlRequired | string | A signed link to the segment's JSON lines; it expires. |
AuditArchiveSegmentOut
| Name | Type | Description |
|---|---|---|
event_countRequired | integer | How many audit rows it holds. |
first_audit_idRequired | string | The lowest audit row id it holds. |
last_audit_idRequired | string | The highest audit row id it holds. |
previous_sha256Required | string or null | The hash of the segment before; null for the first. |
sequenceRequired | integer | The segment's place in the chain, from 1. |
sha256Required | string | The hash of the segment's bytes. |
written_atRequired | string (date-time) | When the segment's bytes landed in the archive. |