I get a status code 200 but when I call response.json() I get an error: in fact, if I inspect the headers, Content-Type is not application/json but text/html instead, and inspecting response.text I get a bunch of meaningless HTML tags, with no actual content inside.
I am using my own user API key (admin one) and this is what my params look like:
Remember that running queries with parameters is an asynchronous process. You’ll basically always need more than one network request to get there results. The first request kicks off the execution. The second request checks the status of the execution. Repeat the second request until a query_result_id is returned. The third request actually retrieves the query result contents.
Here is a simple a simple example using the results endpoint.
First Request
Post to /api/queries/1010101/results
Request body JSON looks like this:
I started from documentation but not being able to make it work I went back in time. I meant to use the gist from redash toolbelt.
Anyway, when I use the /results API, I get a 404 that says: “Hey, there’s not any cached job for this query etc… maybe you should try the “/refresh” endpoint”. Which is what let me to try also using /refresh.
I understood that refreshing a query with parameters is a 2 step job, problem is, I can’t manage to make it go and produce new results. I don’t get a new job ID from the first request