Saturday, April 1, 2017

Calculate a Calendar Duration

CalendarThis post is intended for developers who build and maintain integrations with ITRP. A new feature has been added to the REST API. This feature makes it easy to calculate a duration.

ITRP Calendar
When you specify a calendar, a start time and an end time, the API will return the number of minutes between these two moments, taking into account only the active hours of the calendar. Better still, any holidays that are related to the calendar are excluded.

The cURL example below shows how to obtain the number of active minutes of calendar 42 for the month of January 2020:

$ curl -u "api-token:x" -X GET https://api.itrp.com/v1/calendars/42/duration?
start=2020-01-01T00:00:00Z&end=2020-02-01T00:00:00Z


Retrieving a duration in calendar minutes allows developers to, for example, automate request updates after 80% of their available resolution time has passed. More detailed information about this new API feature can be found in the ITRP Developer documentation.

0 comments:

Post a Comment