Getting the whole dashboard data and transforming it into JSON

Hi,

I’m currently working on a project where I need to scrape the entire content of a dashboard from a custom-built Panel Plugin. My goal is to extract all the dashboard data, including any filters and settings applied by the user, and convert this information into JSON format.

While I know it’s possible to retrieve the underlying data from the relevant datasources, as far as I understand, this typically excludes the applied filters and pre-calculations performed within the dashboard.

For example, if a table panel looks like this:

name payment price
Pete card 12€
Frank cash 9€

It should be converted into:

{“panel1”: [{“name”: “Pete”, “payment”: “card”, “price”: “12€”}, {“name”: “Frank”, “payment”: “cash”, “price”: “9€”}]}

I hope the question is clear. Thanks in advance for your help!

welcome @zeidlennart

worth checking out this section in ini

[auditing]
# Enable the auditing feature
enabled = false
# List of enabled loggers
loggers = file
# Keep dashboard content in the logs (request or response fields); this can significantly increase the size of your logs.
log_dashboard_content = false
# Keep requests and responses body; this can significantly increase the size of your logs.
verbose = false
# Write an audit log for every status code.
# By default it only logs the following ones: 2XX, 3XX, 401, 403 and 500.
log_all_status_codes = false
# Maximum response body (in bytes) to be audited; 500KiB by default.
# May help reducing the memory footprint caused by auditing.
max_response_size_bytes = 512000

and this one

# Log web requests
router_logging = true

then look at your log file

logger=context userId=1 orgId=1 uname=admin t=2025-02-16T09:24:53.3937655-08:00 
level=info msg="Request Completed" method=POST path=/api/user/auth-tokens/rotate status=200 
remote_addr=[::1] time_ms=67 duration=67.6262ms size=2 
referer="http://localhost:1100/d/cecny04x8vmkgd/airline-seats?from=now-6h&orgId=1&timezone=browser&to=now" 
handler=/api/user/auth-tokens/rotate status_source=server