/analyticsList 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.
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 401 | K9O_UNAUTHENTICATED | The caller is not signed in. |
| 403 | K9O_ACCESS_DENIED | The caller is not a member of this project; an organization role alone does not grant access. |
| 403 | K9O_IAM_POLICY_DENIED | The caller's role or IAM policy does not grant datasets:list. |
| 404 | K9O_NOT_FOUND | The project was not found for this caller (project service tokens and extension tokens cannot call this endpoint). |
| data * | object[] | The project's datasets, newest first. Retired datasets are left out. |
| id * | string |
|
| slug * | string | The dataset's name, unique in the project. Queries refer to it as |
| displayName * | string | The name shown for the dataset. |
| schema * | object[] | The declared columns, in order. |
| name * | string | The column's name. |
| type * | string |
|
| partitionKeys * | string[] | Always starts with |
| residencyClass * | "per-subject" | "shared" |
|
| storageTarget * | any | Where the dataset's files are kept: |
| 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 | |
| projectId | string | |
| warnings | object[] | |
| code * | string | |
| message * | string | |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.analytics.list()Showing example in TypeScript
{
"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"
}
]
}
}