Skip to main content

Timetable admin user summary

This document details the changes between the legacy API and the new API for each module. It is intended for developers familiar with the legacy system.


Table of Contents​


Events​

Endpoint Mapping​

Legacy EndpointNew EndpointChange?
GET /api/events/:idRemovedRemoved
POST /api/eventsPOST /api/eventsRequest/response changed
POST /api/events/:idPOST /api/events/{eventId}Path param renamed, request/response changed
DELETE /api/events/:idDELETE /api/events/{eventId}Path param renamed
PUT /api/events/batchPUT /api/events/batchNew: batch update
POST /api/events/batchPOST /api/events/batchNew: batch create
Other event endpointsRemovedRemoved

Endpoint Changes​

1. Get Event​

  • Legacy: GET /api/events/:id
  • New: Removed
  • Change: No direct endpoint to get a single event by ID.

2. Create Event​

  • Legacy: POST /api/events
    • Body: { displayName, start, end, description?, notes?, location?, type?, group?, organiserUsers?, organiserOther?, series? }
  • New: POST /api/events
    • Body: { start, end, displayName, type, seriesId, location, organiserUsers, otherOrganisers }
  • Change: Request object fields standardized; must link to a series.

3. Update Event​

  • Legacy: POST /api/events/:id
    • Body: { displayName?, start?, end?, ... }
  • New: POST /api/events/{eventId}
    • Body: { start?, end?, displayName?, type?, seriesId?, groupId?, location?, organiserUsers?, otherOrganisers? }
  • Change: Path param renamed, request object fields standardized.

4. Delete Event​

  • Legacy: DELETE /api/events/:id
  • New: DELETE /api/events/{eventId}
  • Change: Path param renamed.

5. Batch Update/Create Events​

  • New: PUT /api/events/batch (update multiple events), POST /api/events/batch (create multiple events)
    • Body: { events: [ ... ] }
  • Change: New endpoints for batch operations.

Request & Response Object Changes​

Create Event​

Legacy Request:

{
"displayName": "Lecture 1",
"start": "2025-09-01T09:00:00Z",
"end": "2025-09-01T10:00:00Z",
"description": "Intro to course",
"notes": "Bring notebook",
"location": "Room 101",
"type": "Lecture",
"group": 5,
"organiserUsers": [2, 3],
"organiserOther": ["Dr. Smith"],
"series": [10, 11]
}

New Request:

{
"start": "2025-09-01T09:00:00Z",
"end": "2025-09-01T10:00:00Z",
"displayName": "Lecture 1",
"type": "Lecture",
"seriesId": 10,
"location": "Room 101",
"organiserUsers": [2, 3],
"otherOrganisers": "Dr. Smith"
}

New Response:

{
"id": 1001,
"displayName": "Lecture 1",
"start": "2025-09-01T09:00:00Z",
"end": "2025-09-01T10:00:00Z",
"type": "Lecture",
"seriesId": 10,
"location": "Room 101",
"organiserUsers": [2, 3],
"otherOrganisers": "Dr. Smith",
"createdAt": "2025-08-19T11:37:02.029896+00:00",
"updatedAt": "2025-08-19T11:37:02.029896+00:00"
}
  • Change: Must specify seriesId; group is now groupId if present; otherOrganisers is a string.

Update Event​

New Request:

{
"start": "2025-09-01T09:00:00Z",
"end": "2025-09-01T10:00:00Z",
"displayName": "Lecture 1 - Updated",
"type": "Lecture",
"seriesId": 10,
"groupId": 5,
"location": "Room 101",
"organiserUsers": [2, 3],
"otherOrganisers": "Dr. Smith"
}

New Response:
Same as create, with updated fields.


Batch Create/Update Events​

New Request (Batch Create):

{
"events": [
{
"start": "...",
"end": "...",
"displayName": "...",
"type": "...",
"seriesId": ...,
"location": "...",
"organiserUsers": [...],
"otherOrganisers": "..."
}
]
}

New Response (Batch Create):

{
"events": [
{
"id": 1001,
"displayName": "...",
// ...other fields
}
]
}

