Connect Automation Cloud API to PowerBI

Hello,
I am trying to connect Automation Cloud API to PowerBI by following this tutorial steps.
TUTORIAL: Connect Power Query (Power BI) to Orchestrator API - News / Tutorials - UiPath Community Forum](TUTORIAL: Connect Power Query (Power BI) to Orchestrator API - #7 by marcoaurel95)

At the step which is making Assets query I got this error:
DataSource.Error: The downloaded data is HTML, which isn’t the expected type. The URL may be wrong or you might not have provided the right credentials to the server

How can I solve this?

@maki

Please show what url are you using

cheers

Hello @Anil_G ,
I am using this link for BaseURL
https://cloud.uipath.com/“organization name”

Hi

I think you are using wrong url for assets

Check with doc for all steps to interact with orchestrator entities with api call

And These are the URLs and api method used with orchestrator assets

Try with this

Cheers @maki

@maki

The base url shpuld be the url of your orchestrator exactly…please use the same…open orchestrator and copy till Orchestrator word

Cheers

thank you @Anil_G , @Palaniyappan

I changed the BaseURL and got this error:

DataSource Error:
Details: “Web.Contents failed to get contents from ‘. . . web address here . . .’ (405): Method Not Allowed”

Is this mean that my URL is not allowed to connect by API?

@maki

Can you please show the implementation screenshot

cheers

hello @Anil_G

Is this the implementation screen that you are refering?

This is the whole code I typed:

= let
Path = “/odata/Assets”,
Auth = Json.Document(Web.Contents(BaseURL, [Headers=[#“Content-Type”=“application/json”], Content=Json.FromValue(Credentials), RelativePath=“token/authenticate”])),
Token = Auth[result],
Source = Json.Document(Web.Contents(BaseURL, [Headers=[Accept=“application/json”, #“Authorization”="Bearer " & Token], RelativePath=Path]))

in
Source

@maki

From screenshot we can see that even for authentication you are appending the base url…

Base url is to be appended only for the query urls …

Authentication url is a constant one

https://cloud.uipath.com/identity_/connect/token

Also did you create a external application?

Ideally if mot from swagger then we need to create an external application and use oauth2.0 authentication

This how you can get the bearer token

This is complete postman collection if you need

Cheers

The “Method Not Allowed” error with a status code 405 typically indicates that the HTTP request method you are using is not supported by the web server for the given URL. In this case, it seems that the method you are trying to use is not permitted for the Orchestrator API endpoint you are accessing.

Double-check the URL you are using to access the Orchestrator API. Ensure that it is correctly formatted, including any path and query parameters.

Based on ur submission, ensure that the Path variable contains the correct API endpoint path for accessing Assets in UiPath Orchestrator. The actual path may vary depending on your Orchestrator configuration and the specific endpoint you want to access.

Cheers @maki

@Anil_G @Palaniyappan
thank you for your help. changed the Base URL and got the same error as the first one.
I will create external application and check if the API endpoint is correct.
Let me contact when these are done.

2 Likes

Sure that make sense
Also check with api documentation as well to proceed in right direction
@maki

1 Like

If it’s clarified
Would recommend to close this topic

If not we can keep this discussion open

@maki

Thank you @Palaniyappan.

still trying to create external application but closed this topic!
I will post another topic if any problem happens.
I really appreciate your help.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.