Getting Data In

Can I get the iframe embed URL for a report via the REST API?

sjodle
Path Finder

I'm hoping to build a product that allows users to easily select a report from their Splunk instance and embed it in a page. Is it possible to either retrieve or generate the iframe embed URL for a report from the REST API? Optionally, can I enable embedding for a report through the REST API?

0 Karma
1 Solution

sjodle
Path Finder

Turns out the answer is yes to both.

For a report that's already set up for embedding, the URL scheme is http://<host>:8000/embed?s=/servicesNS/<owner>/<app>/saved/searches/<search name>&oid=<token>. The "token" is retrievable via the "embed.token" attribute of the scheduled search, visible in the REST API.

To enable embedding of a report, assuming it's already been scheduled, simply POST to https://<host>:8089/servicesNS/<owner>/<app>/saved/searches/<search name>/embed.

View solution in original post

andygerberkp
Explorer

I don't believe this is correct anymore for current releases of Splunk.  The embed URL has changed drastically.

0 Karma

sjodle
Path Finder

Turns out the answer is yes to both.

For a report that's already set up for embedding, the URL scheme is http://<host>:8000/embed?s=/servicesNS/<owner>/<app>/saved/searches/<search name>&oid=<token>. The "token" is retrievable via the "embed.token" attribute of the scheduled search, visible in the REST API.

To enable embedding of a report, assuming it's already been scheduled, simply POST to https://<host>:8089/servicesNS/<owner>/<app>/saved/searches/<search name>/embed.

Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...