on 2021 Feb 06 3:38 PM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
52 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.