Dashboards & Visualizations

Creation of one pdf file for 2 dashboard views using rest API

asing13
Path Finder

Hi Team,

I wanted to ask if it is possible to create one pdf file from two dashboards using one rest API call or multiple API calls.

I tried individually and they work as below:

curl -u user:password -k https://localhost:8089/services/pdfgen/render?input-dashboard=health_overview >> test1.pdf       (test1.pdf was created successfully)
curl -u user:password -k https://localhost:8089/services/pdfgen/render?input-dashboard=sales_dashboard >> test2.pdf         (test2.pdf was created successfully)

Now, I have tried the below but none of them seems to work. I am certainly doing something terribly wrong.

 curl -u user:password -k https://localhost:8089/services/pdfgen/render?input-dashboard=health_overview >> test3.pdf
curl -u user:password -k https://localhost:8089/services/pdfgen/render?input-dashboard=sales_dashboard >> test3.pdf

(The result is that only sales_dashboard data is available and over writes health_overview)

Then tried this :

curl -u user:password -k https://localhost:8089/services/pdfgen/render -d input-dashboard=health_overview -d input-dashboard=sales_dashboard_clone_1 >> okdokey.pdf

(The second paramerter(sales_dashboard) overwrites the first written pdf)

 

Then I tried this:

curl -u user:password -k https://localhost:8089/services/pdfgen/render?input-dashboard=sales_dashboard_clone_1?input-dashboard=health_overview >> testClone2.pdf

(And Of course, this was a terrible stupidity and didn't work as expected and threw error. )

I don't want to use any python external module (like pyPDF and pdfwriter) to combine the PDFs.

Any help/workaround would be appreciated. Any out of the box technique would be highly appreciated.

Thanks In Advance!

Regards,
Abhishek Singh

o_calmels
Communicator

Hi Abhishek , 

 

Did you try to create a cheduled view of this dashboard with pdf export configured in the web interface.

Then call this scheduled view trough api. >> https://docs.splunk.com/Documentation/Splunk/8.0.6/RESTREF/RESTsearch

 

asing13
Path Finder

Hi @o_calmels ,

Hope you are doing good during this pandemic.
Actually, I want to combine 2 dashboards in one PDF, I assume that only one PDF could be generated for one dashboard and combining two dashboard to create one PDF is not out of the box. Not sure if my assumption is right or wrong. Could you please help me in understanding the same. 

If you have any links where I could get some info related to combining two dashboards together to generate a single scheduled view which in turn I could send it as a single pdf report then that would be awesome!

Regards,
Abhishek Singh

Get Updates on the Splunk Community!

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...