maki
(Maki)
September 21, 2023, 8:29am
1
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?
Anil_G
(Anil Gorthi)
September 21, 2023, 8:35am
2
@maki
Please show what url are you using
cheers
maki
(Maki)
September 21, 2023, 11:51pm
3
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
Anil_G
(Anil Gorthi)
September 22, 2023, 5:03am
5
@maki
The base url shpuld be the url of your orchestrator exactly…please use the same…open orchestrator and copy till Orchestrator word
Cheers
maki
(Maki)
September 22, 2023, 8:30am
6
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?
Anil_G
(Anil Gorthi)
September 22, 2023, 10:13am
7
@maki
Can you please show the implementation screenshot
cheers
maki
(Maki)
September 25, 2023, 4:15am
8
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
Anil_G
(Anil Gorthi)
September 25, 2023, 4:23am
9
@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
Palaniyappan
(Palaniyappan P )
September 25, 2023, 4:25am
10
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
maki
(Maki)
September 25, 2023, 7:37am
11
@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
Palaniyappan
(Palaniyappan P )
September 25, 2023, 7:41am
12
Sure that make sense
Also check with api documentation as well to proceed in right direction
@maki
1 Like
Palaniyappan
(Palaniyappan P )
September 26, 2023, 6:58am
13
If it’s clarified
Would recommend to close this topic
Forum FAQ - How to mark a post as a solution
This document is part of our beginners guide .
This article will teach you how to properly mark a post as a solution.
We were closely following our last UiPath Forum feedback round! topic and carefully extracted all the bits of feedback that was provided. As such, we would like to tackle the topic of solutions on our Forum and how to properly use them.
When is the topic resolved?
The topic can be considered resolved when the topic author has fo…
If not we can keep this discussion open
@maki
maki
(Maki)
September 27, 2023, 7:10am
14
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
system
(system)
Closed
September 30, 2023, 7:11am
15
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.