Statuses endpoint
Retrieve data for managing session statuses.
Endpoints:
Usage
The format of requests to the Data API use the following syntax:
https://data.learnosity.com/{LTS_VERSION}/{endpoint}
For example, to use the v2025.1.LTS
version and the itembank/items
endpoint, you would create a request like so:
https://data.learnosity.com/v2025.1.LTS/itembank/items
Important Data API is not a REST API. All requests must use the POST method with the action
request body parameter specifying the operation to use. The Learnosity SDK must be used to make requests to Data API.
Note Data API usage is subject to rate limits.
Related articles:
- Getting Started with the Data API
- See Release Cadence and Version Lifecycle for more information on available LTS versions.
Get Statuses
Retrieve information about a session, such as, when it was started, has it been completed, how many Questions were attempted, and so on.
Note Session statuses can be updated with the UPDATE /jobs/sessions/statuses endpoint.
Endpoint | /{LTS_VERSION}/sessions/statuses |
---|---|
HTTP method | POST |
Action type | "get" |
Request body parameters
Body content type: application/json
-
activity_id array[string]
A list of Activity IDs.
Maximum entries:
1000
-
include object
Additional keys to include in the response.
-
sessions.session_metadata array[string]
Specifies which attributes of previously stored session metadata should be included in the response. Only existing attributes are returned.
{ "include": { "sessions.session_metadata": ["my_existing_field"] } }
-
-
limit integer
Restricts the number of records returned.
Default:
50
Maximum:
50
-
maxtime integer string
A timestamp filter based on the session's updated time. The latest UTC Unix timestamp or datetime string (ISO 8601 format) to get results from.
-
maxtime_started integer string
A timestamp filter based on the session's start time. The latest UTC Unix timestamp or datetime string (ISO 8601 format) to get results from.
Version added: v2023.3.LTS
-
maxtime_completed integer string
A timestamp filter based on the session's submission time. The latest UTC Unix timestamp or datetime string (ISO 8601) to get results from.
Version added: v2023.3.LTS
-
mintime integer string
A timestamp filter based on the session's updated time. The earliest UTC Unix timestamp or datetime string (ISO 8601 format) to filter results to.
-
mintime_started integer string
A timestamp filter based on the session's start time. The earliest UTC Unix timestamp or datetime string (ISO 8601 format) to filter results to.
Version added: v2023.3.LTS
-
mintime_completed integer string
A timestamp filter based on the session's submission time. The earliest UTC Unix timestamp or datetime string (ISO 8601 format) to filter results to.
Version added: v2023.3.LTS
-
next string
A token used to request the next page of results.
After making an initial request, if it would produce a result set larger than the specified
limit
, the return packet will include a token inmeta.next
. Pass the token provided bymeta.next
along with the original request parameters to retrieve the next page of results. -
session_id array[string]
A list of session IDs to retrieve.
Maximum length:
1000
-
sort string
Determines the response sorting by ascending or descending order.
Default:
desc
Possible values
asc
desc
-
status array[string]
Retrieve only sessions that contain any of the specified statuses.
Possible values
Incomplete
Completed
Discarded
Pending Scoring
-
user_id array[string]
A list of user IDs to include.
Maximum length:
1000
Request body example
{ "session_id": [ "0a643076-1161-4aef-bf59-a5126a72a403", "15658ed8-c334-4697-a860-6f1997ac19f8", "c67687d8-cd2a-41e1-a3a3-769f334833b1" ], "include": { "sessions": [ "activity_template_id" ] } }
Responses
Response example
{ "meta": { "status": true, "timestamp": 1469590890, "next": "1469536296.323078", "records": 3 }, "data": [ { "user_id": "d7dd0d99-a2da-48f6-8e51-f938cf65204e", "activity_id": "templated_assessment", "num_attempted": 10, "num_questions": 10, "session_id": "0a643076-1161-4aef-bf59-a5126a72a403", "session_duration": 7, "status": "Completed", "dt_started": "2016-07-26T23:31:02Z", "dt_completed": "2016-07-26T23:38:06Z", "activity_template_id": "demo_assessment_template" }, { "user_id": "ca5ca132-ef22-4e31-9c74-f5ae9ace2004", "activity_id": "demo_assessment", "num_attempted": 9, "num_questions": 10, "session_id": "15658ed8-c334-4697-a860-6f1997ac19f8", "session_duration": 8, "status": "Discarded", "dt_started": "2016-07-26T23:25:30Z", "dt_completed": "2016-07-26T23:33:50Z" }, { "user_id": "9a582c41-100c-40a2-be95-48fa5446bb7e", "activity_id": "demo_assessment", "num_attempted": 0, "num_questions": 10, "session_id": "c67687d8-cd2a-41e1-a3a3-769f334833b1", "session_duration": , "status": "Incomplete", "dt_started": "2016-07-27T00:31:45Z", "dt_completed": null } ] }