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

# Export the organisation audit log



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /org/organisation/audit-logs/export
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /org/organisation/audit-logs/export:
    get:
      tags:
        - Organisation API
      summary: Export the organisation audit log
      operationId: export_org_audit_logs
      parameters:
        - description: >-
            Download format; csv answers text/csv, json answers the
            OrgAuditLogExportResponse document.
          in: query
          name: format
          required: false
          schema:
            default: csv
            enum:
              - csv
              - json
            type: string
        - in: query
          name: search
          required: false
          schema:
            type: string
        - in: query
          name: user_id
          required: false
          schema:
            format: uuid
            type: string
        - in: query
          name: action_type
          required: false
          schema:
            type: string
        - in: query
          name: resource_type
          required: false
          schema:
            type: string
        - in: query
          name: start_date
          required: false
          schema:
            format: date-time
            type: string
        - in: query
          name: end_date
          required: false
          schema:
            format: date-time
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuditLogExportResponse'
            text/csv:
              schema:
                type: string
          description: >-
            The audit trail as an attachment, capped at 100000 rows; a capped
            CSV carries the X-Ankra-Export-Truncated: true response header, a
            capped JSON document sets truncated.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuditDetailError'
          description: Missing the audit.read permission
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Request validation error
components:
  schemas:
    OrgAuditLogExportResponse:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/OrgAuditLogExportEntry'
          type: array
        truncated:
          type: boolean
      required:
        - entries
        - truncated
      type: object
    OrgAuditDetailError:
      properties:
        detail:
          type: string
      required:
        - detail
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    OrgAuditLogExportEntry:
      properties:
        action_type:
          type: string
        created_at:
          format: date-time
          type: string
        details:
          type: object
        ip_address:
          anyOf:
            - type: string
            - type: 'null'
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
        resource_type:
          type: string
        user_email:
          type: string
        user_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
      required:
        - created_at
        - user_email
        - user_id
        - action_type
        - resource_type
        - resource_id
        - ip_address
        - details
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````