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
Saadii_360o
Helper I
Helper I

List. Generate not working for Rest API pagination

Hi, Everyone I hope you all are fine.
API URL: https://vcc-na8.8x8.com/api/stats/agents/{Aent-ID}/activities?n=(offset)
Background: Reference to the URL above I am trying to extract data from this API which allows me to add the Agent-ID and provide only 50 rows per request.

I have created this function below which is working perfectly fine and allows me to extract all the id's by using invoke function against those id's in new table, PFB,


Saadii_360o_0-1646863051635.png

 

Saadii_360o_1-1646863051637.png

 


But when I use it in List. Generate function in order to do the pagination of these id's it shows the empty list, PFB

Saadii_360o_2-1646863051641.png

 

Saadii_360o_3-1646863051641.png

 

 

I also created this function below in order to extract all the id's and rows at the same time but it provide infinite loop of tables.

 

 

Saadii_360o_4-1646863051643.png

 

 

Saadii_360o_5-1646863051650.png

 

 

Any Power query expert who can loo into it solve my problem.
Thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Saadii_360o ,

 

You may kindly refer to:Iterate over dynamic Web API Pages with Power Query - How to resolve Cursor-Based Pagination - DataC... to learn how to implement Cursor-Based Pagination using List.Generate to extract large data sets from Web APIs.  

Eyelyn9_0-1647223687009.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Saadii_360o ,

 

You may kindly refer to:Iterate over dynamic Web API Pages with Power Query - How to resolve Cursor-Based Pagination - DataC... to learn how to implement Cursor-Based Pagination using List.Generate to extract large data sets from Web APIs.  

Eyelyn9_0-1647223687009.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.