Close

Search

How to Enroll Learner into a Course or Learning path using Adobe Learning Manager v2 API
June 9, 2024
0
0
Summary
This endpoint is used to enroll a learner/user of ALM in to a course or learning object instance. This API endpoint uses a user ID, learning object id and learning object instance id to successfully enroll the user.
-
-
POST /users/{id}/enrollments
Implementation Notes
Enroll to a learning object by specifying the user ID, learning object id and learning object instance id.
Response Class (Status 200)
Operation successful
- Example Value
{ "data": { "id": "string", "type": "string", "attributes": { "completionDeadline": "string", "dateCompleted": "string", "dateEnrolled": "string", "dateStarted": "string", "enrollmentSource": "string", "hasPassed": true, "lastAccessDate": "string", "progressPercent": 0, "purchasedPrice": 0, "rating": 0, "score": 0, "state": "string", "url": "string" }, "relationships": { "learner": { "data": { "type": "string", "id": "string" } }, "learnerBadge": { "data": { "type": "string", "id": "string" } }, "learningObject": { "data": { "type": "string", "id": "string" } }, "loInstance": { "data": { "type": "string", "id": "string" } }, "loResourceGrades": { "data": [ { "type": "string", "id": "string" } ] } } } }
application/vnd.api+json;charset=UTF-8Parameters
Parameter Value Description Parameter Type Data Type 20941371 Mention the id of the user for whose account, the data is being requested, which is subject to necessary permissions path string course:9756365 Mention the id of the learning object for which the data is being requested,which is subject to necessary permissions. query string course:9756365_10438978 Mention the id of the learning object instance for which the data is being requested. Instance Id can be found using GET /learningObjects/{id} call. query string true false (default) Mention if multi enrollment will be considered while enrollment. query boolean Response Messages
Curl
curl -X POST --header 'Content-Type: application/vnd.api+json;charset=UTF-8' --header 'Accept: application/vnd.api+json' --header 'Authorization: oauth eea25e6e1e03c379c46e5ccc29932899' 'https://learningmanager.adobe.com/primeapi/v2/users/20941371/enrollments?loId=course%3A9756365&loInstanceId=course%3A9756365_10438978&allowMultiEnrollment=false'
Request URL
https://learningmanager.adobe.com/primeapi/v2/users/20941371/enrollments?loId=course%3A9756365&loInstanceId=course%3A9756365_10438978&allowMultiEnrollment=false
Response Body
{ "data": { "id": "course:9756365_10438978_20941371", "type": "learningObjectInstanceEnrollment", "attributes": { "dateEnrolled": "2024-06-09T13:40:18.000Z", "hasPassed": false, "progressPercent": 0, "score": 0, "state": "ENROLLED" }, "relationships": { "learner": { "data": { "id": "20941371", "type": "user" } }, "learningObject": { "data": { "id": "course:9756365", "type": "learningObject" } }, "loInstance": { "data": { "id": "course:9756365_10438978", "type": "learningObjectInstance" } }, "loResourceGrades": { "data": [ { "id": "course:9756365_10438978_15250166_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:9756365_10438978_15250167_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:9756365_10438978_15251398_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:9756365_10438978_15251399_0_20941371", "type": "learningObjectResourceGrade" } ] } } } }
Response Code
200
Response Headers
{ "access-control-allow-credentials": "true", "access-control-allow-headers": "X-acap-all-roles, X-acap-account,X-acap-user,X-acap-caller-role,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, x-experience-api-version, Authorization, X-CSRF-TOKEN, X-HTTP-Method-Override, X-acap-ug-manager-scope, X-acap-extension-token", "access-control-allow-methods": "GET, POST, OPTIONS, PUT, HEAD, DELETE, PATCH", "access-control-allow-origin": "https://learningmanager.adobe.com", "access-control-expose-headers": "Requested-Accept-Language, x-rate-limit, x-burst, x-excess-requests-per-second, Retry-After", "content-length": "836", "content-type": "application/vnd.api+json;charset=UTF-8", "date": "Sun, 09 Jun 2024 13:40:19 GMT", "requested-accept-language": "en-US,en;q=0.9", "server": "openresty", "server-timing": "server_resp;dur=235", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", "x-frame-options": "SAMEORIGIN", "x-request-id": "csvbscitrace", "x-xss-protection": "1" }
-
-
-
POST /users/{id}/enrollments
Implementation Notes
Enroll to a learning object by specifying the user ID, learning object id and learning object instance id.
Response Class (Status 200)
Operation successful
- Example Value
{ "data": { "id": "string", "type": "string", "attributes": { "completionDeadline": "string", "dateCompleted": "string", "dateEnrolled": "string", "dateStarted": "string", "enrollmentSource": "string", "hasPassed": true, "lastAccessDate": "string", "progressPercent": 0, "purchasedPrice": 0, "rating": 0, "score": 0, "state": "string", "url": "string" }, "relationships": { "learner": { "data": { "type": "string", "id": "string" } }, "learnerBadge": { "data": { "type": "string", "id": "string" } }, "learningObject": { "data": { "type": "string", "id": "string" } }, "loInstance": { "data": { "type": "string", "id": "string" } }, "loResourceGrades": { "data": [ { "type": "string", "id": "string" } ] } } } }
application/vnd.api+json;charset=UTF-8Parameters
Parameter Value Description Parameter Type Data Type 20941371 Mention the id of the user for whose account, the data is being requested, which is subject to necessary permissions path string course:9756365 Mention the id of the learning object for which the data is being requested,which is subject to necessary permissions. query string course:9756365_10438978 Mention the id of the learning object instance for which the data is being requested. Instance Id can be found using GET /learningObjects/{id} call. query string true false (default) Mention if multi enrollment will be considered while enrollment. query boolean Response Messages
Curl
curl -X POST --header 'Content-Type: application/vnd.api+json;charset=UTF-8' --header 'Accept: application/vnd.api+json' --header 'Authorization: oauth eea25e6e1e03c379c46e5ccc29932899' 'https://learningmanager.adobe.com/primeapi/v2/users/20941371/enrollments?loId=course%3A9756365&loInstanceId=course%3A9756365_10438978&allowMultiEnrollment=false'
Request URL
https://learningmanager.adobe.com/primeapi/v2/users/20941371/enrollments?loId=course%3A9756365&loInstanceId=course%3A9756365_10438978&allowMultiEnrollment=false
Response Body
{ "data": { "id": "course:9756365_10438978_20941371", "type": "learningObjectInstanceEnrollment", "attributes": { "dateEnrolled": "2024-06-09T13:40:18.000Z", "hasPassed": false, "progressPercent": 0, "score": 0, "state": "ENROLLED" }, "relationships": { "learner": { "data": { "id": "20941371", "type": "user" } }, "learningObject": { "data": { "id": "course:9756365", "type": "learningObject" } }, "loInstance": { "data": { "id": "course:9756365_10438978", "type": "learningObjectInstance" } }, "loResourceGrades": { "data": [ { "id": "course:9756365_10438978_15250166_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:9756365_10438978_15250167_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:9756365_10438978_15251398_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:9756365_10438978_15251399_0_20941371", "type": "learningObjectResourceGrade" } ] } } } }
Response Code
200
Response Headers
{ "access-control-allow-credentials": "true", "access-control-allow-headers": "X-acap-all-roles, X-acap-account,X-acap-user,X-acap-caller-role,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, x-experience-api-version, Authorization, X-CSRF-TOKEN, X-HTTP-Method-Override, X-acap-ug-manager-scope, X-acap-extension-token", "access-control-allow-methods": "GET, POST, OPTIONS, PUT, HEAD, DELETE, PATCH", "access-control-allow-origin": "https://learningmanager.adobe.com", "access-control-expose-headers": "Requested-Accept-Language, x-rate-limit, x-burst, x-excess-requests-per-second, Retry-After", "content-length": "836", "content-type": "application/vnd.api+json;charset=UTF-8", "date": "Sun, 09 Jun 2024 13:40:19 GMT", "requested-accept-language": "en-US,en;q=0.9", "server": "openresty", "server-timing": "server_resp;dur=235", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", "x-frame-options": "SAMEORIGIN", "x-request-id": "csvbscitrace", "x-xss-protection": "1" }
-
You must be logged in to post a comment.
All Comments
Sort by:
Most Recent

- Most Recent
- Most Relevant
Enter a valid email address
Thank you for subscribing to our newsletter