Logo

Redash

Authentication Type: API Key Description: Open-source data visualization and dashboarding platform for querying databases, running saved queries, and retrieving results.


Authentication

To authenticate, you'll need a Redash API key and your instance URL:

  1. Log in to your Redash instance
  2. Click your profile icon in the top-right, then Profile
  3. Under API Key, copy your key (or regenerate one)
  4. Your base URL is the root URL of your Redash instance (e.g., https://redash.yourcompany.com)

For more information, visit the Redash API documentation.


Queries

List Queries

List all saved queries in Redash with pagination. Returns query names, descriptions, schedules, and metadata.

Operation Type: Query (Read)

Parameters:

  • page number (nullable): Page number for pagination (default 1)
  • pageSize number (nullable): Number of results per page (default 25)

Returns:

  • count number: Total number of queries
  • page number: Current page number
  • page_size number: Results per page
  • results array of objects: List of saved queries
    • id number: Query ID
    • name string: Query name
    • description string (nullable): Query description
    • schedule string (nullable): Query schedule configuration
    • created_at string: Creation timestamp
    • updated_at string: Last update timestamp

Example Usage:

{
  "page": 1,
  "pageSize": 25
}

Get Query

Get a specific saved query by ID, including its SQL text, data source, schedule, and metadata.

Operation Type: Query (Read)

Parameters:

  • queryId number (required): The ID of the query to retrieve

Returns:

  • id number: Query ID
  • name string: Query name
  • description string (nullable): Query description
  • query string: The SQL query text
  • data_source_id number: Data source ID
  • schedule string (nullable): Query schedule configuration
  • created_at string: Creation timestamp
  • updated_at string: Last update timestamp
  • is_archived boolean: Whether the query is archived
  • is_draft boolean: Whether the query is a draft
  • tags array of strings: Query tags

Example Usage:

{
  "queryId": 42
}

Run Query

Execute a saved Redash query by ID, optionally with parameters. Waits for results with automatic polling for async jobs.

Operation Type: Query (Read)

Parameters:

  • queryId number (required): The ID of the query to execute
  • parameters string (nullable): JSON-encoded object of query parameters (e.g. {"date_range": "d_last_7_days"}), or null for no parameters

Returns:

  • columns array of objects: Column definitions of the result set
    • name string: Column name
    • type string: Column type
  • rows array of objects: Result rows as key-value objects

Example Usage:

{
  "queryId": 42,
  "parameters": "{\"start_date\": \"2025-01-01\", \"end_date\": \"2025-03-31\"}"
}

Get Query Results

Retrieve the most recently cached results for a saved query. Does not trigger a new execution.

Operation Type: Query (Read)

Parameters:

  • queryId number (required): The ID of the query whose cached results to retrieve

Returns:

  • columns array of objects: Column definitions of the result set
    • name string: Column name
    • type string: Column type
  • rows array of objects: Result rows as key-value objects
  • retrieved_at string: Timestamp when these results were last retrieved

Example Usage:

{
  "queryId": 42
}

Common Use Cases

Data Analysis:

  • Run saved queries to generate reports on demand
  • Execute parameterized queries for date-range or filter-based analysis
  • Retrieve cached results for quick access to recent data

Query Management:

  • List all saved queries to discover available reports and dashboards
  • Get query details to inspect SQL, data sources, and schedules
  • Check query metadata like tags, archive status, and last update time

Automated Reporting:

  • Trigger query executions as part of automated workflows
  • Pull query results into downstream systems for processing
  • Monitor query schedules and ensure data freshness