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
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
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.