2586590 - LMS SegmentAttendances ODATA API call failed with "The Key value ' ' is invalid" .

SAP Knowledge Base Article - Public

2586590 - LMS SegmentAttendances ODATA API call failed with "The Key value ' ' is invalid" .

Symptom

SegmentAttendances Odata API failed with below error.

Error as shown below :

{

   "error" : {
     "code" : null,
  "message" :  "The Key value ' ' is invalid."
    }
}

API issue.PNG

 

Environment

SuccessFactors Learning Managment System (LMS)

Cause

This error could be due to incorrect payload used in the body of API call.

Resolution

Use the below sample code to succesfully call SegmentAttendances Odata API.


SegmentAttendances Odata API URl = https://xyz.plateau.com/learning/odatav4/public/admin/scheduledoffering-service/v1/SegmentAttendances

Method : POST

Sample code / payload :


  {
   "segmentAttendances" : [
     {
     "scheduleID": 897692002, 
     "userID": "skuser",
      "segmentID": 1,         
     "comments": "Test_sucess"
      },
     {
     "scheduleID": 897692002, 
     "userID": "MPRAKASH",
      "segmentID": 1,         
     "comments": "Test_sucess_user2"
      }
     ]
 }

segmentattendances.PNG

attendance recorded.PNG

Keywords

"The Key value ' ' is invalid" , The Key value is , admin/scheduledoffering-service/v1/SegmentAttendances , SegmentAttendances , API , ODATA , Webservices. , KBA , LOD-SF-LMS-ODA , LMS Web Services OData , Problem

Product

SAP SuccessFactors Learning all versions