I am trying to get the list of all files contained in a sharepoint folder, however, because there is more than 5000 files I cannot get any results.
I understand that I cannot query more than 5000 items. Then I tried to limit the number of elements returned by my query but unsuccessfully (I tried to do like the getbytitle() function)
When there is less than 5000 files, I successfuly get the list of files in a folder when I run this query:
web/GetFolderByServerRelativeUrl('Shared%20Documents')/Files
But when there is more than 5000 files, I cannot have any results. I tried this:
web/GetFolderByServerRelativeUrl('Shared%20Documents')/Files?$top=100
web/GetFolderByServerRelativeUrl('Shared%20Documents')/Files?$limit=100
It seems that the parameters 'limit' and 'top' are just ignored by sharepoint and I always get the "SPQueryThrottledException" error.
Is it possible to do what i'm trying to do with the sharepoint API?