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:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | No | |
projectId | string | Yes | |
folderId | string | null | No | |
name | string | Yes | |
label | string | Yes | |
description | string | No | |
cron | string | Yes | |
timezone | string | No | |
enabled | boolean | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string |
getSchedule
Get a schedule by ID
GET
Usage:
const result = await swirls.client.schedules.getSchedule({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
folderId | string | null | |
name | string | |
label | string | |
description | string | null | |
cron | string | |
timezone | string | null | |
enabled | boolean | |
nextRunAt | unknown | |
running | boolean | |
createdAt | unknown | |
orgId | string | null | |
userId | string |
updateSchedule
Update a schedule
PUT
Usage:
const result = await swirls.client.schedules.updateSchedule({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | No | |
description | string | No | |
cron | string | No | |
timezone | string | null | No | |
enabled | boolean | No | |
folderId | string | null | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
folderId | string | null | |
name | string | |
label | string | |
description | string | null | |
cron | string | |
timezone | string | null | |
enabled | boolean | |
nextRunAt | unknown | |
running | boolean | |
createdAt | unknown | |
orgId | string | null | |
userId | string |
deleteSchedule
Delete a schedule
DELETE
Usage:
const result = await swirls.client.schedules.deleteSchedule({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
listSchedules
List all schedules in a project
GET
Usage:
const result = await swirls.client.schedules.listSchedules({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
folderId | string | null | No | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |
listTriggersForSchedule
GET
Usage:
const result = await swirls.client.schedules.listTriggersForSchedule({
scheduleId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
scheduleId | string | Yes | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |