Dashboards & Visualizations

Getting html of an existing dashboard via REST API

ozdavid
Engager

Hey, Is there any way to user the REST API to get the html of an existing dashboard?
I know I can get the XML of a dashboard but I need the html in order to render it in our application(no iframe). 

Tags (1)
1 Solution

niketn
Legend

@ozdavid, sorry I misunderstood your question. Except enabling insecure content as iFrame right now you do not have an option. With the new dashboard framework 3rd Party integration was announced last year but it is not available for general use as underlying framework is rapidly evolving to bring in features as requested.

I would request you to put ideas in ideas.splunk.com or upvote an existing one if already present (link to which is available in the top menu in this community site as well).

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

ashishLSN
Explorer

Hello there,
I also want to render splunk app's dashboard on my website securely, is there any way to render splunk app's dashboard on my web site, i have successfully access an existing dashboard XML definition as per follow this guideline data/ui/views/{name}. Now my Question is how to convert Splunk app's dashboard xml to HTML so we can show that dashboard on my website.

Thanks for your support.

0 Karma

niketn
Legend

@ozdavid if you want html code for dashboard to show up via REST API, you will have to convert your Simple XML dashboard to HTML first (using the convert option on Top Right "..." button from the Edit menu options).

You have to be aware that this action will create a new dashboard (based on the name you chose). But is irreversible i.e. you can not convert HTML dashboard back to SimpleXML and also may loose out on several built in SimpleXML features which you will have to code yourself. For example Dark Theme.

REST API for data views including HTML dashboard remains the same: https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTknowledge#data.2Fui.2Fviews.2F.7Bnam...

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

ozdavid
Engager

@niketn Thanks for answering. this route will give me the XML of the dashboard, but I need to render the dashboard itself, including the results

0 Karma

niketn
Legend

@ozdavid, sorry I misunderstood your question. Except enabling insecure content as iFrame right now you do not have an option. With the new dashboard framework 3rd Party integration was announced last year but it is not available for general use as underlying framework is rapidly evolving to bring in features as requested.

I would request you to put ideas in ideas.splunk.com or upvote an existing one if already present (link to which is available in the top menu in this community site as well).

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...