I have a REST API data source which I connected to successfully from Power BI Desktop (using Feb. version). When I publish to service (free), I can't refresh: "Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again".
In the Data Source Credentials / edit credentials, I have 3 options: anonymous, windows and basic. No option to enter key.
In desktop, I finally used (had to use parameters as a work around for refresh and #"param" for the "-" char):
Source = Json.Document(Web.Contents("https://api......./messages/topic", [RelativePath = "/.....141", ApiKeyName = "api-key", Query = [#"start-date" = dt5, #"end-date" = dt2 ] ])),
and entered the key in the interface (web api). I also tried sending it in header: Headers=[Authorization="api-key <key>"].
Is refresh for this scenario supported in service?