AVAILABLE WITH BUSINESS SUBSCRIPTION

Request: POST /statistics/course

Permissions to Run the Request

Account OwnerAccount AdministratorsDepartment Administrators, or custom roles

Department Administrators and users with a custom role can edit the statuses of the courses 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
courseId (required)The ID of the course whose status you would like to edit.
enrollmentIds (required)The IDs of one or more enrollments whose progress you would like to reset.

date (required if the course status is being changed to Completed)

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

The status you would like to assign to the course. 

Possible values:

  • complete — the status will be changed to Completed.
  • automatic — the status will be recalculated automatically based on the number of modules that were passed.

Response Parameters

ParameterDescription
taskId

The ID of the request sent to edit a course's status.

Possible Response Codes

CodeTextDescription
200OKThe course's 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 permissions).

Sample Request

POST /statistics/course?courseId=14b847e8-c10f-11ea-b4e1-ae33e75597e9&enrollmentIds[]=e1f2c50e-c1ae-11ea-8592-a6eabe1809b2&reason=Completed offline&status=automatic
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
Content-Type:application/xml
XML

Sample Response

https/1.1 200 OK

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