List Completed Study Sessions

GET /sessions/completed

Provides a general purpose endpoint to search Completed Study Sessions

Returns a paginated list of completed study sessions

Query parameters

  • endDate object

    Filter the results by session end date

    Supports either a ISO 8601 formatted date or a Unix timestamp. For example endDate[gt]=1688200245 or endDate[lt]=2023-07-15T12:00:00.000Z

    The following operators cannot be used together

    • gt and gte
    • lt and lte
    Hide endDate attributes Show endDate attributes object
  • userId array[string(uuid)]

    Filter the results by user ID.

    Multiple identifiers can be specified by repeating the query parameter. e.g. userId=value1&userId=value2

    This parameter supports a maximum of 30 identifiers.

    At least 1 but not more than 30 elements.

  • externalId array[string]

    Filter the results by external ID.

    Multiple identifiers can be specified by repeating the query parameter. e.g. externalId=value1&externalId=value2

    This parameter supports a maximum of 30 identifiers.

    At least 1 but not more than 30 elements.

  • nuggetId array[string(uuid)]

    Filter the results by nugget ID.

    Multiple identifiers can be specified by repeating the query parameter. e.g. nuggetId=value1&nuggetId=value2

    This parameter supports a maximum of 30 identifiers.

    At least 1 but not more than 30 elements.

  • classId string(uuid)

    Filter the results by class ID.

  • courseId string(uuid)

    Filter the results by course ID.

  • assignmentId string(uuid)

    Filter the results by assignment ID.

  • sort object

    Specify the sort order of the results.

    The default sort order is sort[field]=endDate&sort[direction]=asc

    Hide sort attributes Show sort attributes object
    • field string

      The available sort fields.

      Value is endDate. Default value is endDate.

    • The sort direction used for ordering the results. Can be "asc" (ascending) or "desc" (descending).

      Values are asc or desc.

  • limit integer(int32)

    The maximum number of results to return per page.

    Minimum value is 1, maximum value is 100. Default value is 100.

  • offset integer(int32)

    Indicates the starting position or index (offset)

    Default value is 0.

  • cursor string(byte) | null

    The cursor for pagination. Encoded byte string used to navigate between pages.

Responses

  • 200 application/json

    List of Study Sessions

    Hide response attributes Show response attributes object
    • data array[object] Required
      One of:
    • pagination object Required

      Metadata for the current pagination position

      Hide pagination attributes Show pagination attributes object
      • total integer(int32) Required

        The total number of items available.

      • limit integer(int32) Required

        The maximum number of results to return per page.

        Minimum value is 1, maximum value is 100. Default value is 100.

      • offset integer(int32) Required

        Indicates the starting position or index (offset)

        Default value is 0.

      • previousCursor string(byte) | null Required

        The cursor for pagination. Encoded byte string used to navigate between pages.

      • nextCursor string(byte) | null Required

        The cursor for pagination. Encoded byte string used to navigate between pages.

  • Invalid request.

  • Invalid authentication credentials

  • Not authorised to access this resource

GET /sessions/completed
curl \
 --request GET 'https://connect.century.tech/api/v1/sessions/completed' \
 --header "x-api-key: $API_KEY"
Response examples (200)
{
  "kind": "GRADED",
  "user": {
    "upn": "Y89421121401A",
    "emails": [
      "john.doe@email.com"
    ],
    "gender": "male",
    "userId": "68f06c66-702a-4c26-b8c5-b6dc4f81f25d",
    "fullName": "John Doe",
    "lastName": "Doe",
    "username": "john_doe",
    "firstName": "John",
    "externalId": "External_ID_123",
    "dateOfBirth": "2010-07-01"
  },
  "nugget": {
    "name": "Addition [MF1.01]",
    "nuggetId": "bc5f8904-c844-4c8a-8231-872e5c84dc8b",
    "diagnostic": false
  },
  "endDate": "2024-23-06T12:08:48.578Z",
  "metrics": {
    "score": 54.16666667,
    "duration": "PT3M25S",
    "completion": 90,
    "correctAnswers": 13,
    "pointsAchieved": 13,
    "pointsPossible": 24,
    "questionsAnswered": 24
  },
  "startDate": "2024-23-06T12:05:23.456Z",
  "studySessionId": "67bf476e17ed9cccd58c1fb4"
}
{
  "kind": "NON_GRADED",
  "user": {
    "upn": "Y89421121401A",
    "emails": [
      "john.doe@email.com"
    ],
    "gender": "male",
    "userId": "68f06c66-702a-4c26-b8c5-b6dc4f81f25d",
    "fullName": "John Doe",
    "lastName": "Doe",
    "username": "john_doe",
    "firstName": "John",
    "externalId": "External_ID_123",
    "dateOfBirth": "2010-07-01"
  },
  "nugget": {
    "name": "Addition [MF1.01]",
    "nuggetId": "bc5f8904-c844-4c8a-8231-872e5c84dc8b",
    "diagnostic": false
  },
  "endDate": "2024-23-06T12:08:48.578Z",
  "metrics": {
    "duration": "PT3M25S",
    "completion": 90.456
  },
  "startDate": "2024-23-06T12:05:23.456Z",
  "studySessionId": "67bf476e17ed9cccd58c1fb4"
}