Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Muhammadbugaje/NAMETS_Website/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint returns all active (is_active = True) events whose start_datetime is in the future and falls within a configurable look-ahead window. It is intended for use in notification workflows and public-facing event listings that should always reflect the next set of upcoming activities. The default window of 7 days is suitable for weekly digest emails; adjust the days parameter for other cadences.

Endpoint paths

PathSource module
GET /api/events/upcoming/api/urls.pyapi/views.py
GET /api/events/upcoming/events/api_urls.pyevents/views_api.py
Both route to a view with identical logic and serializer fields, and both require the X-N8N-Token header. The root project urls.py mounts events/api_urls.py at api/events/, so the resolved URL is the same for both: GET /api/events/upcoming/.

Query parameters

days
integer
default:"7"
The number of days ahead from the current server time to include in the result. Only events with a start_datetime strictly greater than now and less than or equal to now + days are returned.Must be a positive integer. Non-integer values will raise a ValueError (pass only numeric strings).Example: ?days=14

Response fields

id
integer
The unique primary key of the event record.
title
string
The event name, up to 200 characters.
description
string
A short description of the event. May be null if no description was provided.
start_datetime
string
The event start date and time in ISO 8601 format (e.g., "2024-06-21T14:00:00Z").
end_datetime
string
The event end date and time in ISO 8601 format.
location
string
The venue or location name for the event, up to 200 characters.

Examples

Fetch events in the next 7 days (default):
curl -H "X-N8N-Token: your_api_token" \
  https://your-site.onrender.com/api/events/upcoming/
Fetch events in the next 14 days:
curl -H "X-N8N-Token: your_api_token" \
  "https://your-site.onrender.com/api/events/upcoming/?days=14"
Fetch events in the next 30 days:
curl -H "X-N8N-Token: your_api_token" \
  "https://your-site.onrender.com/api/events/upcoming/?days=30"

Example response

[
  {
    "id": 7,
    "title": "Annual NAMETS Sports Day",
    "description": "Inter-department sports competition open to all engineering students. Registration at the venue.",
    "start_datetime": "2024-06-20T08:00:00Z",
    "end_datetime": "2024-06-20T17:00:00Z",
    "location": "Engineering Faculty Sports Complex"
  },
  {
    "id": 8,
    "title": "Qur'an Recitation Competition",
    "description": "Annual Qur'an recitation contest for registered NAMETS members. Prizes for top three positions.",
    "start_datetime": "2024-06-22T10:00:00Z",
    "end_datetime": "2024-06-22T13:00:00Z",
    "location": "Engineering Mosque, ABU Zaria"
  }
]
An empty array [] is returned when no active events fall within the requested window.

Build docs developers (and LLMs) love