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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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