POST /command/schedule_plan (deprecated)
Schedule a plan to run at a later time.
This endpoint is deprecated. Instead, use POST /scheduled_jobs/environment_jobs.
Request format
Prior to deprecation, requests to this endpoint:
- Specified the content type as
application/json
- Contained a JSON object body
- Included these required keys:
plan_name
andscheduled_time
- Could include some optional keys.
For example, this request scheduled the canary
plan
to run on two specific
nodes:
type_header='Content-Type: application/json' auth_header="X-Authentication: $(puppet-access show)" uri="https://$(puppet config print server):8143/orchestrator/v1/command/schedule_plan" data='{"plan_name" : "canary", "params" : { "nodes" : ["node1.example.com", "node2.example.com"]}, "scheduled_time" : "2027-05-05T19:50:08Z"}' curl --insecure --header "$type_header" --header "$auth_header" --request POST "$uri" --data "$data"
Response format
Prior to deprecation, if the plan was successfully scheduled, the server returned
202 and a JSON object containing the job's id
and name
. For
example:
{ "scheduled_job" : { "id" : "https://orchestrator.example.com:8143/orchestrator/v1/scheduled_jobs/81", "name" : "81" } }