Dashboards & Visualizations

Unable to render Dashboard to PDF with REST API

Ethil
Path Finder

Hello everyone, and thanks in advance for your help. I'm very new to this subject so if anything is unclear, i'll try to explain my problem more in details.

I'm using spunk 9.2.1, and i'm trying to generate a PDF from one of my dashboard, using a splunk API call. From what i saw online, i should use :

GET /services/pdfgen/render?input-dashboard=<DashboardName>&namespace=<AppName>&paper-size=a4-landscape

 

 

user = MyUser; app = MyApp; dashboard = Security_events_dashboard

(i'm using a module that calls the API for me, all i do is precise the endpoint and the parameters and it gives me the response as a string)

The problem is that i get this error :

 

Unable to render PDF.<br/><ul><il>Bailing out of Integrated PDF Generation. Exception raised while preparing to render "Untitled" to PDF. [HTTP 404] https://localhost:8089/servicesNS/MyUser/MyApp/data/ui/views/Security_events_dashboard; [{'type': 'ERROR', 'code': None, 'text': 'Could not find object id=Security_events_dashboard'}]</li></ul>

 

 

On th GUI, signed as MyUser, i can see the dashboard under MyApp, and the permission is set to read for MyUser, Owner = nobody, Sharing = App. To confirm this, on my Search-Head VM i can see the dashboard under $SPLUNK_HOME/etc/apps/MyApp/default/data/ui/views/security_events_dashboard.xml. Plus in $SPLUNK_HOME/etc/apps/MyApp/metadata/default.meta :

 

[views/security_events_dashboard.xml]
access = read : [MyUser], write : [admin]
owner = nobody
version = 9.1.0.1
export = system

 

 

I've tried using the dashboard name as security_events_dashboard (instead of Security_events_dashboard) but i get the same error.

I don't see what i'm missing here, si if anyone could give me hint or two please,

thank you

Labels (1)
0 Karma
1 Solution

Ethil
Path Finder

Yeah i know the problem was quite specific, sorry for the late answer and thanks for your help. I was able to determine what failed, the GET was actually supposed to be a POST request. I don't really know why but one splunk error message said that the GET is outdated for pdfgen. Anyway thanks again.

View solution in original post

0 Karma

bowesmana
SplunkTrust
SplunkTrust

I can't answer your specific question other than to ask if you have inputs or tokens, which are discussed from other users who have similar questions.

However, there is a relatively new app

https://splunkbase.splunk.com/app/7171

which may be of interest, as it will give you more control over the output.

 

Ethil
Path Finder

Yeah i know the problem was quite specific, sorry for the late answer and thanks for your help. I was able to determine what failed, the GET was actually supposed to be a POST request. I don't really know why but one splunk error message said that the GET is outdated for pdfgen. Anyway thanks again.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Agentic SOC Triage: Investigating Splunk ES Notables with MCP Server and a Local LLM

The Problem: Too Many Alerts, Too Little Context Security operations teams running Splunk Enterprise Security ...

All Work and No Play? Not at .conf26! Unwind at These Evening Events

Between hands-on technical sessions, keynote reveals, and diving into live architectures, .conf26 is packed ...

Join the Hackathon at .conf26 and build a No-Code AI agent

Join us for the AI Agent Buildathon, an in-person, three-hour hands-on Hackathon where you’ll use Splunk Agent ...