Skip to content

Search the audit trail (admin only)

GET
/api/v1/audit-logs
curl --request GET \
--url 'https://example.com/api/v1/audit-logs?page=1&page_size=25&sort_dir=desc' \
--header 'Authorization: Bearer <token>'

Immutable record of every mutating action, newest first.

Entries with actor_type=system were taken while the server was running with authentication disabled.

resource_type
Resource Type

E.g. ai_system, policy

Any of:
string

E.g. ai_system, policy

resource_id
Resource Id
Any of:
string format: uuid
action
Action
Any of:
AuditAction
string
Allowed values: create update delete classify policy_check evidence_generate login login_failed read
actor_id
Actor Id
Any of:
string format: uuid
actor_type
Actor Type

Filter to actions taken without authentication

Any of:
ActorType
string
Allowed values: user system

Filter to actions taken without authentication

request_id
Request Id

Trace one request end to end

Any of:
string

Trace one request end to end

since
Since
Any of:
string format: date-time
until
Until
Any of:
string format: date-time
page
Page

1-indexed page number

integer
default: 1 >= 1

1-indexed page number

page_size
Page Size

Items per page

integer
default: 25 >= 1 <= 200

Items per page

sort_by
Sort By

Field to sort by

Any of:
string

Field to sort by

sort_dir
Sort Dir
string
default: desc /^(asc|desc)$/

Successful Response

Media typeapplication/json
object
success
required
boolean
default: true
data
required
Page[AuditLogRead]
object
items
required
Items
Array<object>
AuditLogRead
object
id
required
Id
string format: uuid
resource_type
required
Resource Type
string
resource_id
required
Resource Id
Any of:
string format: uuid
action
required
AuditAction
string
Allowed values: create update delete classify policy_check evidence_generate login login_failed read
actor_id
required
Actor Id
Any of:
string format: uuid
actor_email
required
Actor Email
Any of:
string
actor_type
required
ActorType

system marks an action taken while authentication was disabled.

string
Allowed values: user system
actor_label
required
Actor Label
string
request_id
required
Request Id
Any of:
string
ip_address
required
Ip Address
Any of:
string
user_agent
required
User Agent
Any of:
string
old_values
required
Old Values
object
key
additional properties
any
new_values
required
New Values
object
key
additional properties
any
context
required
Context
object
key
additional properties
any
created_at
required
Created At
string format: date-time
meta
required
PageMeta
object
total
required
Total
integer
page
required
Page
integer
page_size
required
Page Size
integer
pages
required
Pages
integer

Example

{
"success": true,
"data": {
"items": [
{
"resource_type": "ai_system",
"action": "create",
"actor_email": "risk@aigov.example.com",
"actor_type": "user",
"actor_label": "system",
"ip_address": "203.0.113.10"
}
],
"meta": {
"total": 137,
"page": 1,
"page_size": 25,
"pages": 6
}
}
}

Unauthorized

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
code
required
Code
string
message
required
Message
string
details
Details
correlation_id
Correlation Id
Any of:
string

Example

{
"error": {
"code": "not_found",
"correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60",
"message": "AI system not found."
}
}

Forbidden

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
code
required
Code
string
message
required
Message
string
details
Details
correlation_id
Correlation Id
Any of:
string

Example

{
"error": {
"code": "not_found",
"correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60",
"message": "AI system not found."
}
}

Not Found

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
code
required
Code
string
message
required
Message
string
details
Details
correlation_id
Correlation Id
Any of:
string

Example

{
"error": {
"code": "not_found",
"correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60",
"message": "AI system not found."
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}