Forum Discussion
Defining a New Dataflow - using a restful API endpoint
I am creating a new Dataflow with the data source connector template "Blank query". I'm using blank query because it the only option that allows me to use a security token.
The motivation for trying to build a dataflow is that we now have more than one report using the exact-same-datasource and transformations.
The raw query I'm about to show you works perfectly in a non-dataflow context and has been in operation for over a year.
here is the query (sensitive keys/data replaced)
let
actualUrl = "https://some-endpoint.com/api/",
record = [token="SOME-SECRET-TOKEN-VALUE",
content="record",
format="csv"
],
body = Text.ToBinary(Uri.BuildQueryString(record)),
options = [Headers =[#"Content-type"="application/x-www-form-urlencoded"], Content=body],
result = Web.Contents(actualUrl, options),
#"Imported as CSV" = Csv.Document(result, [Delimiter = ",", Encoding = 65001, QuoteStyle = QuoteStyle.Csv]),
#"Promoted Headers" = Table.PromoteHeaders(#"Imported as CSV", [PromoteAllScalars = true])
in
#"Promoted Headers"
Unfortunatley I can't get the dataflow to skip the authentication part (which is possible when not using a dataflow)
Does anyone know if dataflows are even possible if the datasource is a webapi using a token in the header?
- Anonymous3 years ago
Hi 274188A , What we've done is create a gateway connection and set the Authentication as Anonymous. Map your dataflow to the connection.
1 Reply
- AnonymousNot applicable
Hi 274188A , What we've done is create a gateway connection and set the Authentication as Anonymous. Map your dataflow to the connection.