SWIRLS_
ReferenceSDKClient

Schedules

SDK reference for schedules — Create and manage cron schedules that can trigger graph executions.

Create and manage cron schedules that can trigger graph executions.

createSchedule

Create a new cron schedule that can trigger graphs

POST

Usage:

const result = await swirls.client.schedules.createSchedule({
  projectId: '...',
  name: '...',
  label: '...',
  cron: '...',
})

Input:

ParameterTypeRequiredDescription
idstringNo
projectIdstringYes
folderIdstring | nullNo
namestringYes
labelstringYes
descriptionstringNo
cronstringYes
timezonestringNo
enabledbooleanNo

Output:

FieldTypeDescription
idstring

getSchedule

Get a schedule by ID

GET

Usage:

const result = await swirls.client.schedules.getSchedule({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes

Output:

FieldTypeDescription
idstring
projectIdstring
folderIdstring | null
namestring
labelstring
descriptionstring | null
cronstring
timezonestring | null
enabledboolean
nextRunAtunknown
runningboolean
createdAtunknown
orgIdstring | null
userIdstring

updateSchedule

Update a schedule

PUT

Usage:

const result = await swirls.client.schedules.updateSchedule({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes
namestringNo
descriptionstringNo
cronstringNo
timezonestring | nullNo
enabledbooleanNo
folderIdstring | nullNo

Output:

FieldTypeDescription
idstring
projectIdstring
folderIdstring | null
namestring
labelstring
descriptionstring | null
cronstring
timezonestring | null
enabledboolean
nextRunAtunknown
runningboolean
createdAtunknown
orgIdstring | null
userIdstring

deleteSchedule

Delete a schedule

DELETE

Usage:

const result = await swirls.client.schedules.deleteSchedule({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes

listSchedules

List all schedules in a project

GET

Usage:

const result = await swirls.client.schedules.listSchedules({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
folderIdstring | nullNo
paginationobjectNo

Output:

FieldTypeDescription
paginationobject
resultsobject[]
totalCountnumber

listTriggersForSchedule

GET

Usage:

const result = await swirls.client.schedules.listTriggersForSchedule({
  scheduleId: '...',
})

Input:

ParameterTypeRequiredDescription
scheduleIdstringYes
paginationobjectNo

Output:

FieldTypeDescription
paginationobject
resultsobject[]
totalCountnumber

On this page