Skip to main content

GET /events

Description

Gets data on all events and returns a json object with an array of events objects

The route handles the GET request made to the /events path.

HTTP methodRoute
GET/events

Payload

No payload is required.

Response

The route returns a json object with an array of all events objects.

Example:

[
{
"id": 1,
"text": "French Open",
"start_date": "2022-06-10T03:05:00.369Z",
"end_date": "2022-06-20T03:05:00.369Z",
"allDay": false,
"type": 1,
"details": "Philippe-Chatrier Court\\n Paris, FRA",
"files": []
},
{
"id": 2,
"text": "Aegon Championship",
"start_date": "2022-06-10T03:05:00.369Z",
"end_date": "2022-07-10T03:05:00.369Z",
"allDay": false,
"type": 1,
"details": "The Queens Club\\n London, ENG",
"files": {
"id": 5,
"name": "document.html",
"url": "https://server.com/uploads/5/document.html"
}
},
// ...
]
note

The event start and end dates should conform to the ISO format yyyy-MM-dd'T'HH:mm:ss.SSSXXX

For another example of the returned object, go to events.

The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).


Related articles: