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

set up API query with key

Hi All,

 

Im struggeling to set up connection to MarineTraffic. I have a key from MarineTracffic but im unable to get the source to work.

I have a request limit 1 pr hour. 

 

When i paste the link in Edge browser i get a expexted result. But not in Power Bi.

 

https://services.marinetraffic.com/api/expectedarrivals/"APIKEY"?v=3&msgtype=extended&protocol=xml&portid=NOAES&fromdate=2021-11-05%2012%3A00%3A00&todate=2021-11-06%2012%3A00%3A00)

 

This is what i have in the query:

 

let
Source = Xml.Document(Web.Contents("https://services.marinetraffic.com/api/expectedarrivals/"APIKEY"?v=3&msgtype=extended&protocol=xml&portid=NOAES&fromdate=2021-11-07%2012%3A00%3A00&todate=2021-11-08%2012%3A00%3A00)"))
in
Source

 

 

Any ideas?

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @Wikolin ,

 

Any updates?

 

Best Regards,
Eyelyn Qin

 

v-eqin-msft
Community Support
Community Support

Hi @Wikolin ,

 

You may try:

Source = Xml.Document(Web.Contents("https://xxx&APIKey="))

 

Similar thread:

https://community.powerbi.com/t5/Power-Query/API-query-return-a-range-of-selection/m-p/1905051

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

mahoneypat
Employee
Employee

Please try this instead with 2 sets of quotation marks

 

let
Source = Xml.Document(Web.Contents("https://services.marinetraffic.com/api/expectedarrivals/""APIKEY""?v=3&msgtype=extended&protocol=xml&portid=NOAES&fromdate=2021-11-07%2012%3A00%3A00&todate=2021-11-08%2012%3A00%3A00)"))
in
Source

 

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


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.

Top Solution Authors
Top Kudoed Authors