SAP Knowledge Base Article - Public

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

Symptom

SegmentAttendances Odata API failed with below error:

{

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

API issue.PNG

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP SuccessFactors Learning

Cause

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

Resolution

Use the below sample code to successfully call the SegmentAttendances 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

See Also

 SAP SuccessFactors Learning OData APIs

Keywords

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

Product

SAP SuccessFactors Learning all versions