hotcakedev
hotcakedev

Reputation: 2504

How to get full response or set pagination using Microsoft Graph API?

I am not sure if my API has the limit for the response.

My Graph API is the following.

https://graph.microsoft.com/v1.0/sites/{site-id}/drive/items/{folder-id}/children

Actually, the children has more than 1,500 results(folders and files), but it responses only 1206 results.

Does the API provide limited response?

I tried to add some filters including $top, $skip, etc, but they were not working.

And when I tried to add ?$skip=1000 to get skip 1,000 results, but it was saying the error.

enter image description here

Please let me know what I should do to get full results or add some filters to paginate using the API.

Thank you.

Upvotes: 0

Views: 2309

Answers (2)

hotcakedev
hotcakedev

Reputation: 2504

I found the answer. I should use "@odata.nextLink" property while it does exist. You could refer to the doc.

Upvotes: 1

Sunitha-MSFT
Sunitha-MSFT

Reputation: 56

Drive apis have service limitations as mentioned here, https://learn.microsoft.com/en-us/graph/throttling#files-and-lists-service-limits and here is the guidance on how to handle throttling issues - https://learn.microsoft.com/en-us/graph/throttling#files-and-lists-service-limits

This method supports the $expand and $select OData query parameters to customize the response.

Upvotes: 1

Related Questions