List Smart IA Sessions

GET /smart-ia/sessions

Provides a general purpose endpoint to search both "In Progress" and "Completed" Smart IA Sessions

A POST version of this endpoint is provided if a large number of filters are required.

Returns a paginated list of completed and in progress sessions

Query parameters

  • startDate object

    Filter the results by session start date

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

    The following operators cannot be used together

    • gt and gte
    • lt and lte
    Hide startDate attributes Show startDate attributes object
  • 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.

  • testId array[string(uuid)]

    Filter the results by test ID.

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

    This parameter supports a maximum of 30 identifiers.

    At least 1 but not more than 30 elements.

  • subject array[string]

    Filter the results by test subject.

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

    This parameter supports a maximum of 30 identifiers.

    At least 1 but not more than 30 elements.

  • limit integer(int32)

    Specify the pagination limit, defaults to 100

  • offset integer(int32)

    Specify the pagination offset, defaults to 0.

    Cannot be used with cursor

  • cursor string(byte) | null

    Provide the next or previous page cursor

  • status string

    Filter sessions by status

    Values are IN_PROGRESS or COMPLETED.

  • sort object

    Specify the sort order of the results.

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

    Hide sort attributes Show sort attributes object
    • field string

      The available sort fields.

      Values are startDate or endDate.

    • direction string

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

      Values are asc or desc.

Responses

  • 200 application/json
    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.

  • 401

    Invalid authentication credentials

  • 403

    Not authorised to access this resource

GET /smart-ia/sessions
curl \
 --request GET 'https://connect.century.tech/api/v1/smart-ia/sessions' \
 --header "x-api-key: $API_KEY"
Response examples (200)
{
  "data": [
    [
      {
        "test": {
          "name": "English Smart Initial Assessment",
          "testId": "c5a77fda-7174-446f-a4f5-0f47ccbf15ce",
          "subject": "English",
          "testVersionId": "38444333-7450-49d5-922d-eb16a8f30589"
        },
        "user": {
          "emails": [
            "john.doe@email.com"
          ],
          "gender": "male",
          "userId": "2716be03-cec0-4027-a373-46b53fb6a08d",
          "fullName": "John Doe",
          "lastName": "Doe",
          "username": "john_doe",
          "firstName": "John",
          "externalId": "External_ID_123"
        },
        "result": {
          "level": "L1 - Lower",
          "duration": "PT1H30M",
          "createdDate": "2023-07-10T15:30:00.000Z"
        },
        "status": "COMPLETED",
        "endDate": "2023-07-10T15:30:00.000Z",
        "sessionId": "d93ba3c3-2482-4b0d-8b99-42a20e68e11e",
        "startDate": "2023-07-10T14:00:00.000Z"
      },
      {
        "test": {
          "name": "English Smart Initial Assessment",
          "testId": "c5a77fda-7174-446f-a4f5-0f47ccbf15ce",
          "subject": "English",
          "testVersionId": "38444333-7450-49d5-922d-eb16a8f30589"
        },
        "user": {
          "gender": "female",
          "userId": "b4334e39-0fa9-4278-8b61-c7aa7e6c8d5e",
          "fullName": "Jane Doe",
          "lastName": "Doe",
          "username": "jane_doe",
          "firstName": "Jane"
        },
        "status": "IN_PROGRESS",
        "sessionId": "9f8a38c6-9194-480e-bb5f-9155b7636580",
        "startDate": "2023-07-10T14:00:00.000Z"
      }
    ]
  ],
  "pagination": {
    "limit": 30,
    "total": 300,
    "offset": 100,
    "nextCursor": "eyJsaW1pdCI6MSxiZWZvcmU6IiIsc29ydDpbWyJlbmREYXRlIiwiZGVzYyJdXX0=",
    "previousCursor": "eyJsaW1pdCI6MSxiZWZvcmU6IiIsc29ydDpbWyJlbmREYXRlIiwiZGVzYyJdXX0="
  }
}