Hi All
I am currently receiving a list of achievements from Litmos via an API Call to Litmos. Each Bundle contains the following
{
“UserId”: “xXstnBCUOsk1”,
“Title”: “Effective Meeting Skills”,
“Description”: “”,
“AchievementDate”: “/Date(1742981935170+0000)/”,
“CourseId”: “ymp_EyN39oU1”
}
I currently use the Iterator to loop round each bundle and get the UserName from Litmos which returns the following
{
“Id”: “xXstnBCUOsk1”,
“UserName”: “Dummy.Username@xxxx.org.uk”,
“FirstName”: “Dummy”,
“LastName”: “User”,
“FullName”: “Dummy User”
}
I have added an rpc that gets the user by the ID (rpc://getUserById) and that works.
What I don’t know is how to call the rpc in the original API Call to litmos so that it returns the username as part of the bundle.
currently have
“response”: {
// Splits array from API response into bundles.
// See documentation at: Custom Apps Documentation | Make Developer Hub
“iterate”: “{{body}}”, // Iterates “users” array from API response to split it into individual items.
"output": {
"AchievementData":"{{item}}",
"UserData":"rpc://getUserById({{item.UserId}})"
}
}
and it’s returning
{
“UserData”: “rpc://app%23litmos-tqrtwt@1/getUserById(xXstnBCUOsk1)”,
“AchievementData”: {
“UserId”: “xXstnBCUOsk1”,
“Title”: “Families Video Module”,
“Description”: “”,
“AchievementDate”: “/Date(1742982868273+0000)/”,
“CourseId”: “P-nmXcdCMxo1”
}
Any ideas - TIA
Paul Smith