Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-68889
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jun 12, 2020
2 parents dbd5db7 + a121d35 commit d0384d4
Show file tree
Hide file tree
Showing 335 changed files with 10,250 additions and 9,270 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/.es
.DS_Store
.node_binaries
.native_modules
node_modules
!/src/dev/npm/integration_tests/__fixtures__/fixture1/node_modules
!/src/dev/notice/__fixtures__/node_modules
Expand Down
1 change: 1 addition & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ files:
- 'x-pack/plugins/maps/**/*.s+(a|c)ss'
- 'x-pack/plugins/spaces/**/*.s+(a|c)ss'
- 'x-pack/plugins/security/**/*.s+(a|c)ss'
- 'x-pack/plugins/monitoring/**/*.s+(a|c)ss'
ignore:
- 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
rules:
Expand Down
95 changes: 70 additions & 25 deletions docs/apm/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,39 @@ Some APM app features are provided via a REST API:
[[apm-api-example]]
=== Using the APIs

Users interacting with APM APIs must have <<apm-app-api-user,sufficient privileges>>.
In addition, there are request headers to be aware of, like `kbn-xsrf: true`, and `Content-Type: applicaton/json`.
// The following content is reused throughout the API docs
// tag::using-the-APIs[]
Interact with APM APIs using cURL or another API tool.
All APM APIs are Kibana APIs, not Elasticsearch APIs;
because of this, the Kibana dev tools console cannot be used to interact with APM APIs.

For all APM APIs, you must use a request header.
Supported headers are `Authorization`, `kbn-xsrf`, and `Content-Type`.

`Authorization: ApiKey {credentials}`::
Kibana supports token-based authentication with the Elasticsearch API key service.
The API key returned by the {ref}/security-api-create-api-key.html[Elasticsearch create API key API]
can be used by sending a request with an `Authorization` header that has a value of `ApiKey` followed by the `{credentials}`,
where `{credentials}` is the base64 encoding of `id` and `api_key` joined by a colon.
+
Alternatively, you can create a user and use their username and password to authenticate API access: `-u $USER:$PASSWORD`.
+
Whether using `Authorization: ApiKey {credentials}`, or `-u $USER:$PASSWORD`,
users interacting with APM APIs must have <<apm-app-api-user,sufficient privileges>>.

`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 whitelisted using the <<settings, `server.xsrf.whitelist`>> setting
* XSRF protections are disabled using the `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.
// end::using-the-APIs[]

Here's an example CURL request that adds an annotation to the APM app:

[source,curl]
Expand All @@ -38,9 +69,6 @@ curl -X POST \
}'
----

The Kibana <<api,REST API reference>> provides additional information on how to use Kibana APIs,
required request headers, and token-based authentication options.

////
*******************************************************
////
Expand All @@ -59,7 +87,15 @@ The following Agent configuration APIs are available:
* <<apm-list-config>> to list all Agent configurations.
* <<apm-search-config>> to search for an Agent configuration.

See <<apm-app-api-config-manager>> for information on the privileges required to use this API endpoint.
[float]
[[use-agent-config-api]]
==== How to use APM APIs

.Expand for required headers, privileges, and usage details
[%collapsible%closed]
======
include::api.asciidoc[tag=using-the-APIs]
======

////
*******************************************************
Expand Down Expand Up @@ -100,7 +136,7 @@ See <<apm-app-api-config-manager>> for information on the privileges required to
[[apm-update-config-example]]
===== Example

[source,console]
[source,curl]
--------------------------------------------------
PUT /api/apm/settings/agent-configuration
{
Expand Down Expand Up @@ -150,7 +186,7 @@ PUT /api/apm/settings/agent-configuration
[[apm-delete-config-example]]
===== Example

[source,console]
[source,curl]
--------------------------------------------------
DELETE /api/apm/settings/agent-configuration
{
Expand Down Expand Up @@ -228,7 +264,7 @@ DELETE /api/apm/settings/agent-configuration
[[apm-list-config-example]]
===== Example

[source,console]
[source,curl]
--------------------------------------------------
GET /api/apm/settings/agent-configuration
--------------------------------------------------
Expand Down Expand Up @@ -293,7 +329,7 @@ GET /api/apm/settings/agent-configuration
[[apm-search-config-example]]
===== Example

[source,console]
[source,curl]
--------------------------------------------------
POST /api/apm/settings/agent-configuration/search
{
Expand All @@ -317,17 +353,25 @@ POST /api/apm/settings/agent-configuration/search
The Annotation API allows you to annotate visualizations in the APM app with significant events, like deployments,
allowing you to easily see how these events are impacting the performance of your existing applications.

By default, annotations are stored in a newly created `observability-annotations` index.
The name of this index can be changed in your `config.yml` by editing `xpack.observability.annotations.index`.

The following APIs are available:

* <<apm-annotation-create>> to create an annotation for APM.
// * <<obs-annotation-create>> POST /api/observability/annotation
// * <<obs-annotation-get>> GET /api/observability/annotation/:id
// * <<obs-annotation-delete>> DELETE /api/observability/annotation/:id

By default, annotations are stored in a newly created `observability-annotations` index.
The name of this index can be changed in your `config.yml` by editing `xpack.observability.annotations.index`.
[float]
[[use-annotation-api]]
==== How to use APM APIs

See <<apm-app-api-annotation-manager>> for information on the privileges required to use this API endpoint.
.Expand for required headers, privileges, and usage details
[%collapsible%closed]
======
include::api.asciidoc[tag=using-the-APIs]
======

////
*******************************************************
Expand Down Expand Up @@ -374,19 +418,20 @@ While you can add additional tags, you cannot remove the `apm` tag.

The following example creates an annotation for a service named `opbeans-java`.

[source,console]
[source,curl]
--------------------------------------------------
POST /api/apm/services/opbeans-java/annotation
{
"@timestamp": "2020-05-08T10:31:30.452Z",
"service": {
"version": "1.2"
},
"message": "Deployment 1.2",
"tags": [
"elastic.co", "customer"
]
}
curl -X POST \
http://localhost:5601/api/apm/services/opbeans-java/annotation \
-H 'Content-Type: application/json' \
-H 'kbn-xsrf: true' \
-H 'Authorization: Basic YhUlubWZhM0FDbnlQeE6WRtaW49FQmSGZ4RUWXdX' \
-d '{
"@timestamp": "2020-05-08T10:31:30.452Z",
"service": {
"version": "1.2"
},
"message": "Deployment 1.2"
}'
--------------------------------------------------

[[apm-annotation-config-body]]
Expand Down
2 changes: 1 addition & 1 deletion docs/apm/deployment-annotations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Alternatively, you can explicitly create deployment annotations with our annotat
The API can integrate into your CI/CD pipeline,
so that each time you deploy, a POST request is sent to the annotation API endpoint:

[source,console]
[source,curl]
----
curl -X POST \
http://localhost:5601/api/apm/services/${SERVICE_NAME}/annotation \ <1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ Navigate to a given app
<b>Signature:</b>

```typescript
navigateToApp(appId: string, options?: {
path?: string;
state?: any;
}): Promise<void>;
navigateToApp(appId: string, options?: NavigateToAppOptions): Promise<void>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| appId | <code>string</code> | |
| options | <code>{</code><br/><code> path?: string;</code><br/><code> state?: any;</code><br/><code> }</code> | |
| options | <code>NavigateToAppOptions</code> | navigation options |

<b>Returns:</b>

Expand Down
1 change: 1 addition & 0 deletions docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [LegacyCoreSetup](./kibana-plugin-core-public.legacycoresetup.md) | Setup interface exposed to the legacy platform via the <code>ui/new_platform</code> module. |
| [LegacyCoreStart](./kibana-plugin-core-public.legacycorestart.md) | Start interface exposed to the legacy platform via the <code>ui/new_platform</code> module. |
| [LegacyNavLink](./kibana-plugin-core-public.legacynavlink.md) | |
| [NavigateToAppOptions](./kibana-plugin-core-public.navigatetoappoptions.md) | Options for the [navigateToApp API](./kibana-plugin-core-public.applicationstart.navigatetoapp.md) |
| [NotificationsSetup](./kibana-plugin-core-public.notificationssetup.md) | |
| [NotificationsStart](./kibana-plugin-core-public.notificationsstart.md) | |
| [OverlayBannersStart](./kibana-plugin-core-public.overlaybannersstart.md) | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [NavigateToAppOptions](./kibana-plugin-core-public.navigatetoappoptions.md)

## NavigateToAppOptions interface

Options for the [navigateToApp API](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)

<b>Signature:</b>

```typescript
export interface NavigateToAppOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) | <code>string</code> | optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.appbase.defaultpath.md)<!-- -->\` as default. |
| [replace](./kibana-plugin-core-public.navigatetoappoptions.replace.md) | <code>boolean</code> | if true, will not create a new history entry when navigating (using <code>replace</code> instead of <code>push</code>) |
| [state](./kibana-plugin-core-public.navigatetoappoptions.state.md) | <code>unknown</code> | optional state to forward to the application |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [NavigateToAppOptions](./kibana-plugin-core-public.navigatetoappoptions.md) &gt; [path](./kibana-plugin-core-public.navigatetoappoptions.path.md)

## NavigateToAppOptions.path property

optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.appbase.defaultpath.md)<!-- -->\` as default.

<b>Signature:</b>

```typescript
path?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [NavigateToAppOptions](./kibana-plugin-core-public.navigatetoappoptions.md) &gt; [replace](./kibana-plugin-core-public.navigatetoappoptions.replace.md)

