Scores - Endpoints - Data API

Scores endpoint

Retrieves the learner scores per session.

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:

Get Scores

Retrieves the learner scores per session. The learner's response content is not returned in the results.

Endpoint /{LTS_VERSION}/sessions/scores
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_response_scores boolean

    Controls whether to include the response object and scores per response.

    Default: false

  • 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 in meta.next. Pass the token provided by meta.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

{
    "user_id": [
        "17c456c0-89ad-4f72-8010-2f7d991f54bd",
        "ba281305-8afb-40de-8378-10a2bffb8024"
    ]
}

Responses

Response example

{
    "meta": {
        "status": true,
        "timestamp": 1389202121,
        "next": "1387312240.1410"
    },
    "data": [
        {
            "user_id": "17c456c0-89ad-4f72-8010-2f7d991f54bd",
            "activity_id": "chemistry_classtest1",
            "session_id": "4d3115f0-1235-4613-5be6fc6e6b2e",
            "score": 39,
            "max_score": 40,
            "subscores": [
                {
                    "id": "subscore-1",
                    "title": "biochem",
                    "num_questions": 20,
                    "num_attempted": 20,
                    "score": 19,
                    "max_score": 20,
                    "attempted_max_score": 20,
                    "items": [
                        "293486384",
                        "293481468",
                        "293475858",
                        "293475234",
                        "292922805"
                    ]
                },
                {
                    "id": "subscore-2",
                    "title": "inorganics",
                    "num_questions": 20,
                    "num_attempted": 20,
                    "score": 20,
                    "max_score": 20,
                    "attempted_max_score": 20,
                    "items": [
                        "293486384",
                        "293481468",
                        "293475858",
                        "293475234",
                        "292922805"
                    ]
                }
            ],
            "status": "Completed"
        },
        {
            "user_id": "ba281305-8afb-40de-8378-10a2bffb8024",
            "activity_id": "economics_classtest1",
            "session_id": "60c527f3-f426-4f22-f1808cbee8f8",
            "score": 2,
            "max_score": 40,
            "subscores": [
                {
                    "id": "subscore-1",
                    "title": "micro",
                    "num_questions": 20,
                    "num_attempted": 6,
                    "score": 1,
                    "max_score": 20,
                    "attempted_max_score": 6,
                    "items": [
                        "293477143",
                        "293477147",
                        "293477148",
                        "293477158",
                        "293477161"
                    ]
                },
                {
                    "id": "subscore-2",
                    "title": "macro",
                    "num_questions": 20,
                    "num_attempted": 3,
                    "score": 1,
                    "max_score": 20,
                    "attempted_max_score": 3,
                    "items": [
                        "293728912",
                        "293728916",
                        "293728917",
                        "293728922",
                        "293728931"
                    ]
                }
            ],
            "status": "Completed"
        }
    ]
}
Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.