Create a Schedule for a Project
post
/api/v2/projects/{id}/schedules/
Make a POST request to this resource with the following schedule fields to create a new schedule associated with this project.
-
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)
POST requests to this resource must include a proper rrule value following
a particular format and conforming to subset of allowed rules.
The following lists the expected format and details of our rrules:
- DTSTART is required and must follow the following format: DTSTART:YYYYMMDDTHHMMSSZ
- DTSTART is expected to be in UTC
- INTERVAL is required
- SECONDLY is not supported
- TZID is not supported
- RRULE must precede the rule statements
- BYDAY is supported but not BYDAY with a numerical prefix
- BYYEARDAY and BYWEEKNO are not supported
- Only one rrule statement per schedule is supported
- COUNT must be < 1000
Here are some example rrules:
"DTSTART:20500331T055000Z RRULE:FREQ=MINUTELY;INTERVAL=10;COUNT=5"
"DTSTART:20240331T075000Z RRULE:FREQ=DAILY;INTERVAL=1;COUNT=1"
"DTSTART:20140331T075000Z RRULE:FREQ=MINUTELY;INTERVAL=1;UNTIL=20230401T075000Z"
"DTSTART:20140331T075000Z RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR"
"DTSTART:20140331T075000Z RRULE:FREQ=WEEKLY;INTERVAL=5;BYDAY=MO"
"DTSTART:20140331T075000Z RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=6"
"DTSTART:20140331T075000Z RRULE:FREQ=MONTHLY;INTERVAL=1;BYSETPOS=4;BYDAY=SU"
"DTSTART:20140331T075000Z RRULE:FREQ=MONTHLY;INTERVAL=1;BYSETPOS=-1;BYDAY=MO,TU,WE,TH,FR"
"DTSTART:20140331T075000Z RRULE:FREQ=MONTHLY;INTERVAL=1;BYSETPOS=-1;BYDAY=MO,TU,WE,TH,FR,SA,SU"
"DTSTART:20140331T075000Z RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=4;BYMONTHDAY=1"
"DTSTART:20140331T075000Z RRULE:FREQ=YEARLY;INTERVAL=1;BYSETPOS=-1;BYMONTH=8;BYDAY=SU"
"DTSTART:20140331T075000Z RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20230401T075000Z;BYDAY=MO,WE,FR"
"DTSTART:20140331T075000Z RRULE:FREQ=HOURLY;INTERVAL=1;UNTIL=20230610T075000Z"
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : schema
Type:
Show Source
object-
description(optional):
string
-
diff_mode(optional):
boolean
-
enabled(optional):
boolean
Enables processing of this schedule.
-
extra_data(optional):
string
-
inventory(optional):
integer
Inventory applied as a prompt, assuming job template prompts for inventory
-
job_tags(optional):
string
-
job_type(optional):
string
-
limit(optional):
string
-
name:
string
-
rrule:
string
A value representing the schedules iCal recurrence rule.
-
scm_branch(optional):
string
-
skip_tags(optional):
string
-
unified_job_template:
integer
-
verbosity(optional):
string
Response
Supported Media Types
- application/json
201 Response
400 Response
Example Response (application/json)
{
"extra_data":[
"Field is not allowed on launch."
]
}