/analytics/{datasetSlug}/schedulesList Dataset Schedules
Returns the dataset's schedules with lastRunAt, lastRunStatus, nextRunAt and their attestation state (attestedAt, expiresAt, attestationStatus).
Requires the datasets:read 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.
| datasetSlug * | path | The Dataset's slug. |
| 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:read. |
| 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 materialization schedules that write to this dataset. |
| schedules * | object[] | The dataset's schedules, newest first. |
| id * | string | The schedule's id ( |
| datasetSlug * | string | The dataset each run writes to. |
| sourceCollection * | string | The collection each run snapshots. |
| intervalSeconds * | integer | Seconds between runs. |
| enabled * | boolean | Whether the schedule is set to run. |
| reattestIntervalDays * | integer | How many days each attestation lasts: 7, 30, 90 or 365. |
| attestedAt * | string <date-time> | When a person last confirmed the schedule (created or re-attested it). |
| expiresAt * | string <date-time> |
After it the schedule stops running until it is re-attested; it isn't deleted. |
| attestationStatus * | "active" | "expiring_soon" | "expired" |
|
| lastRunAt * | any | When the schedule last ran. Null if it has never run. |
| One of: string <date-time> | ||
| or: null | ||
| lastRunStatus * | any | How the last run ended: Null if it has never run. |
| One of: string | ||
| or: null | ||
| nextRunAt * | string <date-time> | When the schedule is next due. |
| createdAt * | string <date-time> | When the schedule was created. |
| 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.schedules.list('<datasetSlug>')Showing example in TypeScript
{
"data": {
"schedules": [
{
"id": "string",
"datasetSlug": "string",
"sourceCollection": "string",
"intervalSeconds": 0,
"enabled": false,
"reattestIntervalDays": 0,
"attestedAt": "string",
"expiresAt": "string",
"attestationStatus": "active",
"lastRunAt": "string",
"lastRunStatus": "string",
"nextRunAt": "string",
"createdAt": "string"
}
]
},
"meta": {
"timing": {
"gatewayMs": 0,
"totalMs": 0
},
"context": {
"requestId": "string",
"traceId": "string",
"projectId": "string"
},
"warnings": [
{
"code": "string",
"message": "string"
}
]
}
}