Teaching Groups

A teaching group object represents the grouping in which students are taught a subject. By default, teaching groups and teaching group memberships are returned for today's date. You can either use a ?date= or an ?academic_year_id= parameter to change this behaviour but not both simultaneously.

Access: This is a read-only resource managed directly by the school.

Permissions: a school level access token with the teaching_groups scope is required to access teaching group information. To access the students in teaching groups, the students.basic scope is also required. To access the supervisors for teaching groups, the staff_members.basic scope is also required.

List Teaching Groups

Returns a list of teaching groups that match the given set of filters.

If a date parameter is provided then the list of groups returned is filtered to only those where the provided date falls between the groups start_date and end_date. Additionally when a date parameter is provided student_ids and supervior_ids are restricted to only those students who were enrolled in the group on the given date.

Note the If-Modified-Since header is optional (see the page on Conditional Requests for more details).

Request

GET /teaching_groups
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer b2s7a9s8BQokikJOvBiI2HlWgH4olfQ2
If-Modified-Since: Mon, 13 Mar 2017 20:00:00 GMT
Parameter Default Example Description
subject_code MAT

filter by subject

year_code 7

only include groups that contain students in this year

date 2018-07-21

returns groups and group memberships for a specific date

academic_year_id 233

returns all groups and group memberships from the specified academic year

per_page 100 25

Number of results to return on a single page. The maximum is 200.

page 1 2

page number to return

URI Template: /teaching_groups{?subject_code,year_code,date,academic_year_id,per_page,page}

Response 200

Headers
Content-Type: application/json; charset=utf-8
Last-Modified: Mon, 13 Mar 2017 20:00:00 GMT
Payload
{
    "object": "list",
    "total_count": 20,
    "total_pages": 1,
    "current_page": 1,
    "prev_page": null,
    "next_page": null,
    "data": [
        {
            "object": "teaching_group",
            "id": 1,
            "name": "7x/Ma1",
            "start_date": "2015-09-01T00:00:00.000Z",
            "end_date": "2016-08-31T23:59:00.000Z",
            "supervisor_ids": [
                1
            ],
            "student_ids": [
                15,
                50,
                109
            ],
            "subject": {
                "object": "subject",
                "id": 2,
                "code": "MAT",
                "name": "Mathematics"
            }
        }
    ]
}

View a Teaching Group

Returns a single teaching group whose ID matches the provided group_id. Additionally includes a list of all the student and supervisor identifiers that have ever been enrolled in the group.

Request

GET /teaching_groups/{group_id}
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer b2s7a9s8BQokikJOvBiI2HlWgH4olfQ2
Parameter Default Example Description
group_id 1

ID of the Teaching Group as an Integer

date 2018-07-21

returns groups and group memberships for a specific date

academic_year_id 233

returns all groups and group memberships from the specified academic year

URI Template: /teaching_groups/{group_id}{?date,academic_year_id}

Response 200

Headers
Content-Type: application/json; charset=utf-8
Payload
{
    "object": "teaching_group",
    "id": 1,
    "name": "7x/Ma1",
    "start_date": "2015-09-01T00:00:00.000Z",
    "end_date": "2016-08-31T23:59:00.000Z",
    "supervisor_ids": [
        1
    ],
    "student_ids": [
        15,
        50,
        109
    ],
    "subject": {
        "object": "subject",
        "id": 2,
        "code": "MAT",
        "name": "Mathematics"
    }
}

List Students for Teaching Group

Returns a list of all the students that are present in the teaching group identified by group_id.

Note the If-Modified-Since header is optional (see the page on Conditional Requests for more details).

Request

GET /teaching_groups/{group_id}/students
Headers
Accept: application/vnd.assembly+json; version=1
Authorization: Bearer b2s7a9s8BQokikJOvBiI2HlWgH4olfQ2
If-Modified-Since: Mon, 13 Mar 2017 20:00:00 GMT
Parameter Default Example Description
group_id 1

ID of the Teaching Group as an Integer

year_code 7

only include students from this year

date 2018-07-21

returns groups and group memberships for a specific date

academic_year_id 233

returns all groups and group memberships from the specified academic year

demographics false true

include demographics data

languages false true

include student language data

contacts false true

include contacts data

care false true

include 'in care' info

ever_in_care false true

include 'ever in care' info

addresses false true

include student address data

sen_needs false true

include SEN needs data

photo false true

include student photo data

per_page 100 25

number of results to return

page 1 2

page number to return

URI Template: /teaching_groups/{group_id}/students{?year_code,date,academic_year_id,demographics,languages,contacts,care,ever_in_care,addresses,sen_needs,photo,per_page,page}

Response 200

Headers
Content-Type: application/json; charset=utf-8
Last-Modified: Mon, 13 Mar 2017 20:00:00 GMT
Payload
{
   "object":"list",
   "total_count":2,
   "total_pages":1,
   "current_page":1,
   "prev_page":null,
   "next_page":null,
   "data":[
     {
         "object": "student",
         "id": 1,
         "year_code": "8",
         "upn": "N825532113104",
         "former_upn": "F820550109001",
         "mis_id": "8032",
         "pan": "A1234",
         "first_name": "George",
         "legal_first_name": "George",
         "middle_name": "",
         "last_name": "Addington",
         "legal_last_name": "Addington",
         "former_last_name": null,
         "dob": "1999-12-10",
         "start_date": "2015-02-31T00:00:00.000Z",
         "end_date": "2079-06-06T23:59:00.000Z",
         "enrolment_status": "Current (Single Registration)"
     },
     {
         "object": "student",
         "id": 3,
         "year_code": "8",
         "upn": "B825532109001",
         "former_upn": "V825500109002",
         "mis_id": "7545",
         "pan": "A4321",
         "first_name": "Harry",
         "legal_first_name": "Harold",
         "middle_name": "",
         "last_name": "Jones",
         "legal_last_name": "Jones",
         "former_last_name": "Smith",
         "dob": "1998-11-12",
         "start_date": "2010-09-01T00:00:00.000Z",
         "end_date": "2079-06-06T23:59:00.000Z",
         "enrolment_status": "Current (Single Registration)"
     }
   ]
}