May 26, 2024
Retrieving Precise Learner Badge Information for a Designated Learning Object in ALM
Like
(1)
Comments
(0)
1
0
Summary
This article will demonstrate the appropriate endpoint for accessing a learner’s badge details pertaining to a specific course, learning program, or certification.
ALM API endpoint to retrieve badge details of a course and learner using user ID and course ID.
GET /users/{userId}/learningObjects/{loId}/userBadges
Implementation Notes
Retrieves list of user badges for a given learning object like courses, learning paths, and certifications.
Example Response Data
{
"data": [
{
"id": "string",
"type": "string",
"attributes": {
"assertionUrl": "string",
"dateAchieved": "string",
"expiryDate": "string",
"modelType": "string"
},
"relationships": {
"badge": {
"data": {
"type": "string",
"id": "string"
}
},
"learner": {
"data": {
"type": "string",
"id": "string"
}
},
"model": {
"data": {
"type": "string",
"id": "string"
}
}
}
}
]
}
application/vnd.api+json;charset=UTF-8
Parameters
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 | |
Mention the maximum number of records to be displayed per page. Max allowed is 10 | query | integer | ||
Mention the last cursor till the records are fetched | query | string | ||
dateAchieved (default) -dateAchieved | 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 | |
20276735 | The id of the user for whose account, the data is being requested | path | string | |
course:7280068 | Mention the id of the learning object for which the data is being requested,which is subject to necessary permissions. | path | string |
Response Messages
Curl
curl -X GET --header 'Accept: application/vnd.api+json' --header 'Authorization: oauth 2fd8739caecd258732b601ad4fe8e203' 'https://learningmanager.adobe.com/primeapi/v2/users/20276735/learningObjects/course%3A7280068/userBadges?page[limit]=10&sort=dateAchieved'
Request URL
https://learningmanager.adobe.com/primeapi/v2/users/20276735/learningObjects/course%3A7280068/userBadges?page[limit]=10&sort=dateAchieved
Response Body
{
"links": {
"self": "https://learningmanager.adobe.com/primeapi/v2/users/20276735/learningObjects/course:7280068/userBadges?page[limit]=10&sort=dateAchieved"
},
"data": [
{
"id": "20276735_1065990_COURSE_7280068_7923787",
"type": "userBadge",
"attributes": {
"assertionUrl": "https://cpcontents.adobe.com/public/accountassets/108079/badges/assertions/e2900f4f6834444c8f357df8f621e417_1695124391300.json",
"dateAchieved": "2023-07-28T11:45:00.000Z",
"modelType": "learningObject"
},
"relationships": {
"badge": {
"data": {
"id": "1065990",
"type": "badge"
}
},
"learner": {
"data": {
"id": "20276735",
"type": "user"
}
},
"model": {
"data": {
"id": "course:7280068",
"type": "learningObject"
}
}
}
}
]
}
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", "age": "-1", "cache-control": "no-cache, no-store, max-age=0, must-revalidate", "content-length": "646", "content-type": "application/vnd.api+json;charset=UTF-8", "date": "Sun, 26 May 2024 14:03:47 GMT", "expires": "-1", "pragma": "no-cache", "requested-accept-language": "en-US,en;q=0.9", "server": "openresty", "server-timing": "server_resp;dur=18", "strict-transport-security": "max-age=31536000; includeSubDomains", "x-content-type-options": "nosniff", "x-frame-options": "SAMEORIGIN", "x-request-id": "gw5ab251c2168d2def229b5c53d3ea68c2", "x-xss-protection": "1" }
——————————————————————————————————————————
-Tags-
#learner’s badge in a course from API #learning program/path #certifications #assigned badge #completed #achieved #extract #download #list #how to retrieve learner badge details in a specific course in ALM #Adobe Learning Manager
0 Comments
Add Comment
You must be logged in to post a comment.