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

# Export your organization's credential events

> Every event the same filters list, as CSV in the list's order, streamed with no row cap.



## OpenAPI

````yaml /api-reference/openapi.json get /issuance/credentials/events/export
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /issuance/credentials/events/export:
    get:
      tags:
        - Credentials
      summary: Export your organization's credential events
      description: >-
        Every event the same filters list, as CSV in the list's order, streamed
        with no row cap.
      operationId: issuance_credentials_events_export
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/CredentialEventSortField'
              - type: 'null'
            description: >-
              `occurred_at`: when the credential was issued or revoked; ties
              break on the credential's `created_at`, then its id, then the
              event (`ISSUED` before `REVOKED` ascending). Defaults to
              `occurred_at` `desc`.
            title: Sort
          description: >-
            `occurred_at`: when the credential was issued or revoked; ties break
            on the credential's `created_at`, then its id, then the event
            (`ISSUED` before `REVOKED` ascending). Defaults to `occurred_at`
            `desc`.
        - name: sort_direction
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SortMethod'
              - type: 'null'
            description: >-
              `asc` or `desc`, for every key of the sort. Defaults to the
              field's own: `occurred_at` `desc`.
            title: Sort Direction
          description: >-
            `asc` or `desc`, for every key of the sort. Defaults to the field's
            own: `occurred_at` `desc`.
        - name: level
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/CredentialMintLevel'
              - type: 'null'
            description: >-
              Only credentials of these levels; repeat for more than one.
              Default all.
            title: Level
          description: >-
            Only credentials of these levels; repeat for more than one. Default
            all.
        - name: state
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/IssuedCredentialLifecycleState'
              - type: 'null'
            description: Only events of credentials in this state now.
            title: State
          description: Only events of credentials in this state now.
        - name: individual_ref
          in: query
          required: false
          schema:
            anyOf:
              - maxLength: 255
                minLength: 1
                type: string
              - type: 'null'
            description: >-
              Only credentials minted for this individual or by them for a
              business.
            title: Individual Ref
          description: >-
            Only credentials minted for this individual or by them for a
            business.
        - name: business_ref
          in: query
          required: false
          schema:
            anyOf:
              - maxLength: 255
                minLength: 1
                type: string
              - type: 'null'
            description: Only credentials minted for this business.
            title: Business Ref
          description: Only credentials minted for this business.
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - maxLength: 255
                type: string
              - type: 'null'
            description: >-
              Every word must match the person's or business's name as the
              credential minted it, the audience or the credential id; a
              `individual_ref` or `business_ref` your organization holds matches
              exactly.
            title: Search
          description: >-
            Every word must match the person's or business's name as the
            credential minted it, the audience or the credential id; a
            `individual_ref` or `business_ref` your organization holds matches
            exactly.
        - name: event_type
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/CredentialEventKind'
              - type: 'null'
            description: Only these events; repeat for several.
            title: Event Type
          description: Only these events; repeat for several.
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: 'Filter records created on or after this date (format: YYYY-MM-DD).'
            title: Start Date
          description: 'Filter records created on or after this date (format: YYYY-MM-DD).'
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: >-
              Filter records created on or before this date (format:
              YYYY-MM-DD).
            title: End Date
          description: 'Filter records created on or before this date (format: YYYY-MM-DD).'
        - name: tz
          in: query
          required: false
          schema:
            type: string
            description: >-
              IANA timezone identifier used to interpret start_date and end_date
              (defaults to UTC).
            examples:
              - UTC
              - America/Los_Angeles
              - Europe/London
            default: UTC
            title: Tz
          description: >-
            IANA timezone identifier used to interpret start_date and end_date
            (defaults to UTC).
      responses:
        '200':
          description: Every event matching the filters, as CSV.
          content:
            text/csv: {}
        '422':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                title: ValidationFailed
                description: The request is invalid.
                examples:
                  - type: validation_failed
                    code: 7112
                    message: The request is invalid.
                    metadata: {}
      security:
        - APIKeyHeader: []
components:
  schemas:
    CredentialEventSortField:
      type: string
      enum:
        - occurred_at
      title: CredentialEventSortField
      description: What a credential event list sorts by.
    SortMethod:
      type: string
      enum:
        - asc
        - desc
      title: SortMethod
    CredentialMintLevel:
      description: |-
        The credential layer a subject mint request selects (KYA).

        Deliberately narrower than ``IssuedCredentialType``: the individual
        and business mint routes issue only the two subject layers.
        Counterparty credentials have their own route and request shape, so
        a ``level`` of COUNTERPARTY must stay an edge-level payload refusal
        — this enum is what keeps issuance-record vocabulary growth from
        widening the mint requests.
      enum:
        - L2
        - L3
      title: CredentialMintLevel
      type: string
    IssuedCredentialLifecycleState:
      description: |-
        A credential's effective state as an issuance-log reader sees it.

        Derived, never stored: ``IssuedCredentialStatus`` deliberately keeps
        expiry out of the persisted status (verifiers check ``exp``), but the
        console and API consumers filter the log by what a credential *is*
        right now — still presentable, aged out, or killed.
      enum:
        - ACTIVE
        - EXPIRED
        - REVOKED
      title: IssuedCredentialLifecycleState
      type: string
    CredentialEventKind:
      description: What happened to a credential, as one row of its event stream.
      enum:
        - ISSUED
        - REVOKED
      title: CredentialEventKind
      type: string
    Error:
      properties:
        type:
          type: string
          title: Type
          description: >-
            Stable snake_case name of the error. Branch on this, never on
            `message`.
        code:
          type: integer
          title: Code
          description: Integer catalog code of the error.
        message:
          type: string
          title: Message
          description: For a human reading a log; not stable and not localized.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Context documented per `type`.
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: The `X-Request-ID` of the failed request.
      type: object
      required:
        - type
        - code
        - message
      title: Error
      description: The one body of every error a KYA route answers.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

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