Coronavirus (Covid-19): Latest updates and information
Skip to main content Skip to navigation

Retrieve attendance for group

Retrieve attendance for all small group events belonging to a particular small group. This API endpoint retrieves the same information as the attendance page for small group events.

Permission requirements

The user must have the SmallGroupEvents.ViewRegister ("View attendance at small groups") permission.

Information about API permissions

Definition

GET https://tabula.warwick.ac.uk/api/v1/groups/:smallGroupId/attendance

URL substitution variables

:smallGroupId The unique identifier for the small group.

Example request

$ curl -XGET https://tabula.warwick.ac.uk/api/v1/groups/7053bff4-6925-455f-9f7a-887f1a9bfb56/attendance

Response parameters

An unsuccessful response will be returned in the standard format. A successful response will return the HTTP code 200 OK.

Example response

{
    "success": true,
    "status": "ok",
    "attendance": {
        "events": {
            "86d7b5a4-d5b9-44e8-b61c-86d1f1952517": {
                "weeks": [
                    {
                        "minWeek": 1,
                        "maxWeek": 10
                    }
                ],
                "endTime": "14:00",
                "id": "86d7b5a4-d5b9-44e8-b61c-86d1f1952517",
                "title": "Lab",
                "startTime": "13:00",
                "location": {
                    "name": "CS0.01",
                    "locationId": "26811",
                    "syllabusPlusName": ""
                },
                "tutors": [
                    {
                        "userId": "u9999999",
                        "universityId": "9999999"
                    }
                ],
                "day": "Monday"
            }
        },
        "instances": {
            "86d7b5a4-d5b9-44e8-b61c-86d1f1952517": 
               [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
        },
        "attendance": [
            {
                "student": "1111111",
                "events": [
                    {
			"event": {
                            "week": 1,
                            "event": "86d7b5a4-d5b9-44e8-b61c-86d1f1952517"
                        },
                        "state": "Late",
                        "details": null,
                        "note": null
                    },
                    {
                        "event": {
                            "week": 2,
                            "event": "86d7b5a4-d5b9-44e8-b61c-86d1f1952517"
                        },
                        "state": "MissedAuthorised",
                        "details": {
                            "replacedBy": [],
                            "replacesAttendance": null,
                            "joinedOn": null,
                            "addedManually": false,
                            "expectedToAttend": true,
                            "updatedBy": "u9999999",
                            "updatedDate": "2020-02-18"
                        },
                        "note": {
                            "absenceType": "cosl",
                            "absenceTypeDescription": "Change of study location",
                            "contents": "Now studying on Kenilworth Campus",
                            "attachment": null,
                            "updatedBy": "u9999999",
                            "updatedDate": "2020-02-18"
                        }
                    },
                    // a lot more events
                ]
            }
        ]
    }
}

Tabula API Methods