mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
## Summary This PR offers small updates to documentation on: * Calling Kibana APIs to automate report generation * Using Elasticsearch APIs directly to export data
25 lines
1.4 KiB
Text
25 lines
1.4 KiB
Text
The response payload of a request to generate a report includes the path to
|
|
download a report. The API to download a report uses HTTP response codes to give
|
|
feedback. In automation, this helps external systems track the various possible
|
|
job states:
|
|
|
|
- **`200` (OK)**: As expected, Kibana returns `200` status in the response for
|
|
successful requests to queue or download reports.
|
|
+
|
|
NOTE: Kibana will send a `200` response status for successfully queuing a Reporting job via
|
|
the POST URL. This is true even if the job somehow fails later, since report
|
|
generation happens asynchronously from queuing.
|
|
|
|
- **`400` (Bad Request)**: When sending requests to the POST URL, if you don't use
|
|
`POST` as the HTTP method, or if your request is missing the `kbn-xsrf` header,
|
|
Kibana will return a code `400` status response for the request.
|
|
|
|
- **`503` (Service Unavailable)**: When using the `path` to request the download, you
|
|
will get a `503` status response if report generation hasn't completed yet. The
|
|
response will include a `Retry-After` header. You can set the script to wait the
|
|
number of seconds in the `Retry-After` header, and then repeat if needed, until the
|
|
report is complete.
|
|
|
|
- **`500` (Internal Server Error)**: When using the `path` to request the download, you
|
|
will get a `500` status response if the report isn't available due to an error when
|
|
generating the report. More information is available at **Management > Kibana > Reporting**.
|