Reference For: developers

API: scheduled-tasks

Operations of the scheduled-tasks tag of the native REST API.

Scheduled power tasks (Once/Hourly/Daily/Weekly/Monthly*)

GET /v1/scheduled-tasks

Lists scheduled tasks visible to the caller.

CLI
kyvernon scheduled-tasks list

Parameters

NameInTypeRequiredDescription
entityquerystring or nullOnly tasks for this VM entity.

Responses

StatusDescriptionSchema
200OKarray of ScheduledTaskView

POST /v1/scheduled-tasks

Creates a scheduled power task on a VM.

CLI
kyvernon scheduled-tasks create --body <json>

Request body

application/json: CreateScheduledTaskRequest

NameTypeRequiredDescription
actionScheduledActionyesPower action.
activeTimestring or nullOptional scheduler active time.
descriptionstringDescription.
enabledbooleanEnabled (default true).
entityIdstringyesTarget VM id.
expireTimestring or nullOptional scheduler expire time.
namestringyesDisplay name.
notificationstring or nullOptional notification address (SMTP send when [smtp] enabled).
recurrenceScheduledRecurrenceScheduler cadence (default once).
runAtstring or nullOne-shot run time / create-time anchor (RFC 3339). Defaults to now.

Responses

StatusDescriptionSchema
201CreatedScheduledTaskView

GET /v1/scheduled-tasks/{id}

One scheduled task.

CLI
kyvernon scheduled-tasks get <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the scheduled task

Responses

StatusDescriptionSchema
200OKScheduledTaskView

PUT /v1/scheduled-tasks/{id}

Reconfigures a scheduled task (entity stays fixed).

CLI
kyvernon scheduled-tasks reconfigure <id> --body <json>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the scheduled task

Request body

application/json: ReconfigureScheduledTaskRequest

NameTypeRequiredDescription
actionScheduledActionyesPower action.
activeTimestring or nullOptional scheduler active time.
descriptionstringDescription.
enabledbooleanEnabled.
expireTimestring or nullOptional scheduler expire time.
namestringyesDisplay name.
notificationstring or nullOptional notification address (SMTP send when [smtp] enabled).
recurrenceScheduledRecurrenceScheduler cadence.
runAtstring or nullOne-shot run time / create-time anchor (RFC 3339). Defaults to now.

Responses

StatusDescriptionSchema
200OKScheduledTaskView

DELETE /v1/scheduled-tasks/{id}

Deletes a scheduled task.

CLI
kyvernon scheduled-tasks delete <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the scheduled task

Responses

StatusDescriptionSchema
204Done; no body

POST /v1/scheduled-tasks/{id}/run

Runs a scheduled task immediately (same privilege as SOAP RunScheduledTask).

CLI
kyvernon scheduled-tasks run <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the scheduled task

Responses

StatusDescriptionSchema
204Done; no body

Version 0.1.