## NavigateToAppOptions.replace property

if true, will not create a new history entry when navigating (using `replace` instead of `push`<!-- -->)

<b>Signature:</b>

```typescript
replace?: boolean;
```

## Remarks

This option not be used when navigating from and/or to legacy applications.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [NavigateToAppOptions](./kibana-plugin-core-public.navigatetoappoptions.md) &gt; [state](./kibana-plugin-core-public.navigatetoappoptions.state.md)

## NavigateToAppOptions.state property

optional state to forward to the application

<b>Signature:</b>

```typescript
state?: unknown;
```
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export interface SessionStorageCookieOptions<T>
| [encryptionKey](./kibana-plugin-core-server.sessionstoragecookieoptions.encryptionkey.md) | <code>string</code> | A key used to encrypt a cookie's value. Should be at least 32 characters long. |
| [isSecure](./kibana-plugin-core-server.sessionstoragecookieoptions.issecure.md) | <code>boolean</code> | Flag indicating whether the cookie should be sent only via a secure connection. |
| [name](./kibana-plugin-core-server.sessionstoragecookieoptions.name.md) | <code>string</code> | Name of the session cookie. |
| [sameSite](./kibana-plugin-core-server.sessionstoragecookieoptions.samesite.md) | <code>'Strict' &#124; 'Lax' &#124; 'None'</code> | Defines SameSite attribute of the Set-Cookie Header. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite |
| [validate](./kibana-plugin-core-server.sessionstoragecookieoptions.validate.md) | <code>(sessionValue: T &#124; T[]) =&gt; SessionCookieValidationResult</code> | Function called to validate a cookie's decrypted value. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SessionStorageCookieOptions](./kibana-plugin-core-server.sessionstoragecookieoptions.md) &gt; [sameSite](./kibana-plugin-core-server.sessionstoragecookieoptions.samesite.md)

## SessionStorageCookieOptions.sameSite property

Defines SameSite attribute of the Set-Cookie Header. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite

<b>Signature:</b>

```typescript
sameSite?: 'Strict' | 'Lax' | 'None';
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
<b>Signature:</b>

```typescript
expandShorthand: (sh: Record<string, ShorthandFieldMapObject>) => Record<string, FieldMappingSpec>
expandShorthand: (sh: Record<string, ShorthandFieldMapObject>) => MappingObject
```
3 changes: 1 addition & 2 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[]
:commit: {repo}commit/
:blob: {repo}blob/{branch}/
:security-ref: https://www.elastic.co/community/security/
:kibana-ref-all: https://www.elastic.co/guide/en/kibana

include::{docs-root}/shared/attributes.asciidoc[]

Expand All @@ -26,8 +27,6 @@ include::accessibility.asciidoc[]

include::limitations.asciidoc[]

include::release-notes/highlights.asciidoc[]

include::migration.asciidoc[]

include::CHANGELOG.asciidoc[]
Expand Down
2 changes: 1 addition & 1 deletion docs/migration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ your application from one version of Kibana to another.
* <<breaking-changes-7.1, Breaking changes in 7.1>>
* <<breaking-changes-7.0, Breaking changes in 7.0>>

See also <<release-highlights>> and <<release-notes>>.
See also <<whats-new>> and <<release-notes>>.
--

include::migration/migrate_7_7.asciidoc[]
Expand Down
2 changes: 1 addition & 1 deletion docs/migration/migrate_7_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This section discusses the changes that you need to be aware of when migrating
your application to Kibana 7.0.

See also <<release-highlights>> and <<release-notes>>.
See also <<whats-new>> and <<release-notes>>.

* <<breaking_70_api_changes>>
* <<breaking_70_browser_support_changes>>
Expand Down
3 changes: 2 additions & 1 deletion docs/migration/migrate_7_2.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
This section discusses the changes that you need to be aware of when migrating
your application to Kibana 7.2.

See also <<release-highlights-7.2.0, release highlights>> and <<release-notes-7.2.0, release notes>>.
See also {kibana-ref-all}/7.2/release-highlights-7.2.0.html[release highlights]
and <<release-notes-7.2.0, release notes>>.

//NOTE: The notable-breaking-changes tagged regions are re-used in the
//Installation and Upgrade Guide
Expand Down
3 changes: 2 additions & 1 deletion docs/migration/migrate_7_3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
This section discusses the changes that you need to be aware of when migrating
your application to Kibana 7.3.

See also <<release-highlights-7.3.0, release highlights>> and <<release-notes-7.3.0, release notes>>.
See also {kibana-ref-all}/7.3/release-highlights-7.3.0.html[release highlights]
and <<release-notes-7.3.0, release notes>>.

//NOTE: The notable-breaking-changes tagged regions are re-used in the
//Installation and Upgrade Guide
Expand Down
2 changes: 1 addition & 1 deletion docs/migration/migrate_7_4.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This section discusses the changes that you need to be aware of when migrating
your application to Kibana 7.4.

//See also <<release-highlights-7.4.0, release highlights>> and <<release-notes-7.4.0, release notes>>.
//See also {kibana-ref-all}/7.4/release-highlights-7.4.0.html[release highlights] and <<release-notes-7.4.0, release notes>>.

//NOTE: The notable-breaking-changes tagged regions are re-used in the
//Installation and Upgrade Guide
Expand Down
2 changes: 1 addition & 1 deletion docs/migration/migrate_7_5.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This page discusses the breaking changes that you need to be aware of when migrating
your application to Kibana 7.5.

//See also <<release-highlights-7.4.0, release highlights>> and <<release-notes-7.4.0, release notes>>.
//See also {kibana-ref-all}/7.5/release-highlights-7.5.0.html[release highlights] and <<release-notes-7.4.0, release notes>>.

//NOTE: The notable-breaking-changes tagged regions are re-used in the
//Installation and Upgrade Guide
Expand Down
Loading

0 comments on commit d0384d4

Please sign in to comment.