Skip to main content
POST
/
datasets
/
{dataset_id}
/
refresh-schedule
Create a refresh schedule for an existing materialized view
curl --request POST \
  --url https://api-dev.narrative.io/datasets/{dataset_id}/refresh-schedule \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cron": "@hourly",
  "cron_zone_id": "EST",
  "stats_enabled": false,
  "status": "active"
}
'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dataset_id
integer
required

Unique identifier for a dataset.

Body

application/json
cron
string
required

cron expression "for example: @hourly, 0 12 * * 1-5"

cron_zone_id
string
required

zone id where the cron should take place "for example: EST, GMT+2"

execution_cluster
object
stats_enabled
boolean

if we need to enable advanced statistics calculation

status
enum<string>

active will be ran on cron schedule, pending and archived won't be run

Available options:
active,
pending,
archived
compute_pool_id
string<uuid>

The ID of the compute pool to use for scheduled refreshes. The compute pool must be active, belong to your company, and be associated with the target data plane.

Response

200

OK