bradjasper / ImportJSON

Import JSON into Google Sheets, this library adds various ImportJSON functions to your spreadsheet
GNU Lesser General Public License v3.0
2.1k stars 1.06k forks source link

Syntax for ImportJSONViaPost #237

Open zacchaeus80 opened 2 years ago

zacchaeus80 commented 2 years ago

Bit of a newbie question, I'm afraid, but I'm struggling to figure out the correct syntax for using ImportJSONViaPost to access data from the GivEnergy API. The curl syntax is as follows:

curl --request POST \ "https://api.givenergy.cloud/v1/inverter/consequatur/energy-flows" \ --header "Authorization: Bearer {YOUR_API_KEY}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"start_time\": \"2022-01-01\", \"end_time\": \"2022-01-01\", \"grouping\": 0, \"types\": [ 0, 1, 2, 5 ] }"

(Further details here)

Many thanks.