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

# Fetches a list of audit logs.



## OpenAPI

````yaml /openapi/integration-api-v2/openapi.yaml get /v2/audit-logs
openapi: 3.0.0
info:
  title: Spirii API
  description: Spirii API
  version: 2.10.0
  contact: {}
servers:
  - url: https://api.spirii.com
security: []
tags: []
paths:
  /v2/audit-logs:
    get:
      tags:
        - Audit Logs
      summary: Fetches a list of audit logs.
      operationId: AuditLogsController_getList_v2
      parameters:
        - name: id
          required: false
          in: query
          description: Filter by the audit log ID.
          schema:
            type: integer
        - name: logName
          required: false
          in: query
          description: Filter by log name.
          schema:
            type: string
        - name: keycloakUuid
          required: false
          in: query
          description: Filter by the Keycloak user UUID that triggered the event.
          schema:
            type: string
        - name: keycloakEmail
          required: false
          in: query
          description: Filter by the Keycloak user email that triggered the event.
          schema:
            type: string
        - name: urlCalled
          required: false
          in: query
          description: Filter by the URL that was called.
          schema:
            type: string
        - name: ip
          required: false
          in: query
          description: Filter by the IP address (IPv4 or IPv6) of the caller.
          schema:
            example: 127.0.0.1
            type: string
        - name: domain
          required: false
          in: query
          description: Filter by domain.
          schema:
            type: string
        - name: caller
          required: false
          in: query
          description: Filter by caller.
          schema:
            type: string
        - name: tableName
          required: false
          in: query
          description: Filter by the affected table name.
          schema:
            type: string
        - name: entityId
          required: false
          in: query
          description: Filter by the numeric entity ID of the affected resource.
          schema:
            type: integer
        - name: entityIdString
          required: false
          in: query
          description: Filter by the string entity ID of the affected resource.
          schema:
            type: string
        - name: event
          required: false
          in: query
          description: Filter by the event type.
          schema:
            enum:
              - created
              - updated
              - deleted
              - associated
              - disassociated
              - unknown
            type: string
        - name: association
          required: false
          in: query
          description: Filter by association.
          schema:
            type: string
        - name: createdAtFrom
          required: false
          in: query
          description: Filter audit logs created from the specified timestamp (inclusive).
          schema:
            format: date-time
            example: '2000-12-01T00:00:00.000Z'
            type: string
        - name: createdAtTo
          required: false
          in: query
          description: Filter audit logs created up to the specified timestamp (inclusive).
          schema:
            format: date-time
            example: '2000-12-01T00:00:00.000Z'
            type: string
        - name: end_cursor
          required: false
          in: query
          description: >-
            Cursor to be used to request the next page. Mutually exclusive with
            `previous_end_cursor`.
          schema:
            type: string
        - name: previous_end_cursor
          required: false
          in: query
          description: >-
            Cursor to be used to request the previous page. Mutually exclusive
            with `end_cursor`.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Limit amount of returned records.
          schema:
            minimum: 1
            maximum: 100
            default: 25
            type: integer
        - name: sort_direction
          required: false
          in: query
          description: Sort direction by creation time.
          schema:
            default: desc
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAuditLogsResponseBodyDto'
components:
  schemas:
    GetAuditLogsResponseBodyDto:
      type: object
      properties:
        data:
          description: List of audit logs
          type: array
          items:
            $ref: '#/components/schemas/GetAuditLogResponseBodyDto'
        end_cursor:
          type: string
          description: Cursor for the end of the current page
        previous_end_cursor:
          type: string
          description: Cursor for the end of the previous page
      required:
        - data
    GetAuditLogResponseBodyDto:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the audit log.
        logName:
          type: string
          description: Log name.
          nullable: true
        keycloakUuid:
          type: string
          description: Keycloak user UUID that triggered the event.
        keycloakEmail:
          type: string
          description: Keycloak user email that triggered the event.
        urlCalled:
          type: string
          description: URL that was called.
        operatorId:
          type: integer
          description: Operator ID the event is scoped to.
        companyId:
          type: integer
          description: Company ID the event is scoped to.
        ip:
          type: string
          description: IP address (IPv4 or IPv6) of the caller.
          example: 127.0.0.1
        domain:
          type: string
          description: Domain.
        caller:
          type: string
          description: Caller.
          nullable: true
        tableName:
          type: string
          description: Affected table name.
        entityId:
          type: integer
          description: Numeric entity ID of the affected resource.
          nullable: true
        entityIdString:
          type: string
          description: String entity ID of the affected resource.
          nullable: true
        event:
          type: string
          description: Event type.
          enum:
            - created
            - updated
            - deleted
            - associated
            - disassociated
            - unknown
        association:
          type: string
          description: Association.
          nullable: true
        properties:
          type: object
          description: Arbitrary JSON object describing the change.
          additionalProperties: true
        createdAt:
          type: string
          description: Timestamp the audit log was created at.
          format: date-time
          example: '2000-12-01T00:00:00.000Z'
      required:
        - id
        - logName
        - keycloakUuid
        - keycloakEmail
        - urlCalled
        - operatorId
        - companyId
        - ip
        - domain
        - caller
        - tableName
        - entityId
        - entityIdString
        - event
        - association
        - properties
        - createdAt

````