> ## 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.

# List audit streams and their searchable fields

> Describe every audit stream this installation has configured.

Each stream lists its searchable fields with a type and the operators
that type accepts, which is what lets a client offer the right
control per field rather than a single text box.

`available` is false when no audit cluster is configured; searching
then returns 503.

**Required roles**: `nx1_audit_viewer`



## OpenAPI

````yaml get /api/audit/sources
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/audit/sources:
    get:
      tags:
        - Audit
      summary: List audit streams and their searchable fields
      description: |-
        Describe every audit stream this installation has configured.

        Each stream lists its searchable fields with a type and the operators
        that type accepts, which is what lets a client offer the right
        control per field rather than a single text box.

        `available` is false when no audit cluster is configured; searching
        then returns 503.

        **Required roles**: `nx1_audit_viewer`
      operationId: list_sources_api_audit_sources_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditSourcesResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    AuditSourcesResponse:
      properties:
        available:
          type: boolean
          title: Available
          description: >-
            False when no audit cluster is configured, in which case searching
            returns 503.
        sources:
          items:
            $ref: '#/components/schemas/AuditStreamModel'
          type: array
          title: Sources
      type: object
      required:
        - available
        - sources
      title: AuditSourcesResponse
    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
    AuditStreamModel:
      properties:
        source:
          type: string
          title: Source
        label:
          type: string
          title: Label
        description:
          type: string
          title: Description
        time_field:
          type: string
          title: Time Field
          description: Field carrying the event time; Ranger's is not @timestamp.
        index_pattern:
          type: string
          title: Index Pattern
        fields:
          items:
            $ref: '#/components/schemas/AuditFieldModel'
          type: array
          title: Fields
      type: object
      required:
        - source
        - label
        - description
        - time_field
        - index_pattern
        - fields
      title: AuditStreamModel
    AuditFieldModel:
      properties:
        name:
          type: string
          title: Name
          description: Field name as stored in the index.
        label:
          type: string
          title: Label
          description: Human-readable name for the UI.
        type:
          type: string
          title: Type
          description: '`keyword`, `text`, `date`, `number`, `boolean` or `ip`.'
        description:
          type: string
          title: Description
          default: ''
        primary:
          type: boolean
          title: Primary
          description: Show as a column in the results table by default.
          default: false
        options:
          items:
            type: string
          type: array
          title: Options
          description: Known values, where the set is small and fixed.
        operators:
          items:
            type: string
          type: array
          title: Operators
          description: >-
            Comparisons this field accepts. Keyword fields deliberately exclude
            `contains` — they are not analysed, so a substring query matches
            nothing.
      type: object
      required:
        - name
        - label
        - type
        - operators
      title: AuditFieldModel
  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

````