Date formats
Learn how to consume and provide valid date formats with the REST API
Dates attributes sent by the API
Dates are sent as UNIX timestamps in the API, whether retrieved with GET API calls or payloads sent back from POST requests. UNIX timestamps represent the number of seconds elapsed since the starting date of the UNIX system (e.g 1970-01-01 00:00:00). An example would be 1611054516
. These dates are expressed in UTC.
Dates attributes consumed by the API
There are two ways of interacting with dates with the API.
- Filtering objects: When retrieving sessions from the API (
GET /sessions
andGET /events/{id}/sessions
for instance), you can filter them by their starting date (start/end) using both timestamps and ISO-8601 dates. - Creating objects: When creating a new session from the API (
POST /events/{id}/sessions
), you can specify the date in which the session will take place using an ISO-8601 format, but you also have to separately provide its timezone (for instanceAmerica/New_York
).
Updated about 3 years ago