Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
monkeysocks
Frequent Visitor

API calls using field as a URL parameter

Hi,

 

I am new to calling API's from Power BI and would very much welcome any help I can get.

 

I have 2 commands that I need to run the first is:

https://SERVER/api/?apikey=yourAPItoken&service=list_clients

This gives me all the clients, next I want to know all the sites of all the clients through running the next command

 

The second is:

https://SERVER/api/?apikey=yourAPItoken&service=list_sites&clientid=CLIENTID

The clientid is a required parameter and is returned from the first command. I need to be able to run it for all clientid's through just the one query but I am not sure how to achieve this. Any help/direction would be gretly appreciated.

 

Thanks in advance,

 

Lara

1 ACCEPTED SOLUTION

I have resolved this issue by completely removing the Change Type step

View solution in original post

2 REPLIES 2
monkeysocks
Frequent Visitor

I have managed to resolve this issue with a function which has worked perfectly. I have repeated the command several layers down which has worked up until the last layer where the following error has occurred:

 

"Expression.Error: The column 'Attribute:status' of the table wasn't found.
Details:
Attribute:status"

 

I have gone to advanced editor and this column is present so not sure why it is producing this error.

 

let
Source = Xml.Tables(Web.Contents("MYURL")),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Attribute:created", type datetimezone}, {"Attribute:host", type text}, {"Attribute:status", type text}}),
#"Expanded error" = Table.ExpandTableColumn(#"Changed Type", "error", {"errorcode", "message"}, {"error.errorcode", "error.message"})
in
#"Expanded error"

 

Does anyone have any ideas why I am getting the error despite the column being there and what I need to do to rectify it?

 

Any help would be greatly appreciated. Thanks in advance!

 

Lara

I have resolved this issue by completely removing the Change Type step

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.