Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Ruairi_CloudP
Regular Visitor

ServiceNow API - Pagination

Hello all, 

 

We're currently building Power BI reporting for a client where we are using REST API endpoints to retreive data from their ServiceNow environment to report on. 

 

The APIs in question are custom APIs which have longer processing times, where we are bringing through ServiceNow rows which are of a certain 'Survey Type' into mutliple tables. One table that has been having issues is one for 'Support' surveys, as this has a larger number of rows to bring through and has longer processing times than the other tables, which leads to some timeout issues. We've had a consistent issue with this table bringing through different numbers of rows every time it is refreshed where it does not bring through every row which we need. 

Screenshot 2023-01-11 at 13.47.02 (2).png

We're attempting to paginate this so it processes in chunks of 1,000 rows to resolve this issue however we've been struggling to put this together. We're looking to paginate this where we're not calling on a specific numbers of pages but just spliting the processing up. 

 

Any help with this would be appreciated, thanks!

3 REPLIES 3
amitchandak
Super User
Super User

@Ruairi_CloudP , refer if these can help

https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78

https://datachant.com/2016/06/27/cursor-based-pagination-power-query/

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hello, 

 

Thanks for the response, 

 

We've looked at the articles you've linked and tried using them as a basline to use for our pagination, however we haven't been able to get it to work yet. 

 

For the first link, we tried using this as a basis however we keep running into an error which is as the following: Web.Contents failed to get contents from "[URL Endpoint]" (406): Not Acceptable
Details:
DataSourceKind=Web
DataSourcePath= "[URL Endpoint]"

Url = "[URL Endpoint]"

 

For the second link, we have an issue where the result is returning a blank row of lists like so:

Screenshot 2023-01-12 at 13.55.20 (2).png

 

Any help with this? Thanks.

Hi @Ruairi_CloudP 

 

Do you still have this problem regarding connecting to service now?

If yes, maybe I can try to help out - I would at least need from you the link to the service now API endpoint you'd like to use (ideally I would also like to see the query - AFTER you remove confidential information from it).

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.