Page tree
Skip to end of metadata
Go to start of metadata

To enroll users into courses, send the GET request to the following URL: /enrollment.

Permissions to run the request: Account Owner, Account AdministratorsDepartment Administrators, Publishers, or users with a role with custom settings allowing to create enrollments.

Request Headers

X-Auth-Account-Url (required)The base URL of the account, e.g. http://myaccount.ispringlearn.com
X-Auth-Email (required)The login of Account OwnerAdministratorDepartment Administrator, Publisher or a user with a role with custom settings allowing to create enrollments. 
X-Auth-Password (required)The password of Account OwnerAdministratorDepartment Administrator, Publisher or a user with a role with custom settings allowing to create enrollments. 
courseIds (required)

The IDs of the courses you want to assign.

learnerIds (required)

The IDs of the learners you want to enroll in the courses.

accessDate (optional)

The date and time when learners are supposed to start studying the course. If the start date and time aren't indicated, the current date and time will be auto-populated.

dueDateType (required)

This parameter indicates whether the course has a due date or it isn't time-limited. Possible values of the parameter are unlimited, default, due_date, due_period.

dueDate (required)

This parameter is required if dueDateType = due_date. 

duePeriod (required)

This parameter is required if dueDateType = due_period. It is measured in hours.

Header

Description

After the request has been completed, the system returns the response with the 201 code. The response code contains the ID of the created enrollment.

Response Codes

201Successful operationNew enrollments have been created.
400Bad RequestA request error.
401UnauthorizedAn authorization error.
403Permission DeniedThe user doesn't have enough permissions to create enrollments.

Code

Text

Description

Sample Request

POST /enrollment HTTP/1.1
Host: api-learn.ispringlearn.com
X-Auth-Account-Url: http://myaccount.ispringlearn.com
X-Auth-Email: email@email.com
X-Auth-Password: 12345Q
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8"?>
<request>
	<courseIds>
		<id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
	</courseIds>
	<learnerIds>
		<id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
	</learnerIds>
	<accessDate>2019-09-26 10:30:00</accessDate>
	<dueDateType>unlimited</dueDateType>
	<dueDate>2019-09-26</dueDate>
	<duePeriod>0</duePeriod>
</request>

Sample Response

HTTP/1.1 201 Successful operation
Connection: close
  • No labels