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

# Get the download URL of an audit-log export report

> Get a short-lived signed URL to download a completed audit-log export report as a ZIP archive with the CSV.



## OpenAPI

````yaml get /v1/analytics/audit-logs/reports/{reference}/download-url
openapi: 3.0.0
info:
  description: >-
    The Magnific API is your gateway to a vast collection of high-quality
    digital resources for your applications and projects. As a leading platform,
    it offers a wide range of graphics, including vectors, photos,
    illustrations, icons, PSD templates, and more, all curated by talented
    designers from around the world.
  title: Magnific API
  version: 1.0.0
servers:
  - description: B2B API Production V1
    url: https://api.magnific.com
security:
  - magnificApiKey: []
paths:
  /v1/analytics/audit-logs/reports/{reference}/download-url:
    get:
      tags:
        - Analytics
      summary: Get the download URL of an audit-log export report
      description: >
        Returns a signed URL to download a `completed` report. The URL needs no
        API key and

        expires about 10 minutes after it is issued; request a new one whenever
        it is needed.


        The file is a ZIP archive holding a single `audit-logs.csv`, with a
        header row and one

        row per event, newest first. It is the same file the dashboard export
        produces, and

        `file_size` in the report is the size of the archive. Its columns are:

        `event_id`, `occurred_at`, `event_type`, `member_type`,
        `member_user_id`,

        `member_email`, `category`, `action_verb`, `action_status`,
        `action_resource_id`,

        `action_duration_ms`, `action_old_state`, `action_new_state`,
        `action_data`,

        `action_context_tool`, `action_context_provider`,
        `action_context_transport`,

        `request_id`, `correlation_id`, `source_project`, `source_platform`,
        `source_referer`,

        `input_prompt`, `output_prompt`, `member_auth`, `member_api_key_id`.

        `action_old_state`, `action_new_state` and `action_data` are JSON
        objects. Text values

        that start with `=`, `+`, `-`, `@`, a tab or a line break are prefixed
        with an

        apostrophe so that a spreadsheet does not evaluate them as formulas.


        Same authentication, plan and role requirements as

        `POST /v1/analytics/audit-logs/export`, and the same shared daily limit.
        Each call is

        recorded in the audit log as a download of the report.
      parameters:
        - description: Reference of the report (the `id` returned by the export request).
          example: 0b6f1c9e-4a57-4d0e-9d55-7c1e2f3a4b5c
          in: path
          name: reference
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/_v1_analytics_audit_logs_reports__reference__download_url_get_200_response
          description: OK
        '400':
          content:
            application/json:
              examples:
                invalid_reference:
                  summary: '`reference` is not a UUID'
                  value:
                    code: invalid_request
                    message: not-a-uuid is not a valid UUID
              schema:
                $ref: '#/components/schemas/audit-log-error'
          description: Bad Request - `reference` is not a valid UUID.
        '403':
          content:
            application/json:
              examples:
                key_not_enterprise:
                  summary: The API key is not an enterprise one
                  value:
                    message: You are not authorized to access this endpoint.
              schema:
                $ref: '#/components/schemas/audit-log-forbidden-error'
          description: >-
            Forbidden - the API key is not an enterprise one, or the member it
            belongs to is not allowed to access audit logs. The first case is
            answered before the request reaches the API and carries only
            `message`; the second carries `code: forbidden` too.
        '404':
          content:
            application/json:
              examples:
                report_not_found:
                  summary: Unknown reference, or a report of another team
                  value:
                    code: not_found
                    message: >-
                      Audit log report with reference
                      "0b6f1c9e-4a57-4d0e-9d55-7c1e2f3a4b5c" not found
              schema:
                $ref: '#/components/schemas/audit-log-error'
          description: Not Found - no report with that reference in the caller's team.
        '409':
          content:
            application/json:
              examples:
                report_not_ready:
                  summary: The report is not completed
                  value:
                    code: report_not_ready
                    message: >-
                      Audit log report "0b6f1c9e-4a57-4d0e-9d55-7c1e2f3a4b5c" is
                      not ready for download
              schema:
                $ref: >-
                  #/components/schemas/_v1_analytics_audit_logs_reports__reference__download_url_get_409_response
          description: >-
            Conflict - the report exists but has no file: it is still `pending`
            or `in_progress`, or it `failed`. Check its `status` in the reports
            list.
        '429':
          $ref: '#/components/responses/429-too-many-requests'
        '500':
          $ref: '#/components/responses/500-internal-server-error'
        '503':
          $ref: '#/components/responses/503-service-unavailable'
components:
  schemas:
    _v1_analytics_audit_logs_reports__reference__download_url_get_200_response:
      example:
        data:
          url: >-
            https://cdn.magnific.com/aud-lgs/b9274fea-b04f-4fa5-b562-a9ab25513004/0b6f1c9e-4a57-4d0e-9d55-7c1e2f3a4b5c/audit-logs.zip?token=exp=1798761600~hmac=3f9a
      properties:
        data:
          $ref: >-
            #/components/schemas/_v1_analytics_audit_logs_reports__reference__download_url_get_200_response_data
      required:
        - data
      type: object
    audit-log-error:
      description: Error answered by the audit-logs export endpoints.
      example:
        code: invalid_request
        message: message
      properties:
        code:
          description: >-
            Machine-readable error code, stable across releases. Branch on this,
            not on `message`.
          example: invalid_request
          type: string
        message:
          description: Human-readable explanation. Its wording may change.
          type: string
      required:
        - code
        - message
      type: object
    audit-log-forbidden-error:
      description: >-
        `403` of the audit-logs export endpoints. `code` is missing when the
        request is rejected before it reaches the API (an API key that is not an
        enterprise one).
      example:
        code: forbidden
        message: message
      properties:
        code:
          description: >-
            Machine-readable error code. `forbidden` when the member is not
            allowed to access audit logs.
          example: forbidden
          type: string
        message:
          description: Human-readable explanation. Its wording may change.
          type: string
      required:
        - message
      type: object
    _v1_analytics_audit_logs_reports__reference__download_url_get_409_response:
      example:
        code: report_not_ready
        message: message
      properties:
        code:
          enum:
            - report_not_ready
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    _v1_analytics_audit_logs_reports__reference__download_url_get_200_response_data:
      example:
        url: >-
          https://cdn.magnific.com/aud-lgs/b9274fea-b04f-4fa5-b562-a9ab25513004/0b6f1c9e-4a57-4d0e-9d55-7c1e2f3a4b5c/audit-logs.zip?token=exp=1798761600~hmac=3f9a
      properties:
        url:
          description: Signed, short-lived URL of the ZIP archive.
          example: >-
            https://cdn.magnific.com/aud-lgs/b9274fea-b04f-4fa5-b562-a9ab25513004/0b6f1c9e-4a57-4d0e-9d55-7c1e2f3a4b5c/audit-logs.zip?token=exp=1798761600~hmac=3f9a
          format: uri
          type: string
      required:
        - url
      type: object
    inline_object:
      example:
        message: message
        request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
      properties:
        request_id:
          description: >-
            Identifier of the HTTP request, the same value as the `X-Request-Id`
            response header. The API gateway adds it to every error response of
            the public API (`/v1` on `api.magnific.com` and `api.magnific.com`),
            so it is absent when a service is called directly, without the
            gateway. Include it when you contact support. It identifies the
            request, not a task.
          example: ak-97f5c07b9dd04324842b8f8b55a0edf1
          type: string
        message:
          type: string
      type: object
    inline_object_2:
      example:
        message: Internal Server Error
        request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
      properties:
        request_id:
          description: >-
            Identifier of the HTTP request, the same value as the `X-Request-Id`
            response header. The API gateway adds it to every error response of
            the public API (`/v1` on `api.magnific.com` and `api.magnific.com`),
            so it is absent when a service is called directly, without the
            gateway. Include it when you contact support. It identifies the
            request, not a task.
          example: ak-97f5c07b9dd04324842b8f8b55a0edf1
          type: string
        message:
          example: Internal Server Error
          type: string
      type: object
    inline_object_3:
      example:
        message: Service Unavailable. Please try again later.
        request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
      properties:
        request_id:
          description: >-
            Identifier of the HTTP request, the same value as the `X-Request-Id`
            response header. The API gateway adds it to every error response of
            the public API (`/v1` on `api.magnific.com` and `api.magnific.com`),
            so it is absent when a service is called directly, without the
            gateway. Include it when you contact support. It identifies the
            request, not a task.
          example: ak-97f5c07b9dd04324842b8f8b55a0edf1
          type: string
        message:
          example: Service Unavailable. Please try again later.
          type: string
      type: object
  responses:
    429-too-many-requests:
      content:
        application/json:
          examples:
            generic:
              summary: Generic message for 429 errors
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Too many requests
            download_limit_reached:
              summary: The download limits has been reached.
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: >-
                  The user can't download more items because the download limits
                  has been reached.
            edit_limit_reached:
              summary: Free user icon edit limits has been reached.
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Limit for free users reached.
          schema:
            $ref: '#/components/schemas/inline_object'
      description: >-
        Too Many Requests - The client has sent too many requests in a given
        amount of time.
    500-internal-server-error:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_object_2'
      description: >-
        Internal Server Error - The server has encountered a situation it
        doesn't know how to handle.
    503-service-unavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_object_3'
      description: Service Unavailable
  securitySchemes:
    magnificApiKey:
      description: >
        Your Magnific API key. Required for authentication. [Learn how to obtain
        an API key](https://docs.magnific.com/quickstart)
      in: header
      name: x-magnific-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.