I am trying to add a REST API to my powerBI report as a data source. The API uses Basic authentication. However, I don't want to keep my token in an unencrypted form in the query editor.
Currently, I am able to make it work by using the following in Advanced Query Editor with Anonymous authentication:
let
token = "apiKey",
options = [Headers=[Authorization="Basic " & token]],
Source = Json.Document(Web.Contents("https://api-url/api/v1/application", options))
in
Source
However, I am trying to use a method, so that I can put my apiKey in the data source credentials, and eventually keep this value as private.

