2

0

I am trying to generate PDF reports and download them using a script. I followed below instructions.

https://github.com/elastic/kibana/blob/master/docs/user/reporting/automating-report-generation.asciidoc

I am able to queue the report and i also got a download url /api/.../download/xyzdrfd but when i am trying WGET on the url, It's not working. I have no idea how to download that report using APIs so just tried with WGET.

Any-idea how to download the reports using API call or programmatically?

Krishnom
  • 1,348
  • 12
  • 39
Rahuman
  • 21
  • 1
  • what does the wget do if it doesn't work? is there an error? what's the error? – warkolm Sep 14 '21 at 22:20
  • @MarkWalkom wget downloads a page with html content and somewhere saying "browser not supported for displaying ..." But it's not a PDF. – Krishnom Sep 15 '21 at 08:38
  • I'd suggest looking at https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html instead of GitHub, because master is considered unreleased and it's not the completely compiled documentation – warkolm Sep 20 '21 at 05:09
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Sep 21 '21 at 06:04

1 Answers1

0

Next step for downloading the report (after successfuly queued & processed):

Call GET request with basic auth and kbn-xsrf header, example:

curl -O -XGET -u elastic -H 'kbn-xsrf: true' 'https://your-elastic-host/api/reporting/jobs/download/l7q4xw77000z7a3357gfmdex'
Yoga Hanggara
  • 96
  • 1
  • 3