Skip to main content
API reference

Audit

Generated HTTP reference for the 1 operation the published OpenAPI document describes under audit.

1 min read
View MarkdownEdit on GitHub

Audit

This page is generated from the published OpenAPI document. It is complete with respect to that document and says nothing about surfaces the document does not describe yet. See what is generated here for what that means.

Base URL: https://api.codespar.dev

Every operation below requires a Bearer token. See Authentication.

GET /v1/audit/events

Browse the audit chain (alias path)

Query parameters

NameTypeRequiredDescription
before_sequenceintegernoReturns entries strictly below this sequence. Use the previous page's next_before_sequence.
event_typestringnoExact match, or a prefix match when it ends with a dot.
fromstring (date-time)noISO 8601. Defaults to seven days ago.
limitintegernoClamped to 1..200. Defaults to 50, and falls back to 50 when the value is 0 or is not a number; a negative value becomes 1.
tostring (date-time)noISO 8601. Defaults to now.

Responses

StatusBodyDescription
200objectOK
400objectBad Request, in a BARE body. invalid_before_sequence when the cursor is not a number, invalid_iso_8601 when from or to is not a date this server can parse, from_after_to when the window is inverted.

Response 200

FieldTypeRequiredDescription
eventsarray of objectyes
next_before_sequenceinteger,nullyesThe lowest sequence on this page when the page was full; null when it was not.

Example response

{
  "events": [
    {
      "sequence_number": 0,
      "event_type": "string",
      "happened_at": "2026-01-15T12:00:00.000Z",
      "payload": {},
      "prev_hash": "string",
      "entry_hash": "string"
    }
  ]
}

Example request

curl -X GET https://api.codespar.dev/v1/audit/events \
  -H "Authorization: Bearer $CODESPAR_API_KEY"
Audit | CodeSpar