Schedules
Schedule your xRunBooks via our API
Last updated
Was this helpful?
Schedule your xRunBooks via our API
Last updated
Was this helpful?
Example:
curl 'https://<your domain>/v1alpha1/schedules?pageSize=1&pageToken=1' \
-H "X-unSkript-API-Key:>token>"
This schedules "unSkript Rules" to run at 5 AM (GMT) every day:
curl -X POST 'https://<api domain>/v1alpha1/schedules' \
-H "X-unSkript-API-Key:<api token>" \
-d '{"schedule":{"proxyId":"1499f27c-640sdfds6-4fbd-bd1b-c6f92800018f",
"runbookName":"unSkript rulez",
"runbookId":"14fac589-5849-403b-afcf-ed80as79099500",
"schedule":"* 5 * * *"}}'
curl 'https://<domain>/v1alpha1/schedules/97b8208a-7b05-4212-b1c3-2e0f0abe8060' \
-H "X-unSkript-API-Key:<api key>"
curl -X DELETE 'https://<domain>/v1alpha1/schedules/c67888f8-2df8-4248-9280-5c4b3589cf43' \
-H "X-unSkript-API-Key:<api token>"
List schedules
tid is the unique request id.
filter expression.
page_size specifies the maximum number of results to be returned.
page_token is used to request a specific page of the list results.
order_by is used to sort the fields by ascending or descending.
GET /v1alpha1/schedules HTTP/1.1
Host:
Accept: */*
{
"respHdr": {
"tid": "text",
"requestTid": "text"
},
"schedules": [
{
"id": "text",
"proxyId": "text",
"proxyName": "text",
"runbookId": "text",
"runbookName": "text",
"inputSchema": "text",
"params": "text",
"schedule": "text",
"lastRun": "2025-06-20T06:57:04.362Z",
"lastUpdated": "2025-06-20T06:57:04.362Z",
"userEmail": "text"
}
],
"nextPageToken": "text",
"pageCount": 1,
"totalCount": 1
}
Get details about a particular schedule
schedule_id is the id of the schedule.
tid is the unique request id.
GET /v1alpha1/schedules/{scheduleId} HTTP/1.1
Host:
Accept: */*
{
"respHdr": {
"tid": "text",
"requestTid": "text"
},
"schedule": {
"id": "text",
"proxyId": "text",
"proxyName": "text",
"runbookId": "text",
"runbookName": "text",
"inputSchema": "text",
"params": "text",
"schedule": "text",
"lastRun": "2025-06-20T06:57:04.362Z",
"lastUpdated": "2025-06-20T06:57:04.362Z",
"userEmail": "text"
}
}
Deletes a particular schedule
schedule_id is the id of the schedule.
tid is the unique request id.
DELETE /v1alpha1/schedules/{scheduleId} HTTP/1.1
Host:
Accept: */*
{
"respHdr": {
"tid": "text",
"requestTid": "text"
}
}
Creates and returns a Schedule object on Success and error on failure
CreateScheduleRequest is the request to create new schedual for particular xRunbook.
POST /v1alpha1/schedules HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 150
{
"reqHdr": {
"tid": "text"
},
"schedule": {
"proxyId": "text",
"runbookId": "text",
"runbookName": "text",
"inputSchema": "text",
"params": "text",
"schedule": "text"
}
}
{
"respHdr": {
"tid": "text",
"requestTid": "text"
},
"schedule": {
"id": "text",
"proxyId": "text",
"proxyName": "text",
"runbookId": "text",
"runbookName": "text",
"inputSchema": "text",
"params": "text",
"schedule": "text",
"lastRun": "2025-06-20T06:57:04.362Z",
"lastUpdated": "2025-06-20T06:57:04.362Z",
"userEmail": "text"
}
}
Update certain fields of a schedule.
schedule_id is the id of schedule.
tid is the unique request id.
Schedule contains basic details about a schedule.
id is the id of the schedule.
proxy_id is the id of the proxy under which the schedule should be created.
environment_name is the name of the environment under which the schedule should be created.
runbook_id is the id of the runbook under which the schedule should be created.
runbook_name is the name of the runbook under which the schedule should be created.
input_schema is the workflow's input schema.
params are params for creating a calendar.
last_run captures the time it was last run.
last_updated captures the time it was last updated.
PATCH /v1alpha1/schedules/{scheduleId} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 113
{
"proxyId": "text",
"runbookId": "text",
"runbookName": "text",
"inputSchema": "text",
"params": "text",
"schedule": "text"
}
{
"respHdr": {
"tid": "text",
"requestTid": "text"
},
"schedule": {
"id": "text",
"proxyId": "text",
"proxyName": "text",
"runbookId": "text",
"runbookName": "text",
"inputSchema": "text",
"params": "text",
"schedule": "text",
"lastRun": "2025-06-20T06:57:04.362Z",
"lastUpdated": "2025-06-20T06:57:04.362Z",
"userEmail": "text"
}
}