Thanks for reaching out buddy. I tried every possible combination of parameters through postman and in the script but i couldnt get a direct post request to results api to work. I then realized that it would be better if try to understand the polling refresh script on redash toolbelt. Dove a little deeper into that and I was able to get the script running for my query on redash.
If you are part of the dev team at redash, I would strongly suggest to update documentation on API page, where it should explain that the logical flow for writing an api in python should be to first get the job value from ‘refresh’ end point and then use that value as input to ‘results’ end point to get your query results as json response. Also parameters go in as p_“your parameter name” and not in the format specified on the api page.
Once again, thanks for reaching out man, cheers