Skip to main content

Notifications

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

Helpful resources

Quick Links

Upcoming TechTalk: Copilot Capabilities…

Review the Copilot features that are currently available in Dynamics 365 Finance…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,377 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,308 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans