kibana/docs/user/reporting/automating-report-generation.asciidoc
gchaps 104fd5571a
[DOCS] Updates Reporting docs (#50989)
* [DOCS] Updates Reporting docs

* [DOCS] Adds more information on roles and privileges

* [DOCS] Incorporated review comments in Reporting doc

* [DOCS] removes xpack from url

* [DOCS] Replaces low values in watcher reporting example
2019-11-21 13:02:44 -08:00

63 lines
1.9 KiB
Plaintext

[role="xpack"]
[[automating-report-generation]]
== Automating report generation
You can automatically generate reports with {watcher}, or by submitting
HTTP `POST` requests from a script.
include::report-intervals.asciidoc[]
[float]
=== Get the POST URL
Generating a report either through {watcher} or a script requires capturing the **POST
URL**, which is the URL to queue a report for generation.
To get the URL for triggering PDF report generation during a given time period:
. Load the saved object in *Visualize* or *Dashboard*.
. To specify a relative or absolute time period, use the time filter.
. In the {kib} toolbar, click *Share*.
. Select *PDF Reports*.
. Click **Copy POST URL**.
To get the URL for triggering CSV report generation during a given time period:
. Load the saved search in *Discover*.
. To specify a relative or absolute time period, use the time filter.
. In the {kib} toolbar, click *Share*.
. Select *CSV Reports*.
. Click **Copy POST URL**.
[float]
=== Use Watcher
include::watch-example.asciidoc[]
[float]
=== Use a script
include::script-example.asciidoc[]
[float]
=== HTTP response codes
include::response-codes.asciidoc[]
[float]
== Deprecated report URLs
The following POST URL paths were once supported but are now deprecated. If there are
any problems with using these paths after upgrading {kib}, use
{kib} to regenerate the POST URL for a particular report.
* Dashboard Reports: `/api/reporting/generate/dashboard/<dashboard-id>`
* Visualization Reports: `/api/reporting/generate/visualization/<visualization-id>`
* Saved Search Reports: `/api/reporting/generate/search/<saved-search-id>`
[IMPORTANT]
===================
Previously there was a `&sync` parameter appended to generation URLs which would hold
the request open until the document was fully generated. This feature has been removed.
Existing use of the `&sync` parameter, in Watcher for example, will need to be updated.
===================