cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

API LMS recordLearningEvents

0 Kudos
473

Hello everyone,

I have a constant problem in using this API:

/learning/odatav4/public/admin/learningEvent/v1/recordLearningEvents

documentation was not helpful:

https://help.sap.com/docs/SAP_SUCCESSFACTORS_LEARNING/5aab9bef78fc4c4fa199c1f7aa142720/838be5e30e554...

and looking through the metadata I couldn't find any useful information.

My body is as follows:

{
    "recordLearningEvents": [
        {
        "componentTypeID": "02",
        "componentID": "TE70",
        "revisionDate": 1428506077000,
        "completionStatusID": "04",
        "studentID" : "E1545",
        "completionDate": 1428506077000,
        "completionTimeZoneID": "US/Eastern",
        "contactHours":1,
        "totalHours":1
        }
    ]
}
I tried various combinations with various users, courses, componentTypeID or completionStatusID;
but the error continues to be:
"errorMessage": "No items found matching input parameters."
 
Do you know how I can solve it? Or do you know another method to update via API the Learning History?
 
Roberto_Di_Nota_All_1-1741200061151.png
Roberto_Di_Nota_All_0-1741200057299.png

 

Accepted Solutions (0)

Answers (2)

Answers (2)

PL1
Product and Topic Expert
Product and Topic Expert
0 Kudos

@Roberto_Di_Nota_All, the cause of the API failure could be the value of the "componentTypeID" field. It seems the assignment type ID is being added. It should be the item type ID (Learning Administration > References > Learning Activities > Item Types).

JonasBrtschi
Participant
0 Kudos

Hi @Roberto_Di_Nota_All 

Please have a look at the sample post body on the SAP Help Portal:

Post Learning Events as Users or Supervisors with a Web Service | SAP Help Portal

As you can see in the sample, not the IDs are used but their descriptions. For example: not "04" but "PASSED" should be used.

Please have another try. 🙂 Good luck!

KR Jonas