API reference

Schedules

Runs a branch's manifest starts on a timer: list them with their last run, pause one, run one now.

GET/v1/ci/schedules

List schedules

Schedules, their last run and the templates on offer.

Permission: ci:jobs.read

Parameters

NameTypeRequiredDescription
repoquerystringOptional

Response200 OK

dataarray of objectsRequired
data[].branchstringRequired
without refs/heads/
data[].cronstringRequired
data[].declared_atstring (date-time)Required
data[].declared_bystringRequired
the subject of the job whose manifest declared it as it is now
data[].declared_job_idstringRequired
uuidv7 rendered as job_<32 hex>
data[].fullbooleanRequired
data[].idstringRequired
uuidv7 rendered as sch_<32 hex>
data[].kindstringRequired
check, test, build, lint or a manifest task id
data[].lastobject or null
one occurrence of a schedule
data[].last.due_atstring (date-time)Required
data[].last.job_idstring or null
uuidv7 rendered as job_<32 hex>
data[].last.reasonstring or null
why it was skipped or still waits: paced, budget, missed, no_tree or a refusal's code
data[].last.requested_bystring or null
who asked for a manual run
data[].last.statestringRequired
waiting until it ran or its window endedOne of waiting, fired, skipped
data[].last.triggerstringRequired
One of cron, manual
data[].namestringRequired
data[].next_run_atstring (date-time) or null
none while paused
data[].next_run_localstring or null
next_run_at in the schedule's zone, rfc 3339 with its offset
data[].no_cachebooleanRequired
data[].paused_bystring or null
who paused it, while it is paused
data[].repo_idstringRequired
uuidv7 rendered as repo_<32 hex>
data[].statestringRequired
One of active, paused
data[].targetsarray of stringsRequired
data[].timezonestringRequired
data[].window_secsintegerRequired
templatesarray of objectsRequired
templates[].namestringRequired
templates[].summarystringRequired
templates[].yamlstringRequired
curl "$CIRESK_API/v1/ci/schedules" \
  -H "Authorization: Bearer $CIRESK_KEY"
POST/v1/ci/schedules/{id}/set

Pause or resume a schedule

Permission: ci:repos.write

Parameters

NameTypeRequiredDescription
idpathstringRequiredThe schedule's ID.

Request body

pausedbooleanRequired

Response200 OK

branchstringRequired
without refs/heads/
cronstringRequired
declared_atstring (date-time)Required
declared_bystringRequired
the subject of the job whose manifest declared it as it is now
declared_job_idstringRequired
uuidv7 rendered as job_<32 hex>
fullbooleanRequired
idstringRequired
uuidv7 rendered as sch_<32 hex>
kindstringRequired
check, test, build, lint or a manifest task id
lastobject or null
one occurrence of a schedule
last.due_atstring (date-time)Required
last.job_idstring or null
uuidv7 rendered as job_<32 hex>
last.reasonstring or null
why it was skipped or still waits: paced, budget, missed, no_tree or a refusal's code
last.requested_bystring or null
who asked for a manual run
last.statestringRequired
waiting until it ran or its window endedOne of waiting, fired, skipped
last.triggerstringRequired
One of cron, manual
namestringRequired
next_run_atstring (date-time) or null
none while paused
next_run_localstring or null
next_run_at in the schedule's zone, rfc 3339 with its offset
no_cachebooleanRequired
paused_bystring or null
who paused it, while it is paused
repo_idstringRequired
uuidv7 rendered as repo_<32 hex>
statestringRequired
One of active, paused
targetsarray of stringsRequired
timezonestringRequired
window_secsintegerRequired
curl -X POST "$CIRESK_API/v1/ci/schedules/52b1f8be-1255-4119-993d-3c12e08650d7/set" \
  -H "Authorization: Bearer $CIRESK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "paused": true
  }'
POST/v1/ci/schedules/{id}/trigger

Start a scheduled run now

Permission: ci:jobs.run

Parameters

NameTypeRequiredDescription
idpathstringRequiredThe schedule's ID.

Response201 Created

due_atstring (date-time)Required
job_idstring or null
uuidv7 rendered as job_<32 hex>
reasonstring or null
why it was skipped or still waits: paced, budget, missed, no_tree or a refusal's code
requested_bystring or null
who asked for a manual run
statestringRequired
waiting until it ran or its window endedOne of waiting, fired, skipped
triggerstringRequired
One of cron, manual
curl -X POST "$CIRESK_API/v1/ci/schedules/52b1f8be-1255-4119-993d-3c12e08650d7/trigger" \
  -H "Authorization: Bearer $CIRESK_KEY"