Year Groups

A Year Group is a collection of student memberships in a cohort that share the same Program.

Get all Year Groups

get
/v2p2/year-groups

This endpoint retrieves the basic information of all Year Groups. It returns the group name, program, program_code, grade level and student IDs for members.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Query parameters
modified_sincestringOptional

A timestamp to filter results by modification date.

pagestringOptional

An integer defining which page to display.

per_pagestringOptional

An integer defining the number of records to display per page.

archivedbooleanOptional

A boolean that, if set to true, returns only archived groups.

Responses
get
/v2p2/year-groups
200

Success

Get Students for a Year Group

get
/v2p2/year-groups/{id}/students

This endpoint retrieves all students belonging to a year group, as specified by the year group ID.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
idintegerRequired

Unique identifier for year group.

Query parameters
pagestringOptional

An integer defining which page to display.

per_pagestringOptional

An integer defining the number of records to display per page.

Responses
get
/v2p2/year-groups/{id}/students
200

Success

Add Students to a Year Group

post
/v2p2/year-groups/{id}/add_students

This endpoint adds a list of student IDs to a year group, as specified by the year group ID.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
idintegerRequired

Unique identifier for year group.

Body
student_idsinteger[]Required

An array of student IDs to be added to a year group

Responses
post
/v2p2/year-groups/{id}/add_students
200

Success

Remove Students from a Year Group

post
/v2p2/year-groups/{id}/remove_students

This endpoint removes a list of student IDs from a year group, as specified by the year group ID.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
idintegerRequired

Unique identifier for year group.

Body
student_idsinteger[]Required

An array of Student IDs to remove from the Year Group

Responses
post
/v2p2/year-groups/{id}/remove_students
200

Success

Get Advisors

get
/v2p2/year-groups/{id}/advisors

Retrieves the Homeroom, CAS, EE, TOK, Project-based Learning advisors for a Year Group, specified by id. Returns advisor IDs and role abbreviations.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
idintegerRequired

Unique identifier for year group.

Responses
get
/v2p2/year-groups/{id}/advisors
200

Success

Last updated

Was this helpful?