Skip to content

Commit

Permalink
Merge branch 'master' into fix_case_hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 24, 2021
2 parents e765efb + e19773b commit 41b2535
Show file tree
Hide file tree
Showing 44 changed files with 1,127 additions and 229 deletions.
86 changes: 0 additions & 86 deletions docs/api/using-api.asciidoc

This file was deleted.

31 changes: 4 additions & 27 deletions docs/canvas/canvas-share-workpad.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

When you've finished your workpad, you can share it outside of {kib}.

For information on how to create PDFs and POST URLs, refer to <<reporting-getting-started, Reporting from {kib}>>.

[float]
[[export-single-workpad]]
=== Export workpads
Expand All @@ -17,37 +19,12 @@ image::images/canvas-export-workpad.png[Export single workpad through JSON, from

Want to export multiple workpads? Go to the *Canvas* home page, select the workpads you want to export, then click *Export*.

[float]
[[create-workpad-pdf]]
=== Create a PDF

If you have a subscription that supports the {report-features}, you can create a PDF copy of your workpad that you can save and share outside {kib}.

To begin, click *Share > PDF reports > Generate PDF*.

[role="screenshot"]
image::images/canvas-generate-pdf.gif[Image showing how to generate a PDF]

For more information, refer to <<reporting-getting-started, Reporting from Kibana>>.

[float]
[[create-workpad-URL]]
=== Create a POST URL

If you have a subscription that supports the {report-features}, you can create a POST URL that you can use to automatically generate PDF reports using <<watcher-ui,Watcher>> or a script.

To begin, click *Share > PDF reports > Advanced options > Copy POST URL*.

[role="screenshot"]
image::images/canvas-create-URL.gif[Image showing how to create POST URL]

For more information, refer to <<automating-report-generation, Automating report generation>>.

[float]
[[add-workpad-website]]
=== Share the workpad on a website

beta[] Canvas allows you to create _shareables_, which are workpads that you download and securely share on any website. To customize the behavior of the workpad on your website, you can choose to autoplay the pages or hide the workpad toolbar.
beta[] Canvas allows you to create _shareables_, which are workpads that you download and securely share on any website.
To customize the behavior of the workpad on your website, you can choose to autoplay the pages or hide the workpad toolbar.

. Click *Share > Share on a website*.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:blog-ref: https://www.elastic.co/blog/
:wikipedia: https://en.wikipedia.org/wiki

include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[]
include::{docs-root}/shared/versions/stack/7.10.asciidoc[]

:docker-repo: docker.elastic.co/kibana/kibana
:docker-image: docker.elastic.co/kibana/kibana:{version}
Expand Down
102 changes: 82 additions & 20 deletions docs/user/api.asciidoc
Original file line number Diff line number Diff line change
@@ -1,37 +1,99 @@
[[api]]
= REST API

[partintro]
--
Some {kib} features are provided via a REST API, which is ideal for creating an
integration with {kib}, or automating certain aspects of configuring and
deploying {kib}.

Each API is experimental and can include breaking changes in any version of
{kib}, or might be entirely removed from {kib}.
[float]
[[using-apis]]
== Using the APIs

////
Each API has one of the following labels:
Interact with the {kib} APIs through the `curl` command and HTTP and HTTPs protocols.

* *Stable* APIs should be safe to use extensively in production. Any breaking
changes to these APIs should only occur in major versions and will be
clearly documented in the breaking changes documentation for that release.
It is recommended that you use HTTPs on port 5601 because it is more secure.

* *Beta* APIs are on track to become stable, permanent features of {kib}.
Caution should be exercised in their use since it is possible we'd have to make
a breaking change to these APIs in a minor version, but we'll avoid this
wherever possible.
NOTE: The {kib} Console supports only Elasticsearch APIs. You are unable to interact with the {kib} APIs with the Console and must use `curl` or another HTTP tool instead. For more information, refer to <<console-kibana,Console>>.

* *Experimental* APIs are just that - an experiment. An experimental API might
have breaking changes in any version of {kib}, or it might even be removed
entirely.
[float]
[[api-authentication]]
=== Authentication
The {kib} APIs support key- and token-based authentication.

If a label is missing from an API, it is considered `experimental`.
////
[float]
[[token-api-authentication]]
==== Token-based authentication

To use token-based authentication, you use the same username and password that you use to log into Elastic.
In a given HTTP tool, and when available, you can select to use its 'Basic Authentication' option,
which is where the username and password are stored in order to be passed as part of the call.

[float]
[[key-authentication]]
==== Key-based authentication

To use key-based authentication, you create an API key using the Elastic Console, then specify the key in the header of your API calls.

For information about API keys, refer to <<api-keys,API keys>>.

[float]
[[api-calls]]
=== API calls
API calls are stateless. Each request that you make happens in isolation from other calls and must include all of the necessary information for {kib} to fulfill the request. API requests return JSON output, which is a format that is machine-readable and works well for automation.

Calls to the API endpoints require different operations. To interact with the {kib} APIs, use the following operations:

* *GET* - Fetches the information.

* *POST* - Adds new information.

* *PUT* - Updates the existing information.

* *DELETE* - Removes the information.

For example, the following `curl` command exports a dashboard:

[source,sh]
--------------------------------------------
curl -X POST api/kibana/dashboards/export?dashboard=942dcef0-b2cd-11e8-ad8e-85441f0c2e5c
--------------------------------------------
// KIBANA

[float]
[[api-request-headers]]
=== Request headers

For all APIs, you must use a request header. The {kib} APIs support the `kbn-xsrf` and `Content-Type` headers.

`kbn-xsrf: true`::
By default, you must use `kbn-xsrf` for all API calls, except in the following scenarios:

* The API endpoint uses the `GET` or `HEAD` operations
* The path is allowed using the <<settings-xsrf-allowlist, `server.xsrf.allowlist`>> setting
* XSRF protections are disabled using the <<settings-xsrf-disableProtection, `server.xsrf.disableProtection`>> setting

`Content-Type: application/json`::
Applicable only when you send a payload in the API request. {kib} API requests and responses use JSON.
Typically, if you include the `kbn-xsrf` header, you must also include the `Content-Type` header.

Request header example:

[source,sh]
--------------------------------------------
curl -X POST \
http://localhost:5601/api/spaces/space \
-H 'Content-Type: application/json' \
-H 'kbn-xsrf: true' \
-d '{
"id": "sales",
"name": "Sales",
"description": "This is your Sales Space!",
"disabledFeatures": []
}
'
--------------------------------------------

--

include::{kib-repo-dir}/api/using-api.asciidoc[]
include::{kib-repo-dir}/api/features.asciidoc[]
include::{kib-repo-dir}/api/spaces-management.asciidoc[]
include::{kib-repo-dir}/api/role-management.asciidoc[]
Expand Down
6 changes: 2 additions & 4 deletions docs/user/dashboard/dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,8 @@ When you're finished making changes, save the dashboard.

To share the dashboard with a larger audience, click *Share* in the toolbar, then choose one of the following options:

* *Embed code* &mdash; Embed the dashboard as an iframe on a web page. Embedded dashboards are fully interactive, but you can
hide some parts of the dashboard using the menu options. User authentication is required, which the user provides or via reverse proxy. 
<<anonymous-authentication, Anonymous access>> is also supported. For more details,
learn about <<kibana-authentication>>.
* *Embed code* &mdash; Embed a fully interactive dashboard as an iframe on a web page. To access embedded dashboards, you can require users to
log in using their {kib} credentials, via reverse proxy, or enable <<anonymous-access-and-embedding, anonymous access>>.

* *Permalinks* &mdash; Share a direct link to a {kib} dashboard. User authentication is required.

Expand Down
13 changes: 5 additions & 8 deletions docs/user/reporting/automating-report-generation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ include::report-intervals.asciidoc[]
[float]
=== Create a POST URL

Create the POST
URL that triggers a report to generate.
Create the POST URL that triggers a report to generate PDF and CSV reports.

To create the POST URL for PDF reports:

. Open then main menu, click *Dashboard*, then open a dashboard.
+
To specify a relative or absolute time period, use the time filter.
. Open the  dashboard, visualization, or **Canvas** workpad.

. From the {kib} toolbar, click *Share*, then select *PDF Reports*.

