Schedule and calendar
Use for "when is my class tomorrow?", "what's on next Wednesday?" or a week
overview. Interpret relative days in the Program's time zone and pass dates; end is exclusive
and at most 400 days after start. A busy term is a large result: narrow it with
course_ids, kinds or a shorter range. Cancelled classes are included with status 'cancelled'.
For today alone prefer calendar.today.get. Each class carries its term week in meta.week_number.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
start*StartFirst day, in the Program's time zone
dateend*EndDay after the last day (exclusive); at most 400 days later
datesources?array<>|Sources to include, e.g. ['schedule.meetings', 'tasks.due']; all by default
term_id?|Only this term
course_ids?array<>|Only these courses
kinds?array<>|Only these kinds: class, event, task; all by default
Successful Response
application/json- response
timezone*TimezoneThe Program's time zone, for reading the local times
start*Startdateend*Enddateitems*array<>Sorted by start
weeks*array<>Term weeks touching the range
breaks*array<>Breaks touching the range
curl -X GET 'https://example.com/programs/string/calendar?start=2019-08-24&end=2019-08-24'{ "timezone": "string", "start": "2019-08-24", "end": "2019-08-24", "items": [ { "id": "string", "source": "string", "kind": "class", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": false, "course_id": "string", "type_code": "string", "location": "string", "color_ref": "string", "status": "cancelled", "ref": { "entity": "string", "id": "string" }, "meta": { "conflicts_with": [ "string" ], "term_id": "string", "meeting_id": "string", "section_id": "string", "original_date": "2019-08-24", "original_start_at": "2019-08-24T14:15:22Z", "week_number": 0, "section_code": "string", "instructor": "string", "note": "string", "url": "string", "assessment_id": "string", "updated_at": "2019-08-24T14:15:22Z" } } ], "weeks": [ { "term_id": "string", "start_date": "2019-08-24", "end_date": "2019-08-24", "number": 0, "break_name": "string" } ], "breaks": [ { "term_id": "string", "name": "string", "start_date": "2019-08-24", "end_date": "2019-08-24" } ]}Prefer this for questions about today ("what do I have today?", "what's due this week?"). It also says which term week it is. For other days or longer ranges use calendar.occurrence.list. Times are local to the Program, with their UTC offset.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
Successful Response
application/json- response
day*DayToday in the Program's time zone
datetimezone*Timezoneweek*|The current term's week, if in a term
items*array<>Today's classes and events
upcoming*array<>Tasks due in the next 7 days
tasks*array<>Tasks due today and overdue ones
curl -X GET 'https://example.com/programs/string/today'{ "day": "2019-08-24", "timezone": "string", "week": { "term_id": "string", "term_name": "string", "number": 0, "break_name": "string" }, "items": [ { "id": "string", "source": "string", "kind": "class", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": false, "course_id": "string", "type_code": "string", "location": "string", "color_ref": "string", "status": "cancelled", "ref": { "entity": "string", "id": "string" }, "meta": { "conflicts_with": [ "string" ], "term_id": "string", "meeting_id": "string", "section_id": "string", "original_date": "2019-08-24", "original_start_at": "2019-08-24T14:15:22Z", "week_number": 0, "section_code": "string", "instructor": "string", "note": "string", "url": "string", "assessment_id": "string", "updated_at": "2019-08-24T14:15:22Z" } } ], "upcoming": [ { "id": "string", "source": "string", "kind": "class", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": false, "course_id": "string", "type_code": "string", "location": "string", "color_ref": "string", "status": "cancelled", "ref": { "entity": "string", "id": "string" }, "meta": { "conflicts_with": [ "string" ], "term_id": "string", "meeting_id": "string", "section_id": "string", "original_date": "2019-08-24", "original_start_at": "2019-08-24T14:15:22Z", "week_number": 0, "section_code": "string", "instructor": "string", "note": "string", "url": "string", "assessment_id": "string", "updated_at": "2019-08-24T14:15:22Z" } } ], "tasks": [ { "id": "string", "source": "string", "kind": "class", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": false, "course_id": "string", "type_code": "string", "location": "string", "color_ref": "string", "status": "cancelled", "ref": { "entity": "string", "id": "string" }, "meta": { "conflicts_with": [ "string" ], "term_id": "string", "meeting_id": "string", "section_id": "string", "original_date": "2019-08-24", "original_start_at": "2019-08-24T14:15:22Z", "week_number": 0, "section_code": "string", "instructor": "string", "note": "string", "url": "string", "assessment_id": "string", "updated_at": "2019-08-24T14:15:22Z" } } ]}Use after adding or moving meetings to warn about clashes. Only enabled meetings that share at least one date count.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
term_id*Term IdTerm id
Successful Response
application/json- response
items*array<>curl -X GET 'https://example.com/terms/string/schedule-conflicts'{ "items": [ { "meeting_id": "string", "other_meeting_id": "string", "weekday": 0, "dates": [ "2019-08-24" ] } ]}Optionally only one course's or one term's. For a date range use calendar.occurrence.list.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
course_id?|Only this course's events
term_id?|Only this term's events
Successful Response
application/json- response
items*array<>By start time
curl -X GET 'https://example.com/programs/string/events'{ "items": [ { "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "type_code": "string", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": true, "location": "string", "note": "string", "source_kind": "string", "source_ref": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}Times without an offset are read in the Program's time zone. For something that repeats weekly use schedule.meeting.create.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
title*TitleE.g. 'Midterm'
1 <= length <= 100start_at*Start AtStart; without an offset it is read in the Program's time zone
date-timeend_at*End AtEnd (not before the start)
date-timeall_day?All DayWhole days; times are ignored
falsecourse_id?|Course it belongs to
term_id?|Term it belongs to
type_code?|Event type code, e.g. 'TUT'
location?|Location
note?|Note
source_kind?|Importer that created it
source_ref?|Id in the import source
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*string|nullcourse_id*string|nulltype_code*string|nulltitle*Titlestart_at*Start Atdate-timeend_at*End Atdate-timeall_day*All Daylocation*string|nullnote*string|nullsource_kind*string|nullsource_ref*string|nullcreated_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X POST 'https://example.com/programs/string/events' \ -H 'Content-Type: application/json' \ -d '{ "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z"}'{ "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "type_code": "string", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": true, "location": "string", "note": "string", "source_kind": "string", "source_ref": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Times without an offset are read in the Program's time zone. For something that repeats weekly use schedule.section.create_many. An item with the same source_kind and source_ref as an existing event of the Program updates it.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
events*array<>Events; same source_kind+source_ref updates
1 <= items <= 100Successful Response
application/json- response
items*array<>created_ids*array<string>updated_ids*array<string>curl -X POST 'https://example.com/programs/string/events:batch' \ -H 'Content-Type: application/json' \ -d '{ "events": [ { "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z" } ]}'{ "items": [ { "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "type_code": "string", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": true, "location": "string", "note": "string", "source_kind": "string", "source_ref": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "created_ids": [ "string" ], "updated_ids": [ "string" ]}Use schedule.event.list or calendar.occurrence.list to find events.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
event_id*Event IdEvent id
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*string|nullcourse_id*string|nulltype_code*string|nulltitle*Titlestart_at*Start Atdate-timeend_at*End Atdate-timeall_day*All Daylocation*string|nullnote*string|nullsource_kind*string|nullsource_ref*string|nullcreated_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X GET 'https://example.com/events/string'{ "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "type_code": "string", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": true, "location": "string", "note": "string", "source_kind": "string", "source_ref": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Only the fields that are sent change. Moving only start_at keeps the event's
duration. Find the id with schedule.event.list; a weekly class is changed with
schedule.meeting.update or, for one week, schedule.exception.upsert.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
event_id*Event IdEvent id
application/json- body
title?|Title
start_at?|Start
end_at?|End
all_day?|Whole days
course_id?|Course, or null
term_id?|Term, or null
type_code?|Event type code, or null
location?|Location, or null
note?|Note, or null
Successful Response
application/json- response
id*Idprogram_id*Program Idterm_id*string|nullcourse_id*string|nulltype_code*string|nulltitle*Titlestart_at*Start Atdate-timeend_at*End Atdate-timeall_day*All Daylocation*string|nullnote*string|nullsource_kind*string|nullsource_ref*string|nullcreated_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X PATCH 'https://example.com/events/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "program_id": "string", "term_id": "string", "course_id": "string", "type_code": "string", "title": "string", "start_at": "2019-08-24T14:15:22Z", "end_at": "2019-08-24T14:15:22Z", "all_day": true, "location": "string", "note": "string", "source_kind": "string", "source_ref": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Irreversible. Find the id with schedule.event.list. A weekly class is not an event: cancel one week with schedule.exception.upsert, or remove the class time with schedule.meeting.delete.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
event_id*Event IdEvent id
Successful Response
application/json- response
deleted?Deletedtruecurl -X DELETE 'https://example.com/events/string'{ "deleted": true}Use to find valid type codes before creating meetings or events.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
Successful Response
application/json- response
items*array<>In display order
curl -X GET 'https://example.com/programs/string/event-types'{ "items": [ { "id": "string", "program_id": "string", "code": "string", "name": "string", "color": "string", "icon": "string", "builtin": true, "position": 0 } ]}Use when a schedule needs a type the Program does not have yet.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
code*CodeAbbreviation, letters and digits, e.g. 'LAB'
^[A-Za-z0-9]{1,8}$name*NameDisplay name, e.g. 'Laboratory'
1 <= length <= 100color?|'subject-<1..12>' or '#rrggbb'
icon?|lucide icon name, e.g. 'flask-conical'
Successful Response
application/json- response
id*Idprogram_id*Program Idcode*CodeUpper-case abbreviation, e.g. 'LEC'
name*NameDisplay name; built-in types are translated by the app
color*string|nullicon*string|nullbuiltin*Builtinposition*Positioncurl -X POST 'https://example.com/programs/string/event-types' \ -H 'Content-Type: application/json' \ -d '{ "code": "string", "name": "string"}'{ "id": "string", "program_id": "string", "code": "string", "name": "string", "color": "string", "icon": "string", "builtin": true, "position": 0}Built-in types (LEC, PRA, TUT) keep their name; their color and icon can change.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
event_type_id*Event Type IdEvent type id
application/json- body
name?|Display name (not for built-in types)
color?|Color, or null for none
icon?|Icon name, or null for none
Successful Response
application/json- response
id*Idprogram_id*Program Idcode*CodeUpper-case abbreviation, e.g. 'LEC'
name*NameDisplay name; built-in types are translated by the app
color*string|nullicon*string|nullbuiltin*Builtinposition*Positioncurl -X PATCH 'https://example.com/event-types/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "program_id": "string", "code": "string", "name": "string", "color": "string", "icon": "string", "builtin": true, "position": 0}Fails with schedule.event_type_in_use while anything uses the type.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
event_type_id*Event Type IdEvent type id
Successful Response
application/json- response
deleted?Deletedtruecurl -X DELETE 'https://example.com/event-types/string'{ "deleted": true}Types not listed keep their relative order after the listed ones.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
event_type_ids*array<>Types in display order
items <= 100Successful Response
application/json- response
items*array<>In display order
curl -X PUT 'https://example.com/programs/string/event-types:order' \ -H 'Content-Type: application/json' \ -d '{ "event_type_ids": [ "string" ]}'{ "items": [ { "id": "string", "program_id": "string", "code": "string", "name": "string", "color": "string", "icon": "string", "builtin": true, "position": 0 } ]}The class happens again as regularly scheduled. Use when a class cancelled or moved with schedule.exception.upsert takes place after all.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
meeting_id*Meeting IdMeeting id
original_date*Original DateRegular date of the changed class
dateSuccessful Response
application/json- response
id*Idsection_id*Section Idweekday*Weekday1 = Monday .. 7 = Sunday
start_time*Start TimeWall-clock time in the Program's time zone
timeend_time*End Timetimelocation*string|nulltitle*|Optional name of this time, e.g. 'Lab'
enabled*EnabledShown in the calendar
source_kind*string|nullsource_ref*string|nullexceptions*array<>Cancelled or moved dates
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X DELETE 'https://example.com/meetings/string/exceptions/2019-08-24'{ "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Use for "class is cancelled on Friday" or "Tuesday's lecture moves to room X".
original_date must be a date the meeting normally happens on. Prefer this over deleting the
meeting.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
meeting_id*Meeting IdMeeting id
original_date*Original DateThe regular date of the class to change
dateapplication/json- body
kind*KindCancel it, or move it
"cancelled""moved"new_date?|Moved: new date (default: same day)
new_start_time?|Moved: new start time
new_end_time?|Moved: new end time
new_location?|Moved: new location; null keeps the meeting's, "" means none
note?|Note shown with the class
Successful Response
application/json- response
id*Idsection_id*Section Idweekday*Weekday1 = Monday .. 7 = Sunday
start_time*Start TimeWall-clock time in the Program's time zone
timeend_time*End Timetimelocation*string|nulltitle*|Optional name of this time, e.g. 'Lab'
enabled*EnabledShown in the calendar
source_kind*string|nullsource_ref*string|nullexceptions*array<>Cancelled or moved dates
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X PUT 'https://example.com/meetings/string/exceptions/2019-08-24' \ -H 'Content-Type: application/json' \ -d '{ "kind": "cancelled"}'{ "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}One link per Program; None while it is off.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
Successful Response
application/json- response
feed*|The Program's link; None while it is off
curl -X GET 'https://example.com/programs/string/calendar-feed'{ "feed": { "id": "string", "program_id": "string", "prefix": "string", "url": "string", "sources": [ "schedule" ], "created_at": "2019-08-24T14:15:22Z", "last_fetched_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z" }}Anyone with the link can read the calendar. Returns the existing link if on.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram id
application/json- body
sources?array<>What the feed contains
1 <= itemsSuccessful Response
application/json- response
id*Idprogram_id*Program Idprefix*PrefixFirst characters of the token
url*|Subscription URL; anyone with it can read the calendar. None for a link that cannot be shown again (made by an older version): reset gives a new one
sources*array<>created_at*Created Atdate-timelast_fetched_at*|nullrevoked_at*|nullcurl -X POST 'https://example.com/programs/string/calendar-feed' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "program_id": "string", "prefix": "string", "url": "string", "sources": [ "schedule" ], "created_at": "2019-08-24T14:15:22Z", "last_fetched_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z"}Calendars subscribed to the old address stop updating.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
feed_id*Feed IdFeed id
Successful Response
application/json- response
id*Idprogram_id*Program Idprefix*PrefixFirst characters of the token
url*|Subscription URL; anyone with it can read the calendar. None for a link that cannot be shown again (made by an older version): reset gives a new one
sources*array<>created_at*Created Atdate-timelast_fetched_at*|nullrevoked_at*|nullcurl -X POST 'https://example.com/calendar-feeds/string/reset'{ "id": "string", "program_id": "string", "prefix": "string", "url": "string", "sources": [ "schedule" ], "created_at": "2019-08-24T14:15:22Z", "last_fetched_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z"}Subscribed calendars pick up the change on their next refresh.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
feed_id*Feed IdFeed id
application/json- body
sources*array<>What the feed contains
1 <= itemsSuccessful Response
application/json- response
id*Idprogram_id*Program Idprefix*PrefixFirst characters of the token
url*|Subscription URL; anyone with it can read the calendar. None for a link that cannot be shown again (made by an older version): reset gives a new one
sources*array<>created_at*Created Atdate-timelast_fetched_at*|nullrevoked_at*|nullcurl -X PATCH 'https://example.com/calendar-feeds/string' \ -H 'Content-Type: application/json' \ -d '{ "sources": [ "schedule" ]}'{ "id": "string", "program_id": "string", "prefix": "string", "url": "string", "sources": [ "schedule" ], "created_at": "2019-08-24T14:15:22Z", "last_fetched_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z"}Calendars subscribed to it stop updating.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
feed_id*Feed IdFeed id
Successful Response
application/json- response
id*Idprogram_id*Program Idprefix*PrefixFirst characters of the token
url*|Subscription URL; anyone with it can read the calendar. None for a link that cannot be shown again (made by an older version): reset gives a new one
sources*array<>created_at*Created Atdate-timelast_fetched_at*|nullrevoked_at*|nullcurl -X DELETE 'https://example.com/calendar-feeds/string'{ "id": "string", "program_id": "string", "prefix": "string", "url": "string", "sources": [ "schedule" ], "created_at": "2019-08-24T14:15:22Z", "last_fetched_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z"}The time runs in the section's weeks. Check schedule.conflict.list afterwards and mention any overlap.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
section_id*Section IdSection the time belongs to
application/json- body
weekday*Weekday1 = Monday .. 7 = Sunday
1 <= value <= 7start_time*Start TimeStart, wall-clock time in the Program's time zone
timeend_time*End TimeEnd, after the start
timelocation?|Room or building
title?|Optional name of this time
enabled?EnabledFalse hides it from the calendar
trueSuccessful Response
application/json- response
id*Idsection_id*Section Idweekday*Weekday1 = Monday .. 7 = Sunday
start_time*Start TimeWall-clock time in the Program's time zone
timeend_time*End Timetimelocation*string|nulltitle*|Optional name of this time, e.g. 'Lab'
enabled*EnabledShown in the calendar
source_kind*string|nullsource_ref*string|nullexceptions*array<>Cancelled or moved dates
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X POST 'https://example.com/sections/string/meetings' \ -H 'Content-Type: application/json' \ -d '{ "weekday": 1, "start_time": "14:15:22Z", "end_time": "14:15:22Z"}'{ "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Changes every week. The weeks are the section's: schedule.section.update. To change or cancel a single date use schedule.exception.upsert instead.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
meeting_id*Meeting IdMeeting id
application/json- body
weekday?|1 = Monday .. 7 = Sunday
start_time?|Start time
end_time?|End time
location?|Location, or null
title?|Title, or null
enabled?|Shown in the calendar
Successful Response
application/json- response
id*Idsection_id*Section Idweekday*Weekday1 = Monday .. 7 = Sunday
start_time*Start TimeWall-clock time in the Program's time zone
timeend_time*End Timetimelocation*string|nulltitle*|Optional name of this time, e.g. 'Lab'
enabled*EnabledShown in the calendar
source_kind*string|nullsource_ref*string|nullexceptions*array<>Cancelled or moved dates
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X PATCH 'https://example.com/meetings/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}A section's last time goes with the section. To cancel one class use schedule.exception.upsert with kind 'cancelled'; to hide a section the user does not attend use schedule.meeting.set_enabled.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
meeting_id*Meeting IdMeeting id
Successful Response
application/json- response
deleted?Deletedtruecurl -X DELETE 'https://example.com/meetings/string'{ "deleted": true}To hide a whole section, pass all of its meetings. To keep only one section, pass its meetings with enabled=true and the other sections' meetings as other_meeting_ids. Disabled meetings stay in the course but are left out of the calendar. Returns only the meetings whose state changed (empty when they already were as asked).
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
course_id*Course IdCourse id
application/json- body
meeting_ids*array<>Meetings to change
1 <= items <= 200enabled*EnabledTrue to show them, false to hide them
other_meeting_ids?array<>Meetings set to the opposite state in the same change, e.g. the other sections when keeping only one
items <= 200Successful Response
application/json- response
items*array<>curl -X PUT 'https://example.com/courses/string/meetings:enabled' \ -H 'Content-Type: application/json' \ -d '{ "meeting_ids": [ "string" ], "enabled": true}'{ "items": [ { "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}Each section runs in one of the course's terms; times are wall-clock times in the Program's time zone, and all times of a section share its weeks. A section code the course already has in that term adds the times to that section. Check schedule.conflict.list afterwards and mention any overlap. For a single extra session (exam, make-up class) use schedule.event.create_many instead.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
course_id*Course IdCourse id
application/json- body
sections*array<>Sections
1 <= items <= 50Successful Response
application/json- response
items*array<>The sections written, with all their times
created_ids*array<string>Meetings added
updated_ids*array<string>Meetings that existed and were updated
curl -X POST 'https://example.com/courses/string/sections:batch' \ -H 'Content-Type: application/json' \ -d '{ "sections": [ { "term_id": "string", "type_code": "string", "meetings": [ { "weekday": 1, "start_time": "14:15:22Z", "end_time": "14:15:22Z" } ] } ]}'{ "items": [ { "id": "string", "course_id": "string", "term_id": "string", "type_code": "string", "section_code": "string", "instructor": "string", "recurrence": "weekly", "anchor_week": 0, "start_week": 0, "end_week": 0, "skip_breaks": true, "meetings": [ { "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "created_ids": [ "string" ], "updated_ids": [ "string" ]}The weeks apply to every weekly time of the section. To change one time's day, hours or room use schedule.meeting.update; to change or cancel a single date use schedule.exception.upsert.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
section_id*Section IdSection id
application/json- body
term_id?|Another term of the course
type_code?|Event type code
section_code?|Section code
instructor?|Instructor, or null
recurrence?|weekly or biweekly
anchor_week?|Biweekly anchor week; null = the first week
start_week?|First term week
end_week?|Last term week, or null
skip_breaks?|Skip breaks
Successful Response
application/json- response
A class section with its weekly times; all of them run in the section's weeks.
id*Idcourse_id*Course Idterm_id*Term Idtype_code*Type Codesection_code*Section Codee.g. 'LEC0101'; empty when the source has none
instructor*string|nullrecurrence*Recurrence"weekly""biweekly"anchor_week*Anchor WeekBiweekly: the term week it starts alternating from
start_week*Start Weekend_week*|Last term week; null = until the end of term
skip_breaks*Skip Breaksmeetings*array<>Weekly times, by weekday and start time
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X PATCH 'https://example.com/sections/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "course_id": "string", "term_id": "string", "type_code": "string", "section_code": "string", "instructor": "string", "recurrence": "weekly", "anchor_week": 0, "start_week": 0, "end_week": 0, "skip_breaks": true, "meetings": [ { "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}To hide a section the user does not attend use schedule.meeting.set_enabled instead; to cancel one class use schedule.exception.upsert.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
section_id*Section IdSection id
Successful Response
application/json- response
deleted?Deletedtruecurl -X DELETE 'https://example.com/sections/string'{ "deleted": true}Use to see when a course meets each week, or to find a section or meeting id before changing or cancelling a class. A section (e.g. LEC0101) has one or more weekly times (meetings) that all run in the section's weeks. Optionally only one term of a year-long course.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
course_id*Course IdCourse id
term_id?|Only this term's sections
Successful Response
application/json- response
items*array<>By term, type and section code
curl -X GET 'https://example.com/courses/string/sections'{ "items": [ { "id": "string", "course_id": "string", "term_id": "string", "type_code": "string", "section_code": "string", "instructor": "string", "recurrence": "weekly", "anchor_week": 0, "start_week": 0, "end_week": 0, "skip_breaks": true, "meetings": [ { "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}The app's section editor: the section's fields and weeks, and its times updated, added and deleted together. Sem and MCP use schedule.section.update and the schedule.meeting tools.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
course_id*Course IdCourse id
application/json- body
term_id*Term IdTerm of the course the section runs in
1 <= length <= 64type_code*Type CodeEvent type code of the Program, e.g. 'LEC'
^[A-Za-z0-9]{1,8}$section_code?Section CodeSection, e.g. 'LEC0101'
length <= 32""instructor?|Instructor
section_id?|The section edited; null adds one
weeks?Weeks of all times
times*array<>Its weekly times
1 <= items <= 20Successful Response
application/json- response
A class section with its weekly times; all of them run in the section's weeks.
id*Idcourse_id*Course Idterm_id*Term Idtype_code*Type Codesection_code*Section Codee.g. 'LEC0101'; empty when the source has none
instructor*string|nullrecurrence*Recurrence"weekly""biweekly"anchor_week*Anchor WeekBiweekly: the term week it starts alternating from
start_week*Start Weekend_week*|Last term week; null = until the end of term
skip_breaks*Skip Breaksmeetings*array<>Weekly times, by weekday and start time
created_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X PUT 'https://example.com/courses/string/sections' \ -H 'Content-Type: application/json' \ -d '{ "term_id": "string", "type_code": "string", "times": [ { "weekday": 1, "start_time": "14:15:22Z", "end_time": "14:15:22Z" } ]}'{ "id": "string", "course_id": "string", "term_id": "string", "type_code": "string", "section_code": "string", "instructor": "string", "recurrence": "weekly", "anchor_week": 0, "start_week": 0, "end_week": 0, "skip_breaks": true, "meetings": [ { "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}For the term timetable; schedule.section.list is per course.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
term_id*Term IdTerm id
Successful Response
application/json- response
items*array<>By term, type and section code
curl -X GET 'https://example.com/terms/string/sections'{ "items": [ { "id": "string", "course_id": "string", "term_id": "string", "type_code": "string", "section_code": "string", "instructor": "string", "recurrence": "weekly", "anchor_week": 0, "start_week": 0, "end_week": 0, "skip_breaks": true, "meetings": [ { "id": "string", "section_id": "string", "weekday": 0, "start_time": "14:15:22Z", "end_time": "14:15:22Z", "location": "string", "title": "string", "enabled": true, "source_kind": "string", "source_ref": "string", "exceptions": [ { "id": "string", "meeting_id": "string", "original_date": "2019-08-24", "kind": "cancelled", "new_date": "2019-08-24", "new_start_time": "14:15:22Z", "new_end_time": "14:15:22Z", "new_location": "string", "note": "string", "imported": true } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ]}