Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
274188A
Frequent Visitor

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?

1 ACCEPTED SOLUTION
wikkleyn
Solution Supplier
Solution Supplier

Hi @274188A , What we've done is create a gateway connection and set the Authentication as Anonymous. Map your dataflow to the connection.

 

wikkleyn_0-1667203837407.png

 

View solution in original post

1 REPLY 1
wikkleyn
Solution Supplier
Solution Supplier

Hi @274188A , What we've done is create a gateway connection and set the Authentication as Anonymous. Map your dataflow to the connection.

 

wikkleyn_0-1667203837407.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors