Update-and-re-score-Item - Endpoints - Data API

Update and re-score Item endpoint

Update sessions containing the specified Items to use the latest Question validation rules from the Item bank, and rescores the Item in the existing sessions using the newly updated content.

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:

Update and re-score Item

For a specified target Item in one or more saved sessions, this endpoint updates those session(s) to use the latest Question validation rules from the Item bank, and rescores that Item in the existing sessions using the newly updated content.

The target_item specifies which Item in the provided session_ids should be updated.

The copy_item value can point to an alternative version of the Item that has been updated with the intended scoring rules. If provided, the Question definitions of copy_item will be copied over to the session and used for scoring purposes. This does not rewrite the original Item references in the session, therefore:

  • The session's updated scores will continue to be reported against target_item.
  • The session's Item source metadata accessible via Data API will still refer to target_item.

If copy_item is omitted, it defaults to the current definition of target_item in the Item bank.

The endpoint validates that the provided Item(s) and session(s) are compatible for rescoring. Specifically:

  • the target_item and copy_item must contain the same number of Questions.
  • the target_item and copy_item must contain identical Question types, in the same order.
  • Each provided session_id must be in Completed status.

Note If any of the given session_ids do not contain the target_item, they will be ignored during job processing.

If any validation errors occur at this stage, the endpoint will return a descriptive message and the sessions will not be modified.

If the validation is successful, the endpoint returns a job_reference. The status of the rescoring job can be retrieved by passing that job_reference to Data API's GET /jobs.

  • The job may take up to 60 minutes to complete, depending on other load on Learnosity systems.
  • Reviewing any of the given sessions while the rescoring job is in progress may cause inconsistent data to be displayed in the reviewed session.
  • Resuming any of the given sessions while the rescoring job is in progress is not a supported use case and may cause errors in the session and/or the job.

Important This endpoint has a rate limit of 1 request per 5 second window, per API consumer key.

For more details about this endpoint and the job resulting payload, see Rescoring: change or fix the autoscoring rules for an assessment.

Endpoint /{LTS_VERSION}/sessions/item
HTTP method POST
Action type "update"

Request body parameters

Body content type: application/json

  • session_ids array[string]

    A list of session IDs.

    Maximum entries: 100

  • target_item object

    An Item reference object describing the selected Item to be updated in the sessions.

    • reference string

      The reference of the "target" Item.

    • organisation_id integer

      (Optional) The ID of the Item bank from which to retrieve the "target" Item. Defaults to the primary Item bank of the API consumer if unspecified.

    • item_pool_id string

      (Optional) The Item pool from which to retrieve the "target" Item. Uses the Item bank (organisation_id) if unspecified.

  • copy_item object

    (Optional) An Item reference object describing a specific Item to use as the source of updated Question validation rules.

    If a "copy" Item is not specified, then the "target" Item is used as the source.

    • reference string

      The reference of the "copy" Item.

    • organisation_id integer

      (Optional) The ID of the Item bank from which to retrieve the "copy" Item. Defaults to the primary Item bank of the API consumer if unspecified.

    • item_pool_id string

      (Optional) The Item pool from which to retrieve the "copy" Item. Uses the Item bank if unspecified.

Request body example

{
    "session_ids": [
        "f91a7773-c5b0-440a-86a4-b8f82c8a8119",
        "2761f570-c4ec-413d-ac9d-26e429e7f8df"
    ],
    "target_item": {
        "reference": "LRN-000045",
        "organisation_id": 32,
        "item_pool_id": "ipv1"
    },
    "copy_item": {
        "reference": "LRN-000046",
        "organisation_id": 32,
        "item_pool_id": "ipv2"
    }
}

Responses

Response example

{
    "meta": {
        "status":true
    },
    "data": {
        "job_reference": "9fd443d0-2b4f-4315-aec6-708da3d30d49"
    }
}
Was this article helpful?

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