API reference
Audit events
What was done to the books and who decided it, for the whole books or one record.
Guides: See who changed what
List what was done to the books, and by whom
GET/v1/audit_events
client.auditEvents.list()
The audit trail of these books, newest first: what happened, to what,
and who decided. Narrow it to one record with subject_type and
subject_id for that record's history, and to a stretch of time with
since and until.
Parameters
| Name | Type | Description |
|---|---|---|
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
subject_typeQuery | string or null | Only what happened to records of this kind. |
subject_idQuery | string or null | An id. Which resource it names is given by the field beside it. |
actor_kindQuery | string or null | Only what a person, the system or a model did. user, system, model |
actionQuery | string or null | Only this action, e.g. |
sinceQuery | string (date-time) or null | Only what happened at or after this instant. No offset means UTC. |
untilQuery | string (date-time) or null | Only what happened before this instant. No offset means UTC. |
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_events" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
AuditEventPage
| Name | Type | Description |
|---|---|---|
currencyRequired | string | The books' currency: what every row's |
dataRequired | array of AuditEventOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
AuditEventOut
| Name | Type | Description |
|---|---|---|
actionRequired | string | What happened, dotted and past tense: |
actor_avatar_url | string or null | That member's profile picture, while they are still in the books and have one; null otherwise. |
actor_email | string or null | That member's email, while they are still in the books; null once they have left. |
actor_id | string or null | An id that starts with |
actor_kindRequired | string | Who decided: user, system, model |
amount | string or null | How much moved, in the books' currency: a posted entry's total. Null for an action that moved nothing, or whose amount is in another currency. |
assistant_conversation_id | string or null | An id that starts with |
created_atRequired | string (date-time) | |
detail | object or null | What the action recorded about itself; its shape varies. |
idRequired | string | An id that starts with |
links | array of AuditLinkOut | The other records the action touched, each with the part it played: the accounts an entry debited and credited, the account a transaction was filed to, the entry that reversed this one. |
reason | string or null | Why, in the words of whoever did it, where they gave one: a reversal's reason, a filing's note. |
request_id | string or null | The request that made the change, when one did. |
subject_idRequired | string | That record's id, prefixed for its kind. A row recorded before the record's kind took uuids names the record by its id today when it still exists, and by its old number when it does not. |
subject_label | string or null | The record as a person names it: an entry's description, a transaction's, an account's code and name, a period's month. Null for a kind with no name of its own, and for a record that is gone. |
subject_ref | string or null | What the record is opened by, where that is not its id: an entry's number, a period's |
subject_typeRequired | string | The kind of record it happened to: |
via_assistant | boolean | The change was proposed by the assistant and approved by the member named as the actor. |
AuditLinkOut
| Name | Type | Description |
|---|---|---|
label | string or null | The record as a person names it; null for a record that is gone. |
ref | string or null | What the record is opened by, where that is not its id. |
roleRequired | string | The part the record played: debit, credit, filed_to, learned_rule, reversed_by, replaced_by, from_account, to_account, matched_with, merged_into |
subject_idRequired | string | That record's id, prefixed for its kind. |
subject_typeRequired | string | The kind of record, as |