dosubot[bot] commented on issue #32037:
URL: https://github.com/apache/superset/issues/32037#issuecomment-2623919706

   <!-- Greeting -->
   Hello @juliacebria! I'm here to help you with any bugs, questions, or 
contributions you have.
   
   <!-- Answer -->
   There is a way to pass filters when generating a screenshot via the API in 
Apache Superset. You can use the `DownloadScreenshot` component, which utilizes 
the `dataMask` from the Redux state to include the current filter state of the 
dashboard. This `dataMask` is part of the `jsonPayload` in the POST request to 
the `/api/v1/dashboard/${dashboardId}/cache_dashboard_screenshot/` endpoint, 
ensuring that the screenshot reflects the current filters applied to the 
dashboard 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx)</sup>.
   
   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 `cache_dashboard_screenshot` and 
`build_pdf_from_screenshots`, which ensure that the PDF reflects the current 
state of the dashboard, including any filters 
<sup>[[2]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboards/api_tests.py)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/e39610ab-78fd-4172-bd9c-0194f5693861?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/e39610ab-78fd-4172-bd9c-0194f5693861?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/e39610ab-78fd-4172-bd9c-0194f5693861?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/e39610ab-78fd-4172-bd9c-0194f5693861?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/e39610ab-78fd-4172-bd9c-0194f5693861?feedback_type=hallucination)
 | 
[Other](https://app.dosu.dev/response-feedback/e39610ab-78fd-4172-bd9c-0194f5693861?feedback_type=other)</sup>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to