Skip to main content
GET/analytics/{datasetSlug}/schedules

List 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.

Parameters
datasetSlug *path

The Dataset's slug.

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:read.
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 materialization schedules that write to this dataset.

schedules *object[]

The dataset's schedules, newest first.

id *string

The schedule's id (msch_...).

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>

attestedAt plus reattestIntervalDays.

After it the schedule stops running until it is re-attested; it isn't deleted.

attestationStatus *"active" | "expiring_soon" | "expired"

expiring_soon within 14 days of expiresAt.

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: ok, error, stale_principal_denied (the person who configured it has lost write access to the dataset) or attestation_expired.

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
projectIdstring
warningsobject[]
code *string
message *string
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.analytics.schedules.list('<datasetSlug>')

Showing example in TypeScript

Response example (200)
{
  "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"
      }
    ]
  }
}

More in Analytics & Intelligence