New Features & Removals​

New Features​

  • Batch create and update endpoints for events.
  • All event creation and updates must be linked to a series.

Removed Features​

  • No direct endpoint to get a single event by ID.
  • No direct event CRUD outside of series context.

Summary​

  • Events must now be linked to a series.
  • Batch operations for events are supported.
  • Direct event retrieval by ID is removed.
  • Request/response objects are standardized and simplified.

OrgUnit​

Endpoint Mapping​

Legacy EndpointNew EndpointChange?
GET /api/orgunit/:idGET /api/orgunit/{orgUnitId}Path param renamed
GET /api/orgunitsGET /api/orgunitPath renamed
POST /api/orgunitPOST /api/orgunitRequest/response changed
POST /api/orgunit/:idPUT /api/orgunit/{orgUnitId}Verb changed, request/response changed
DELETE /api/orgunit/:idDELETE /api/orgunit/{orgUnitId}Path param renamed
GET /api/orgunit/:id/seriesRemovedRemoved
POST /api/orgunit/:id/seriesPOST /api/orgunit/{orgUnitId}/seriesRequest/response changed
DELETE /api/orgunit/:id/seriesDELETE /api/orgunit/{orgUnitId}/seriesNew endpoint
GET /api/orgunit/:id/exportRemovedRemoved
POST /api/orgunit/:id/importRemovedRemoved
POST /api/orgunit/:id/subscribePOST /api/orgunit/{orgUnitId}/subscribePath param renamed
POST /api/orgunit/:id/unsubscribePOST /api/orgunit/{orgUnitId}/unsubscribePath param renamed
GET /api/orgunit/:id/calendarGET /api/orgunit/{orgUnitId}/calendarPath param renamed
GET /api/orgunit/:id/parentsGET /api/orgunit/{orgUnitId}/parentsPath param renamed

Endpoint Changes​

1. Get Org Unit by ID​

  • Legacy: GET /api/orgunit/:id
  • New: GET /api/orgunit/{orgUnitId}
  • Change: Path param renamed. Query param includeSeries still supported.

2. Get All Org Units​

  • Legacy: GET /api/orgunits
  • New: GET /api/orgunit
  • Change: Path renamed. Query params: parent, type, includeSeries, includePermissions, userId.

3. Create Org Unit​

  • Legacy: POST /api/orgunit
    • Body: { displayName, type, description?, metadata?, published?, groupId?, parentId? }
  • New: POST /api/orgunit
    • Body: { displayName, type, parentId?, published?, description? }
  • Change: Request object simplified; groupId and metadata not directly settable.

4. Update Org Unit​

  • Legacy: POST /api/orgunit/:id
    • Body: { displayName?, type?, description?, metadata?, published?, groupId?, parentId? }
  • New: PUT /api/orgunit/{orgUnitId}
    • Body: { displayName, published? }
  • Change: HTTP verb changed to PUT, request object simplified.

5. Delete Org Unit​

  • Legacy: DELETE /api/orgunit/:id
  • New: DELETE /api/orgunit/{orgUnitId}
  • Change: Path param renamed.

6. Borrow Series​

  • Legacy: POST /api/orgunit/:id/series
    • Body: { series: [id, ...] }
  • New: POST /api/orgunit/{orgUnitId}/series
    • Body: { seriesIds: [id, ...] }
  • Change: Request object renamed.

7. Remove Borrowed Series​

  • Legacy: No direct endpoint
  • New: DELETE /api/orgunit/{orgUnitId}/series
    • Body: { seriesId }
  • Change: New endpoint.

8. Subscribe/Unsubscribe​

  • Legacy: POST /api/orgunit/:id/subscribe, POST /api/orgunit/:id/unsubscribe
    • Body: { userId }
  • New: POST /api/orgunit/{orgUnitId}/subscribe, POST /api/orgunit/{orgUnitId}/unsubscribe
    • Body: { userId }
  • Change: Path param renamed.

9. Get Org Unit Calendar​

  • Legacy: GET /api/orgunit/:id/calendar?start=...&end=...
  • New: GET /api/orgunit/{orgUnitId}/calendar?start=...&end=...
  • Change: Path param renamed.

