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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
thomazinh
Helper I
Helper I

API multiple call to return all data (paging)

I don't have a lot of M Query experience, and I'm working on calling all data points for an API call. In order to get where I want, I have to make 2 seperate calls above this (asking for a list of all company projects and a second asking for those project's inspections). The goal is to get all checklist itmes from those inspections.

 

How can I go through and page to get all data? My current M query looks something like this: 

 

ChecklistItems =
Table.AddColumn(
#"Filtered Rows1",
"New",
each
Json.Document(
Web.Contents(
"https://api.WEBSITE.com/rest/v1.0/",
[
RelativePath =
"projects/"
& Text.From([Project Id])
& "/checklist/list_items?filters[inspection_type_id]=98634",
Query = [
per_page = "1000"
],
Headers = [
Authorization = AuthToken
]
]
)
)
),

1 REPLY 1
ImkeF
Community Champion
Community Champion

Hello @thomazinh ,
This blogpost shows a simple paging semantics and also gives you a solution to not miss the last page when paging in Power Query: How not to miss the last page when paging with Power BI and Power Query (thebiccountant.com)

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.