Gautam Buddha University · Developer platform

API documentation

API 1.1.0Public · read onlyAsia/Kolkata

Quick start

Read published SAMAY course and room schedules. These endpoints require no API key. Developer scope approvals do not issue credentials; OAuth is not operational.

Base URL: https://api.mygbu.in

curl --fail-with-body "https://api.mygbu.in/v1/timetable?day=1&limit=20"

Open a JSON response: Monday timetable · Sunday timetable · API health

OpenAPI 3.1.1 specification

Endpoints

GET and HEAD are supported. Other methods return 405.
MethodPathPurpose
GET/Service information and links
GET/healthProcess liveness; does not test source or database freshness
GET/openapi.jsonMachine-readable API contract
GET/v1/timetablePublished timetable entries

Filters & pagination

ParameterTypeValues
limitintegerMinimum 1; maximum 500; default 100
afterintegerMinimum 0; default 0
dayintegerMinimum 1; maximum 7
publication_idintegerMinimum 1
coursestringExact match, up to 160 characters
roomstringExact match, up to 100 characters

Combine filters, then follow links.next until it is null. Monday is 1 and Sunday is 7. Text equality follows the database collation. Unknown parameters return 422.

Entries receive new IDs when a snapshot is replaced. Restart a full read after publication. Multi-page reads are not snapshot-isolated; a withdrawn publication stops returning entries even if its ID is supplied.

Response example

Synthetic example. IDs and weekdays are integers; class times are local to Asia/Kolkata.

{
    "data": [
        {
            "id": 123,
            "publication_id": 12,
            "title": "Example published timetable",
            "day_of_week": 1,
            "starts_at": "08:30:00",
            "ends_at": "09:30:00",
            "course": "DEMO-CS101",
            "room": "Example room"
        }
    ],
    "next_after": null,
    "visibility": "published only",
    "timezone": "Asia/Kolkata",
    "meta": {
        "api_version": "1.1",
        "count": 1,
        "request_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "pagination": {
            "limit": 20,
            "after": 0,
            "has_more": false,
            "next_after": null
        }
    },
    "links": {
        "self": "https://api.mygbu.in/v1/timetable?limit=20&after=0",
        "next": null
    }
}

meta.count is the count returned in this page. It is not a total across all pages. A final page has next_after: null and links.next: null.

Errors and request IDs

Failures use application/problem+json and RFC 9457 Problem Details. Preserve the X-Request-ID response header when reporting an issue; it matches the JSON request_id.

  • 404: unknown endpoint.
  • 405: unsupported HTTP method.
  • 422: invalid or unsupported query parameter.
  • 503: temporary API database/service failure.
{
    "type": "about:blank",
    "title": "Unprocessable Content",
    "status": 422,
    "detail": "Invalid day",
    "instance": "/v1/timetable",
    "request_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "error": "Invalid day"
}

Data policy and refresh

Only published snapshots are returned. The source owner identifies the configured SAMAY feed as published-only. Drafts, withdrawn snapshots, source editor identifiers, faculty details and meeting links are excluded from this public projection.

Periods start at 08:30 and last one hour by default; period 11 is 18:30–19:30. Custom period times are applied through operator configuration. Blank source rooms are shown as Unassigned; identical public timetable entries are collapsed.

Refresh happens when the server's sync command runs. A five-minute schedule is available to the operator; this page does not assert that it has been enabled. Failed source fetches preserve the last successful snapshot. The raw source provides no authoritative release timestamp, so the API does not invent one.

Browser applications on another origin require a separately configured CORS policy or their own server-side integration. Navigation links and server-side clients work without cross-origin browser fetch access.