Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have about 10 queries that are made to a JSON / REST API.
The format of the URLs is:
http://api.accounturl.company.com/api/v2/method/?auth_key=XXXXXXXXXXXXXXXXX&format=json¶meter1=100000¶meter2=10000
Some parameters and their values change in each query.
My goal is to be able to modify the beginning of the URL including auth_key parameter "http: //api.accounturl.company.com/api/v2/method/?auth_key=XXXXXXXXXXXXXXXXX" in all queries, so that the parameters configured in each one persist.
The "RelativePath" option could be a solution.
I tried:
let
Origen = Json.Document(Web.Contents("http://api.accounturl.company.com/api/v2",
[RelativePath="/api/v2/method/?auth_key=XXXXXX&format=json¶meter1=100000¶meter2=10000"]
)),
This function properly, but I need to change auth_key parameter in all queries.
So, I tried this:
let
Origen = Json.Document(Web.Contents("http://api.accounturl.company.com/api/v2/method/?auth_key=XXXXXXX",
[RelativePath="&format=json¶meter1=100000¶meter2=10000"]
)),
By this way, the DataSourcePath/URL is incorrect:
DataSourcePath=http://api.accounturl.company.com/api/v2/method/&format=json¶meter1=100000¶meter2=10000
Url=http://api.accounturl.company.com/api/v2/method/&format=json¶meter1=100000¶meter2=10000?auth_key=XXXXXXXX
I am starting to use PowerBI, maybe there is a simpler solution.
Seems like you might want to use query parameters? Tough to say exactly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 161 | |
| 132 | |
| 117 | |
| 79 | |
| 53 |