SAP Knowledge Base Article - Public

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

Symptom

OData API calls such as '/odatav4/public/admin/scheduledoffering-service/v1/EnrollmentListings' only return a maximum of 10 records although

Environment

SuccessFactors Learning Management System (LMS)

Reproducing the Issue

  1. Get your admin token
  2. Setup the API with the admin token
  3. Do a basic call such as https://{LMS-URL}/learning/odatav4/public/admin/scheduledoffering-service/v1/EnrollmentListings?$filter=criteria/scheduleID eq 897129001
  4. Only 10 enrollments will be returned

Cause

Only returning 10 is as designed.

Resolution

Only returning 10 is as designed, thus the API call needs to be modified.

A parameter of $top needs to be added as shown in the screenshot.  $top = n where n is the amount of users that need to be pulled. "n" can be larger than the amount of users enrolled.

ODA.JPG

For more information on pagination please see the Learning OData API Reference Guide

Please note you must login to access this guide.

Keywords

OData API, enrollment, token, OData, EnrollmentListings top list return data enough not more fetch results limit increase , KBA , LOD-SF-LMS-ODA , Web Services OData , How To

Product

SAP SuccessFactors Learning all versions