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.
Hello Everyone,
I need to connect to a api and i got web URL and X-API-KEY along with user credentials.
1.Can we add custom headers in the "http request header parameters" in advanced options in connecting a web url in powerbi desktop
2.Can I pass this key as a parameter in URL ?
Solved! Go to Solution.
Hi @raokilaru ,
For your first question, you could refer to this example whcih accessing the current credential for an API key and using it to populate a custom header (x-APIKey
).
MyConnector.Raw = (_url as text) as binary => let apiKey = Extension.CurrentCredential()[Key], headers = [ #"x-APIKey" = apiKey, Accept = "application/vnd.api+json", #"Content-Type" = "application/json" ], request = Web.Contents(_url, [ Headers = headers, ManualCredentials = true ]) in request
2. If your api is supported the parameter, I'm afraid that we could pass this key as a parameter in URL.
More details, you could have a reference of this article.
Best Regards,
Cherry
Hi @raokilaru ,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @raokilaru ,
For your first question, you could refer to this example whcih accessing the current credential for an API key and using it to populate a custom header (x-APIKey
).
MyConnector.Raw = (_url as text) as binary => let apiKey = Extension.CurrentCredential()[Key], headers = [ #"x-APIKey" = apiKey, Accept = "application/vnd.api+json", #"Content-Type" = "application/json" ], request = Web.Contents(_url, [ Headers = headers, ManualCredentials = true ]) in request
2. If your api is supported the parameter, I'm afraid that we could pass this key as a parameter in URL.
More details, you could have a reference of this article.
Best Regards,
Cherry
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |