You can get all the account enrollments, enrollments related to certain learners or to certain courses, or both. |
Account Owner, Account Administrators, Department Administrators, or a custom role.
Department Administrators and users with a custom role can get a list of enrollments assigned to learners belonging to the departments they manage and their sub-departments.
Header | Description |
|---|---|
| Authorization (required) | Access token. You can obtain a token by making a request |
| Parameter | Description |
| learnerIds (optional) | The IDs of the users whose enrollments you want to retrieve |
| courseIds (optional) | The IDs of the courses whose enrollments you want to retrieve |
| pageSize (optional) | The number of entries per page. If not indicated, equal to 1000 |
| pageToken (optional) | The token to continue to the next page |
Response Parameters
| Parameter | Description |
|---|---|
response | An array with enrollment data |
| enrollmentId | The ID of the enrollment |
| courseId | The ID of the course |
| learnerId | The ID of the user enrolled in the course |
| accessDate | The date the learner is supposed to start studying the course |
| dueDate (optional) | Course completion date. This parameter appears in the response if a due date is specified |
| expirationDate (optional) | Course completion date. This parameter appears in the response if a due date is specified and shouldLockAfterDueDate is equal to 1 |
| shouldLockAfterDueDate | Possible values: 0 — access is granted. 1 — access is denied. |
| сertificate | Certificate info |
| issuedCertificateId | The certificate ID (token) from the list of enrollments |
| issueDate | The date the certificate was issued |
| expiryDate | The certificate’s expiration date |
| enrollmentTypeGroup | Possible values: 0 — assigned by an administrator 1 — added from the catalog |
The date of issue and expiration of the certificate can only be received for active enrollments. When using this method, you cannot get the data for archived or deleted enrollments. |
Response Codes
Code | Text | Description |
|---|---|---|
| 200 | OK | The request has been successfully processed. The response body contains the XML data regarding enrollments |
| 400 | Bad Request | A request error |
| 401 | Unauthorized | An authorization error |
| 403 | Permission Denied | The user doesn't have enough permissions to retrieve a list of enrollments |
GET/enrollments?courseIds[]=c74b4059-f593-11e9-a66a-0a580af40186&learnerIds[]=e9e1b906-0614-11ea-9f83-0a580af40788&pageSize=1000&pageToken=YzljNmM1MTEtZjU5My0xMWU5LWE2NmEtMGE1ODBhZjQwMddddTg28 https/1.1 Host: api-learn.ispringlearn.com Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE Content-Type:application/xml |
https/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<response>
<enrollments>
<enrollment>
<enrollmentId>c9c6bc26-f593-11e9-a66a-0a580af40186</enrollmentId>
<courseId>c74a4369-f593-11e9-a66a-0a580af40186</courseId>
<learnerId>b698163c-f593-11e9-a66a-0a580af40186</learnerId>
<accessDate>2018-03-07</accessDate>
<shouldLockAfterDueDate>0</shouldLockAfterDueDate>
<certificate>
<issuedCertificateId>66b4ed00-040e-11ed-a8a2-b6f58d6fa7b5</issuedCertificateId>
<issueDate>2022-07-15T07:19:00+00:00</issueDate>
<expiryDate>2022-07-15T07:21:00+00:00</expiryDate>
</certificate>
</enrollment>
<enrollment>
...
</enrollment>
</enrollments>
<nextPageToken>string</nextPageToken>
</response> |