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

# List an environment's exports



## OpenAPI

````yaml https://api.twinbay.ai/openapi.json get /environments/{environment_id}/exports
openapi: 3.1.0
info:
  title: Twinbay
  description: Backend API
  version: 0.1.0
servers:
  - url: https://api.twinbay.ai
    description: Production
security: []
tags:
  - name: healthchecks
    description: Healthcheck endpoints
  - name: users
    description: >-
      The current user. Sign-up and sign-in happen in WorkOS AuthKit, which
      issues the access tokens this API accepts.
  - name: organizations
    description: >-
      Organizations the caller belongs to. Every authenticated request acts
      inside exactly one organization — the one its access token names — so
      these routes address it as `current`.
  - name: api-keys
    description: >-
      Long-lived credentials for callers that cannot hold an AuthKit session —
      agents, SDKs, CI. A key is accepted wherever an access token is, and acts
      with the role its creator holds when the request arrives.
  - name: environments
    description: >-
      Create and edit isolated provider environments. Each environment contains
      behavioural twins from the `twins` package.
  - name: twins
    description: Browse the digital twins available for new environments.
paths:
  /environments/{environment_id}/exports:
    get:
      tags:
        - environments
      summary: List an environment's exports
      operationId: list_exports
      parameters:
        - name: environment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Environment Id
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Page size
            default: 50
            title: Size
          description: Page size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_ExportResponse_'
        '401':
          description: The credential is missing, malformed, expired, or not trusted
        '403':
          description: The credential does not act inside an organization
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Access token: []
        - Organization API key: []
components:
  schemas:
    Page_ExportResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ExportResponse'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
        pages:
          type: integer
          minimum: 0
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - size
        - pages
      title: Page[ExportResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExportResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        environment_id:
          type: string
          format: uuid
          title: Environment Id
        status:
          type: string
          title: Status
          description: pending, running, ready or failed
        slice:
          $ref: '#/components/schemas/ExportSlice'
          description: The traffic this export was asked for.
        failure:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure
          description: Why generation failed, if it did.
        created_at:
          type: string
          format: date-time
          title: Created At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
      type: object
      required:
        - id
        - environment_id
        - status
        - slice
        - created_at
      title: ExportResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ExportSlice:
      properties:
        environment_twin_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
              minItems: 1
            - type: 'null'
          title: Environment Twin Ids
          description: >-
            Twin slots inside this environment to export, by
            `environment_twins.id`. Omitted exports every twin; an empty list
            would export none, which is never what a caller means.
        occurred_from:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Occurred From
          description: Export calls served at or after this instant.
        occurred_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Occurred Until
          description: >-
            Export calls served at or before this instant. An export never reads
            past the moment it was asked for, whatever this says.
      type: object
      title: ExportSlice
      description: >-
        The traffic an export was asked for, where null means no limit.


        The same shape on the way in and on the way out, and it is echoed into
        the

        exported file: a filtered export and a whole-environment one are
        otherwise

        indistinguishable, which is the difference between a dataset and a wrong

        dataset.
  securitySchemes:
    Access token:
      type: http
      description: Access token issued by WorkOS AuthKit.
      scheme: bearer
    Organization API key:
      type: apiKey
      description: >-
        An organization API key. Create one at
        https://console.twinbay.ai/api-keys
      in: header
      name: X-API-Key

````