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

Bu makale İngilizce olarak mevcuttur.

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"}

Çerez tercihleri

Hangi çerezlerin kullanılacağını siz seçersiniz. Tercihinizi istediğiniz zaman alt bilgideki “Çerez ayarları”ndan değiştirebilirsiniz. Gizlilik politikası

Gerekli

Her zaman açık

Sitenin çalışması için gereklidir: açık/koyu tema seçiminiz ve bu çerez tercihiniz tarayıcınızda saklanır. Sizi izlemek için kullanılmazlar.

Analitik

Google Analytics 4, sayfaların nasıl kullanıldığını istatistiklerle ölçer ve siteyi iyileştirmemize yardımcı olur. Kabul ederseniz çerez bırakır ve ziyaretinizi tam olarak ölçer. Reddederseniz çerez bırakmaz, ancak Google yine de görüntülenen sayfa, tarayıcı türü ve IP adresi gibi teknik veriler alabilir.

_ga, _ga_* · en çok 2 yıl · Google