These are chat archives for getredash/redash

3rd
Aug 2015
marcobu
@marcobu
Aug 03 2015 09:36
@arikfr with 5000 rows it starts getting slower but is still usable. with 10000 I had to wait about a minute to complete the search. I think 5000 can be a good value, but it may vary on another pc.
Alex Wolkov
@altryne
Aug 03 2015 17:12
hey everyone and especially @arikfr , sorry to burge in here
Is there a public api feature in redash? If I want to get some data out of redash programatically?
Arik Fraimovich
@arikfr
Aug 03 2015 17:35
@altryne there is api for everything. I'll post details a little later when I'm near a keyboard
Alex Wolkov
@altryne
Aug 03 2015 17:36
Thanx man
Arik Fraimovich
@arikfr
Aug 03 2015 18:46

To explore the API you can append /api/ to most URLs, for example:

http://demo.redash.io/dashboard/gdelt -> http://demo.redash.io/api/dashboards/gdelt (note that dashboard becomes dashboards)
http://demo.redash.io/queries/4 -> http://demo.redash.io/api/queries/4

To get results for a query you can use the following:
JSON: http://demo.redash.io/api/queries/4/results.json
CSV: http://demo.redash.io/api/queries/4/results.csv

Other resources have API access too, but I assume you need access to the queries. If you have something else in mind, let me know.

If you try the above in the browser, assuming you already logged in to the demo instance, it will just work.
To get it working from a script, you need to add an API key to the request (example: http://demo.redash.io/api/queries/4?api_key=60f0c7364ce547a49b0a297aa549c29bcfcf9db2). Each query has its own API key (which you can see if you click on the key icon in the query page), which lets you access this query and its results using the api. Also each user has an api key, which gives you access to all API resources. Currently there is no UI to show it, but if you browse to /admin/user (as an admin) you can see the api keys there.

  • API keys per user available from v0.6.3.
  • Before v0.7 you had to sign requests rather than just add api key. You can enable api keys instead of signatures in older versions too, let me know if you need details.
^ @altryne
@marcobu got it. I think I'll set the limit on 5K then. Btw, what's your use case for pivot tables?