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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors