These are chat archives for getredash/redash

27th
Jul 2015
Rahul Ghose
@rghose
Jul 27 2015 07:18
so I was trying to get a curl request working with the API key for a query to download the csv generated. How would that work?
I am trying like this: curl -X POST -d 'user_id=<api_key>' "http://redash/api/queries/51/results/2964.csv"
get this: {"status": 405, "message": "Method Not Allowed"}
Arik Fraimovich
@arikfr
Jul 27 2015 07:21
@rghose it should be a GET request. also, did you set the authentication method to be api key based (vs. hmac)? if you're running on version older than 0.7, you need to do this explicitly in the settings file
@rghose once you define it, you add the api_key as a query string parma -> http://redash/api/queries/51/results.csv?api_key=...
Rahul Ghose
@rghose
Jul 27 2015 07:22
so the API_KEY remains a constant in the .env file?
Arik Fraimovich
@arikfr
Jul 27 2015 07:22
@rghose note that if you don't specify the query results id, it will just use the latest one
@rghose no. it's just a setting to tell it to use api key validation vs. signature validation.
you need to add export REDASH_AUTH_TYPE=api_key to the env file
Rahul Ghose
@rghose
Jul 27 2015 07:23
okay thanks :)
lemme try it out
Arik Fraimovich
@arikfr
Jul 27 2015 07:23
(and restart the server after , of course)
also, each query has its own api key, but also each user has an api key that gives access to all queries/resources
Rahul Ghose
@rghose
Jul 27 2015 07:23
wait, does this mean google aps login won't work
apps*
I meant login with google?
Arik Fraimovich
@arikfr
Jul 27 2015 07:25
@rghose no, this setting is only defining how we validate the api key based calls
Google OAuth will keep working
Rahul Ghose
@rghose
Jul 27 2015 07:26
ok cool
Rahul Ghose
@rghose
Jul 27 2015 07:38
so I was about to upgrade, but the upgrader keeps asking for a password. I am upgrading from a passwordless user with just a key.
Arik Fraimovich
@arikfr
Jul 27 2015 07:49
@rghose you need to pass to the fabric the path to your key file (with -i, like the ssh command)
fixed it
j0t3x
@j0t3x
Jul 27 2015 15:40
@arikfr it says query in queue