Connection PowerBI to UiPath API -> get rid of the OrgID restriction

Dear everyone,

I’m new to this forum and of course I came here with a question :wink:
I’ve been building reports on our UiPath acvtivities with Power BI for quite a while now and I’m fairly experienced with the data model. So far we’ve been connecting Power BI to the UiPath SQL database and everything was working fine.

However, due to company restrictions, people asked my to switch to the UiPath REST API when retrieving the data. I have already managed to authenticate against the API, retrieving a token with the following Query:

let
Source = Json.Document(Web.Contents(“https://XXX/api/account/authenticate”,[Headers = [#“Content-Type”=“application/json”], Content=Text.ToBinary("{"“tenancyName”": ““XXX””,"“UsernameOrEmailAddress”": ““XXX””,"“Password”": ““XXX””}")]))
in
Source

Then I was trying to retrieve a list of all QueueItems with the following query:

let
Source = Json.Document(Web.Contents(“https://XXX/odata/QueueItems”, [Headers=[#“x-uipath-organizationunitid”=“98”, ContentType=“application/json”, Authorization="Bearer "&List.First(Token)]]))
in
Source

My problem is the following: I seem to have to filter by the OrgUnitID (in this case 98) and I want to avoid that. I just want to get a list of all QueueItems, no matter in which OrgUnit they are sitting.
Is there a way to manipulate the query accordingly, so that it returns all Queue Items?

Best regards and stay healthy!

Paul

1 Like