Create an export schedule
Changed onCreates an export schedule and returns it. The server assigns the identifier.
An active schedule creates one export of each of its periods as the period ends, starting with the period in progress.
If the body is invalid, the request fails with 400. If the organization already has 20 export schedules, the request fails with 409.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Request body
The body of a request that creates or replaces an export schedule. It carries the full schedule without id, next_run_at, created_at, and updated_at, which the server sets.
The body of a request that creates or replaces an export schedule. It carries the full schedule without id, next_run_at, created_at, and updated_at, which the server sets.
Example request
{
"format": "csv",
"compression": "gzip",
"labels": {
"env": "test"
},
"managed_by": {
"owner": "terraform"
}
}Response
The created export schedule.
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.
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.
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
- info
endpoint added
- info