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

# Create Export Job

> Create a bulk export job that writes audit logs in JSON Lines format.

The export job is processed asynchronously. The response includes a job
identifier that you can use to check job status and retrieve the download URL.




## OpenAPI

````yaml /anaconda-platform/cloud/admin/audit-logs/audit_log_api.json post /api/audit-logs/export
openapi: 3.1.0
info:
  title: Audit Logs API
  version: 0.1.0
servers:
  - url: https://anaconda.com
    description: Anaconda Cloud
security: []
paths:
  /api/audit-logs/export:
    post:
      summary: Create Export Job
      description: >
        Create a bulk export job that writes audit logs in JSON Lines format.


        The export job is processed asynchronously. The response includes a job

        identifier that you can use to check job status and retrieve the
        download URL.
      operationId: create_export_job_export_post
      parameters:
        - description: >
            Name of the organization to scope the request to. This header is
            required

            in multi-tenant deployments.
          in: header
          name: X-Org-Name
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: |
              Organization name used to resolve the tenant context.
            title: X-Org-Name
        - description: |
            API version identifier (for example, `v1` or `v2`). Defaults to `v1`
            when not provided.
          in: header
          name: X-API-Version
          required: false
          schema:
            default: v1
            description: |
              API version to target for this request.
            title: X-Api-Version
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportRequest'
        required: true
      responses:
        '200':
          description: |
            Request succeeded and an export job identifier is returned.
          content:
            application/json:
              schema:
                additionalProperties:
                  format: uuid
                  type: string
                title: Response Create Export Job Export Post
                type: object
        '422':
          description: |
            The request body or headers failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - JWT or Access Token: []
components:
  schemas:
    ExportRequest:
      description: >
        **Request body** for creating a new export job that filters audit logs
        and

        writes them in JSON Lines format.
      properties:
        from_date:
          anyOf:
            - format: date-time
              type: string
              example: <timestamp>
            - type: 'null'
          description: |
            Lower bound (inclusive) for filtering audit logs by `occurred_at`.
            Only events with `occurred_at >= from_date` are exported.
          title: From Date
        q:
          default: []
          description: >
            Search filters in the format
            `column_name:search_string1,search_string2`.


            Multiple values for a single column are separated by commas. To
            combine

            multiple `q` entries, use `search_operator`.
          items:
            type: string
          title: Q
          type: array
        search_operator:
          default: or
          description: |
            Logical operator used to combine multiple `q` filters:

            - `or` — export logs that match **any** search condition  
            - `and` — export logs that match **all** search conditions
          title: Search Operator
          type: string
        to_date:
          anyOf:
            - format: date-time
              type: string
              example: <timestamp>
            - type: 'null'
          description: |
            Upper bound (inclusive) for filtering audit logs by `occurred_at`.
            Only events with `occurred_at <= to_date` are exported.
          title: To Date
      title: ExportRequest
      type: object
    HTTPValidationError:
      description: |
        **Error response** returned when the request fails validation.
      properties:
        detail:
          description: >
            List of validation errors describing which fields are invalid and
            why.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      description: >
        **Validation error** describing an issue with a specific part of the
        request.
      properties:
        loc:
          description: |
            Location of the validation error as a path of components, such as
            `["body", "field_name"]` or `["query", "param_name"]`.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: |
            Human-readable description of the validation error.
          title: Message
          type: string
        type:
          description: |
            Machine-readable error type code.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    JWT or Access Token:
      bearerFormat: JWT or Access Token
      description: >
        Authenticate requests using a bearer token.


        Supported token types:


        - **Access Token** — short-lived token obtained from the authentication
        service  

        - **JWT Token** — JSON Web Token containing encoded credentials  


        **Header format**


        - `Authorization: Bearer <your_token>`
      scheme: bearer
      type: http

````