I recently came across creating the dashboards in SPLUNk that has json as the content (not XML) using Dashboard studio. But I am not able to create these dashboards using the rest end point that we have to create the dashboards with XML as it's data i.e
I hope you have used below API for creating dashboard.
curl -ku admin:changeme https://localhost:8089/servicesNS/admin/search/data/ui/views/ -d 'name=newdash' -d 'eai:data=<put your xml here>'
For Deployment of Dashboards generated from Dashboard Studio, you still need to send XML which will have JSON definition.
You can find the dashboard XML in same folder where old one are created. It will look like this.
You have to pass this XML as eai:data parameter in API.
Sample API Call:
curl -ku admin:admin123 https://localhost:8089/servicesNS/admin/search/data/ui/views/ -d 'name=newdash' -d 'eai:data=<dashboard version="2" theme="light"><label>Sample Dashboard Studio 1</label><description></description><definition><![CDATA[{"visualizations":{"viz_GnINCxpe":{"type":"viz.pie","options":{},"dataSources":{"primary":"ds_6EQA5AdB"}}},"dataSources":{"ds_6EQA5AdB":{"type":"ds.search","options":{"query":"| makeresults count=5 \n| eval a=1 \n| accum a \n| stats count by a"},"name":"Search_1"}},"defaults":{"dataSources":{"ds.search":{"options":{"queryParameters":{"latest":"$global_time.latest$","earliest":"$global_time.earliest$"}}}}},"inputs":{"input_global_trp":{"type":"input.timerange","options":{"token":"global_time","defaultValue":"-24h@h,now"},"title":"Global Time Range"}},"layout":{"type":"grid","options":{},"structure":[{"item":"viz_GnINCxpe","type":"block","position":{"x":0,"y":0,"w":1200,"h":400}}],"globalInputs":["input_global_trp"]},"description":"","title":"Sample Dashboard Studio"}]]></definition><assets><![CDATA[{}]]></assets></dashboard>'
Just try this and let me know if any issue.
Thanks
KV
▄︻̷̿┻̿═━一
If this reply helps you, an upvote would be appreciated.
That thing actually helped me. Thank you so much for your updates.