How to fetch more than 200 files from Sharepoint folder via API?

Sarthak Konher 0 Reputation points
2024-04-08T08:18:43.16+00:00

We are getting only 200 files from API and there is no link to fetch further data. Also, we are not able to find any way to increase the number of responses in the documentation.

Is this a limitation?

Documentation:

  1. https://learn.microsoft.com/en-us/graph/api/shares-get?view=graph-rest-1.0&tabs=http
  2. https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,785 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 16,561 Reputation points Microsoft Vendor
    2024-04-09T07:34:22.0066667+00:00

    Hi @Sarthak Konher,

    If the returned result set is larger than 200 then the response body will contain the @odata.nextLink parameter, which contains a URL, which can be used to fetch the next page of results.

    You can get all the data by iterating nextPage, until nextPage equals null to end the traversal.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments