Which endpoint is used for retrieving class schedules for a user?
How to query student schedules
Best answer by scopous_iiq
We do have an SIS classes endpoint. It returns every class section the user is enrolled in, along with the course, the school, and the room. Here are the details on how to use it.
Endpoint
GET /api/v1.0/sis/classes/for/user/{UserId}{UserId} is the IncidentIQ UserId (the user's GUID in IncidentIQ), not the SIS user id and not the student ID number.
Headers
| Header | Value |
|---|---|
Authorization | Bearer {your API key} |
SiteId | Your site GUID |
ProductId | 88DF910C-91AA-E711-80C2-0004FFA00010 |
Content-Type | application/json |
Finding the UserId
If you are starting from a student ID number, resolve it first:
POST /api/v1.0/users{
"Filters": [
{ "Facet": "schoolidnumber", "Value": "100482", "Selected": true }
],
"FieldsToReturn": ["UserId", "SchoolIdNumber", "Name"]
}Take Items[0].UserId and pass it into the classes call.
What comes back
A standard list response: Items[] plus a Paging block.
| Field | Notes |
|---|---|
SisClassId | The section's GUID. Use it for roster lookups. |
Name | Section name |
ClassCode | Section code from the SIS |
ClassType | Section type from the SIS, for example scheduled or homeroom |
Subjects | Subject list for the section |
SisCourseId | The course this section belongs to |
CourseName, CourseCode | Course identity, carried onto the section for convenience |
LocationId, LocationName | The school |
LocationDetails | Room detail as supplied by the SIS |
IsActive | Whether the section is active |
EnrolledStudents, EnrolledUsers | Enrollment counts |
ExternalId | The section's id in your SIS |
CourseGroupName | Course group the section belongs to |
SearchText | Prebuilt search string for the section |
ClassImage | Section image path, defaulted when the SIS supplies none |
SiteId | Your site GUID |
AppId | The SIS integration that supplied the record |
Section records cover the course, the school, and the room. Meeting dates come from the enrollment record, covered below.
Current enrollments
The endpoint returns what the student is enrolled in today. Sections from a finished term drop off on their own, and sections for a term that has not started yet appear once the start date arrives, so there is nothing to filter on your side.
This call takes an IncidentIQ UserId, so it covers students who have an IncidentIQ account. To work directly from SIS identities instead, use the enrollment query below, which is keyed on SisUserId.
Paging and sorting
| Parameter | Purpose |
|---|---|
$p | Page index, zero based |
$s | Page size, default 100 |
$o | Sort expression, for example $o=Name DESC |
Results are sorted by Name ascending by default.
Prior terms and full enrollment history
To see enrollments outside the current window, including prior terms and dropped sections, query the enrollment records directly:
POST /api/v1.0/sis/courseusers/query/getFilter by SisUserId, the SIS user id from GET /api/v1.0/sis/users. Filters must be nested inside RequestOptions:
{
"RequestOptions": {
"Filters": [
{ "Facet": "SisUserId", "Ids": ["00000000-0000-0000-0000-000000000001"] }
],
"Paging": { "PageIndex": 0, "PageSize": 100 }
}
}Each record carries SisCourseUserId, SisUserId, SisClassId, SisCourseId, RoleId, IsPrimary, ExternalId, AppId, and the BeginDate and EndDate of the enrollment itself. Those two dates are where a section's term window lives. Resolve section names by passing SisClassId to GET /api/v1.0/sis/classes/{SisClassId}.
SisClassId and SisCourseId filter the same way. Nest every filter under RequestOptions.
Related endpoints
| Endpoint | Returns |
|---|---|
GET /api/v1.0/sis/classes/{SisClassId} | A single section |
GET /api/v1.0/sis/users/for/class/{SisClassId} | The roster for a section. RoleName distinguishes teachers from students. |
GET /api/v1.0/sis/courses/{SisCourseId} | The course behind a section |
GET /api/v1.0/sis/rooms/for/user/{UserId} | The rooms a user's sections meet in, as IncidentIQ room records |
GET /api/v1.0/sis/classes | Every section in the site |
Full example
curl -X GET \
'https://yourdistrict.incidentiq.com/api/v1.0/sis/classes/for/user/00000000-0000-0000-0000-000000000001?$p=0&$s=100' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'SiteId: YOUR_SITE_GUID' \
-H 'ProductId: 88DF910C-91AA-E711-80C2-0004FFA00010' \
-H 'Content-Type: application/json'Response shape
{
"Items": [
{
"SisClassId": "3f21b0c4-8a55-4a1e-9f70-2c1d5b7e4a10",
"Name": "Algebra I Section 3",
"ClassCode": "ALG1-003",
"ClassType": "scheduled",
"Subjects": "Mathematics",
"SisCourseId": "b8d4e2a1-77c3-4f19-8e52-9a0f3c6d1b44",
"CourseName": "Algebra I",
"CourseCode": "ALG1",
"LocationId": "c1a7f930-5d62-4b88-a3e1-6f2b9d40c755",
"LocationName": "Central High School",
"LocationDetails": "Room 214",
"IsActive": true,
"EnrolledStudents": 27,
"EnrolledUsers": 28,
"ExternalId": "SIS-SEC-88213",
"CourseGroupName": "Mathematics 9",
"SearchText": "Algebra I Section 3 ALG1",
"SiteId": "9d2c5b71-3f84-4a06-b512-77e8c1904d33",
"ClassImage": "/media/img/sis-classes/default.png",
"AppId": "oneroster"
}
],
"Paging": { "PageCount": 1, "PageIndex": 0, "PageSize": 100, "TotalRows": 6 },
"ItemCount": 6,
"StatusCode": 200
}Sections are one per row, so a student's full course load is the Items array.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

