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

# Query audit logs

> Retrieves audit logs. Allows for filtering and searching through historical audit data.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml post /api/v1/audit-logs
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/audit-logs:
    post:
      tags:
        - v1
      summary: Query audit logs
      description: >-
        Retrieves audit logs. Allows for filtering and searching through
        historical audit data.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: The query string to filter audit logs.
              required:
                - query
              additionalProperties: false
        required: true
      responses:
        '200':
          description: >-
            A successful response containing a list of audit log entries that
            match the provided query.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: An array of audit log records matching the query.
                required:
                  - data
                additionalProperties: false
        '400':
          description: 'Bad Request: The query string is malformed or invalid.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A message describing the error.
                required:
                  - error
                additionalProperties: false
        '500':
          description: >-
            Internal Server Error: An unexpected error occurred while retrieving
            audit logs.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: A message describing the error.
                required:
                  - error
                additionalProperties: false

````