Zum Inhalt springen
DeutschlandGPT

Get audit logs

Returns paginated audit logs for the enterprise workspace. Supports filtering by category, action, actor, and date range. Requires an admin API key and enterprise workspace.

GEThttps://api.deutschlandgpt.de/v2/admin/audit-logs

Example request

curl https://api.deutschlandgpt.de/v2/admin/audit-logs \
  -X GET \
  -H "Authorization: Bearer $DGPT_API_KEY"

Parameters

pageintegeroptional

Page number

page_sizeintegeroptional

Results per page

categorystringoptional

Filter by action namespace prefix — matches actions beginning with <category>. (e.g. category=api_key matches api_key.created).

actionstringoptional

Filter by action (e.g. api_key.created)

actor_idstringoptional

Filter by actor user ID

start_datestring<date>optional

Start date (ISO 8601)

end_datestring<date>optional

End date (ISO 8601)

sortstringoptional

Sort field

dirstringoptional

Sort direction

anonymizebooleanoptional

When true (default), PII fields are replaced with deterministic SHA-256 hashes. Set to false to return raw values.

Response

200application/json
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "action": "string",
      "actorEmail": "string",
      "actorId": "string",
      "targetId": "string",
      "targetLabel": "string",
      "metadata": {},
      "createdAt": "2025-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "page": 0,
    "pageSize": 0,
    "total": 0,
    "totalPages": 0
  }
}

Paginated audit logs

objectstring
dataAuditLogEntry[]
idstring
actionstring
actorEmailstring

Actor email address. SHA-256 hashed by default when anonymize=true.

actorIdstring | null

Actor user ID. Null if the actor user has been deleted.

targetIdstring | null
targetLabelstring | null

Target label (may contain PII). SHA-256 hashed by default when anonymize=true.

metadataobject | null
createdAtstring<date-time>
paginationobject
pageinteger
pageSizeinteger
totalinteger
totalPagesinteger

Response codes

200

Paginated audit logs

object
401

Unauthorized

403

Requires admin API key and enterprise workspace

Was this page helpful?