Date Ranges

For metrics endpoints, you need to specify the date range you want to query. As in our CS Digital platform, you cannot query more than 92 days of data for at once (this is to guarantee reliability and performance). If a date range exceeds 92 days or is out of the project data retention period, the API will return an error message indicating that the range is out of bounds.

In terms of format, dates must respect one of the following ISO formats:

  • 2021-08-13T12:32:40.000Z (YYYY-MM-DDThh:mm:ss.sssZ) for a date in UTC.
  • 2021-08-13T12:32:40 (YYYY-MM-DDThh:mm:ss), equivalent to 2021-08-13T12:32:40.000Z.
  • 2021-08-13T12:32 (YYYY-MM-DDThh:mm), equivalent to 2021-08-13T12:32:00.000Z.
  • 2021-08-13 (YYYY-MM-DD), equivalent to 2021-08-13T00:00:00.000Z.
  • 2021-08 (YYYY-MM), equivalent to 2021-08-01T00:00:00.000Z.
  • 2021-08-13T12:32:40+02:00 (YYYY-MM-DDThh:mm:ss+hh:mm) where the part after the + (it can also be -) represents the time zone UTC offset. Keep in mind that when specifying dates in URL parameters, the + character must be encoded into %2B (e.g. 2021-08-13T12:32:40%2B02:00).
  • 2021-08-13T12:32+02:00 (YYYY-MM-DDThh:mm+hh:mm), equivalent to 2021-08-13T12:32:00+02:00.