Query
schedule_items
Returns a list of schedule items. A schedule item groups all of the scheduling data about a configured scan, such as the time and date when the scan is scheduled to run, and how frequently. When a scheduled scan is due to start, a Scan object is created based on the associated schedule item. Note that for recurring scans, all individual occurrences of the scan share a common schedule item.
Returns
Example
Query
query GetScheduleItems($sort_by: SortBy, $sort_order: SortOrder) {
schedule_items(sort_by: $sort_by, sort_order: $sort_order) {
id
sites {
id
name
}
schedule {
initial_run_time
rrule
name
}
scheduled_run_time
}
}
Variables
{
"sort_by": "start",
"sort_order": "asc"
}
Result
{
"data": {
"schedule_items": [
{
"id": "2",
"sites": [
{
"id": "2",
"name": "Example shop"
}
],
"schedule": {
"initial_run_time": "2026-01-02T09:00:00.000Z",
"rrule": null,
"name": "One-off scan"
},
"scheduled_run_time": "2026-01-02T09:00:00.000Z"
},
{
"id": "1",
"sites": [
{
"id": "1",
"name": "Example site"
}
],
"schedule": {
"initial_run_time": "2026-01-05T09:00:00.000Z",
"rrule": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO",
"name": "Weekly scan"
},
"scheduled_run_time": "2026-01-05T09:00:00.000Z"
}
]
}
}