Search Smart IA Sessions

POST /smart-ia/sessions/search

Returns a paginated list of completed and in progress sessions

This endpoint should be used if there are more than 30 values for any given filter.

application/json

Body Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data array[object] Required
      One of:
    • pagination object Required
      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 authentication credentials

  • Not authorised to access this resource

POST /smart-ia/sessions/search
curl \
 -X POST https://connect.century.tech/api/v1/smart-ia/sessions/search \
 -H "Content-Type: application/json" \
 -d '{"sort":{"field":"endDate","direction":"desc"},"search":{"status":"COMPLETED","endDate":{"gt":"2023-01-01T12:00:00.000Z","lt":"2023-06-01T12:00:00.000Z"}}}'
{
  "sort": {
    "field": "endDate",
    "direction": "desc"
  },
  "search": {
    "status": "COMPLETED",
    "endDate": {
      "gt": "2023-01-01T12:00:00.000Z",
      "lt": "2023-06-01T12:00:00.000Z"
    }
  }
}
{
  "sort": {
    "field": "endDate",
    "direction": "desc"
  },
  "search": {
    "status": "COMPLETED",
    "endDate": {
      "gt": "2023-01-01T12:00:00.000Z"
    }
  }
}
{
  "sort": {
    "field": "endDate",
    "direction": "desc"
  },
  "search": {
    "status": "COMPLETED",
    "testIds": [
      "c5a77fda-7174-446f-a4f5-0f47ccbf15ce"
    ]
  }
}
{
  "sort": {
    "field": "startDate",
    "direction": "desc"
  },
  "search": {
    "userIds": [
      "2716be03-cec0-4027-a373-46b53fb6a08d"
    ]
  }
}
Response examples (200)
{
  "data": [
    {
      "test": {
        "name": "English Smart Initial Assessment",
        "testId": "c5a77fda-7174-446f-a4f5-0f47ccbf15ce",
        "subject": "English",
        "testVersionId": "33ea5957-9320-4300-998d-c8fba3646aaa"
      },
      "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": "33ea5957-9320-4300-998d-c8fba3646aaa"
      },
      "user": {
        "gender": "female",
        "userId": "2716be03-cec0-4027-a373-46b53fb6a08d",
        "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": 20,
    "total": 100,
    "offset": 0,
    "nextCursor": "eyJsaW1pdCI6MiwibGVmdDpbWyJlbmREYXRlIiwiZGVzYyJdXX0=",
    "previousCursor": null
  }
}