Hello! My dashboard has a Text or Category filter . Let's say the filter name is test filter
and the condition is to contain abc
. The code I used to generate iframe url is as follows:
METABASE_SITE_URL = "http://localhost:3000"
METABASE_SECRET_KEY = "my secret key"
payload = {
"resource": {
"dashboard": 1
},
"params": {
"test filter": "abc"
},
"exp": round(time.time()) + (60 * 30) # 10 minute expiration
}
token = jwt.encode(payload, METABASE_SECRET_KEY, algorithm="HS256")
iframeUrl = METABASE_SITE_URL + "/embed/dashboard/" + token + "#bordered=true&titled=true"
I added the filter to params. The iframe url shows the dashboard but the added filter doesn't work. That is, the charts on the dashboard showed unfiltered result.
I also tried adding the filter at the end of ifame url like this: my_iframe_url?test_filter=abc
but it still doesn't work, the result is the same as above, no filter applied.
Is there a way to add dashboard filter to the iframe url? Thanks!