Search documentation
karat

+

K

User Documentation ↗

Create Schedule

POST/api/v2/orchestration/schedules
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Creates a new Schedule.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:orchestration-write.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

CreateScheduleRequest
object
Hide child attributes

Hide child attributes

displayName
string
optional
description
string
optional
action
object
Show child attributes

Show child attributes

abortOnFailure
boolean
optional

If any job in the build is unsuccessful, immediately finish the build by cancelling all other jobs.

forceBuild
boolean
optional

Whether to ignore staleness information when running the build.

retryBackoffDuration
object
optional

The duration to wait before retrying after a Job fails.

Show child attributes

Show child attributes

value
integer

The duration value.

unit
string (enum)

The unit of duration.

Enum values: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS

retryCount
integer
optional

The number of retry attempts for failed Jobs within the Build. A Job's failure is not considered final until all retries have been attempted or an error occurs indicating that retries cannot be performed. Be aware, not all types of failures can be retried.

fallbackBranches
list<BranchName>
optional

The branches to retrieve JobSpecs from if no JobSpec is found on the target branch.

Show child attributes

Show child attributes

BranchName
string

The name of a Branch.

branchName
string
optional

The target branch the schedule should run on.

notificationsEnabled
boolean
optional

Whether to receive a notification at the end of scheduled builds.

target
union

The targets of the build.

Show child attributes

Show child attributes

upstream
object
optional
Show child attributes

Show child attributes

ignoredRids
list<BuildableRid>
optional

The datasets to ignore when calculating the final set of dataset to build.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

targetRids
list<BuildableRid>
optional

The target datasets.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

manual
object
optional
Show child attributes

Show child attributes

targetRids
list<BuildableRid>
optional
Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

connecting
object
optional
Show child attributes

Show child attributes

ignoredRids
list<BuildableRid>
optional

The datasets between the input datasets and target datasets to exclude.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

targetRids
list<BuildableRid>
optional

The downstream target datasets (inclusive).

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

inputRids
list<BuildableRid>
optional

The upstream input datasets (exclusive).

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

trigger
union
optional

The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty.

Show child attributes

Show child attributes

jobSucceeded
object
optional

Trigger whenever a job succeeds on the dataset and on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

or
object
optional

Trigger whenever any of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
Show child attributes

Show child attributes

jobSucceeded
object
optional

Trigger whenever a job succeeds on the dataset and on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

or
object
optional

Trigger whenever any of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
newLogic
object
optional

Trigger whenever a new JobSpec is put on the dataset and on that branch.

Show child attributes

Show child attributes

branchName
string

The name of a Branch.

datasetRid
string

The Resource Identifier (RID) of a Dataset.

and
object
optional

Trigger after all of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
datasetUpdated
object
optional

Trigger whenever a new transaction is committed to the dataset on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

scheduleSucceeded
object
optional

Trigger whenever the specified schedule completes its action successfully.

Show child attributes

Show child attributes

scheduleRid
string

The Resource Identifier (RID) of a Schedule.

mediaSetUpdated
object
optional

Trigger whenever an update is made to a media set on the target branch. For transactional media sets, this happens when a transaction is committed. For non-transactional media sets, this event happens eventually (but not necessary immediately) after an update.

Show child attributes

Show child attributes

mediaSetRid
string

The Resource Identifier (RID) of a Media Set

branchName
string

The name of a Branch.

time
object
optional

Trigger on a time based schedule.

Show child attributes

Show child attributes

cronExpression
string

A standard CRON expression with minute, hour, day, month and day of week.

timeZone
string

A string representation of a java.time.ZoneId

newLogic
object
optional

Trigger whenever a new JobSpec is put on the dataset and on that branch.

Show child attributes

Show child attributes

branchName
string

The name of a Branch.

datasetRid
string

The Resource Identifier (RID) of a Dataset.

and
object
optional

Trigger after all of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
Show child attributes

Show child attributes

jobSucceeded
object
optional

Trigger whenever a job succeeds on the dataset and on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

or
object
optional

Trigger whenever any of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
newLogic
object
optional

Trigger whenever a new JobSpec is put on the dataset and on that branch.

Show child attributes

Show child attributes

branchName
string

The name of a Branch.

datasetRid
string

The Resource Identifier (RID) of a Dataset.

and
object
optional

Trigger after all of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
datasetUpdated
object
optional

Trigger whenever a new transaction is committed to the dataset on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

scheduleSucceeded
object
optional

Trigger whenever the specified schedule completes its action successfully.

Show child attributes

Show child attributes

scheduleRid
string

The Resource Identifier (RID) of a Schedule.

mediaSetUpdated
object
optional

Trigger whenever an update is made to a media set on the target branch. For transactional media sets, this happens when a transaction is committed. For non-transactional media sets, this event happens eventually (but not necessary immediately) after an update.

Show child attributes

Show child attributes

mediaSetRid
string

The Resource Identifier (RID) of a Media Set

branchName
string

The name of a Branch.

time
object
optional

Trigger on a time based schedule.

Show child attributes

Show child attributes

cronExpression
string

A standard CRON expression with minute, hour, day, month and day of week.

timeZone
string

A string representation of a java.time.ZoneId

datasetUpdated
object
optional

Trigger whenever a new transaction is committed to the dataset on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

scheduleSucceeded
object
optional

Trigger whenever the specified schedule completes its action successfully.

Show child attributes

Show child attributes

scheduleRid
string

The Resource Identifier (RID) of a Schedule.

mediaSetUpdated
object
optional

Trigger whenever an update is made to a media set on the target branch. For transactional media sets, this happens when a transaction is committed. For non-transactional media sets, this event happens eventually (but not necessary immediately) after an update.

Show child attributes

Show child attributes

mediaSetRid
string

The Resource Identifier (RID) of a Media Set

branchName
string

The name of a Branch.

time
object
optional

Trigger on a time based schedule.

Show child attributes

Show child attributes

cronExpression
string

A standard CRON expression with minute, hour, day, month and day of week.

timeZone
string

A string representation of a java.time.ZoneId

scopeMode
union
optional

The boundaries for the schedule build.

Show child attributes

Show child attributes

project
object
optional
Show child attributes

Show child attributes

projectRids
list<ProjectRid>
optional
Show child attributes

Show child attributes

ProjectRid
string

The unique resource identifier (RID) of a Project.

user
object
optional

Response body

Schedule
object

The created Schedule

Hide child attributes

Hide child attributes

rid
string

The Resource Identifier (RID) of a Schedule.

displayName
string
optional
description
string
optional
currentVersionRid
string

The RID of the current schedule version

createdTime
string

The time at which the resource was created.

createdBy
string

The Foundry user who created this resource

updatedTime
string

The time at which the resource was most recently updated.

updatedBy
string

The Foundry user who last updated this resource

paused
boolean
trigger
union
optional

The schedule trigger. If the requesting user does not have permission to see the trigger, this will be empty.

Show child attributes

Show child attributes

jobSucceeded
object
optional

Trigger whenever a job succeeds on the dataset and on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

or
object
optional

Trigger whenever any of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
Show child attributes

Show child attributes

jobSucceeded
object
optional

Trigger whenever a job succeeds on the dataset and on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

or
object
optional

Trigger whenever any of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
newLogic
object
optional

Trigger whenever a new JobSpec is put on the dataset and on that branch.

Show child attributes

Show child attributes

branchName
string

The name of a Branch.

datasetRid
string

The Resource Identifier (RID) of a Dataset.

and
object
optional

Trigger after all of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
datasetUpdated
object
optional

Trigger whenever a new transaction is committed to the dataset on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

scheduleSucceeded
object
optional

Trigger whenever the specified schedule completes its action successfully.

Show child attributes

Show child attributes

scheduleRid
string

The Resource Identifier (RID) of a Schedule.

mediaSetUpdated
object
optional

Trigger whenever an update is made to a media set on the target branch. For transactional media sets, this happens when a transaction is committed. For non-transactional media sets, this event happens eventually (but not necessary immediately) after an update.

Show child attributes

Show child attributes

mediaSetRid
string

The Resource Identifier (RID) of a Media Set

branchName
string

The name of a Branch.

time
object
optional

Trigger on a time based schedule.

Show child attributes

Show child attributes

cronExpression
string

A standard CRON expression with minute, hour, day, month and day of week.

timeZone
string

A string representation of a java.time.ZoneId

newLogic
object
optional

Trigger whenever a new JobSpec is put on the dataset and on that branch.

Show child attributes

Show child attributes

branchName
string

The name of a Branch.

datasetRid
string

The Resource Identifier (RID) of a Dataset.

and
object
optional

Trigger after all of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
Show child attributes

Show child attributes

jobSucceeded
object
optional

Trigger whenever a job succeeds on the dataset and on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

or
object
optional

Trigger whenever any of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
newLogic
object
optional

Trigger whenever a new JobSpec is put on the dataset and on that branch.

Show child attributes

Show child attributes

branchName
string

The name of a Branch.

datasetRid
string

The Resource Identifier (RID) of a Dataset.

and
object
optional

Trigger after all of the given triggers emit an event.

Show child attributes

Show child attributes

triggers
list<Trigger>
optional
Show child attributes

Show child attributes

Trigger
union
datasetUpdated
object
optional

Trigger whenever a new transaction is committed to the dataset on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

scheduleSucceeded
object
optional

Trigger whenever the specified schedule completes its action successfully.

Show child attributes

Show child attributes

scheduleRid
string

The Resource Identifier (RID) of a Schedule.

mediaSetUpdated
object
optional

Trigger whenever an update is made to a media set on the target branch. For transactional media sets, this happens when a transaction is committed. For non-transactional media sets, this event happens eventually (but not necessary immediately) after an update.

Show child attributes

Show child attributes

mediaSetRid
string

The Resource Identifier (RID) of a Media Set

branchName
string

The name of a Branch.

time
object
optional

Trigger on a time based schedule.

Show child attributes

Show child attributes

cronExpression
string

A standard CRON expression with minute, hour, day, month and day of week.

timeZone
string

A string representation of a java.time.ZoneId

datasetUpdated
object
optional

Trigger whenever a new transaction is committed to the dataset on the target branch.

Show child attributes

Show child attributes

datasetRid
string

The Resource Identifier (RID) of a Dataset.

branchName
string

The name of a Branch.

scheduleSucceeded
object
optional

Trigger whenever the specified schedule completes its action successfully.

Show child attributes

Show child attributes

scheduleRid
string

The Resource Identifier (RID) of a Schedule.

mediaSetUpdated
object
optional

Trigger whenever an update is made to a media set on the target branch. For transactional media sets, this happens when a transaction is committed. For non-transactional media sets, this event happens eventually (but not necessary immediately) after an update.

Show child attributes

Show child attributes

mediaSetRid
string

The Resource Identifier (RID) of a Media Set

branchName
string

The name of a Branch.

time
object
optional

Trigger on a time based schedule.

Show child attributes

Show child attributes

cronExpression
string

A standard CRON expression with minute, hour, day, month and day of week.

timeZone
string

A string representation of a java.time.ZoneId

action
object
Show child attributes

Show child attributes

target
union

The targets of the build.

Show child attributes

Show child attributes

upstream
object
optional

Target the specified datasets along with all upstream datasets except the ignored datasets.

Show child attributes

Show child attributes

targetRids
list<BuildableRid>
optional

The target datasets.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

ignoredRids
list<BuildableRid>
optional

The datasets to ignore when calculating the final set of dataset to build.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

manual
object
optional

Manually specify all datasets to build.

Show child attributes

Show child attributes

targetRids
list<BuildableRid>
optional
Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

connecting
object
optional

All datasets between the input datasets (exclusive) and the target datasets (inclusive) except for the datasets to ignore.

Show child attributes

Show child attributes

inputRids
list<BuildableRid>
optional

The upstream input datasets (exclusive).

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

targetRids
list<BuildableRid>
optional

The downstream target datasets (inclusive).

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

ignoredRids
list<BuildableRid>
optional

The datasets between the input datasets and target datasets to exclude.

Show child attributes

Show child attributes

BuildableRid
string

The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID.

branchName
string

The target branch the schedule should run on.

fallbackBranches
list<BranchName>
optional

The branches to retrieve JobSpecs from if no JobSpec is found on the target branch.

Show child attributes

Show child attributes

BranchName
string

The name of a Branch.

forceBuild
boolean

Whether to ignore staleness information when running the build.

retryCount
integer
optional

The number of retry attempts for failed Jobs within the Build. A Job's failure is not considered final until all retries have been attempted or an error occurs indicating that retries cannot be performed. Be aware, not all types of failures can be retried.

retryBackoffDuration
object
optional

The duration to wait before retrying after a Job fails.

Show child attributes

Show child attributes

value
integer

The duration value.

unit
string (enum)

The unit of duration.

Enum values: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS

abortOnFailure
boolean

If any job in the build is unsuccessful, immediately finish the build by cancelling all other jobs.

notificationsEnabled
boolean

Whether to receive a notification at the end of scheduled builds.

scopeMode
union

The boundaries for the schedule build.

Show child attributes

Show child attributes

project
object
optional

The schedule will only build resources in the following projects.

Show child attributes

Show child attributes

projectRids
list<ProjectRid>
optional
Show child attributes

Show child attributes

ProjectRid
string

The unique resource identifier (RID) of a Project.

user
object
optional

When triggered, the schedule will build all resources that the associated user is permitted to build.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/orchestration/schedules?preview=true" \ -d '{"displayName":"My Daily Schedule","description":"Run all the transforms at midnight","action":{"abortOnFailure":false,"forceBuild":false,"retryBackoffDuration":{"unit":"SECONDS","value":30},"fallbackBranches":[],"branchName":"master","notificationsEnabled":false,"target":{"type":"manual","targetRids":["ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e","ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43"]}},"trigger":{"type":"time","cronExpression":"0 0 * * *","timeZone":"UTC"},"scopeMode":{"type":"user"}}'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 { "updatedTime": "2024-09-25T17:29:35.974Z", "paused": false, "updatedBy": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", "createdBy": "f05f8da4-b84c-4fca-9c77-8af0b13d11de", "displayName": "My Daily Schedule", "currentVersionRid": "ri.scheduler.main.schedule-version.4d1eb55f-6c13-411c-a911-5d84e08d8017", "description": "Run all the transforms at midnight", "createdTime": "2024-09-25T17:29:35.974Z", "action": { "abortOnFailure": false, "forceBuild": false, "retryBackoffDuration": { "unit": "SECONDS", "value": 30 }, "fallbackBranches": [], "branchName": "master", "notificationsEnabled": false, "target": { "type": "manual", "targetRids": [ "ri.foundry.main.dataset.b737e24d-6b19-43aa-93d5-da9fc4073f6e", "ri.foundry.main.dataset.d2452a94-a755-4778-8bfc-a315ab52fc43" ] } }, "trigger": { "type": "time", "cronExpression": "0 0 * * *", "timeZone": "UTC" }, "rid": "ri.scheduler.main.schedule.8843955e-37d1-4363-85eb-539833e10a41", "scopeMode": { "type": "user" } }