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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
difg
Regular Visitor

Connection to Wrike & pagination

We need to recover data from Wrike using an API, but there is a limitation of 1000 records. 

At the time of using the page number to retrieve all the pages, Wrike uses a token
that is an alphanumeric value that represents the start identifier of the next batch. I need to make a function in PowerBI that allows me to recover the way to recover
all records using that value that the api returns.
I have written thousands of function attempts,
but I can only retrieve the first 1000 records,
the next token and an error in the next iteration.
If anyone has any idea how I can do it, I will be grateful for the help.
1 ACCEPTED SOLUTION
ZappySys
Helper I
Helper I

Hi,

 

Not sure if you are open for 3rd party driver but ZappySys has very easy to use ODBC Drivers for REST API which can connect to any APi and it has many Pagination / Authentication options.

 

You can write queries like below

SELECT * FROM $
LIMIT 25
WITH(
	 src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)

 

Here is an article you can start with.


https://zappysys.com/blog/howto-import-json-rest-api-power-bi/

 

Check below link for more articles reklated to Power BI and Rest API Integration.

 

https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/bi-reporting-power-bi/

 

 

 

View solution in original post

4 REPLIES 4
ZappySys
Helper I
Helper I

Hi,

 

Not sure if you are open for 3rd party driver but ZappySys has very easy to use ODBC Drivers for REST API which can connect to any APi and it has many Pagination / Authentication options.

 

You can write queries like below

SELECT * FROM $
LIMIT 25
WITH(
	 src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)

 

Here is an article you can start with.


https://zappysys.com/blog/howto-import-json-rest-api-power-bi/

 

Check below link for more articles reklated to Power BI and Rest API Integration.

 

https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/bi-reporting-power-bi/

 

 

 

Hi ZappySys

 

I'll review that.

 

Thank you so much!

v-shex-msft
Community Support
Community Support

Hi @difg,

 

I think you can refer to following blog about how to get whole records from paged REST API:

Loading paged and related data from MS Graph API into Power BI using a recursive Power Query functio...

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi Xiaoxin

 

I'll review the article!

 

Thanks a lot!!!!  Smiley Happy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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