Symptom
When using ODATA learningHistory web service call without the filter criteria it fails (GET /learning/odatav4/public/user/learningHistory/v1/learninghistorys?). You may get the following error:
- Caused by: org.apache.olingo.client.api.communication.ODataClientErrorException: (null) The URI is malformed. [HTTP/1.1 400 ]
Environment
SAP SuccessFactors Learning
Reproducing the Issue
Run the call without the filter criteria (GET /learning/odatav4/public/user/learningHistory/v1/learninghistorys? $filter=criteria/maxNumberToRetrieve eq 10 and criteria/includeDeepLink eq true).
Cause
Filter is mandatory for this ODATA learningHistory api call. The API is not meant for a bulk data extraction or doing a search with wildcards.
The API is meant for accessing a single user's learning history along with a filter to restrict the number of records.
If you are using admin Token then you need to provide targetUserID in the filter. Use specific user Token then you need not to provide targetUserID in the filter.
This API is designed in such a way that it will allow to access a single user's learning history at a time.
Resolution
GET /learning/odatav4/public/user/learningHistory/v1/learninghistorys?$filter=criteria/maxNumberToRetrieve eq 10 and criteria/includeDeepLink eq true
See Also
2804267 - SAP SucessFactors Learning Product Guidelines & Best Practices
2191572 - Location for Learning Web Services API Reference Guide
Keywords
learningHistory, learning, history, odata, api, call, get, uri, org.apache.olingo.client.api.communication.ODataClientErrorException, null, malformed, http, 400, org.apache.olingo.client.api.communication.ODataClientErrorException: (null) The URI is malformed. [HTTP/1.1 400] , KBA , LOD-SF-LMS , Learning Management System , LOD-SF-LMS-ODA , Web Services OData , Problem