AVAILABLE WITH BUSINESS SUBSCRIPTION
Request: POST /statistics/course
Permissions to Run the Request
Account Owner, Account Administrators, Department 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
Header | Description |
---|
Authorization (required) | Access token. You can obtain a token by making a request.
|
Parameter | Description |
---|
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
Parameter | Description |
---|
taskId | The ID of the request sent to edit a course's status. |
Possible Response Codes
Code | Text | Description |
---|
200 | OK | The course's status has been successfully updated. |
400 | Bad Request | A request error. |
401 | Unauthorized | An authorization error. |
403 | Permission Denied | The 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