This endpoint can be used to extract or retrieve the enrollments of a specific user of ALM. The result will provide the enrolled courses, learning paths, certifications and Job aids. The enrollment ID of the user for each learning object is present in the beginning of the response data model hence this endpoint can also be used to get the enrollment ID and loResourceGrades ID of a user for any learning object.
-
-
GET /users/{id}/enrollments
Implementation Notes
Get enrollments of a user using their userId. This API endpoint will provide all the learning objects of the user in which he/she is enrolled to. Additional filters are available to narrow down the results.
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 refer – https://elearning.adobe.com/?p=171607 Mention any additional model to be tagged along with this model query string refer – https://elearning.adobe.com/?p=170582
Mention the id of the user for whose account, the data is being requested, which is subject to necessary permissions path string Mention the last cursor till the records are fetched query string Mention the maximum number of records to be displayed per page. Max allowed is 10 query integer course (default) learningProgram jobAid certification Choose the filter based on the type of learning object. query Array[] active Select Active to get only active enrollments query string dateEnrolled (default) -dateEnrolled Choose the type of sorting to be applied to the results. Sorting based on recommendation score will only be applicable for PRL enabled LOs query string Response Messages
Curl
curl -X GET --header 'Accept: application/vnd.api+json' --header 'Authorization: oauth eea25e6e1e03c379c46e5ccc29932899' 'https://learningmanager.adobe.com/primeapi/v2/users/20941371/enrollments?page[limit]=3&filter.loTypes=course&sort=dateEnrolled'
Request URL
https://learningmanager.adobe.com/primeapi/v2/users/20941371/enrollments?page[limit]=3&filter.loTypes=course&sort=dateEnrolled
Response Body
{ "links": { "self": "https://learningmanager.adobe.com/primeapi/v2/users/20941371/enrollments?page[limit]=3&filter.loTypes=course&sort=dateEnrolled", "next": "https://learningmanager.adobe.com/primeapi/v2/users/20941371/enrollments?page[limit]=3&filter.loTypes=course&sort=dateEnrolled&page[cursor]=eyJqb2JBaWQiOjAsImNvdXJzZSI6MywibGVhcm5pbmdQcm9ncmFtIjowLCJjZXJ0aWZpY2F0aW9uIjowfQ==" }, "data": [ { "id": "course:6511020_7037048_20941371", "type": "learningObjectInstanceEnrollment", "attributes": { "completionDeadline": "2023-12-13T11:48:49.000Z", "dateEnrolled": "2023-06-16T11:48:49.000Z", "enrollmentSource": "AUTO_ENROLL", "hasPassed": false, "progressPercent": 0, "score": 0, "state": "ENROLLED" }, "relationships": { "learner": { "data": { "id": "20941371", "type": "user" } }, "learningObject": { "data": { "id": "course:6511020", "type": "learningObject" } }, "loInstance": { "data": { "id": "course:6511020_7037048", "type": "learningObjectInstance" } }, "loResourceGrades": { "data": [ { "id": "course:6511020_7037048_11676159_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:6511020_7037048_11676160_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:6511020_7037048_11676161_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:6511020_7037048_11676162_0_20941371", "type": "learningObjectResourceGrade" } ] } } }, { "id": "course:7236650_7877507_20941371", "type": "learningObjectInstanceEnrollment", "attributes": { "dateEnrolled": "2023-06-29T11:34:50.000Z", "enrollmentSource": "SELF_ENROLL", "hasPassed": false, "progressPercent": 0, "score": 0, "state": "ENROLLED" }, "relationships": { "learner": { "data": { "id": "20941371", "type": "user" } }, "learningObject": { "data": { "id": "course:7236650", "type": "learningObject" } }, "loInstance": { "data": { "id": "course:7236650_7877507", "type": "learningObjectInstance" } }, "loResourceGrades": { "data": [ { "id": "course:7236650_7877507_12456287_0_20941371", "type": "learningObjectResourceGrade" } ] } } }, { "id": "course:7236827_7877699_20941371", "type": "learningObjectInstanceEnrollment", "attributes": { "dateEnrolled": "2023-06-29T12:34:33.000Z", "enrollmentSource": "ADMIN_ENROLL", "hasPassed": false, "progressPercent": 0, "score": 0, "state": "ENROLLED" }, "relationships": { "learner": { "data": { "id": "20941371", "type": "user" } }, "learningObject": { "data": { "id": "course:7236827", "type": "learningObject" } }, "loInstance": { "data": { "id": "course:7236827_7877699", "type": "learningObjectInstance" } }, "loResourceGrades": { "data": [ { "id": "course:7236827_7877699_12456477_0_20941371", "type": "learningObjectResourceGrade" }, { "id": "course:7236827_7877699_12463854_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-expose-headers": "Requested-Accept-Language, x-rate-limit, x-burst, x-excess-requests-per-second, Retry-After", "content-encoding": "gzip", "content-type": "application/vnd.api+json;charset=UTF-8", "date": "Sun, 09 Jun 2024 13:05:09 GMT", "requested-accept-language": "en-US,en;q=0.9", "server": "openresty", "server-timing": "server_resp;dur=27", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", "x-frame-options": "SAMEORIGIN", "x-request-id": "csvbscitrace", "x-xss-protection": "1" }
The course enrollment ID recevied in the response is a path/combination of the courseID_CourseInstanceID_UserID and similarly the module/
loResourceGrades
ID received in relationship is a path/combination ofcourseID_CourseInstanceID_moduleID_moduleVersionNo_UserID
You can use the
loResourceGrades ID
to make calls in other API endpoints of ALM.
-
You must be logged in to post a comment.