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

# Search the audit stream across all workspaces

> Search decision audit events across every workspace.

Returns 503 when no audit store is configured — governance state is
still recorded in the database, but there is no searchable stream.

**Required roles**: `nx1_decisions_admin`



## OpenAPI

````yaml get /api/decisions/audit
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/decisions/audit:
    get:
      tags:
        - Decisions
      summary: Search the audit stream across all workspaces
      description: |-
        Search decision audit events across every workspace.

        Returns 503 when no audit store is configured — governance state is
        still recorded in the database, but there is no searchable stream.

        **Required roles**: `nx1_decisions_admin`
      operationId: global_audit_api_decisions_audit_get
      parameters:
        - name: actor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by username.
            title: Actor
          description: Filter by username.
        - name: action
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by event type, e.g. `approved`.
            title: Action
          description: Filter by event type, e.g. `approved`.
        - name: decision_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Decision Key
        - name: outcome
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: '`success`, `denied` or `error`.'
            title: Outcome
          description: '`success`, `denied` or `error`.'
        - name: content_sha
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Find every event that ran exactly these rule bytes.
            title: Content Sha
          description: Find every event that ran exactly these rule bytes.
        - name: start
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Start
            description: ISO-8601 lower bound, inclusive.
          description: ISO-8601 lower bound, inclusive.
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: End
            description: ISO-8601 upper bound, inclusive.
          description: ISO-8601 upper bound, inclusive.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            title: Limit
            default: 50
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            title: Offset
            default: 0
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditEventResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    AuditEventResponse:
      properties:
        total:
          type: integer
          title: Total
        events:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Events
      type: object
      required:
        - total
        - events
      title: AuditEventResponse
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````