Skip to main content
GET/analytics

List Datasets

Returns the project's active datasets, newest first: slug, display name, schema, partition keys (region is always the first), residency class, storage target and creation time.

Requires the datasets:list permission (PROJECT_ADMIN, PROJECT_AUTHOR or PROJECT_EDITOR by default).

Callers must be members of the project (an organization role alone does not grant access); project service tokens and extension tokens cannot call it.

Parameters
projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Responses
HTTPK9O CodeDescription
200Success
401K9O_UNAUTHENTICATEDThe caller is not signed in.
403K9O_ACCESS_DENIEDThe caller is not a member of this project; an organization role alone does not grant access.
403K9O_IAM_POLICY_DENIEDThe caller's role or IAM policy does not grant datasets:list.
404K9O_NOT_FOUNDThe project was not found for this caller (project service tokens and extension tokens cannot call this endpoint).
Response body (200)
data *object[]

The project's datasets, newest first.

Retired datasets are left out.

id *string

dset_ id.

slug *string

The dataset's name, unique in the project.

Queries refer to it as dataset.<slug>.

displayName *string

The name shown for the dataset.

schema *object[]

The declared columns, in order.

name *string

The column's name.

type *string

string, int32, int64, float64, bool, date, timestamp, json, bytes, or decimal(p,s).

partitionKeys *string[]

Always starts with region, then the declared partitionBy keys.

residencyClass *"per-subject" | "shared"

per-subject: rows hold data about individual people, sealed per person and kept in that person's region. shared: rows are not about any one person.

storageTarget *any

Where the dataset's files are kept: managed for platform-managed storage, or byos with the bindingId of a storage location you connected.

One of: object
kind *"managed"

Platform-managed storage.

or: object
kind *"byos"

A storage location you connected.

bindingId *string

The storage location's binding id.

createdAt *string <date-time>

When the dataset was created.

retiredAt *null

Always null: a retired dataset reads as absent.

meta *object

Request metadata: cost, timing and correlation ids.

cost *object

Metered usage for this request; empty when nothing was metered.

timing *object
gatewayMs *number
totalMs *number
context *object
requestId *string
traceId *string
projectIdstring
warningsobject[]
code *string
message *string
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.analytics.list()

Showing example in TypeScript

Response example (200)
{
  "data": [
    {
      "id": "string",
      "slug": "string",
      "displayName": "string",
      "schema": [
        {
          "name": "string",
          "type": "string"
        }
      ],
      "partitionKeys": [
        "string"
      ],
      "residencyClass": "per-subject",
      "storageTarget": {
        "kind": "managed"
      },
      "createdAt": "string"
    }
  ],
  "meta": {
    "timing": {
      "gatewayMs": 0,
      "totalMs": 0
    },
    "context": {
      "requestId": "string",
      "traceId": "string",
      "projectId": "string"
    },
    "warnings": [
      {
        "code": "string",
        "message": "string"
      }
    ]
  }
}

More in Analytics & Intelligence