> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datris.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Query the audit log (admin)

> Admin-only. Audit entries matching the filter, newest first, one page at a time. 404 with `{"enabled": false, "error": ...}` while USE_AUDIT_LOG is off. API keys need the `audit:read` capability.



## OpenAPI

````yaml /openapi.yaml get /api/v1/audit-log
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.57.1
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/audit-log:
    get:
      tags:
        - Audit Log
      summary: Query the audit log (admin)
      description: >-
        Admin-only. Audit entries matching the filter, newest first, one page at
        a time. 404 with `{"enabled": false, "error": ...}` while USE_AUDIT_LOG
        is off. API keys need the `audit:read` capability.
      parameters:
        - name: since
          in: query
          required: false
          schema:
            type: string
          description: Earliest entry, as an ISO-8601 instant or epoch milliseconds
        - name: until
          in: query
          required: false
          schema:
            type: string
          description: Latest entry, as an ISO-8601 instant or epoch milliseconds
        - name: category
          in: query
          required: false
          schema:
            type: string
        - name: action
          in: query
          required: false
          schema:
            type: string
        - name: actor
          in: query
          required: false
          schema:
            type: string
          description: Actor label
        - name: actorType
          in: query
          required: false
          schema:
            type: string
        - name: outcome
          in: query
          required: false
          schema:
            type: string
        - name: resource
          in: query
          required: false
          schema:
            type: string
          description: Resource name (substring match)
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            maximum: 1000
          description: Page size (values above 1000 are clamped)
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: '`nextCursor` from the previous page'
      responses:
        '200':
          description: One page of entries
          content:
            application/json:
              schema:
                type: object
                properties:
                  enabled:
                    type: boolean
                  entries:
                    type: array
                    items:
                      type: object
                      description: >-
                        An audit entry (`id`, `ts`, `actor`, `category`,
                        `action`, `resource`, `outcome`, `httpStatus`,
                        `durationMs`, `request`, `errorMessage`, ...)
                  nextCursor:
                    type: string
                    description: Present when more entries match
        '400':
          description: >-
            `since` or `until` is not an ISO-8601 instant or epoch millis. Body:
            `{"error": ...}`
        '404':
          description: >-
            The audit log is not enabled. Body: `{"enabled": false, "error":
            ...}`
        '500':
          description: Error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.