Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Everyone,
Im new to REST web api, i need help to connect to vmware vRealize Operations rest api for creating dashboard.
When i try to connect using "web" option , i get the error "A web API key can only be specified when a web API key name is provided."
and when i try from blank query> advanced editior i get error as mentioned in the end of the question , Please help me to fix the issue.
let
Source = Web.Contents("https://www.mgmt.cloud.vmware.com/.......",[ApiKeyName="keyname"])
in
Source
DataSource.Error: Web.Contents failed to get contents from 'https://www.mgmt.cloud.vmware.com/......' (404): Not Found
Details:
DataSourceKind=Web
DataSourcePath=https://www.mgmt.cloud.vmware.com
Url=https://www.mgmt.cloud.vmware.com/.......
Pull REST api data from VMWare vCenter
Finally able to do it my self after multiple troubleshooting. But it is still workaround as i needed to feed the Token inside query itself instead of using powerbi authentication.
Hi ,
Thank you for the suggestion.. I used postman after your suggestion and able to get the output succesfully. Basically first need to do "post" command to get the access tocken then need to feed that to "Get" Command..
not sure how to get help on this..
POST "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "refresh_token={CSP API Token}”
gets output as below
{ "id_token", "token_type", "expires_in", "scope", "access_token", "refresh_token” }
need to use access_token from above output to below get request
GET https://www.mgmt.cloud.vmware.com/vrops-cloud/suite-api/api/adapterkinds
headers are Content-Type: application/json Authorization: CSPToken <access_token> Accept: application/json
after this im getting the output that is required.. could you help to put this in powerbi... I'm really sorry for the question.
Web.Contents - PowerQuery M | Microsoft Docs has the details on how to change from GET to POST. Worst case specify an empty payload.
hi,
I tried the web.contents but unable to post the key and feed it to get command..
Im able to "post" the key from postman and copy paste the same in powerbi "GET" but problem is it is only valid for 30 mins and i have to repeat the process again.. could someone help me
Now im getting error as bad request.
DataSource.Error: Web.Contents failed to get contents from 'https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize' (400): Bad Request
Details:
DataSourceKind=Web
DataSourcePath=https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize
Url=https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize
-----------------------
let
url = "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize",
token = "refresh_token JHz...........",
headers = [#"Content-Type"="application/x-www-form-urlencoded",Accept="application/json"],
postData = Text.ToBinary(token),
response =Web.Contents(url, [Content= postData])
in
response
404 means the URL you specified is incorrect. Use Postman or similar to troubleshoot, then implement in Web.Contents.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.