Create a Schedule for a Workflow Job Template
post
/api/v2/workflow_job_templates/{id}/schedules/
Make a POST request to this resource with the following schedule fields to create a new schedule associated with this workflow job template.
-
rrule
: A value representing the schedules iCal recurrence rule. (string, required) -
name
: Name of this schedule. (string, required) description
: Optional description of this schedule. (string, default=""
)extra_data
: (json, default={}
)inventory
: Inventory applied as a prompt, assuming job template prompts for inventory (id, default=``)scm_branch
: (string, default=""
)job_type
: (choice)None
: --------- (default)""
: ---------run
: Runcheck
: Check
job_tags
: (string, default=""
)skip_tags
: (string, default=""
)limit
: (string, default=""
)diff_mode
: (boolean, default=None
)-
verbosity
: (choice)None
: --------- (default)0
: 0 (Normal)1
: 1 (Verbose)2
: 2 (More Verbose)3
: 3 (Debug)4
: 4 (Connection Debug)5
: 5 (WinRM Debug)
-
enabled
: Enables processing of this schedule. (boolean, default=True
)
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : schema
Example:
{
"inventory":"1",
"name":"test sch",
"rrule":"DTSTART:20151117T050000Z RRULE:FREQ=DAILY;INTERVAL=1;COUNT=1"
}
Response
Supported Media Types
- application/json
201 Response
Example Response (application/json)
{
"created":"2018-02-01T08:00:00.000000Z",
"description":"",
"diff_mode":null,
"dtend":"2015-11-17T05:00:00Z",
"dtstart":"2015-11-17T05:00:00Z",
"enabled":true,
"extra_data":{
},
"id":"1",
"inventory":"1",
"job_tags":null,
"job_type":null,
"limit":null,
"modified":"2018-02-01T08:00:00.000000Z",
"name":"test sch",
"next_run":null,
"related":{
"credentials":"/api/v2/schedules/1/credentials/",
"inventory":"/api/v2/inventories/1/",
"unified_job_template":"/api/v2/workflow_job_templates/1/",
"unified_jobs":"/api/v2/schedules/1/jobs/"
},
"rrule":"DTSTART:20151117T050000Z RRULE:FREQ=DAILY;INTERVAL=1;COUNT=1",
"scm_branch":null,
"skip_tags":null,
"summary_fields":{
"inventory":{
"description":"",
"has_active_failures":false,
"has_inventory_sources":false,
"hosts_with_active_failures":"0",
"id":"1",
"inventory_sources_with_failures":"0",
"kind":"",
"name":"test-inv",
"organization_id":"1",
"total_groups":"0",
"total_hosts":"0",
"total_inventory_sources":"0"
},
"unified_job_template":{
"description":"",
"id":"1",
"name":"test-workflow_job_template",
"unified_job_type":"workflow_job"
},
"user_capabilities":{
"delete":true,
"edit":true
}
},
"timezone":"UTC",
"type":"schedule",
"unified_job_template":"1",
"until":"",
"url":"/api/v2/schedules/1/",
"verbosity":null
}
400 Response
Example Response (application/json)
{
"inventory":[
"Field is not configured to prompt on launch."
]
}