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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Pinky0404
Helper III
Helper III

Get Data through API

Hi All,

 

I am new to API's and  wants to pull the data from "https://console.amp.cisco.com"  with the  help of API key. Can anyone please walk me through the steps  to achieve my goal.

 

Also facing the error while connecting through API key.

Error.PNG

 

 

 

 

Thanks in Advance

Pinky

3 REPLIES 3
mjjoachim
New Member

The Web API authentication method can only be used if the API can accept the API key via a query string parameter.

 

The Web.Contents M function has an ApiKeyName parameter. The error message is refering to this missing parameter. This parameter must be set to the name of the query string parameter the API is expecting.

 

In the following example, the API key value will be sent in the query string/URL as a parameter named "api_key":

Web.Contents(
  "https://console.amp.cisco.com/",
  [
    ApiKeyName="api_key"
  ]
)

 

Then, on the Web API credentials dialog, enter the API key as the value for the Key prompt.

 

The resulting request will look something like: https://console.amp.cisco.com/?api_key=apikeyvalue

jayhawk
Advocate I
Advocate I

Hi

Were you able to get this figured out?  I am new to APIs, and trying to do the same thing.  The one I see here, isn't anything close to what it seems you and myself are trying to do, and get answered. 

Thanks,

v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Pinky0404,

You can specify an API key name in the hearers area of Web.Contents using Advanced Editor. You can review the example in this blog: https://msdn.microsoft.com/en-us/library/mt260892.aspx.

Please refer to the following threads.

Get data from web error: A web API key can only be specified when a web API key name is provided 
Connect to restful api data source multiple times

Working with Web Services in Power Query

Best Regards,
Angelia

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.