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

> Poll the status and progress percentage of an asynchronous Bronto export job by ID, and retrieve the signed download URL once the export completes.

# Retrieve an export by ID



## OpenAPI

````yaml get /exports/{exportId}
openapi: 3.0.2
info:
  title: Bronto API
  license:
    name: Commercial
  version: 1.0.0
servers:
  - url: https://api.eu.bronto.io
  - url: https://api.us.bronto.io
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: api-keys
    description: >
      An Application Programming Interface (API) key is a unique identifier. 

      The API Key must be provided as X-BRONTO-API-KEY in headers for the
      request to be authenticated 

      and authorized by the API server according to the API Key's role. For
      further information about 

      roles visit [our API Key docs] 
      https://docs.bronto.io/manage/manage-api-keys
  - name: context
    description: >
      Context is a REST API resource that allows the retrieval of a specified
      number of log events (default of 100) around 

      a log event of interest, e.g. when a number of log events were returned by
      a previous query and you then decide you 

      want to see the 50 log events before one of those returned log events. Log
      events can be retrieved either before, 

      after, or both before and after the specified log event.
  - name: exports
    description: >
      The Bronto Export API allows you to efficiently download large volumes of
      log data for further analysis.

      The data to be exported can be filtered by entering the search parameters
      \"from\", \"where\" and \"time_range\" as

      per a normal query in the \"search_details\" object.


      To export data the following steps are required:

      1. Create an export using a POST request, which will return an
      \"export_id\", \"status\" and \"progress\".

      2. Use the export id to get the status of the export task by sending a GET
      request,

      which will return \"status\" and \"progress\" with a value of percentage
      completed. When the export is

      completed, the \"status\" will be \"COMPLETE\"

      3. Once the export task has completed you can download your data using
      curl (or similar)

      from the \"location\" URL returned in the GET response.
  - name: logs
    description: >
      Logs are a sequence of timestamped log events. Logs can be searched to
      view events matching a filter 

      or to perform statistical functions on matching events.
  - name: search
    description: >
      The REST API for searching data uses queries based on a subset of SQL,
      with

      the syntax as per
      https://docs.brontobytes.io/core-features/log-search/query-syntax/.
  - name: top-keys
    description: >
      Top-Keys is a REST API resource that allows you to easily retrieve the top
      keys for a specific log.
  - name: usage
    description: >
      Usage is a REST API resource that allows you to easily track your Bronto
      usage by retrieving usage data relating 

      to data ingestion and amount of data searched, and allowing you to drill
      down for a specific dataset over a defined timeframe.
  - name: users
    description: >
      Users are given specific roles, where each role determines the user's
      permissions within the application. Those roles are as follows:

      - "Admin" role has permission for all actions on all entities in the
      application.

      - "Standard" role allows Read/Write and Delete actions on entities in
      non-sensitive areas of the application.

      - "ReadOnly" role allows only read actions and only on entities in
      non-sensitive areas of the application.
paths:
  /exports/{exportId}:
    get:
      tags:
        - exports
      summary: Retrieve an export by ID
      operationId: getExportById
      parameters:
        - name: exportId
          in: path
          description: The unique identifier of the export to retrieve
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Export retrieved successfully
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Export'
        '404':
          description: Not Found - The export is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: Unexpected Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  headers:
    RateLimitLimit:
      description: The request limit per time window.
      schema:
        type: integer
      example: 20
    RateLimitRemaining:
      description: The number of requests left in the current time window.
      schema:
        type: integer
      example: 12
    RateLimitReset:
      description: The number of seconds left in the current time window.
      schema:
        type: integer
      example: 13
  schemas:
    Export:
      required:
        - bytes
        - events
        - export_id
        - location
        - org_id
        - progress
        - search_details
        - status
      type: object
      properties:
        export_id:
          type: string
          description: The unique identifier for the export.
        org_id:
          type: string
          description: The ID of the organization associated with the export.
        progress:
          type: integer
          description: The progress percentage of the export.
        status:
          type: string
          description: The current status of the export.
          enum:
            - CREATED
            - IN_PROGRESS
            - COMPLETE
        bytes:
          type: integer
          description: The size of the export in bytes.
        events:
          type: integer
          description: The number of events in the export.
        location:
          type: string
          description: The location where the export is stored.
        search_details:
          $ref: '#/components/schemas/ExportDetails'
        created_at:
          type: integer
          description: The timestamp when the export was created.
          format: int64
        modified_at:
          type: integer
          description: The timestamp when the export was last modified.
          format: int64
        failure_detail:
          type: string
          description: >-
            Provides the reason for the failure if the export did not complete
            successfully.
    ErrorResponse:
      required:
        - code
        - correlation_id
        - message
      type: object
      properties:
        code:
          minimum: 200
          type: integer
          description: The http response code.
          format: int32
        correlation_id:
          type: string
          description: The unique identifier for the request.
        message:
          type: string
    ExportDetails:
      type: object
      properties:
        from:
          type: string
          description: The ids of the logs to search separated by a colon (:).
          example: >-
            550e8400-e29b-41d4-a716-446655440000:297bb888-83b1-44e0-8ab6-47879f1275a2
        time_range:
          type: string
          description: >
            The relative time range for which to query data. Time range
            supported is from milliseconds to years. For an exact range, use
            `from_ts` and `to_ts` instead.
          example: Last 3 weeks
        timeRange:
          type: string
          description: >
            The relative time range for which to query data. Time range
            supported is from milliseconds to years. For an exact range, use
            `from_ts` and `to_ts` instead.
          example: Last 3 weeks
          deprecated: true
        fromTs:
          description: >
            The starting time (unix time in milliseconds) for which to query
            data. Must be used together with `to_ts`. This parameter is not to
            be used when using `time_range`.
          deprecated: true
          oneOf:
            - type: integer
              format: int64
              example: 1709251200000
            - type: string
              example: '1709251200000'
              deprecated: true
        from_ts:
          description: >
            The starting time (unix time in milliseconds) for which to query
            data. Must be used together with `to_ts`. This parameter is not to
            be used when using `time_range`.
          oneOf:
            - type: integer
              format: int64
              example: 1709251200000
            - type: string
              example: '1709251200000'
              deprecated: true
        toTs:
          description: >
            The ending time (unix time in milliseconds) for which to query data.
            Must be used together with `from_ts`. This parameter is incompatible
            with `time_range`.
          deprecated: true
          oneOf:
            - type: integer
              format: int64
              example: 1711390455601
            - type: string
              example: '1711390455601'
              deprecated: true
        to_ts:
          description: >
            The ending time (unix time in milliseconds) for which to query data.
            Must be used together with `from_ts`. This parameter is incompatible
            with `time_range`.
          oneOf:
            - type: integer
              format: int64
              example: 1711390455601
            - type: string
              example: '1711390455601'
              deprecated: true
        where:
          type: string
          description: >
            The where parameter is used to filter the results of your query. 
            See https://docs.bronto.io/core-features/log-search/query-syntax for
            more details The filter can combine multiple terms using AND, OR,
            NOT.
          example: ip=10.0.0.1
      oneOf:
        - required:
            - from
            - fromTs
            - toTs
            - where
          type: object
        - required:
            - from
            - from_ts
            - to_ts
            - where
          type: object
        - required:
            - from
            - time_range
            - where
          type: object
        - required:
            - from
            - timeRange
            - where
          type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-BRONTO-API-KEY
      in: header
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````