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

Schedules Timeline REST Api default and historical issue

mark_couvaras February 19, 2024


I am currently using the v2 schedules endpoint to extract the timeline for each schedule. I am facing an issue when the type is default it returns two objects in the finalTimeline>rotations>periods array.

Basically if the current rotation falls within the current date (or the date you call the endpoint) it returns a 'historical' type object for the original start date which is the correct date and the end date is the current date/time. Then it also includes a 'default' type object of the same rotation with a start date of the current date/time and a correct end date of the original schedule end date? This, I find rather frustrating when trying to collect store and update this data in our SQL database for analytics as I cannot seem to find any form of index to compare against for updates.

So for my two questions, can we somehow return a unique id for the items inside the periods array, or can we call the endpoint to return the rotation periods without the current date/time part and just return the actual original start and end dates as they would appear if the rotation period had totally elapsed?

I hope this all makes sense and thanks for your help in advance.

1 answer

0 votes
Tejaswi G
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 21, 2024

Hi Mark,

Thank you for reaching out to Atlassian support. I understand you would like to see the start and end date of a rotation in the same object.

When rotation is split between two dates, the historical type will show the current date as the end date, and the default type will have the actual end date. In this case, you can use the user ID as the unique ID in your script, and when the historical type is present for the user ID, You can fetch the end date from the default type.

However, I understand that this can be confusing at times. To make it better in future, I have created a Feature request, OPSGENIE-1925, with your suggestions. You can add yourself as a watcher to keep track of it and to receive notifications for updates.


Thank you,

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events