The authentication is probably throwing an error because it’s expecting a base64 encoded version of “username:password” not just “username, password”.
You’re trying to do a SQL Query so the “template” field in the parameters is unnecessary.
I assume ‘path’ is coming from the function sheet you linked to but you’re not calling the function sheet so the path variable doesn’t exist in our API endpoint, it would be ‘storage’
I’m very curious of how that code sample works. There very well may be something I’m missing as I’m reading through the script there. However, below is a sample script output from Postman for using this API endpoint if it helps.
note that I did a base64 encode of “username:password” which is being used here as dXNlcm5hbWU6cGFzc3dvcmQ=
Postman definitely helps a lot for building the APIs. For one, it does the basic auth for you. The POST calls are slightly different as you need to define the JSON body. You can download our swagger file and import to Postman to make it tons easier. The only thing thats difficult here is that the reports endpoint has a lot of different options when building the body depending on the report you intend to create.