You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Request: GET /enrollment/{enrollment_id}

Permissions to Run the Request

 Account Owner, Account Administrators, Department Administrators, or custom roles

Department Administrators and users with a custom role can get information about enrollments assigned to learners from the departments they manage or their sub-departments.

Request Headers

Header

Description

Authorization (required)Access token. You can obtain a token by making a request
ParameterDescription

enrollmentIds (optional)

The ID of an enrollment you want to get information on

Response Parameters

ParameterDescription

response

An array with enrollment data
enrollmentIdThe ID of the enrollment
courseIdThe ID of the course
learnerIdThe ID of the user enrolled to the course
accessDateThe date when the learner is supposed to start studying the course
dueDate (optional)

Course completion date. The parameter appears in the response if a due date is specified

expirationDate (optional)

Course completion date. The parameter appears in the response if a due date is specified and shouldLockAfterDueDate is equal to 1

shouldLockAfterDueDate

Possible values:

0 means that access is granted

1 means that access is denied

enrollmentTypeGroup

Possible values:

0 — assigned by an administrator

1 — added from the catalog

с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

Response Codes

Code

Text

Description

200OKThe request has been successfully processed. The response body will contain XML data with the information on the enrollment
400Bad RequestA request error
401UnauthorizedAn authorization error
403Permission DeniedThe user doesn't have enough permissions to get information on an enrollment

Sample Request

GET /enrollment/3fa85f64-5717-4562-b3fc-2c963f66afa6 https/1.1
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <enrollment>
        <enrollmentId>1de7698c-df6c-11ee-b83c-0242ac160070</enrollmentId>
        <courseId>1a4799aa-df6c-11ee-b4d3-0242ac160070</courseId>
        <learnerId>0dcb28fe-df6c-11ee-a2ed-0242ac160070</learnerId>
        <accessDate>2024-03-11</accessDate>
        <enrollmentTypeGroup>0</enrollmentTypeGroup>
        <shouldLockAfterDueDate>0</shouldLockAfterDueDate>
    </enrollment>
    <enrollment>
        <enrollmentId>b7ec648e-e5e2-11ee-83ef-0242ac140071</enrollmentId>
        <courseId>a9d460cc-e5e2-11ee-9e4e-0242ac140071</courseId>
        <learnerId>5aaf4a2e-e075-11ee-ae20-0242c0a82070</learnerId>
        <accessDate>2024-03-19</accessDate>
        <enrollmentTypeGroup>0</enrollmentTypeGroup>
        <shouldLockAfterDueDate>0</shouldLockAfterDueDate>
    </enrollment>
    <enrollment>
        <enrollmentId>6e051388-e76e-11ee-9af6-0242ac140070</enrollmentId>
        <courseId>4d67b6bc-e76e-11ee-9e86-0242ac140070</courseId>
        <learnerId>50daac78-e5e3-11ee-a5d5-0242ac140071</learnerId>
        <accessDate>2024-03-21</accessDate>
        <enrollmentTypeGroup>0</enrollmentTypeGroup>
        <shouldLockAfterDueDate>0</shouldLockAfterDueDate>
        <certificate> 
            <issuedCertificateId>b2d2a8d0-7be6-11ed-a572-b61c518344d9</issuedCertificateId>
            <issueDate>2022-12-15T00:00:00+00:00</issueDate>
            <expiryDate>2023-12-15T00:00:00+00:00</expiryDate>
        </certificate>     
    </enrollment>
</response>
  • No labels