. If you are using **Canvas**, click *Advanced options*.

. Click *Copy POST URL*.
+
[role="screenshot"]
Expand All @@ -27,9 +26,7 @@ image::images/report-automate-pdf.png[Generate Visualize and Dashboard reports]

To create the POST URL for CSV reports:

. Load the saved search in *Discover*.
+
To specify a relative or absolute time period, use the time filter.
. In *Discover*, open the saved search.

. From the {kib} toolbar, click *Share*, then select *CSV Reports*.

Expand Down
Binary file modified docs/user/reporting/images/canvas-full-page-layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/reporting/images/preserve-layout-switch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/reporting/images/share-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 19 additions & 25 deletions docs/user/reporting/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ saved search, or Canvas workpad. Depending on the object type, you can export th
a PDF, PNG, or CSV document, which you can keep for yourself, or share with others.

Reporting is available from the *Share* menu
in *Discover*, *Dashboard*, and *Canvas*.
in *Discover*, *Dashboard*, *Visualize Library*, and *Canvas*.

[role="screenshot"]
image::user/reporting/images/share-menu.png["Share"]
Expand All @@ -38,31 +38,32 @@ for an example.

[float]
[[manually-generate-reports]]
== Generate a report manually
== Manually generate and download reports

. Open the dashboard, visualization, Canvas workpad, or saved search that you want to include in the report.
Generate and download PDF, PNG, and CSV files of dashboards, visualizations, **Canvas** workpads, and saved searches.

. In the {kib} toolbar, click *Share*. If you are working in Canvas,
click the share icon image:user/reporting/images/canvas-share-button.png["Canvas Share button"].
. Open the dashboard, visualization, **Canvas** workpad, or saved search.

. Select the option appropriate for your object. You can export:
+
** A dashboard or visualization as either a PNG or PDF document
** A Canvas workpad as a PDF document
** A saved search as a CSV document
. From the {kib} toolbar, click **Share**, then select one of the following options:

** **PDF Reports** &mdash; Generates a PDF file of the dashboard, visualization, or **Canvas** workpad.
** **PNG Reports** &mdash; Generates a PNG file of the dashboard or visualization.
** **CSV Reports** &mdash; Generates a CSV report of the saved search.

. Generate the report.
+
A notification appears when the report is complete.
When the report completes, a notification appears.

. Click **Download report**.

NOTE: When you export a data table or saved search from a dashboard report, the PDF includes only the visible data.
NOTE: When you create a dashboard report that includes a data table or saved search, the PDF includes only the visible data.

[float]
[[reporting-layout-sizing]]
== Layout and sizing
The layout and size of the PDF or PNG image depends on the {kib} app
with which the Reporting plugin is integrated. For Canvas, the
worksheet dimensions determine the size for Reporting. In other apps,
with which the Reporting plugin is integrated. For *Canvas*, the
worksheet dimensions determine the size for reports. In other apps,
the dimensions are taken on the fly by looking at
the size of the visualization elements or panels on the page.

Expand All @@ -72,9 +73,9 @@ This resizes the shareable container before generating the
report, so the desired dimensions are passed in the job parameters.

In the following {kib} dashboard, the shareable container is highlighted.
The shareable container is captured when you click the
*Generate* or *Copy POST URL* button. It might take some trial and error
before you're satisfied with the layout and dimensions in the resulting
The shareable container is captured when you click
*Generate* or *Copy POST URL* from the *Share* menu. It might take some trial and error
before you're satisfied with the layout and dimensions in the
PNG or PDF image.

[role="screenshot"]
Expand Down Expand Up @@ -107,16 +108,9 @@ image::user/reporting/images/canvas-full-page-layout.png["Full Page Layout"]
== View and manage report history

For a list of your reports, open the main menu, then click *Stack Management > Reporting*.
From this view, you can monitor the generation of a report and
From this view, you can monitor the status of a report and
download reports that you previously generated.

[float]
[[automatically-generate-reports]]
== Automatically generate a report

To automatically generate a report from a script or with
{watcher}, see <<automating-report-generation, Automating report generation>>.

--

include::automating-report-generation.asciidoc[]
Expand Down
Loading

0 comments on commit 41b2535

Please sign in to comment.