Date range format for API


(AJ) #1

When I call List Incidents Rest Endpoint, it returns incidents when date_range is set to all.
But when I tray to use a specific date range, it fails.

What is the correct format for date to be supplied?




Error returned for failed ones are:
“error”: {
“message”: “Invalid Input Provided”,
“code”: 2001,
“errors”: [
" is invalid."

(Malcolm Konner) #2

Hi Anup,

Date and time format for our REST API calls are required to be in the ISO 8601 date/time format which I have included a reference to in our dev docs here:

I replied in your support ticket too but it looks like the issue with the failed calls that your shared is the result of the span of time in your time parameters being greater than 6 months. This endpoint can only query up to 6 months at a time, so if you need to get incidents over a longer time period than that, I would recommend breaking up the request into smaller chunks.

Please let us know if you have any further questions!

Thank you,

(AJ) #3

Perfect. Actually it seems to be 5 months. It worked when I tried 2016-01-01 to 2016-05-31. But it fails when the end date is beyond that. I have updated my code to run it with a 5 month date range. Thanks.