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

Dieser Artikel liegt noch nicht auf Deutsch vor und wird unten auf Englisch angezeigt.

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-Einstellungen

Sie entscheiden, welche Cookies verwendet werden. Ihre Wahl können Sie jederzeit über „Cookie-Einstellungen“ im Footer ändern. Datenschutzerklärung

Notwendig

Immer aktiv

Für den Betrieb der Website erforderlich: Ihr Hell-/Dunkel-Design und diese Cookie-Auswahl werden in Ihrem Browser gespeichert. Sie dienen nicht dem Tracking.

Analyse

Google Analytics 4 misst über Statistiken, wie Seiten genutzt werden, und hilft uns, die Website zu verbessern. Wenn Sie zustimmen, setzt es Cookies und erfasst Ihren Besuch vollständig. Wenn Sie ablehnen, setzt es keine Cookies, doch Google kann weiterhin technische Daten erhalten, etwa die aufgerufene Seite, Ihren Browsertyp und Ihre IP-Adresse.

_ga, _ga_* · bis zu 2 Jahre · Google