Jul 23 2021 01:33 AM - last edited on Nov 09 2023 11:09 AM by
Help!!!
REST API request data in SharePoint Online list.
The list data more than 5k data, but the result of request don't more than 5k.
SharePoint REST API return error as below:
test-web-part_be28700c1e68b12fdf02398b82852235.js:1 Uncaught (in promise) Error: Error making HttpClient request in queryable [500] Internal Server Error ::> {"odata.error":{"code":"-2147024860, Microsoft.SharePoint.SPQueryThrottledException","message":{"lang":"en-US","value":"The attempted operation is prohibited because it exceeds the list view threshold."}}}
at new t (test-web-part_be28700c1e68b12fdf02398b82852235.js:1)
at test-web-part_be28700c1e68b12fdf02398b82852235.js:1
My Request:
https://linyus.sharepoint.com/sites/DevelopSite/_api/web/lists/getByTitle('Test')/items?$top=100&$fi... eq '1' and Test eq '1'
Error:
Result only 1 item, but REST error
Jul 23 2021 02:18 PM
Hi @Linyu001
The first filter condition (ItemType eq '1') is likely returning more than 5000 items. This needs to always return less than 5000 items and only after that the other filter queries are applied.
Also, you may already be aware, but $top will only be applied after the filter so it does not prevent the list view threshold error
Jul 23 2021 08:30 PM
Aug 19 2021 12:57 AM
Jul 13 2024 09:36 AM
@Joel Rodrigues Is there still no way to avoid this error?
if I filter by text, 2 elements are returned to me and everything is ok, but if I search by date, it finds more than 5000 elements and I also get an error:
- {"error":{"code":"-2147024860, Microsoft.SharePoint.SPQueryThrottledException","message":"The attempted operation is prohibited because it exceeds the list view threshold."}}