AVAILABLE WITH BUSINESS SUBSCRIPTION

Request: POST /statistics/module

Note:

  • With this method, you can edit the status only of a material that is included in a course. You won't be able to edit the status of a training included in a course using this method.

Permissions to Run the Request

The Account OwnerAccount AdministratorsDepartment Administrators, or custom roles

Department Administrators and users with a custom role can edit the statuses of the modules assigned to the users belonging to the departments they manage and their sub-departments.

Request Headers and Parameters

HeaderDescription
Authorization (required)Access token. You can obtain a token by making a request.
ParameterDescription
enrollmentIds (required)The IDs of one or more enrollments whose statuses you would like to update.
courseId (required)The ID of the course to which one or more modules whose statuses you would like to update belong.
moduleStatuses (required)

An array with the data regarding the module's status. 

contentItemId (required)The ID of the module whose status you would like to update.

date (required)

The module completion date.
reason (optional)The reason why you want to change the module's status.
status (required)

The status you would like to assign to the module. 
Possible values:

  • completed
  • incomplete
  • passed
  • failed
  • accepted
  • declined
awardedScore (required)The number of scores earned for the module completion.

Response Parameters

ParameterDescription
taskId

The ID of the request sent to update the module status.

Possible Response Codes

CodeTextDescription
200Successful operationThe module status has been successfully updated.
400Bad RequestA request error.
401UnauthorizedAn authorization error.
403Permission DeniedThe user is not allowed to handle the requested action (not enough permission).

Sample Request

POST /statistics/module
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
Content-Type:application/json
{
  "enrollmentIds": [
    "e1f2c50e-c1ae-11ea-8592-a6eabe1809b2"
  ],
  "courseId": "8e74ef32-09f4-11ea-8d15-ba7e6fa4e089",
  "moduleStatuses": [
    {
      "contentItemId": "b38a8cf6-218b-11ea-9b28-4274327ed6b8",
      "date": "2020-03-12",
      "reason": "",
      "status": "completed",
      "awardedScore": 100
    }
  ]
}
XML

Sample Response

https/1.1 200 Successful operation

<?xml version="1.0" encoding="UTF-8"?>
<taskId>99949</taskId>
XML