Session metadata endpoint
Manage the metadata from existing sessions.
Endpoints:
Usage
The format of requests to the Data API uses the following syntax:
https://data.learnosity.com/{LTS_VERSION}/{endpoint}
For example, to use the v2025.2.LTS version and the /sessions/metadata endpoint, you would create a request like so:
https://data.learnosity.com/v2025.2.LTS/sessions/metadata
Important The 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 The 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 Session Metadata
Retrieves the metadata that was previously set from the specified sessions.
You would want to use this to process all session metadata for your application, for example.
The session metadata can be added and updated with the SET /jobs/sessions/metadata endpoint.
Note The dt_score_updated (date time of the latest score change) value returned with each response object shows the time of the most recent update to the response record, resulting from a save, submit, auto-scoring, or manual scoring operation. This attribute will be updated only if there is an actual change in score value.
| Endpoint | /{LTS_VERSION}/sessions/metadata |
|---|---|
| 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 -
limit integer
Restricts the number of records returned.
Default:
50Maximum:
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
Indicates the pagination token to be used for retrieving the next page of session data.
You would want to use this so that you can continue retrieving sessions or implement periodic polling to fetch new data over time.
The
nexttoken is included in responses from the sessions endpoint only when the current result set contains results, regardless of whether additional records exist beyond the current page. This enables you to implement long-polling strategies by reusing the last token in subsequent requests to detect newly created sessions.Note This behavior differs from other Data API endpoints such as those under the Item bank, where the
nexttoken is only returned if more results exist beyond the current page. -
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:
descPossible values
ascdesc
-
status array[string]
Retrieve only sessions that contain any of the specified statuses.
Possible values
IncompleteCompletedDiscardedPending Scoring
-
user_id array[string]
A list of user IDs to include.
Maximum length:
1000
Request body example
{
"session_id": [
"9ce7daeb-e117-4d14-9452-c94a0afe203b"
]
}
Responses
Response example
{
"meta": {
"status": true,
"timestamp": 1522209399,
"next": "1522209397.443887",
"records": 1
},
"data": [
{
"user_id": "422ecd28-870b-4037-a365-f45153851ce6",
"session_id": "9ce7daeb-e117-4d14-9452-c94a0afe203b",
"metadata": {
"session_tags": [
{
"type": "assignment_type",
"name": "homework"
}
]
}
}
]
}