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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Auto refresh data from API on web

Hi everyone!
As a newbie I'm trying to set an auto-update the API from a CRM service. I've found some tutorials here but no success. 
The API use a Header token. 

How can I add the API/token_name and token on the online dashboard for my client?

Thanks 🙂

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Done...I went to the dataset in PBI service online and set a auto refresh and worked ¬¬ haha
Thanks guys!!

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Done...I went to the dataset in PBI service online and set a auto refresh and worked ¬¬ haha
Thanks guys!!

mahoneypat
Employee
Employee

That probably won't solve it, but not that I see more info, I think you need a different fix.  Please see this post.

The hidden gems of the function Web.Contents() - Kohera

You likely need to pull the query part of your URL into the [query=  part of Web.Contents as described in that post.

 

Also, you should be able to manually trigger refresh in the service to test if it is working or not (vs. waiting for the next scheduled refresh.

 

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


mahoneypat
Employee
Employee

Please see if this post helps.

Solved: Pull data from a REST API Authentication - Microsoft Power BI Community

 

Looking at documentation at the link you provided, you'll need to have the following in the header

content-type: application/json

token_exact: <your token>

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Hey Pat...

 

I didn't undertand. I've imported all the data thru Advanced Editor (before your solution):

= Json.Document(Web.Contents("https://api.exactsales.com.br/v2/listarlead?max_results=10000", [Headers=[token_exact="my token"]]))

 

 

I've followed your solution and gave me:

= Json.Document(Web.Contents("https://api.exactsales.com.br/v2/" & "listarlead?max_results=10000", [Headers=[#"Content-Type"="application/json", token_exact="my token"]]))

 

Basically the same. 

This will auto refresh the report online? 

I'm sorry, I'm newbie in this API field.

 

Anyways, I've changed to the solution you gave, I'll publish now and pray for tomorrow auto-refresh 😄

 

 

Anonymous
Not applicable

Thanks for the quick response!
I'll try right now.

Anonymous
Not applicable

Anyone? 😕

Anonymous
Not applicable

I forgot to mention: this is the api: https://exactdev.docs.apiary.io/

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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