Forum Discussion
Syndicate_Admin
3 years agoAdministrator
Needs some help with RelativePath when using a Headers =[]
I have the following source section of my query, which runs fine, but I'm trying to use RelativePath methodology so I can set up automatic refreshes in PBI service let
Source = (page as text...
- 3 years ago
I resolved this myself, i totally misunderstood the syntaxing here.
the below works in case anyone had to learn this for the first time like i did)
let Source = (page as text) as table => let Source = Json.Document(Web.Contents("https://api.harvestapp.com/v2/invoices", [RelativePath ="?per_page=2000", Query = [page=(page)], Headers=[Authorization="**mykey**", #"Harvest-Account-Id"="******", #"User-Agent"="****"]])), #"Converted to Table" = Table.FromRecords({Source}),
Syndicate_Admin
3 years agoAdministrator
I resolved this myself, i totally misunderstood the syntaxing here.
the below works in case anyone had to learn this for the first time like i did)
let
Source = (page as text) as table =>
let
Source = Json.Document(Web.Contents("https://api.harvestapp.com/v2/invoices",
[RelativePath ="?per_page=2000",
Query = [page=(page)],
Headers=[Authorization="**mykey**", #"Harvest-Account-Id"="******", #"User-Agent"="****"]])),
#"Converted to Table" = Table.FromRecords({Source}),