exports

Get an export schedule

Changed on

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

get/v1/ai-cost-management/export-schedules/{scheduleId}

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

scheduleId, string uuid required

The id of the export schedule.

Response

The export schedule.

AICostExportSchedule required

An export schedule exports the organization's usage period by period, such as month by month. An active schedule creates one export of each period as the period ends. Each export is an ordinary export whose schedule names the schedule: it's listed, downloaded, and expires like a one-time export. Its files follow the dataset's rule: one for each day for usage_events, and one for each calendar month for focus. Each export of a daily usage_events schedule or a monthly focus schedule therefore has one file.

  • The export of a period has the period's start as starts_at and its end as ends_at, and the schedule's other settings as they are when the export is created.
  • When a schedule becomes active, by creation or by resuming, its first period is the one in progress. That period's export covers the whole period, including the time before the schedule became active.
  • A schedule exports each period once and never refreshes it, even when events of the period arrive later. A scheduled export that fails stays failed, and the schedule doesn't create it again. To include later events or to fill a failed period, a client creates a one-time export of the same range.
  • When runs are late, for example after an outage, the schedule catches up on at most the 31 most recent periods that ended while it was active, and skips older ones.
id, string uuid required

Contains a unique identifier used for this resource.

name, string required

A human-readable name for the schedule.

1 to 100 characters after the server removes leading and trailing whitespace.

cadence, 'daily' | 'weekly' | 'monthly' required

The length of each period, which sets the range of each export.

A replacement can't change it.

time_zone, string iana-time-zone required

The IANA time zone in which the periods start. Each export that the schedule creates has this time_zone.

A replacement can't change it.

status, 'active' | 'paused' required

Whether the schedule creates exports.

dataset, 'usage_events' | 'focus' required

The data that each export holds.

schema_version, 1 | 2 required

The schema version of each export's data files within the dataset, which fixes their columns and values.

focus, AICostFocusOptions nullable required

The FOCUS options of each export, with defaults applied.

null unless dataset is focus.

format, 'parquet' | 'csv' required

The file format of each export's data files.

compression, 'none' | 'gzip' | 'zstd' required

How each export's data files are compressed.

filters, object required

The filters of each export. {} for none.

labels, Labels required

Key-value metadata on the schedule. The schedule list can filter by label. Each export that the schedule creates copies the labels as they are at that moment.

managed_by, ManagedBy required

Identifies the tool that manages this resource, such as {"tool": "terraform-provider-konnect"}. The service stores the value and never acts on it.

next_run_at, string date-time nullable required

When the period in progress ends and the schedule creates its export, as an RFC 3339 timestamp in UTC. That export starts 6 hours later, so that events that arrive late can be stored first.

null while the schedule is paused. It's in the past while a run is late.

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.

Example response

{
  "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "format": "csv",
  "compression": "gzip",
  "labels": {
    "env": "test"
  },
  "managed_by": {
    "owner": "terraform"
  },
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z"
}

Changes

    • warning

      added the new 2.00 enum value to the allOf[subschema #1]/schema_version/allOf[#/components/schemas/AICostExportSchemaVersion] response property for the response status

    • info

      added the required property allOf[subschema #1]/managed_by to the response with the status