2526632 - How to set a range while searching using API in LMS

SAP Knowledge Base Article - Public

2526632 - How to set a range while searching using API in LMS

Symptom

  • Currently, the maximum return is 500 records using API call as per KBA 2526520
  • This KBA covers how to set a limit/criteria in the search filter so that search results for records beyond the first 500 program records in LMS are returned

Environment

SAP SuccessFactors Learning Management System (LMS)

Reproducing the Issue

  1. Generate admin token
  2. Use:
    1. API Request URL :
    2. https://customer.plateau.com/learning/odatav4/public/admin/search-service/v1/Programs?$filter=criteria/active eq true&$top=114
    3. Method: GET
    4. Response : (You will see that the array returns the top 114 records from the search)
    5.  response_search.PNG

Cause

  • The 'top' parameter will result in the number of records being specified in the request URL
  • If there are more records, it cannot be fetched using top parameter/condition

Resolution

In order to fetch the results for a certain range, you need to use the parameter 'skip' along with 'top'

Example:

  1. Say, I have 514 program records in my instance and I want to get the program records which are beyond 414 and 514.In other words, I want to see the 100 programs which starts from serial number 415 to 514.
  2. The request URL should look like:
    1. https://customer.plateau.com/learning/odatav4/public/admin/search-service/v1/Programs?$filter=criteria/active eq true&$top=114&$skip=414
  3. The response will look like:

    range_search.PNG
  4. The above call lets you view the remaining 100 records from te API search.

See Also

KBA 2318897 - LMS Webservices Knowledge Support and Tips

Keywords

SF SuccessFactors Learning API LMS, search, range, more than 500, results, search return fetch call record row back increase more , KBA , LOD-SF-LMS-ODA , LMS Web Services OData , LOD-SF-LMS , SuccessFactors Learning , How To

Product

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 1505 ; SuccessFactors Learning 1508