/
Workload and Holiday Scheme REST APIs for Jira Cloud
Workload and Holiday Scheme REST APIs for Jira Cloud
The code examples provided below are for curl and you will need to adapt them to your preferred means of dealing with REST APIs. All information provided in curly brackets “{}” need to be replaced with the variables from your instance.
Workload Schemes
Workload schemes can be created through the REST APIs. The API allows you to create a workload scheme and populate the associated scheme in one single API call. An API call looks like this:
curl --request POST 'https://api.tempo.io/4/workload-schemes' \
-H 'Authorization: Bearer {YourTempoAccessToken}' \
-H 'Content-Type: text/plain' \
--data-raw '{"name": "40h workload scheme",\
"days": [ \
{"day": "MONDAY","requiredSeconds": 28800},\
{"day": "TUESDAY","requiredSeconds": 28800},\
{"day": "WEDNESDAY","requiredSeconds": 28800},\
{"day": "THURSDAY","requiredSeconds": 28800},\
{"day": "FRIDAY","requiredSeconds": 28800},\
{"day": "SATURDAY","requiredSeconds": 0},\
{"day": "SUNDAY","requiredSeconds": 0}\
]}'
More detailed information on the workload API can be found in the REST API documentation.
Holiday Schemes
Holiday schemes need to be created in two steps as they can't be created and be populated at the same time. To create a holiday scheme you should run: