Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Getting Holiday Schemes and Holidays

Gökberk Karaca July 26, 2022

Hello, I need to get the determined fixed and floating holidays from Tempo Server using api and found this:
/rest/tempo-core/1/holidayscheme/

When I use get function via postman, I get this response:

[
    {
        "id"1,
        "name""Default Holiday Scheme",
        "description""Default Holiday Scheme",
        "count"21487,
        "defaultScheme"true
    }
]
So I can't get the holidays and could not see any more information on documents about it. Can you help me please ? 
Thanks. 

1 answer

1 accepted

3 votes
Answer accepted
Susanne Götz _Tempo_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2022

Hi @Gökberk Karaca

retrieving the defined holidays needs to be done for each holiday scheme, and a separate call needs to be made for the fixed and floating holidays. 

You can use the REST API 
GET  YOUR_JIRA/rest/tempo-core/2/holidayschemes/{schemeId}/days/{type}

The "schemeId" is the id of the scheme you need to retrieve the holidays for (1 for the scheme from your example)

the "type" has to be either "fixed" or "floating". 

Please note that this is a private API and subject to change. 

Best regards,
Susanne Götz
Tempo team 

Gökberk Karaca July 27, 2022

Thanks so much Susanne,

I have another question now. Can I take the holidays of a specific month somehow, like April's holidays ?  I need to take the working days of a specific month and extract these holidays from working days. (Like if April has 2 holidays and 22 working days, means it has 20 working days.) 


Thanks again. 

Like Dave Rosenlund _Trundl_ likes this
Susanne Götz _Tempo_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 27, 2022

Hi @Gökberk Karaca


It is not possible to do this with an API. The API only returns the total information and can not be limited to returning data for a selected timeframe. 

What you can do with a REST API, is get information how many hours a selected user should be working on each day in a selected timeframe.

Something like:

GET  YOUR_JIRA/rest/tempo-core/1/user/schedule?user=john&from=2022-07-01&to=2022-07-31

Which will return a list of days and the number of hours the user is required to work on each of them (see also https://www.tempo.io/server-api-documentation/core?hsLang=en#tag/User-Schedule-V1/operation/getUserSchedule)

Best regards,
Susanne 

Like 2 people like this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events