Help with POST URL

Hi, I am new to POST URLs but my goal is to generate a pdf from a dashboard automatically, and save it locally to a shared area.

I have got my POST URL of my dashboard and using Unix curl command I have tried to get the required dashboard using the following:

curl -XPOST -u elastic:changeme -H 'kbn-xsrf: true' '<URL>/api/reporting/generate/printablePdfV2?.....' -o /tmp/dashboard.pdf

That looks to generate a report in Kibana Reports (/app/management/insightsAndAlerting/reporting), but then I have to download it manually. I thought the -o would have give me what I wanted.

Any advice from someone who has done this before would be appreciated.
I feel like I am almost there, I just need to get the report downloaded at the same time.

Thanks.

Hi @ElasticNovis,

Welcome to the community! You're right that the POST method will generate the report rather than send the report to you.

The response will give you the path attribute that can then use with a follow-up HTTP GET request to download the report. There is some details here in the docs that should help.

1 Like

Hi Carly, just confirming that this is the correct link. 'logstash_plugins'

Oh sorry, not that is not the right link. Thanks for flagging!

I've corrected the link in the prior post but here it is as well:

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