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

# List Audit Logs

> List audit log entries (Administrator only).



## OpenAPI

````yaml /api/openapi-cutmake.json get /audit-log
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /audit-log:
    get:
      tags:
        - Audit Log
      summary: List Audit Logs
      description: List audit log entries (Administrator only).
      operationId: list_audit_logs_audit_log_get
      parameters:
        - name: entity_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by entity type
            title: Entity Type
          description: Filter by entity type
        - name: entity_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by entity identifier
            title: Entity Id
          description: Filter by entity identifier
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by user ID
            title: User Id
          description: Filter by user ID
        - name: action
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by action
            title: Action
          description: Filter by action
        - name: fromDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Start of created_at range
            title: Fromdate
          description: Start of created_at range
        - name: toDate
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: End of created_at range
            title: Todate
          description: End of created_at range
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            description: Page size
            default: 20
            title: Limit
          description: Page size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogListResponse'
        '401':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    AuditLogListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/AuditLogEntry'
          type: array
          title: Data
        pagination:
          $ref: '#/components/schemas/schemas__audit_log__PaginationMetadata'
      type: object
      required:
        - data
        - pagination
      title: AuditLogListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AuditLogEntry:
      properties:
        id:
          type: string
          title: Id
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        action:
          type: string
          title: Action
        entity_type:
          type: string
          title: Entity Type
        entity_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Id
        changes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Changes
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - org_id
        - user_id
        - action
        - entity_type
        - entity_id
        - changes
        - metadata
        - created_at
      title: AuditLogEntry
    schemas__audit_log__PaginationMetadata:
      properties:
        page:
          type: integer
          title: Page
        limit:
          type: integer
          title: Limit
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
        has_next:
          type: boolean
          title: Has Next
        has_prev:
          type: boolean
          title: Has Prev
      type: object
      required:
        - page
        - limit
        - total
        - total_pages
        - has_next
        - has_prev
      title: PaginationMetadata
    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:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````