exports

Returns a page of the organization's exports, newest first unless the request sets sort. Filters on status, dataset, schedule.id, and created_at narrow the list.

get/v1/ai-cost-management/exports

Request

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

Query parameters

filter, AICostExportFilterParameters

Filters on the exports' fields. Every filter must match, and a bare value means eq.

  • status: eq, neq, and oeq. filter[status]=succeeded excludes expired exports, and filter[status]=expired selects them.
  • dataset: eq, neq, and oeq.
  • schedule.id: eq, neq, and oeq. filter[schedule.id] selects the exports that one schedule created.
  • created_at: eq, gt, gte, lt, and lte.
  • labels.<key>: the value of the label <key>, with eq, neq, oeq, contains, ocontains, exists, and nexists. A bare key with no value matches exports that have the label. eq, neq, and oeq compare case-sensitively, and contains and ocontains ignore case.

Any other filter key fails with 400. Enum values are case-sensitive, so any other spelling, such as SUCCEEDED, fails with 400. UUIDs compare case-insensitively.

status, union

Filters a field by its value with eq, neq, or oeq. Accepts pending, running, succeeded, failed, and expired. A bare value means eq.

dataset, union

Filters a field by its value with eq, neq, or oeq. Accepts usage_events and focus. A bare value means eq.

schedule.id, UuidFieldFilter

Filter using one of the following operators: eq, oeq, neq

created_at, union

Filters on the given datetime (RFC-3339) field value.

Narrows the list. Each filter has the form filter[field][operator]=value, or filter[field]=value for eq. An operator that takes no value, such as exists, leaves out =value.

A request can combine several filters, and every filter must match.

{
  "created_at": {
    "eq": "2022-03-30T07:20:50Z"
  }
}
sort, string

The order of the results, as a comma-separated list of fields in priority order. Each field can be followed by a space and asc or desc, and sorts in ascending order without one. The service breaks ties so that the order is unique.

Sortable fields: status, dataset, created_at. Defaults to created_at desc.

page[size], integer

The number of results on each page.

1 to 100. Defaults to 20.

page[after], string

A cursor for the page after an earlier response's page. Clients take it from that response's meta.page.next link, which also carries the request's other parameters, and don't build or change it.

A request can't send both page[after] and page[before].

page[before], string

A cursor for the page before an earlier response's page. Clients take it from that response's meta.page.previous link, which also carries the request's other parameters, and don't build or change it.

A request can't send both page[after] and page[before].

Response

A page of exports.

object required
data, AICostExport[] required

The exports on this page, in sort order.

meta, CursorMeta required

Pagination metadata.

Example response

{
  "data": [
    {
      "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
      "format": "csv",
      "compression": "gzip",
      "labels": {
        "env": "test"
      },
      "created_at": "2022-11-04T20:10:06.927Z",
      "updated_at": "2022-11-04T20:10:06.927Z",
      "expires_at": "2022-11-04T20:10:06.927Z"
    }
  ],
  "meta": {
    "page": {
      "size": 10
    }
  }
}

Changes