SAP Knowledge Base Article - Public

2526585 - Error while trying to call the Assigning or Unassigning SAP SuccessFactors Learning Programs to users (ProgramTypeID)

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 , LMS Web Services OData , How To

Product

SAP SuccessFactors Learning 1511 ; SAP SuccessFactors Learning 1602 ; SAP SuccessFactors Learning 1605 ; SAP SuccessFactors Learning 1608 ; SAP SuccessFactors Learning 1611 ; SAP SuccessFactors Learning 1702 ; SAP SuccessFactors Learning 1705 ; SAP SuccessFactors Learning 1708 ; SAP SuccessFactors Learning 1711 ; SuccessFactors Learning 1508