Forum Discussion

Redraidas10's avatar
Redraidas10
Frequent Visitor
3 years ago
Solved

Help needed with setting up a parameter for my API (To loop through multiple APIs)

Hi everyone! Basically, I'm trying to create a parameter for my API, where I could feed various IDs to it. The problem is that I get the following error when I try to feed ID to it: Error: ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    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.