This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Error:
An error occurred in the ‘’ query. Expression.Error: 3 arguments were passed to a function which expects between 1 and 2.
Details:
Pattern=
Arguments=[List]
Code used (I'm pretty sure it requires a slight tweak somewhere but I'm not sure where - it works if I remove the bit where I provide API token, however, without the token I cannot access the data, so I just need to figure out how to correctly specify the API key in my Power Query):
(ID as text) as table=>
let
Source = Json.Document(Web.Contents("---MY API ADDRESS---",
[RelativePath ="/api/data/"&(ID)&"/"],
[Headers=[#"X-API-KEY"="9999999999999999"]]
))
#"Converted to Table" = Record.ToTable(Source),
#"Pivoted Column" = Table.Pivot(#"Converted to Table", List.Distinct(#"Converted to Table"[Name]), "Name", "Value")
in
#"Pivoted Column"
Solved! Go to Solution.
Hi @Redraidas10
1.May you can refet to the following code
e.g
Source = Json.Document(Web.Contents(PARAM_API_BASE_URL, [RelativePath = "/project/testprj", Headers = [Authorization = "Basic " & Binary.ToText(Text.ToBinary(PARAM_API_USERNAME & ":" & PARAM_API_USER_PASSWORD), BinaryEncoding.Base64), #"APIKey" = PARAM_API_KEY]]))
And you can refer to the following link.
Accessing REST APIs with Basic Auth and API Key in Power Query | John Dalesandro
2.You can try to the following solution.
a.select "Web" in get data in Power BI Desktop.
b.input the URL in basic.
3.Select the "Web API" to access and input your key.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Redraidas10
1.May you can refet to the following code
e.g
Source = Json.Document(Web.Contents(PARAM_API_BASE_URL, [RelativePath = "/project/testprj", Headers = [Authorization = "Basic " & Binary.ToText(Text.ToBinary(PARAM_API_USERNAME & ":" & PARAM_API_USER_PASSWORD), BinaryEncoding.Base64), #"APIKey" = PARAM_API_KEY]]))
And you can refer to the following link.
Accessing REST APIs with Basic Auth and API Key in Power Query | John Dalesandro
2.You can try to the following solution.
a.select "Web" in get data in Power BI Desktop.
b.input the URL in basic.
3.Select the "Web API" to access and input your key.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |