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

# Get Audit Logs

> Get authorization, data changes, and message exchange ledger

Get authorization, data changes, and message exchange ledger.

<ParamField status="200" type="AuditLogsResponse">
  <ParamField name="logs" type="array">
    List of audit logs
  </ParamField>

  <ParamField name="pagination" type="Pagination">
    Pagination information
  </ParamField>
</ParamField>

### Reference Documentation

<Info>
  For more information on logging & audit management, please refer to:

  * Page 556 of "Functional\_Requirements\_V18 FINAL": [https://belli.sg/4nxxCDR](https://belli.sg/4nxxCDR)
</Info>


## OpenAPI

````yaml GET /api/audit-logs
openapi: 3.0.3
info:
  title: Mock API
  version: 1.0.0
  description: >-
    Mock OpenAPI spec for QR API Service. All endpoints require API key
    authentication via 'Authorization: Bearer <token>' or 'x-api-key: <token>'
    headers.
servers:
  - url: https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io
    description: Production server
security:
  - ApiKeyAuth: []
  - ApiKeyHeader: []
tags:
  - name: auth-v1
    description: Authentication and user management
  - name: reference-data-v1
    description: Reference data and master data
  - name: flights-v1
    description: Flight schedules and capacity
  - name: quotes-v1
    description: Quotation and pricing
  - name: awb-stock-v1
    description: AWB Stock Management
  - name: bookings-v1
    description: Booking management
  - name: shipments-v1
    description: Shipment documents and tracking
  - name: compliance-v1
    description: Compliance and safety declarations
  - name: operations-v1
    description: Operational events and manifests
  - name: webhooks-v1
    description: Webhook management
  - name: admin-v1
    description: Administrative and audit functions
  - name: qr-exp-cgo-ext-availability-v1
    description: Legacy availability service
  - name: qr-exp-cgo-ext-booking-v1
    description: Legacy booking service
  - name: qr-exp-cgo-ext-flight-schedules-v1
    description: Legacy flight schedules service
  - name: qr-exp-cgo-shipments-v1
    description: Legacy shipments service
  - name: qr-exp-cgo-stock-v1
    description: Legacy stock service
  - name: qr-exp-cgo-tables-v1
    description: Legacy table data service
paths:
  /api/audit-logs:
    get:
      tags:
        - admin-v1
      summary: Get audit logs
      description: Get authorization, data changes, and message exchange ledger
      parameters:
        - name: action
          in: query
          schema:
            type: string
          description: Filter by action
        - name: resource
          in: query
          schema:
            type: string
          description: Filter by resource
        - name: userId
          in: query
          schema:
            type: string
          description: Filter by user ID
        - name: fromDate
          in: query
          schema:
            type: string
            format: date-time
          description: Filter from date
        - name: toDate
          in: query
          schema:
            type: string
            format: date-time
          description: Filter to date
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          description: Page number
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
          description: Items per page
      responses:
        '200':
          description: Audit logs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogsResponse'
components:
  schemas:
    AuditLogsResponse:
      type: object
      properties:
        logs:
          type: array
          items:
            $ref: '#/components/schemas/AuditLog'
        pagination:
          $ref: '#/components/schemas/Pagination'
    AuditLog:
      type: object
      properties:
        id:
          type: string
          example: log-123
        timestamp:
          type: string
          format: date-time
          example: '2024-01-01T10:00:00Z'
        action:
          type: string
          example: CREATE
        resource:
          type: string
          example: quote
        resourceId:
          type: string
          example: quote-123
        userId:
          type: string
          example: user-123
        ipAddress:
          type: string
          example: 192.168.1.1
        details:
          type: object
          example:
            field: status
            oldValue: pending
            newValue: confirmed
    Pagination:
      type: object
      properties:
        page:
          type: integer
          example: 1
        limit:
          type: integer
          example: 10
        total:
          type: integer
          example: 100
        totalPages:
          type: integer
          example: 10
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````