Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

how to do pagination in MS Dynamics REST APIs

Posted on by 30
I want to implement pagination in the API:
 
[dynamics_instance_url]/api/data/v9.0/roles?$select=_businessunitid_value,roleid
 
Currently, it is giving me a list of all the security roles inside the MS Dynamics instance. I want to get 50 results at a time. I tried implementing the
$top and $skip query parameters but, the $skip parameter is only supported in the CRM platform. 
 
How can I implement the pagination on the returned response irrespective of the Dynamics platform? 
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    how to do pagination in MS Dynamics REST APIs?
    Hi Partner,
    Please refer to the following link:
    Dataverse doesn't support the $skip query option, so you can't use the the combination of $top and $skip for paging.
    1.Paging Regular Queries
    Use the Prefer: odata.maxpagesize request header to control the number of records returned. 
    2.Paging with FetchXML

    I hope you can verify my answer if it helps you! If you have any questions, please feel free to contact me.
    Regards,
    Leah

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,556 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,625 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans