Canvas Copy Generate Post URL

I'm Using kibana 7.5.2 via ECE and trying to create a watcher job to send out the pdf of my workpad. When I go to copy the post url it will only return https://domain.com:/api/reporting/generate/printablePdf with no parameters. I'm not sure what i'm doing wrong or if this is a bug?

Steps to reproduce
Create new workpad via a template, modify the report, validate the pdf sharing feature works ( it does ), then try and create a watcher item with the URL. This process will fail as watcher has no idea what report it should be running.

What should a proper post URL look like for a workpad? Perhaps i can try and generate the url myself based on asset/report ID's etc.
Thanks

Do you see any errors in your browser's dev console?

Here is what a valid reporting URL would look like for Canvas, just in case you need to try that as a workaround. It should be possible to just swap out the title and workpad ID.

http://domain.com/api/reporting/generate/printablePdf?jobParams=(browserTimezone:America%2FPhoenix,layout:(dimensions:(height:720,width:1280),id:preserve_layout),objectType:'canvas%20workpad',relativeUrls:!(%2Fapp%2Fcanvas%23%2Fexport%2Fworkpad%2Fpdf%2Fworkpad-ad72a4e9-b422-480c-be6d-a64a0b79541d%2Fpage%2F1),title:'%5BLogs%5D%20Web%20Traffic')

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-SbBSU7MfZFnVMq4PuE/jbBz7pPIfXUTYDrdHl7Ckchc='), or a nonce ('nonce-...') is required to enable inline execution.

This is the only error on the workpad page. I've tried disabling ublock in both FF and Chrome. This error is displayed in both browsers.

I can reproduce this behavior by creating a new workpad based off of a template kibana provided template.

Thanks

Hi @Rob_wylde

This is indeed a bug that exists in 7.5.2 and should be fixed in the upcoming 7.6 release
https://github.com/elastic/kibana/issues/53967

Like Bargs mentioned though, you should be able to replace the ID and title from that url as a workaround

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.