-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Generate a Filtered Screenshots of Dashboard Charts #32037
Comments
Hello @juliacebria! I'm here to help you with any bugs, questions, or contributions you have. There is a way to pass filters when generating a screenshot via the API in Apache Superset. You can use the Additionally, you can generate a PDF of the dashboard with the applied filters. The process involves caching the screenshot and then retrieving it in PDF format using functions like To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
A 404 Not Found response when accessing the
Please verify these aspects to resolve the 404 error. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Thank you! That worked and now I get Status Code: 202 and the cache_key. No obstant, I'm encountering a 404 Not Found error when trying to retrieve a cached screenshot using the following API endpoint: GET http://localhost:8088/api/v1/dashboard/2/screenshot/{cache_key}/ The cache_key I received from a previous API call is bed09521aa9f663df42b625577cff7b5. I correctly replace {cache_key} with the actual value, but I still get the 404 Not Found error, with the following response: { |
A 404 Not Found error when trying to retrieve a cached screenshot using the cache_key can occur for a couple of reasons:
Make sure that the cache_key is valid and that the cache is properly configured and operational. If the cache key was set with a timeout, it might have expired, leading to the screenshot not being found in the cache [1]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
@dosu However, when I try to fetch the screenshot using the generated cache_key with the following endpoint:
I get a 404 Not Found error with the response message "Not found", even though the dashboard exists and the cache key seems correct. |
Discussed in #32036
Originally posted by juliacebria January 30, 2025
I have a dashboard with multiple charts, each showing data for different counties. I need to generate a PDF for each county with the relevant filtered data.
If generating a filtered PDF is not possible, I want to capture a screenshot of each chart individually with the county filter applied. However, when using GET /api/v1/chart/{pk}/cache_screenshot/, the API does not allow filtering.
Is there a way to pass filters when generating a screenshot via API, or an alternative method to schedule or generate a filtered PDF of the dashboard?
The text was updated successfully, but these errors were encountered: