cancel
Showing results for 
Search instead for 
Did you mean: 

SF LMS ODATA API 'Students' not returning more than 10 records in response

sinhasouvik
Participant
0 Kudos

Hi Experts,

I was trying to fetch the Users/Students/Learners records using below LMS ODATA API using some filter criteria mentioned below. But not able get more than 10 records in API response. Also I did not find any filter criteria like $top to fetch more than 10 records for this Student search API.

Could you please let me know whether this is the standard behavior or there is any way to fetch more than 10 records from this API call.

/learning/odatav4/searchStudent/v1/Students?$filter=criteria/isActive eq true and criteria/domainIDs eq 'XXXX'

I was following the below help docuemnts:

API details:- https://help.sap.com/viewer/5aab9bef78fc4c4fa199c1f7aa142720/2005/en-US/06a0bc063f314e139252a844e0c5...

Use case sample:- https://help.sap.com/viewer/5aab9bef78fc4c4fa199c1f7aa142720/2005/en-US/b13684d05fe84842aaaa71f75766...

Regards,

Souvik

View Entire Topic
sinhasouvik
Participant

To overcome the above limitation/features of Odata v4, you can use the OData standard parameter $top and $skip for this:

{{lmsDomain}}learning/odatav4/searchStudent/v1/Students?$top=200&$skip=10

This will get you 200 records and will skip the first 10.

Example including filter:-

learning/odatav4/searchStudent/v1/Students?$top=200&$skip=10&$filter=criteria/isActive%20eq%20true

See also OData V4 spec here: OData Version 4.0 Part 1: Protocol (oasis-open.org)

Please not that the spec is not always updated by vendors by 100% some feature might be available some not.

Regards,

Souvik