Developers · API endpoints

Audit trail

Read the organisation’s audit trail: who changed what, when, and through which key.

Version
v1.0.0
Base URL
https://dppapi-production.up.railway.app/v1
Format
JSON · OpenAPI 3.1
FeedbackLast updated

Every change to a model, battery, passport, document or registration is written to an audit trail with a hash of the record before and after. This is the "who, when, from which source" record (Art. 78(g)), readable over the API.

Personalise the samples. Paste a test key and every snippet uses it — and your own model and passport ids.

GET/v1/audit
read scope

List audit entries

Audit entries for your organisation, newest first, a page at a time. Each holds the SHA-256 of the record before and after the change, so you can prove what a record looked like. Changes made over the API are attributed to the member who created the key.

Parameters5

  • limitintegerqueryoptional

    Page size, 1–200. Default 50.

  • cursorstringqueryoptional

    The next_cursor of the previous page. Omit for the first page.

  • entitystringqueryoptional

    Only this entity type, e.g. BatteryPassport, BatteryModel, BatteryItem, Document, ApiKey, WebhookEndpoint.

  • entity_idstringqueryoptional

    One record’s history.

  • sinceISO 8601 date-timequeryoptional

    Only entries at or after this instant.

Responses

  • 200OK — A page of audit entries.

Errors2

Response fields · 200

object
  • has_morebooleanrequired
  • next_cursorstring | nullrequired

    Pass as cursor to get the next page.

GET /v1/audit
curl "https://dppapi-production.up.railway.app/v1/audit?entity=BatteryPassport&since=2027-01-01T00%3A00%3A00Z" \-H "Authorization: Bearer $DPP_API_KEY"
200 OK · A page of audit entries.
{"data": [{"id": "cm1qe0a1b0050l70fq1w2e3r4","entity": "BatteryPassport","entityId": "cm1q8y0bq0006l70fx9y8z7w6","action": "publish","beforeHash": "1b4f0a9c2e7d5b8361f4a0c9e2d7b5a8361f4a0c9e2d7b5a8361f4a0c9e2d7b5a","afterHash": "7c9e3b1d5f2a8460e7c9b3d1f5a2e8460c7e9b3d1f5a2e8460c7e9b3d1f5a2e84","at": "2027-01-15T10:02:11.000Z"}],"has_more": true,"next_cursor": "eyJpZCI6ImNtMXE4eTBicTAwMDZsNzBmeDl5OHo3dzYifQ"}

Cookie preferences

You choose which cookies are used. You can change your choice at any time with “Cookie settings” in the footer. Privacy policy

Necessary

Always on

Needed for the site to work: your light/dark theme and this cookie choice are stored in your browser. They do not track you.

Analytics

Google Analytics 4 measures how pages are used through statistics, which helps us improve the site. If you accept, it sets cookies and measures your visit in full. If you decline, it sets no cookies, but Google may still receive technical data such as the page viewed, your browser type and IP address.

_ga, _ga_* · up to 2 years · Google