Forum Discussion

VIPDRE's avatar
VIPDRE
Regular Visitor
5 years ago

What if datasource via Json API has a required parameter?

I access my datasoudatasource via a Json API. One of the queries has a required parameter for a date-time field in the format YYYY-mm-dd.

 

How do I pass a parameter value so that I can preview the data in Query Editor?

My ultimate goal is to automagically pass the value for the date the query was last refreshed.

Here is the string

= Json.Document(Web.Contents("https://survey.XXXXX.com/api" & "/answers", [Timeout=#duration(0, 0, 3, 0), Headers=[#"x-api-key"="123456789"]]))

 

Thoughts?

 

 

1 Reply

  • Power BI has no memory.  Store your parameter in an external table (SQL, Sharepoint List, Excel etc) and use that as an additional data source.  You can write back to that data source with View.NativeQuery, or you can control the dataset refresh completely from the external system (for example via Power Automate).