STATUS
Description
The Status endpoint returns all events that are currently running (And 12h after they are finished) which have media. It is used to fetch the stories of the active events.
Endpoint
GET https://api.thenights.app/event_manager/user_events?request_type=STATUS
Request
Headers
| Key | Value |
|---|---|
| Content-Type | application/json |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| request_type | String | yes | Set which event endpoint is contactes should be STATUS. |
Response
Response depends on the data currently within the data base that satisfies the set conditions.
Success Response
Code: 200 OK
| Parameter | Type | Description |
|---|---|---|
| results | List | List of STATUS events. |
| next | String | direct url link used for pagination. Returns the next 12 events with a story. |
Example Response Body
{
"results": [
{
"event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3",
"event_name": "Amsterdam Street Art Festival",
"event_type": "PARTY",
"event_public_status": "PUBLIC",
"event_description_short": "Experience the vibrant street art scene of Amsterdam as talented artists transform public spaces into captivating works of art.",
"event_startdatetime": "2023-09-07T06:14:24.185000Z",
"event_enddatetime": "2023-09-07T12:14:24.180000Z",
"event_rating": 0,
"event_likecount": 1,
"event_created": "2023-09-07T06:14:24.185000Z",
"event_status": "RUNNING",
"event_age": 18,
"event_image": "https://api.thenights.app/media/images/default/event16.jpg",
"event_longitude": "4.897829445559270000",
"event_latitude": "52.367748113094280000",
"event_nrattendees": 1,
"event_hasMedia": true,
"event_story_thumb": "https://api.thenights.app/media/2023/9/7/c0a6c1d5-89a6-4407-98c5-c46e4fa2ae37.webp",
"event_location": {
"event_street_name": "Oudezijds Achterburgwal",
"event_postal_name": "Amsterdam",
"event_postal_code": "00",
"event_state_long": "MOCK State",
"event_state_short": "MOCK",
"event_country_long": "Netherland",
"event_country_short": "NL"
},
"event_partner_logo": null,
"event_club_id": null,
"event_club_name": null,
"event_media": [
{
"event_media_id": "355ef778-2099-4897-b9ab-c5b391fdd359",
"event_media_media": "https://api.thenights.app/media/2023/9/7/2b46e4d6-5705-48f4-b1f3-293dea8461b6.mp4",
"event_media_type": "VIDEO",
"event_media_format": "PORTRAIT",
"event_media_formtype": "mp4",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T08:26:46.654000Z",
"event_media_thumb": "https://api.thenights.app/media/2023/9/7/c0a6c1d5-89a6-4407-98c5-c46e4fa2ae37.webp",
"event_media_flames": null,
"event_media_event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3"
},
{
"event_media_id": "f855b26a-69dc-4ea9-af15-075ffb1a4b42",
"event_media_media": "https://api.thenights.app/media/2023/9/7/fc27f50b-3e32-4128-a115-dd35482711c7.4C6A2BE5-0E59-456E-B6DF-2BCFDE4A697D.jpg",
"event_media_type": "IMAGE",
"event_media_format": "UNDEFINED",
"event_media_formtype": "4C6A2BE5-0E59-456E-B6DF-2BCFDE4A697D.jpg",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T08:26:53.418000Z",
"event_media_thumb": "https://api.thenights.app/media/2023/9/7/fc27f50b-3e32-4128-a115-dd35482711c7.4C6A2BE5-0E59-456E-B6DF-2BCFDE4A697D.jpg",
"event_media_flames": null,
"event_media_event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3"
},
{
"event_media_id": "a9dbd10f-c023-439b-b455-a54cd1c9f6b6",
"event_media_media": null,
"event_media_type": "IMAGE",
"event_media_format": "UNDEFINED",
"event_media_formtype": "D649DF2D-F95C-4CE0-B3F9-D276F0A0A2B6.jpg",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T08:42:18.662050Z",
"event_media_thumb": null,
"event_media_flames": null,
"event_media_event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3"
},
{
"event_media_id": "3e74717f-4be7-4947-a6b7-8fdf7c36efc9",
"event_media_media": null,
"event_media_type": "IMAGE",
"event_media_format": "UNDEFINED",
"event_media_formtype": "530ABB8D-77BB-49F9-A680-C5B662463B34.jpg",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T09:11:57.218959Z",
"event_media_thumb": null,
"event_media_flames": null,
"event_media_event_id": "229f43ee-52e4-47d7-ade6-9e9d48a55bd3"
}
]
},
{
"event_id": "47e528ef-6f78-47ec-a6eb-31dab2094b35",
"event_name": "Amsterdam Film Festival",
"event_type": "PARTY",
"event_public_status": "PUBLIC",
"event_description_short": "Embark on a cinematic journey as the Amsterdam Film Festival showcases a diverse selection of compelling films from around the world.",
"event_startdatetime": "2023-09-07T06:14:23.988000Z",
"event_enddatetime": "2023-09-07T12:14:23.983000Z",
"event_rating": 0,
"event_likecount": 0,
"event_created": "2023-09-07T06:14:23.988000Z",
"event_status": "RUNNING",
"event_age": 18,
"event_image": "https://api.thenights.app/media/images/default/event01.jpg",
"event_longitude": "4.899488094884950000",
"event_latitude": "52.370000039078090000",
"event_nrattendees": 1,
"event_hasMedia": true,
"event_story_thumb": "https://api.thenights.app/media/2023/9/7/6ad245a1-61c2-4132-9d62-01603126beca.C4EA5B68-4C7C-468C-87E2-4EB68060541D.jpg",
"event_location": {
"event_street_name": "Oudezijds Achterburgwal",
"event_postal_name": "Amsterdam",
"event_postal_code": "00",
"event_state_long": "MOCK State",
"event_state_short": "MOCK",
"event_country_long": "Netherland",
"event_country_short": "NL"
},
"event_partner_logo": null,
"event_club_id": null,
"event_club_name": null,
"event_media": [
{
"event_media_id": "1205f119-ad46-4480-8014-c2e08fa463eb",
"event_media_media": "https://api.thenights.app/media/2023/9/7/6ad245a1-61c2-4132-9d62-01603126beca.C4EA5B68-4C7C-468C-87E2-4EB68060541D.jpg",
"event_media_type": "IMAGE",
"event_media_format": "UNDEFINED",
"event_media_formtype": "C4EA5B68-4C7C-468C-87E2-4EB68060541D.jpg",
"event_media_creator": "ac3d3851-daaf-4ad2-b42f-1509bdc0b12f",
"event_media_created_at": "2023-09-07T09:26:25.662888Z",
"event_media_thumb": "https://api.thenights.app/media/2023/9/7/6ad245a1-61c2-4132-9d62-01603126beca.C4EA5B68-4C7C-468C-87E2-4EB68060541D.jpg",
"event_media_flames": null,
"event_media_event_id": "47e528ef-6f78-47ec-a6eb-31dab2094b35"
}
]
}
],
"next": null
}
Error Response
Code: 400 Bad Request
| Parameter | Type | Description |
|---|---|---|
| detail | String | occurs when parameter are missing or an invalid request_type was provided |
Technical
The endpoint uses elasticsearch to retrieve all events that lie wihtin a given timeframe and have event_hasMedia as true. It uses JSON cache to retrieve the event objects from their id's. The event json will be expanded by thier event_media which are also loaded from cache. A list of events with status will be returned.