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

# List audit log archives

> Use this endpoint to list all audit log archives. Archives contain historical audit log data that has been compressed and moved to long-term storage. Supports offset-based pagination.



## OpenAPI

````yaml /pt/openapi/v3-current/matcher.yaml get /v1/governance/archives
openapi: 3.1.0
info:
  title: Matcher APIs
  description: >-
    Complete API reference for the Matcher reconciliation engine, providing
    automated transaction matching between Midaz Ledger and external systems.
  version: 6.1.0
  license:
    name: Lerian Studio General License
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/governance/archives:
    get:
      tags:
        - Governance
      summary: List audit log archives
      description: >-
        Use this endpoint to list all audit log archives. Archives contain
        historical audit log data that has been compressed and moved to
        long-term storage. Supports offset-based pagination.
      operationId: listArchives
      parameters:
        - description: A unique identifier for tracing the request across services.
          in: header
          name: X-Request-Id
          schema:
            type: string
        - description: Start date filter (YYYY-MM-DD or RFC 3339 format)
          explode: false
          in: query
          name: from
          schema:
            description: Filter archives from this date (YYYY-MM-DD or RFC3339)
            type: string
        - description: End date filter (YYYY-MM-DD or RFC 3339 format)
          explode: false
          in: query
          name: to
          schema:
            description: Filter archives until this date (YYYY-MM-DD or RFC3339)
            type: string
        - description: The maximum number of items to include in the response.
          explode: false
          in: query
          name: limit
          schema:
            default: 20
            description: Maximum number of records to return
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - description: The number of items to skip before returning results.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Number of records to skip
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          description: List of audit log archives
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListArchivesResponse'
        '400':
          description: The request contains invalid parameters or payload.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                400-from-must-be-a-valid-date-yyyy-mm-dd-or-rfc3339:
                  $ref: >-
                    #/components/examples/400-from-must-be-a-valid-date-yyyy-mm-dd-or-rfc3339
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    ListArchivesResponse:
      additionalProperties: false
      properties:
        hasMore:
          description: True when more archives exist beyond this page
          examples:
            - true
          type: boolean
        items:
          description: Completed audit log archives for the current page
          items:
            $ref: '#/components/schemas/ArchiveMetadataResponse'
          maxItems: 200
          type:
            - array
            - 'null'
        limit:
          description: Page size applied to this response (offset-based pagination)
          examples:
            - 20
          format: int64
          maximum: 200
          minimum: 1
          type: integer
      required:
        - items
        - limit
        - hasMore
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    ArchiveMetadataResponse:
      additionalProperties: false
      properties:
        archivedAt:
          description: >-
            Timestamp when archival completed, in RFC 3339 format (UTC); absent
            until the archive finishes
          examples:
            - '2024-04-01T02:30:00Z'
          type: string
        checksum:
          description: >-
            Hex-encoded SHA-256 of the decompressed archive content; present
            only when persisted
          type: string
        compressedSizeBytes:
          description: Compressed file size of the archive object, in bytes
          examples:
            - 10485760
          format: int64
          type: integer
        dateRangeEnd:
          description: End of the archived date range, in RFC 3339 format (UTC)
          examples:
            - '2024-03-31T23:59:59Z'
          type: string
        dateRangeStart:
          description: Start of the archived date range, in RFC 3339 format (UTC)
          examples:
            - '2024-01-01T00:00:00Z'
          type: string
        id:
          description: Unique identifier (UUID) for the archive
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        partitionName:
          description: Name of the database partition that was archived
          examples:
            - audit_logs_2024_q1
          type: string
        rowCount:
          description: Number of audit log rows captured in the archive
          examples:
            - 150000
          format: int64
          type: integer
        status:
          description: >-
            Archive status. Only COMPLETE archives are listed by this endpoint
            (in-progress and failed archives are not surfaced)
          enum:
            - COMPLETE
          examples:
            - COMPLETE
          type: string
        storageClass:
          description: >-
            Object-storage class the archive is stored under.
            STANDARD/STANDARD_IA/ONEZONE_IA are immediately readable tiers (IA =
            infrequent access); INTELLIGENT_TIERING auto-moves objects between
            tiers; GLACIER_IR is instant-retrieval cold storage; GLACIER and
            DEEP_ARCHIVE are archival tiers that require a restore before
            download
          enum:
            - STANDARD
            - STANDARD_IA
            - ONEZONE_IA
            - INTELLIGENT_TIERING
            - GLACIER_IR
            - GLACIER
            - DEEP_ARCHIVE
          examples:
            - GLACIER
          type: string
      required:
        - id
        - partitionName
        - dateRangeStart
        - dateRangeEnd
        - rowCount
        - compressedSizeBytes
        - storageClass
        - status
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
    RateLimitErrorResponse:
      description: >-
        Flat body that the rate limiter returns. `code` is the HTTP status as a
        number.
      type: object
      required:
        - code
        - title
        - message
      properties:
        code:
          type: integer
          description: HTTP status code.
          example: 429
        title:
          type: string
          description: Error type.
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message.
          example: rate limit exceeded
  examples:
    400-from-must-be-a-valid-date-yyyy-mm-dd-or-rfc3339:
      summary: from must be a valid date (YYYY-MM-DD or RFC3339)
      value:
        title: Bad Request
        status: 400
        detail: >-
          The from filter is not a valid date. Use YYYY-MM-DD or a full RFC 3339
          timestamp, then try again.
  responses:
    Unauthorized:
      description: The request lacks valid authentication credentials.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          examples:
            MissingToken:
              summary: Missing token
              value:
                type: https://errors.lerian.studio/v1/AUT-0006
                title: Token Missing
                status: 401
                detail: >-
                  A valid token must be provided in the request header. Please
                  include a token and try again.
                code: AUT-0006
            InvalidToken:
              summary: Invalid token
              value:
                type: https://errors.lerian.studio/v1/AUT-0007
                title: Invalid Token
                status: 401
                detail: >-
                  The provided token is expired, invalid or malformed. Please
                  provide a valid token and try again.
                code: AUT-0007
    Forbidden:
      description: You do not have permission to access this resource.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          examples:
            TenantClaimRequired:
              summary: Tenant claim missing
              value:
                type: https://errors.lerian.studio/v1/MTCH-0004
                title: Forbidden
                status: 403
                detail: tenant claim required
                code: MTCH-0004
            PermissionDenied:
              summary: Permission denied
              value:
                type: https://errors.lerian.studio/v1/AUT-1020
                title: Permission Denied
                status: 403
                detail: >-
                  the credential is not allowed to perform contexts:read on this
                  request
                code: AUT-1020
    ValidationFailed:
      description: >-
        The request failed validation. The `errors` list names each value that
        failed.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          example:
            title: Unprocessable Entity
            status: 422
            detail: validation failed
            errors:
              - message: expected required property name to be present
                location: body
    TooManyRequests:
      description: >-
        The request exceeded the rate limit. Wait the number of seconds in
        `Retry-After`, then retry.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
          example:
            code: 429
            title: rate_limit_exceeded
            message: rate limit exceeded
    InternalServerError:
      description: An unexpected error occurred on the server.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          example:
            type: https://errors.lerian.studio/v1/MTCH-0002
            title: Internal Server Error
            status: 500
            detail: internal error
            code: MTCH-0002
        text/plain:
          schema:
            type: string
          example: Internal Server Error
  headers:
    RetryAfter:
      description: Seconds to wait before you retry.
      schema:
        type: integer
        example: 30
    XRateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
        example: 100
    XRateLimitRemaining:
      description: Requests left in the current window. Always `0` on a `429`.
      schema:
        type: integer
        example: 0
    XRateLimitReset:
      description: Unix time, in seconds, when the current window resets.
      schema:
        type: integer
        example: 1767225600
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'
      scheme: bearer
      type: http

````

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