Forum Discussion
Using a blank query POST API connection that generates a zip file with a CSV file into Power Query
Hey Artemus,
This is what I was initially putting into the Advance editor for a blank query based on the instructions of the API:
let
url = "https://files.usaspending.gov/generated_downloads/COVID-19_Profile_2020-07-09_H17M39S27272793.zip",
body = " {
""filters"": {
""def_codes"": [""L"", ""M"", ""N"", ""O"", ""P"", ""U""]
}
}",
Source = Json.Document(Web.Contents(url,[Content=Text.ToBinary(body),Headers=[#"Content-Type"="application/json"]]))
in
Source
With the json query you gave me I see I add the url but I don't know what to put in place for the parameters. Would your option look like this:
let
Source = Web.Contents("https:/api.usaspending.gov//api/v2/download/disaster/"),
#"Imported JSON" = Table.FromRecords(Json.Document(Source,65001)[value])
in
#"Imported JSON"