10. Get Org Unit Parents​

  • Legacy: GET /api/orgunit/:id/parents
  • New: GET /api/orgunit/{orgUnitId}/parents
  • Change: Path param renamed.

11. Export/Import Org Unit Tree​

  • Legacy: GET /api/orgunit/:id/export, POST /api/orgunit/:id/import
  • New: Removed
  • Change: No longer available.

Request & Response Object Changes​

Create Org Unit​

Legacy Request:

{
"displayName": "Physics",
"type": "module",
"description": "Physics module",
"metadata": { "externalId": "abc" },
"published": true,
"groupId": 2,
"parentId": 1
}

New Request:

{
"displayName": "Physics",
"type": "module",
"parentId": 1,
"published": true,
"description": "Physics module"
}

New Response:

{
"id": 1,
"displayName": "Physics",
"type": "module",
"description": "Physics module",
"parentId": 1,
"published": true,
"groupId": 2,
"createdAt": "2025-08-19T11:37:02.029896+00:00",
"updatedAt": "2025-08-19T11:37:02.029896+00:00",
"series": [],
"canManage": true
}
  • Change: Metadata and groupId are set automatically; response includes more fields.

Update Org Unit​

Legacy Request:

{
"displayName": "Physics Updated",
"published": true
}

New Request:

{
"displayName": "Physics Updated",
"published": true
}

New Response:
Returns updated org unit object (see above).


Borrow Series​

Legacy Request:

{
"series": [1, 2, 3]
}

New Request:

{
"seriesIds": [1, 2, 3]
}

New Response:

{
"successCount": 2,
"failureCount": 1
}

Remove Borrowed Series​

New Request:

{
"seriesId": 2
}

New Response:

{}

Subscribe/Unsubscribe​

New Request:

{
"userId": 2
}

New Response:

{}

Get Org Unit Calendar​

New Response:

{
"results": [
{
"id": 101,
"displayName": "Maths 101",
"start": "2025-08-19T11:37:02.029896+00:00",
"end": "2025-08-19T12:37:02.029876+00:00",
"location": "Room 12",
"type": "Lecture",
"notes": "Bring calculator",
"organisers": ["Dr. Smith"]
}
]
}

Get Org Unit Parents​

New Response:

{
"orgUnitInfo": {
"id": 1,
"displayName": "Physics",
"parent": {
"id": 2,
"displayName": "Engineering"
}
}
}

New Features & Removals​

New Features​

  • Subscribe/unsubscribe endpoints for org units.
  • Borrow/remove series endpoints.
  • Calendar and parent hierarchy endpoints.
  • Standardized field names and response objects.
  • canManage property in responses.

Removed Features​

  • Export/import org unit tree endpoints.
  • Some legacy query parameters and request fields.

Summary​

  • Endpoints have been renamed and standardized.
  • Request and response objects are more structured and consistent.
  • Some legacy features (export/import) have been removed.
  • New features (subscribe, calendar, parents, borrowed series) have been added.
  • Field names and HTTP verbs have changed for clarity and RESTfulness.

Series​

Endpoint Mapping​

Legacy EndpointNew EndpointChange?
GET /api/series/:idGET /api/series/{seriesId}Path param renamed
POST /api/seriesPOST /api/modules/{moduleId}/seriesPath and semantics changed (must link to org unit/module)
POST /api/series/:idPOST /api/series/{seriesId}Path param renamed
DELETE /api/series/:idDELETE /api/series/{seriesId}Path param renamed
GET /api/series/:id/eventsGET /api/series/{seriesId}/eventsPath param renamed
GET /api/series/:id/events-with-admin-infoGET /api/series/{seriesId}/events-with-admin-infoNew endpoint (admin only)
POST /api/series/:id/subscribePOST /api/series/{seriesId}/subscribePath param renamed
POST /api/series/:id/unsubscribePOST /api/series/{seriesId}/unsubscribePath param renamed
GET /api/series/:id/parentsGET /api/series/{seriesId}/parentsPath param renamed
Other endpoints (e.g. calendars, pictures, etc.)RemovedRemoved

