Skip to main content

Query Audit Logs

Page Outline

Retrieves structured audit log entries for a model, recording all significant lifecycle events, configuration changes, and access actions performed by users and automated systems.

Base Path: /api/v1/models

Method: GET

Path: /{model_id}/audit-logs

Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)

Path Parameters

ParameterTypeDescription
model_idstringUnique identifier of the model

Query Parameters

ParameterTypeDefaultDescription
fromstring (ISO 8601)90 days agoStart of the audit log window
tostring (ISO 8601)nowEnd of the audit log window
actionstringFilter by action type (see Action Types below)
actor_idstringFilter to events performed by a specific user ID
pageinteger1Page number
page_sizeinteger50Results per page (max: 200)
sort_orderstringdescChronological order: asc or desc

Action Types

The action filter supports any of the following audit event types:

ActionDescription
model.createdModel record was created
model.updatedMetadata or config was modified
model.deletedModel was permanently deleted
model.archivedModel was archived
model.unarchivedModel was restored from archive
model.duplicatedA copy of the model was created
model.training_startedA training run was initiated
model.training_completedA training run completed successfully
model.training_failedA training run failed
model.version_promotedA version was set as the promoted version
model.version_restoredA version was restored as the config baseline
model.dataset_linkedA dataset was linked to the model
model.dataset_unlinkedThe dataset link was removed
model.config_updatedTraining configuration was updated
model.settings_updatedDisplay/notification/access settings were modified
model.collaborator_addedA user was granted access
model.collaborator_removedA user's access was revoked

Behavior

  • Audit logs are immutable — they cannot be deleted or modified via the API.
  • Logs older than the organization's retention policy (default: 365 days) may not be returned.
  • The metadata field contains event-specific context (e.g., changed field names and previous values).
  • Requires the caller to have admin or owner role on the model to access audit logs.
  • Returns HTTP 404 if the model is not found; HTTP 403 if the caller lacks audit access.

Response

Returns a paginated AuditLogList object.

{
"total": 87,
"page": 1,
"page_size": 50,
"logs": [
{
"log_id": "log-00142",
"action": "model.version_promoted",
"model_id": "mdl-7f3a19bc",
"actor": {
"user_id": "user-001",
"email": "alice@example.com",
"ip_address": "192.168.1.42"
},
"metadata": {
"previous_version_id": "ver-000",
"new_version_id": "ver-001"
},
"timestamp": "2026-03-13T16:10:00Z"
}
]
}