Forum Discussion
How to connect a Rest API with variable path parameters as endpoints in URL with Power BI?
- Anonymous4 years ago
HI ANNOAH,
You can create a query aptamer with text type and invoke it in your query table steps, then you can change the query parameter by rest API to dynamic affect the data source target:
let Path = "/name/server/api/" & Parameter, Result = Web.Contents( "https://test.com", [ Headers = [ Authorization = "Bearer " + token, RelativePath = Path ] ] ) in ResultDatasets - Update Parameters In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs
Regards,
Xiaoxin Sheng
HI ANNOAH,
You can create a query aptamer with text type and invoke it in your query table steps, then you can change the query parameter by rest API to dynamic affect the data source target:
let
Path = "/name/server/api/" & Parameter,
Result =
Web.Contents(
"https://test.com",
[
Headers = [
Authorization = "Bearer " + token,
RelativePath = Path
]
]
)
in
Result
Datasets - Update Parameters In Group - REST API (Power BI Power BI REST APIs) | Microsoft Docs
Regards,
Xiaoxin Sheng
- ANNOAH4 years agoNew Member
Hi Xiaoxin,
thank you for your answer!
My issue is that I have to use path parameters (not only text, but also integer) and no query parameters. Is there any solution for path parameters?
Best regards