[[reporting-getting-started]]
= Reporting and sharing

[partintro]

--
:frontmatter-description: {kib} provides you with several options to share *Discover* sessions, dashboards, *Visualize Library* visualizations, and *Canvas* workpads with others, or on a website.
:frontmatter-tags-products: [kibana]

{kib} provides you with several options to share *Discover* sessions, dashboards, *Visualize Library* visualizations, and *Canvas* workpads. These sharing options are available from the *Share* menu in the toolbar.

[float]
[[share-a-direct-link]]
== Share with a direct link

You can share direct links to saved Discover sessions, dashboards, and visualizations. When clicking **Share**, look for the **Links** tab to get the shareable link and copy it. 

TIP: When sharing an object with unsaved changes, you get a temporary link that might break in the future, for example in case of upgrade. Save the object to get a permanent link instead.

To access the object shared with the link, users need to authenticate.

Anonymous users can also access the link if you have configured <<anonymous-authentication,Anonymous authentication>> and your anonymous service account has privileges to access what you want to share.

image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt49f2b5a80ec89a34/66b9e919af508f4ac182c194/share-dashboard.gif[getting a shareable link for a dashboard]

[float]
[[manually-generate-reports]]
== Export as a file

NOTE: For more information on how to configure reporting in {kib}, refer to <<secure-reporting,Configure reporting in {kib}>>

Create and download PDF, PNG, or CSV reports of saved Discover sessions, dashboards, visualizations, and workpads.

* *PDF* &mdash; Generate and download PDF files of dashboards, visualizations, and *Canvas* workpads. PDF reports are a link:https://www.elastic.co/subscriptions[subscription feature].

* *PNG* &mdash; Generate and download PNG files of dashboards and visualizations. PNG reports are a link:https://www.elastic.co/subscriptions[subscription feature].

* *CSV Reports* &mdash; Generate CSV reports of saved Discover sessions. <<csv-limitations,Certain limitations apply>>.

* *CSV Download* &mdash; Generate and download CSV files of *Lens* visualizations.

* *Download as JSON* &mdash; Generate and download JSON files of *Canvas* workpads.


[[reporting-layout-sizing]]
The layout and size of the report depends on what you are sharing.
For saved Discover sessions, dashboards, and visualizations, the layout depends on the size of the panels.
For workpads, the layout depends on the size of the worksheet dimensions.

To change the output size, change the size of the browser, which resizes the shareable container before the report generates. It might take some trial and error before you're satisfied.

In the following dashboard, the shareable container is highlighted:

[role="screenshot"]
image::user/reporting/images/shareable-container.png["Shareable Container"]

. Open the saved Discover session, dashboard, visualization, or workpad you want to share.

. From the toolbar, click *Share*, then select the report option. 

* If you are creating dashboard PDFs, select *For printing* to create printer-friendly PDFs with multiple A4 portrait pages and two visualizations per page.
+
NOTE: When you create a dashboard report that includes a data table or Discover session, the PDF includes only the visible data.

* If you are creating workpad PDFs, select *Full page layout* to create PDFs without margins that surround the workpad.

. Generate the report by clicking **Export file**, **Generate CSV**, or **Generate PDF**, depending on the object you want to export.
+
NOTE: You can use the *Copy POST URL* option instead to generate the report from outside Kibana or from Watcher.

. A message appears, indicating that the report is in the export queue. 

You can then download it from that message, or go to the *Stack Management > Reporting* page to view and access all of your reports.

NOTE: In self-managed and Cloud hosted deployments, reports are stored in {es} and managed by the `kibana-reporting` {ilm}
({ilm-init}) policy. By default, the policy stores reports forever. To learn more about {ilm-init} policies, refer
to the {es} {ref}/index-lifecycle-management.html[{ilm-init} documentation].

[float]
[[csv-limitations]]
=== CSV report limitations

include::reporting-csv-limitations.asciidoc[]

[float]
[[pdf-limitations]]
=== PNG/PDF report limitations

include::reporting-pdf-limitations.asciidoc[]

[float]
[[download-as-json]]
== Create JSON files

Create and share JSON files for workpads.

. Go to *Canvas*.

. Open the workpad you want to share.

. From the toolbar, click *Share*, then select *Download as JSON*.

[float]
== Embed outside of {kib}

* beta[] *Share on a website* &mdash; Download and securely share *Canvas* workpads on any website.

* *Embed code* &mdash; Embed fully interactive dashboards as an iframe on web pages.

[[reporting-on-cloud-resource-requirements]]
NOTE: For Elastic Cloud hosted deployments, {kib} instances require a minimum of 2GB RAM to generate PDF or PNG reports. To
change {kib} sizing, {ess-console}[edit the deployment].


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

beta[] Create and securely share static *Canvas* workpads on a website. To customize the behavior of the workpad on your website, you can choose to autoplay the pages or hide the workpad toolbar.

. Go to *Canvas*.

. Open the workpad you want to share.

. Click *Share > Share on a website*.

. To customize the workpad behavior to autoplay the pages or hide the toolbar, use the inline parameters.
+
To make sure that your data remains secure, the data in the JSON file is not connected to {kib}. *Canvas* does not display elements that manipulate the data on the workpad.
+
NOTE: Shareable workpads encode the current state of the workpad in a JSON file. When you make changes to the workpad, the changes do not appear in the shareable workpad on your website.

. To change the settings, click the settings icon, then choose the settings you want to use.

[float]
[[embed-code]]
== Embed code

Display your dashboards on an internal company website or personal web page with an iframe. To embed other {kib} objects, manually create the HTML code.

For information about granting access to embedded dashboards, refer to <<kibana-authentication>>.

. Open the dashboard you want to share.

. Click *Share > Embed code*.

. Specify which parts of the dashboard you want to include: Top menu, query, time filter, and filter bar.

. Click *Copy embed code*.




--

include::automating-report-generation.asciidoc[]
include::reporting-troubleshooting.asciidoc[]
include::reporting-csv-troubleshooting.asciidoc[leveloffset=+1]
include::reporting-pdf-troubleshooting.asciidoc[leveloffset=+1]