Sometimes you need to visualize data not contained in an RDBMS or NOSQL data store. For those times, Redash provides two URL-based mechanisms to pull in your data:
JSON. Either source can be added from the settings screen in Redash.
JSON data source is currently only available as part of SaaS Redash. This page will be updated when it is added to the Open Source version as well. This is expected in the next major version release (version 8).
URL, you can load large amounts of tabular data while abstracting away the underlying storage mechanism. This data source allows you to explicitly declare the types of data returned (text, dates, numbers e.g.).
The features of the
URL data source will eventually be rolled into the
JSON data source. At that time, the
URL data source will be deprecated and this documentation will be updated. For future development we recommend using the
JSON data source.
Now you can use the
JSON data source for tabular data, non-tabular data, or API's where you do not control the underlying data structure. Redash treats all incoming data from the
JSON data source as text; so you should be prepared to use table formatting when rendering the data.
If the server behind your
URL data source requires HTTP authentication headers, you can enter them during data source setup. For the
JSON data source, authentication must be explicitly passed in your queries.
URL data source expects your endpoints to return tabular data in JSON format.
The body of your query will include only the URL that returns data, for example:
To manipulate the data (filter, sort, aggregate etc.) you can use the Query Results Data Source.
The returned object must expose two keys:
name keys described in your
The following data types are supported for columns:
An example of returned data appears below:
JSON Data Source to query arbitrary JSON API's. Setup is easy because no authentication is needed. Any RESTful JSON API will handle authentication through HTTP headers. So just create a new Data Source of type
JSON and name it whatever you like ("JSON" is a good choice).
This Data Source takes queries in YAML format. Here's some examples using the GitHub API:
Return a list of objects from an endpoint
This will return the result of the above API call as is.
Return a single object
The above API call returns a single object, and this object is being converted to a row.
Return Specific Fields
In case you want to pick only specific fields from the resulting object(s), you can pass the
fields: [number, title]
Return an inner object
Many JSON API's can return nested objects. You can access a nested object with the
The above query will use the
assignee objects from the API result as the query result.
Pass query string parameters
You can either craft your own URLs, or you can pass the
q: is:open type:pr repo:getredash/redash
The above is the same as:
Additional HTTP Options
You can pass additional keys to modify various HTTP options:
method - the HTTP method to use (default:
headers - a dictionary of headers to send with the request
auth - basic authentication username/password (should be passed as an array:
params - a dictionary of query string parameters to add to the URL
data - a dictionary of values to use as request body
json - same as
data except that it's being converted to JSON