---
title: "Get an export"
method: GET
path: "/v1/ai-cost-management/exports/{exportId}"
tags: ["exports"]
---

# Get an export

`GET /v1/ai-cost-management/exports/{exportId}`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/ai-cost-management/exports/{exportId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Returns one of the organization's exports. If the organization has no export with this identifier, or the identifier isn't a valid UUID, the request fails with `404`.

## Path parameters

- `exportId` string, uuid, required

## Response `200`

The export.

- union
  - object: An export copies the organization's stored usage events in a time range into files to download. It runs asynchronously: `status` follows its progress, and once it succeeds, `files` lists the data files, which can be downloaded until `expires_at`. After creation, only an export's status and results change. A client creates a one-time export, and an export schedule creates one export of each of its periods.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `dataset` 'usage_events' | 'focus', required: The data the export holds.
    - `schema_version` 1, required: The schema version of the data files within the dataset, which fixes their columns and values.
    - `focus` AICostFocusOptions, nullable, required: The FOCUS options of the export, with defaults applied. `null` unless `dataset` is `focus`.
      - `version` '1.3' | '1.4', required: The FOCUS version that the files follow.
      - `charge_period` 'day' | 'hour', required: The length of each row's charge period: a calendar day or an hour in `time_zone`, which `ChargePeriodStart` and `ChargePeriodEnd` bound. The range selects the events and doesn't shorten the first or last period, so those periods can extend beyond `starts_at` and `ends_at`.
      - `tag_keys` string[], required: The tag keys whose values split the rows. A row's `Tags` column holds the named keys that its events carry, with their values. `[]` when the request named none.
    - `format` intersection, required: The file format of the export's data files.
      - [`AICostExportFormat`](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4/schema?at=%2Fcomponents%2Fschemas%2FAICostExportFormat)
      - 'csv'
    - `compression` intersection, required: How the export's data files are compressed. Together with `format`, it sets the files' extension and content type.
      - [`AICostExportCompression`](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4/schema?at=%2Fcomponents%2Fschemas%2FAICostExportCompression)
      - 'none' | 'gzip'
    - `starts_at` string, date-time, required: The start of the range, inclusive, as an RFC 3339 timestamp in UTC. The export holds the events whose `time` is at or after `starts_at`.
    - `ends_at` string, date-time, required: The end of the range, exclusive, as an RFC 3339 timestamp in UTC. The export holds the events whose `time` is before `ends_at`.
    - `time_zone` string, iana-time-zone, required: The IANA time zone that decides where each file's period starts: a day for a `usage_events` export, or a calendar month for a `focus` export. For a `focus` export, it also decides where the charge and billing periods start.
    - `filters` object, required: The filters that select the exported events. `{}` for none.
    - `schedule` object, nullable, required: The schedule that created the export. `null` for a one-time export, and once the schedule is deleted.
      - `id` string, uuid, required: The identifier of the schedule that created the export, which the export schedule operations take as `scheduleId`.
    - `labels` Labels, required: Key-value metadata on the export, set when it's created, or copied from the schedule that created it. The export list can filter by label. Labels don't change which events the export holds.
    - `status` 'pending' | 'running' | 'succeeded' | 'failed' | 'expired', required: Where the export is in its lifecycle. A client reads the export again with `GET /v1/ai-cost-management/exports/{exportId}` to follow its progress.
    - `failure_reason` string, nullable, required: Why the export failed. `query_limit_exceeded` means that reading the events took more time or memory than one export may use, so an export with a shorter range or narrower filters can succeed, and a `focus` export can also name fewer `tag_keys` or use `day` for `charge_period`. `attempts_exhausted` means that every attempt failed for a reason that a later attempt could overcome, such as an outage, so the same export created later can succeed. A schedule doesn't create a failed export again. The set of reasons can grow, so a client treats a reason it doesn't know as a general failure. `null` unless `status` is `failed`.
    - `record_count` integer, nullable, required: The number of records across all data files. `null` until the export succeeds.
    - `data_read_at` string, date-time, nullable, required: When the successful attempt began reading the stored events, as an RFC 3339 timestamp in UTC. An event stored after this time can be missing from the files. Comparing the `data_read_at` and `record_count` of 2 exports of the same range and filters shows whether they differ. `null` until the export succeeds.
    - `files` object[], required: The data files, in date order. A `usage_events` export has one file for each day of the range in `time_zone`, and a `focus` export has one for each calendar month. The first and last files can cover part of their period, and a period without matching events still has a file, with no records. The list doesn't include `manifest.json`. `[]` until the export succeeds.
      - `name` string, required: The file's name, which the download operation takes as `file`. A `usage_events` file is named by its day as `YYYY-MM-DD`, and a `focus` file by its month as `YYYY-MM`, both in the export's `time_zone`. The extension that `format` and `compression` set follows, as in `2026-09-01.parquet` or `2026-09.csv.gz`.
      - `record_count` integer, required: The number of records in the file.
      - `size_bytes` integer, required: The size of the file as downloaded, in bytes.
      - `sha256` string, required: The SHA-256 digest of the file as downloaded. A client checks a download by comparing its size and digest with `size_bytes` and `sha256`. 64 lowercase hexadecimal digits.
    - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - `started_at` string, date-time, nullable, required: When the first attempt started, as an RFC 3339 timestamp in UTC. `null` while the export is `pending`.
    - `finished_at` string, date-time, nullable, required: When the export succeeded or failed, as an RFC 3339 timestamp in UTC. `null` until then.
    - `expires_at` string, date-time, nullable, required: An ISO-8601 timestamp representation of entity expiration date.
  - object: An export copies the organization's stored usage events in a time range into files to download. It runs asynchronously: `status` follows its progress, and once it succeeds, `files` lists the data files, which can be downloaded until `expires_at`. After creation, only an export's status and results change. A client creates a one-time export, and an export schedule creates one export of each of its periods.
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `dataset` 'usage_events' | 'focus', required: The data the export holds.
    - `schema_version` 1, required: The schema version of the data files within the dataset, which fixes their columns and values.
    - `focus` AICostFocusOptions, nullable, required: The FOCUS options of the export, with defaults applied. `null` unless `dataset` is `focus`.
      - `version` '1.3' | '1.4', required: The FOCUS version that the files follow.
      - `charge_period` 'day' | 'hour', required: The length of each row's charge period: a calendar day or an hour in `time_zone`, which `ChargePeriodStart` and `ChargePeriodEnd` bound. The range selects the events and doesn't shorten the first or last period, so those periods can extend beyond `starts_at` and `ends_at`.
      - `tag_keys` string[], required: The tag keys whose values split the rows. A row's `Tags` column holds the named keys that its events carry, with their values. `[]` when the request named none.
    - `format` intersection, required: The file format of the export's data files.
      - [`AICostExportFormat`](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4/schema?at=%2Fcomponents%2Fschemas%2FAICostExportFormat)
      - 'parquet'
    - `compression` intersection, required: How the export's data files are compressed. Together with `format`, it sets the files' extension and content type.
      - [`AICostExportCompression`](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4/schema?at=%2Fcomponents%2Fschemas%2FAICostExportCompression)
      - 'zstd'
    - `starts_at` string, date-time, required: The start of the range, inclusive, as an RFC 3339 timestamp in UTC. The export holds the events whose `time` is at or after `starts_at`.
    - `ends_at` string, date-time, required: The end of the range, exclusive, as an RFC 3339 timestamp in UTC. The export holds the events whose `time` is before `ends_at`.
    - `time_zone` string, iana-time-zone, required: The IANA time zone that decides where each file's period starts: a day for a `usage_events` export, or a calendar month for a `focus` export. For a `focus` export, it also decides where the charge and billing periods start.
    - `filters` object, required: The filters that select the exported events. `{}` for none.
    - `schedule` object, nullable, required: The schedule that created the export. `null` for a one-time export, and once the schedule is deleted.
      - `id` string, uuid, required: The identifier of the schedule that created the export, which the export schedule operations take as `scheduleId`.
    - `labels` Labels, required: Key-value metadata on the export, set when it's created, or copied from the schedule that created it. The export list can filter by label. Labels don't change which events the export holds.
    - `status` 'pending' | 'running' | 'succeeded' | 'failed' | 'expired', required: Where the export is in its lifecycle. A client reads the export again with `GET /v1/ai-cost-management/exports/{exportId}` to follow its progress.
    - `failure_reason` string, nullable, required: Why the export failed. `query_limit_exceeded` means that reading the events took more time or memory than one export may use, so an export with a shorter range or narrower filters can succeed, and a `focus` export can also name fewer `tag_keys` or use `day` for `charge_period`. `attempts_exhausted` means that every attempt failed for a reason that a later attempt could overcome, such as an outage, so the same export created later can succeed. A schedule doesn't create a failed export again. The set of reasons can grow, so a client treats a reason it doesn't know as a general failure. `null` unless `status` is `failed`.
    - `record_count` integer, nullable, required: The number of records across all data files. `null` until the export succeeds.
    - `data_read_at` string, date-time, nullable, required: When the successful attempt began reading the stored events, as an RFC 3339 timestamp in UTC. An event stored after this time can be missing from the files. Comparing the `data_read_at` and `record_count` of 2 exports of the same range and filters shows whether they differ. `null` until the export succeeds.
    - `files` object[], required: The data files, in date order. A `usage_events` export has one file for each day of the range in `time_zone`, and a `focus` export has one for each calendar month. The first and last files can cover part of their period, and a period without matching events still has a file, with no records. The list doesn't include `manifest.json`. `[]` until the export succeeds.
      - `name` string, required: The file's name, which the download operation takes as `file`. A `usage_events` file is named by its day as `YYYY-MM-DD`, and a `focus` file by its month as `YYYY-MM`, both in the export's `time_zone`. The extension that `format` and `compression` set follows, as in `2026-09-01.parquet` or `2026-09.csv.gz`.
      - `record_count` integer, required: The number of records in the file.
      - `size_bytes` integer, required: The size of the file as downloaded, in bytes.
      - `sha256` string, required: The SHA-256 digest of the file as downloaded. A client checks a download by comparing its size and digest with `size_bytes` and `sha256`. 64 lowercase hexadecimal digits.
    - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - `started_at` string, date-time, nullable, required: When the first attempt started, as an RFC 3339 timestamp in UTC. `null` while the export is `pending`.
    - `finished_at` string, date-time, nullable, required: When the export succeeded or failed, as an RFC 3339 timestamp in UTC. `null` until then.
    - `expires_at` string, date-time, nullable, required: An ISO-8601 timestamp representation of entity expiration date.

## Other responses

- `401`: The request has no valid access token. The token is missing, malformed, or expired, or it fails another check, and the response doesn't say which.
- `403`: The access token is valid, but its principal lacks the permission this operation requires. For an operation on one resource, the response doesn't reveal whether that resource exists.
- `404`: The organization has no export with this identifier.

## Changes

- **2026-11-19** `3b071797f6e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v1/ai-cost-management/exports/:exportId/get.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
