2526520 - How to increase the number of search results fetched from an API call in LMS (eg : more than 10)

SAP Knowledge Base Article - Public

2526520 - How to increase the number of search results fetched from an API call in LMS (eg : more than 10)

Symptom

  • An API call results in 10 records returned in the LMS
  • This KBA covers how to increase the number of results from an API call

Environment

SAP SuccessFactors Learning Management System (LMS)

Reproducing the Issue

  1. Generate admin type
  2. Use:
    • API Request URL: https://[LMS instance].plateau.com/learning/odatav4/public/admin/search-service/v1/Programs?$filter=criteria/active eq true
    • Method: GET
    • Response: The resultset will fetch only 10 records

Cause

By default the API returns only 10 records

Resolution

  • In order to increase the search results to fetch more than 10 records, add the parameter '$top' to the request URL
    • Example:
    • https://[LMS instance].plateau.com/learning/odatav4/public/admin/search-service/v1/Programs?$filter=criteria/active eq true&$top=100
  • This URL will allow the API to fetch 100 records
  • The maximum limit is 500 records

See Also

KBA 2318897 - LMS Webservices Knowledge Support and Tips

Keywords

SF SuccessFactors Learning search program API LMS ODATA increase limit fetch return result set resultset number amount call record row top , 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