When I go to a specific folder in Sharepoint, I hit an error that I have exceeded the view threshold of 5000 items. I created a new view to only show items when the ID < 5000, I am able to see the folder contents now.
However, how do I apply a specific view/filter when using Python?
Using Python's request module, I have:
requestUrl = sharePointUrl + "/{0}/_api/web/GetFolderByServerRelativeUrl('/{0}/{1}')/Files".format(site, folder)
headers={'Content-Type': 'application/json; odata=verbose', 'accept': 'application/json;odata=verbose'}
requests.get(requestUrl , headers=headers).json()
which returns {'d': {'results': []}}
If I modify the requestUrl to include ?$top=1000
or ?$filter=Id lt 1000
, I still have an empty result (no throttled error, just empty result)
How do I apply the filters correctly or use a specific view when running the request query?
(I used a different folder name and I get an error 'Field or property "Id" does not exist.'
so clearly something is wrong with my query too but I am not sure why the other folder returns empty result and not an error)