* [Docs/Reporting] More information about HTTP / script stuff * "post url" formatting consistency * consistent wording from 1 paragraph to another * Update docs/reporting/response-codes.asciidoc Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com> * pr feedback * subs=attributes, version in command example * "Retry-After" content * another feedback
23 lines
1.3 KiB
Text
23 lines
1.3 KiB
Text
The Reporting APIs use 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-version` 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**.
|