Audit logs
Audit logs: 10 operations, tagged audit-logs in the OpenAPI document.
| Method | Path | Summary |
|---|---|---|
GET |
/api/audit-logs |
List audit logs with filters |
GET |
/api/audit-logs/application-ids |
Distinct application ids |
POST |
/api/audit-logs/batch |
Ingest a batch of audit log entries (SDK) |
GET |
/api/audit-logs/client-ids |
Distinct client ids |
GET |
/api/audit-logs/entity-types |
Distinct entity types |
GET |
/api/audit-logs/entity/{entityType}/{entityId} |
Audit logs for a specific entity |
GET |
/api/audit-logs/operations |
Distinct operations |
GET |
/api/audit-logs/principal/{principalId} |
Audit logs for a specific principal |
GET |
/api/audit-logs/recent |
List recent audit logs (alias for list) |
GET |
/api/audit-logs/{id} |
Get an audit log by id |
Operations
Section titled “Operations”GET /api/audit-logs
Section titled “GET /api/audit-logs”List audit logs with filters
Operation ID: listAuditLogs
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
after |
query | string | no | Opaque cursor from a previous page’s nextCursor |
pageSize |
query | integer (int64) | no | Page size (default 50, capped at 200) |
entityType |
query | string | no | |
entityId |
query | string | no | |
principalId |
query | string | no | |
operation |
query | string | no | |
applicationIds |
query | string | no | CSV of application ids |
clientIds |
query | string | no | CSV of client ids |
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogListResponse |
default |
Error | application/json ErrorModel |
GET /api/audit-logs/application-ids
Section titled “GET /api/audit-logs/application-ids”Distinct application ids
Operation ID: auditLogApplicationIDs
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogApplicationIDsResponse |
default |
Error | application/json ErrorModel |
POST /api/audit-logs/batch
Section titled “POST /api/audit-logs/batch”Ingest a batch of audit log entries (SDK)
Requires platform:admin:batch:audit-logs-write. At most 100 items. Partial success: each item reports, in its own results slot and in order, SUCCESS (with the new id), BAD_REQUEST (principalId missing, applicationCode naming no application, or an application not permitted for an application-scoped credential) or FORBIDDEN (a clientCode naming a client the credential does not reach, or, for a credential that is not an anchor, naming no client). An anchor’s clientCode that names no client is stored platform-scoped, as on the events batch. An item is never dropped without a refusal: SKIPPED is no longer answered.
Operation ID: batchIngestAuditLogs
Request body (required)
| Content type | Schema |
|---|---|
application/json |
AuditBatchRequest |
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditBatchResponse |
default |
Error | application/json ErrorModel |
GET /api/audit-logs/client-ids
Section titled “GET /api/audit-logs/client-ids”Distinct client ids
Operation ID: auditLogClientIDs
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogClientIDsResponse |
default |
Error | application/json ErrorModel |
GET /api/audit-logs/entity-types
Section titled “GET /api/audit-logs/entity-types”Distinct entity types
Operation ID: auditLogEntityTypes
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogEntityTypesResponse |
default |
Error | application/json ErrorModel |
GET /api/audit-logs/entity/{entityType}/{entityId}
Section titled “GET /api/audit-logs/entity/{entityType}/{entityId}”Audit logs for a specific entity
Operation ID: auditLogsByEntity
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
entityType |
path | string | yes | |
entityId |
path | string | yes |
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogListResponse |
default |
Error | application/json ErrorModel |
GET /api/audit-logs/operations
Section titled “GET /api/audit-logs/operations”Distinct operations
Operation ID: auditLogOperations
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogOperationsResponse |
default |
Error | application/json ErrorModel |
GET /api/audit-logs/principal/{principalId}
Section titled “GET /api/audit-logs/principal/{principalId}”Audit logs for a specific principal
Operation ID: auditLogsByPrincipal
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
principalId |
path | string | yes |
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogListResponse |
default |
Error | application/json ErrorModel |
GET /api/audit-logs/recent
Section titled “GET /api/audit-logs/recent”List recent audit logs (alias for list)
Operation ID: listAuditLogsRecent
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
after |
query | string | no | Opaque cursor from a previous page’s nextCursor |
pageSize |
query | integer (int64) | no | Page size (default 50, capped at 200) |
entityType |
query | string | no | |
entityId |
query | string | no | |
principalId |
query | string | no | |
operation |
query | string | no | |
applicationIds |
query | string | no | CSV of application ids |
clientIds |
query | string | no | CSV of client ids |
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogListResponse |
default |
Error | application/json ErrorModel |
GET /api/audit-logs/{id}
Section titled “GET /api/audit-logs/{id}”Get an audit log by id
Operation ID: getAuditLog
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | yes |
Responses
| Status | Description | Body |
|---|---|---|
200 |
OK | application/json AuditLogResponse |
default |
Error | application/json ErrorModel |
Schemas
Section titled “Schemas”AuditBatchItem
Section titled “AuditBatchItem”| Field | Type | Required | Description |
|---|---|---|---|
applicationCode |
string | no | |
clientCode |
string | no | |
entityId |
string | yes | |
entityType |
string | yes | |
operation |
string | yes | |
operationData |
any | no | |
performedAt |
string | no | |
principalId |
string | yes |
AuditBatchRequest
Section titled “AuditBatchRequest”| Field | Type | Required | Description |
|---|---|---|---|
items |
AuditBatchItem[] |
yes |
AuditBatchResponse
Section titled “AuditBatchResponse”| Field | Type | Required | Description |
|---|---|---|---|
results |
AuditBatchResult[] |
yes |
AuditBatchResult
Section titled “AuditBatchResult”| Field | Type | Required | Description |
|---|---|---|---|
error |
string | no | |
id |
string | yes | |
status |
string | yes |
AuditLogApplicationIDsResponse
Section titled “AuditLogApplicationIDsResponse”| Field | Type | Required | Description |
|---|---|---|---|
applicationIds |
string[] | yes |
AuditLogClientIDsResponse
Section titled “AuditLogClientIDsResponse”| Field | Type | Required | Description |
|---|---|---|---|
clientIds |
string[] | yes |
AuditLogEntityTypesResponse
Section titled “AuditLogEntityTypesResponse”| Field | Type | Required | Description |
|---|---|---|---|
entityTypes |
string[] | yes |
AuditLogListResponse
Section titled “AuditLogListResponse”| Field | Type | Required | Description |
|---|---|---|---|
auditLogs |
AuditLogResponse[] |
yes | |
hasMore |
boolean | yes | |
nextCursor |
string | no |
AuditLogOperationsResponse
Section titled “AuditLogOperationsResponse”| Field | Type | Required | Description |
|---|---|---|---|
operations |
string[] | yes |
AuditLogResponse
Section titled “AuditLogResponse”| Field | Type | Required | Description |
|---|---|---|---|
applicationId |
string | no | |
clientId |
string | no | |
entityId |
string | yes | |
entityType |
string | yes | |
id |
string | yes | |
operation |
string | yes | |
operationJson |
string | no | |
performedAt |
string (date-time) | yes | |
principalId |
string | no | |
principalName |
string | no |