Skip to content

Commit

Permalink
Update reporting docs (#87651) (#87920)
Browse files Browse the repository at this point in the history
  • Loading branch information
jportner authored Jan 11, 2021
1 parent e909ebe commit ceb2e67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/user/reporting/response-codes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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,
`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
Expand Down
7 changes: 3 additions & 4 deletions docs/user/reporting/script-example.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The response from this request will be JSON, and will contain a `path` property
URL to use to download the generated report. Use the `GET` method in the HTTP request to
download the report.

The request method must be `POST` and it must include a `kbn-version` header for Kibana
The request method must be `POST` and it must include a `kbn-xsrf` header for Kibana
to allow the request.

The following example queues CSV report generation using the `POST` URL with cURL:
Expand All @@ -13,15 +13,14 @@ The following example queues CSV report generation using the `POST` URL with cUR
curl \
-XPOST \ <1>
-u elastic \ <2>
-H 'kbn-version: {version}' \ <3>
-H 'kbn-xsrf: true' \ <3>
'http://0.0.0.0:5601/api/reporting/generate/csv?jobParams=...' <4>
---------------------------------------------------------
// CONSOLE

<1> `POST` method is required.
<2> Provide user credentials for a user with permission to access Kibana and X-Pack reporting.
<3> The `kbn-version` header is required for all `POST` requests to Kibana.
**The value must match the dotted-numeral version of the Kibana instance.**
<3> The `kbn-xsrf` header is required for all `POST` requests to Kibana.
<4> The POST URL. You can copy and paste the URL for any report from the Kibana UI.

Here is an example response for a successfully queued report:
Expand Down

0 comments on commit ceb2e67

Please sign in to comment.