Endpoint Changes​

1. Get Series by ID​

  • Legacy: GET /api/series/:id
  • New: GET /api/series/{seriesId}
  • Change: Path param renamed. Query param includeOrgUnits supported.

2. Create Series​

  • Legacy: POST /api/series
    • Body: { appId, displayName, description, groupId }
  • New: POST /api/modules/{moduleId}/series
    • Body: { displayName, description }
  • Change: Must specify module/org unit to link series; groupId is set automatically.

3. Update Series​

  • Legacy: POST /api/series/:id
    • Body: { displayName?, description?, group? }
  • New: POST /api/series/{seriesId}
    • Body: { displayName?, description?, groupId? }
  • Change: Path param renamed; field names standardized.

4. Delete Series​

  • Legacy: DELETE /api/series/:id
  • New: DELETE /api/series/{seriesId}
  • Change: Path param renamed.

5. Get Events in Series​

  • Legacy: GET /api/series/:id/events
  • New: GET /api/series/{seriesId}/events
  • Change: Path param renamed; response standardized.

6. Get Events in Series (Admin Info)​

  • New: GET /api/series/{seriesId}/events-with-admin-info
    • Returns extra details for admins/group admins.

7. Subscribe/Unsubscribe to Series​

  • Legacy: POST /api/series/:id/subscribe, POST /api/series/:id/unsubscribe
    • Body: { userId }
  • New: POST /api/series/{seriesId}/subscribe, POST /api/series/{seriesId}/unsubscribe
    • Body: { userId, orgUnitId? }
  • Change: Path param renamed; orgUnitId can be specified.

8. Get Series Parents​

  • Legacy: No direct endpoint
  • New: GET /api/series/{seriesId}/parents
    • Returns parent org units for the series.

Request & Response Object Changes​

Create Series​

Legacy Request:

{
"appId": 1,
"displayName": "Maths 101",
"description": "Maths series",
"groupId": 2
}

New Request:

{
"displayName": "Maths 101",
"description": "Maths series"
}
  • Change: Series must be created under a module/org unit (POST /api/modules/{moduleId}/series).

New Response:

{
"id": 1,
"displayName": "Maths 101",
"description": "Maths series",
"groupId": 2,
"appId": 1,
"createdAt": "2025-08-19T11:37:02.029896+00:00",
"updatedAt": "2025-08-19T11:37:02.029896+00:00",
"orgUnits": [
{
"id": 3,
"displayName": "Physics",
"type": "module"
}
]
}

Update Series​

Legacy Request:

{
"displayName": "Maths 101 Updated",
"description": "Updated description",
"group": 2
}

New Request:

{
"displayName": "Maths 101 Updated",
"description": "Updated description",
"groupId": 2
}

New Response:

{
"id": 1,
"displayName": "Maths 101 Updated",
"description": "Updated description",
"groupId": 2,
"appId": 1,
"updatedAt": "2025-08-19T11:37:02.029896+00:00"
}

Get Series​

New Response:

{
"id": 1,
"displayName": "Maths 101",
"description": "Maths series",
"groupId": 2,
"appId": 1,
"createdAt": "2025-08-19T11:37:02.029896+00:00",
"updatedAt": "2025-08-19T11:37:02.029896+00:00",
"orgUnits": [
{
"id": 3,
"displayName": "Physics",
"type": "module"
}
]
}

Get Events in Series​

New Response:

{
"results": [
{
"id": 101,
"displayName": "Maths 101",
"start": "2025-08-19T11:37:02.029896+00:00",
"end": "2025-08-19T12:37:02.029876+00:00",
"location": "Room 12",
"type": "Lecture",
"notes": "Bring calculator",
"organisers": "Dr. Smith"
}
]
}

Subscribe/Unsubscribe to Series​

New Request:

{
"userId": 2,
"orgUnitId": 3
}

New Response:

{}

Get Series Parents​

New Response:

{
"parents": [
{
"id": 3,
"displayName": "Physics",
"type": "module"
}
]
}