SAP Knowledge Base Article - Public

2526664 - Learning: 1708 Feature - Add and Update User OData API (Admin) to support upserts for Job Location, Organization ID and Job Code ID

Symptom

You can now call the Add / Modify User API to support upserts for Job Location, Organization ID and Job Code ID even if the ID does not currently exist in LMS. A new property, 'createReferences', controls the ability to allow references to be created via the API. Previously, the API rejected a User Add / Modify if there was a new User Reference for any referenced field.

Environment

SuccessFactors Learning

Learning Management System

Resolution

In this example below, I have explained how to update the information for user 'SF11232'.In the same way, you can do it for other users in your system.

1.Generate a Bearer token of Admin type

2. Use:

  • Request URL : https://customer.plateau.com/learning/odatav4/public/admin/userService/v1/Users('SF11232')
  • Method : POST
  • Sample Payload :
{
  "@odata.context": "$metadata#Users/$entity",
  "studentID": "cbai2",
  "firstName": "Chris",
  "lastName": "Bai",
  "middleInitial": null,
  "gender": null,
  "notActive": "N",
  "hasAccess": null,
  "employeeStatusID": null,
  "employeeTypeID": null,
  "jobLocationID": null,
  "jobPositionID": null,
  "jobTitle": null,
  "domainID": "PUBLIC",
  "organizationID": "1",
  "roleID": "DEFAULT USER",
  "address": null,
  "city": null,
  "state": null,
  "postal": null,
  "country": null,
  "regionID": null,
  "emailAddress": "chris.bai@sap.com",
  "hireDate": null,
  "terminationDate": null,
  "supervisorID": null,
  "resumeLocation": null,
  "comments": null,
  "accountCode": null,
  "hasAccessToOrgFinancialAccount": null,
  "timeZone": "Australia/Sydney",
  "locale": "English",
  "altSuperID1": null,
  "altSuperID2": null,
  "altSuperID3": null,
  "shoppingAccountType": "EXTERNAL",
  "enableShoppingAccount": "Y",
  "positionNumberID": null,
  "includeInGovtReporting": "N",
  "legalEntityID": null,
  "employeeClassID": null,
  "hourlyRate": null,
  "hourlyRateCurrency": null,
  "regularTempID": null,
  "fulltime": "Y",
  "nativeDeeplinkUser": "N",
  "studentPhones": [],
  "customColumn": [],
  "assignProfileID": null,
  "currencyID": "USD",
  "removeAltSuperID1": null,
  "removeAltSuperID2": null,
  "removeAltSuperID3": null,
  "personGUID": null,
  "personExternalID": "cbai2",
  "gamificationStudentID": null,
  "totalCount": null,
  "createReferences":true
}
  • Response :

201: Created. or ERROR or 201: Created

NOTE : The same call can also be used to update existing data for a user.Please use Method 'PUT' for that and pass the user ID in the URL for whom the record needs to be updated.

The Request URL will look like :

https://(learning server)/learning/odatav4/public/admin/userService/v1/Users('cbai2')

Keywords

Add and Update User,Job Location, Organization ID,Job Code ID,API,LMS , KBA , LOD-SF-LMS-ODA , Web Services OData , Problem

Product

SAP SuccessFactors Learning 1708 ; SAP SuccessFactors Learning 1711