Symptom
We are not able to assign Programs to users using API in LMS
Environment
SuccessFactors Learning
Learning Management System
Reproducing the Issue
1.Generate user token
2.Use :
API URL : https://customer.plateau.com/learning/odatav4/public/user/userassignment-service/v1/UserPrograms
Method: POST
Payload :
{
"userProgram":[
{
"programID": "ZT_L_CLASSROOM_ACE_001",
"programTypeID": "Open-Ended",
}
]
}
Response:
{
"error": {
"code": null,
"message": "while trying to invoke the method org.apache.olingo.commons.api.data.Property.getValue() of a null object returned from org.apache.olingo.commons.api.data.Entity.getProperty(java.lang.String)"
}
}
Cause
The value passed in the payload for parameter 'programTypeID' is not accepted by the API
Resolution
The allowable values for the parameter programTypeID in the payload are :
DURATION_BASED,OPEN_ENDED, SCHEDULE_BASED
NOTE: these values should be exactly in the same case as provided above depending on the type of program you are trying to assign.
The corrected payload should look like :
{
"userProgram":[
{
"programID": "ZT_L_CLASSROOM_ACE_001",
"programTypeID": "OPEN_ENDED",
}
]
}
See Also
https://launchpad.support.sap.com/#/notes/2318897
Keywords
programTypeID,program,assign,unassign,API,LMS,ODATA , KBA , LOD-SF-LMS-ODA , Web Services OData , How To