Is there a supported way to deeplink to a dashboard with pre-applied filters from an external tool? #41512
-
|
I'm integrating an external tool (Retool) with Apache Superset. Is there an officially supported way to do this? Ideally something like a URL that accepts filter values as parameters and opens the dashboard with those filters pre-applied-similar to a deeplink. I looked into native_filters_key in the dashboard URL but couldn't find a public API or documented approach for generating that key programmatically from outside Superset. Any guidance on the recommended approach would be appreciated.@dosu |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Yes, there is a supported path, but I would avoid trying to synthesize The approach I would use from an external app like Retool is:
The relevant Superset APIs are:
So the external tool should call Superset's API first, receive the generated key, then open the dashboard with that generated state applied. For embedded dashboards, the same idea applies: pass the generated permalink key through the embedded SDK URL params rather than hand-building the native filter URL. Docs: |
Beta Was this translation helpful? Give feedback.
-
|
There are a few supported approaches for deeplinking to a Superset dashboard with pre-applied filters from an external tool like Retool: 1. Rison-Encoded URL Filters (Newest approach) As of a recent merge, Superset supports passing filters directly in the URL using Rison encoding [1]: This matches filters by column name (case-insensitive, whitespace-tolerant) and auto-applies them. Unmatched filters are displayed as removable chips. This is likely the simplest option for your use case since you just need to construct the URL in Retool. 2. Dashboard Permalink API (Best for persistent/shareable links) You can programmatically create a permalink that encodes the full filter state:
The 3. Filter State API (Temporary/session-based) There's also a temporary filter state API at For your Retool integration, the Rison-encoded URL approach (#1) is probably the easiest — you just build the URL string with your job ID and date as parameters. If you need more durable links or complex filter states, the Permalink API (#2) would work but requires an API call to Superset first. Note that the Rison URL filter feature is quite new, so make sure your Superset version includes it. If you're on an older version, the Permalink API is your best bet. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Beta Was this translation helpful? Give feedback.
Yes, there is a supported path, but I would avoid trying to synthesize
native_filters_keyyourself. Treat that value as a server-generated state key.The approach I would use from an external app like Retool is:
The relevant Superset APIs are:
POST /api/v1/dashboard/{pk}/filter_statePOST /api/v1/dashboard/{pk}/permalinkSo the external tool should call Superset's API firs…