Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-52989
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Dec 17, 2019
2 parents 57d7241 + 1a2654f commit c680314
Show file tree
Hide file tree
Showing 392 changed files with 7,188 additions and 2,330 deletions.
37 changes: 31 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ module.exports = {
'src/legacy/**/*',
'x-pack/**/*',
'!x-pack/**/*.test.*',
'src/plugins/**/(public|server)/**/*',
'!x-pack/test/**/*',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'src/core/(public|server)/**/*',
],
from: [
Expand All @@ -283,13 +284,32 @@ module.exports = {
'!src/core/server/types',
'!src/core/server/*.test.mocks.ts',

'src/plugins/**/public/**/*',
'!src/plugins/**/public/index.{js,ts,tsx}',

'src/plugins/**/server/**/*',
'!src/plugins/**/server/index.{js,ts,tsx}',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,ts,tsx}',
],
allowSameFolder: true,
errorMessage: 'Plugins may only import from top-level public and server modules.',
},
{
target: [
'(src|x-pack)/plugins/**/*',
'!(src|x-pack)/plugins/*/server/**/*',

'src/legacy/core_plugins/**/*',
'!src/legacy/core_plugins/*/server/**/*',
'!src/legacy/core_plugins/*/index.{js,ts,tsx}',

'x-pack/legacy/plugins/**/*',
'!x-pack/legacy/plugins/*/server/**/*',
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
],
from: [
'src/core/server',
'src/core/server/**/*',
'(src|x-pack)/plugins/*/server/**/*',
],
errorMessage:
'Server modules cannot be imported into client modules or shared modules.',
},
{
target: ['src/**/*'],
Expand All @@ -306,6 +326,11 @@ module.exports = {
],
errorMessage: 'The core cannot depend on any plugins.',
},
{
target: ['(src|x-pack)/plugins/*/public/**/*'],
from: ['ui/**/*', 'uiExports/**/*'],
errorMessage: 'Plugins cannot import legacy UI code.',
},
{
from: ['src/legacy/ui/**/*', 'ui/**/*'],
target: [
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"src/plugins/data"
],
"embeddableApi": "src/plugins/embeddable",
"embeddableExamples": "examples/embeddable_examples",
"share": "src/plugins/share",
"esUi": "src/plugins/es_ui_shared",
"devTools": "src/plugins/dev_tools",
Expand Down
16 changes: 8 additions & 8 deletions docs/api/spaces-management/post.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ experimental["The underlying Spaces concepts are stable, but the APIs for managi
[[spaces-api-post-request-body]]
==== Request body

`id`::
`id`::
(Required, string) The space ID that is part of the Kibana URL when inside the space. You are unable to change the ID with the update operation.

`name`::
`name`::
(Required, string) The display name for the space.

`description`::
`description`::
(Optional, string) The description for the space.

`disabledFeatures`::
`disabledFeatures`::
(Optional, string array) The list of disabled features for the space. To get a list of available feature IDs, use the <<features-api-get, Features API>>.

`initials`::
`initials`::
(Optional, string) Specifies the initials shown in the space avatar. By default, the initials are automatically generated from the space name. Initials must be 1 or 2 characters.

`color`::
`color`::
(Optional, string) Specifies the hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.

`imageUrl`::
`imageUrl`::
(Optional, string) Specifies the data-url encoded image to display in the space avatar. If specified, `initials` will not be displayed, and the `color` will be visible as the background color for transparent images.
For best results, your image should be 64x64. Images will not be optimized by this API call, so care should be taken when using custom images.

[[spaces-api-post-response-codes]]
==== Response codes

Expand Down
44 changes: 34 additions & 10 deletions docs/api/using-api.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[using-api]]
== Using the APIs

Interact with the {kib} APIs through the `curl` command and HTTP and HTTPs protocols.
Interact with the {kib} APIs through the `curl` command and HTTP and HTTPs protocols.

It is recommended that you use HTTPs on port 5601 because it is more secure.

Expand Down Expand Up @@ -34,13 +34,37 @@ For example, the following `curl` command exports a dashboard:
curl -X POST -u $USER:$PASSWORD "localhost:5601/api/kibana/dashboards/export?dashboard=942dcef0-b2cd-11e8-ad8e-85441f0c2e5c"
--

The following {kib} APIs are available:
[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` methods

* The path is whitelisted using the <<settings, `server.xsrf.whitelist`>> setting

* XSRF protections are disabled using the `server.xsrf.disableProtection` setting

* <<features-api-get, Get features API>>
* <<spaces-api, Kibana spaces API>>
* <<role-management-api, Kibana role management APIs>>
* <<saved-objects-api, Saved objects APIs>>
* <<dashboard-api, Import and export dashboards APIs>>
* <<logstash-configuration-management-api, Logstash configuration mangaement APIs>>
* <<url-shortening-api, Shorten URL API>>
* <<upgrade-assistant-api, Upgrade assistant APIs>>
`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": []
}
'
--
7 changes: 7 additions & 0 deletions docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsCreateOptions](./kibana-plugin-public.savedobjectscreateoptions.md) | |
| [SavedObjectsFindOptions](./kibana-plugin-public.savedobjectsfindoptions.md) | |
| [SavedObjectsFindResponsePublic](./kibana-plugin-public.savedobjectsfindresponsepublic.md) | Return type of the Saved Objects <code>find()</code> method.<!-- -->\*Note\*: this type is different between the Public and Server Saved Objects clients. |
| [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. |
| [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) | Represents a failure to import. |
| [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. |
| [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) | The response describing the result of an import. |
| [SavedObjectsImportRetry](./kibana-plugin-public.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. |
| [SavedObjectsImportUnknownError](./kibana-plugin-public.savedobjectsimportunknownerror.md) | Represents a failure to import due to an unknown reason. |
| [SavedObjectsImportUnsupportedTypeError](./kibana-plugin-public.savedobjectsimportunsupportedtypeerror.md) | Represents a failure to import due to having an unsupported saved object type. |
| [SavedObjectsMigrationVersion](./kibana-plugin-public.savedobjectsmigrationversion.md) | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
| [SavedObjectsStart](./kibana-plugin-public.savedobjectsstart.md) | |
| [SavedObjectsUpdateOptions](./kibana-plugin-public.savedobjectsupdateoptions.md) | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md)

## SavedObjectsImportConflictError interface

Represents a failure to import due to a conflict.

<b>Signature:</b>

```typescript
export interface SavedObjectsImportConflictError
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [type](./kibana-plugin-public.savedobjectsimportconflicterror.type.md) | <code>'conflict'</code> | |

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportConflictError](./kibana-plugin-public.savedobjectsimportconflicterror.md) &gt; [type](./kibana-plugin-public.savedobjectsimportconflicterror.type.md)

## SavedObjectsImportConflictError.type property

<b>Signature:</b>

```typescript
type: 'conflict';
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [error](./kibana-plugin-public.savedobjectsimporterror.error.md)

## SavedObjectsImportError.error property

<b>Signature:</b>

```typescript
error: SavedObjectsImportConflictError | SavedObjectsImportUnsupportedTypeError | SavedObjectsImportMissingReferencesError | SavedObjectsImportUnknownError;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [id](./kibana-plugin-public.savedobjectsimporterror.id.md)

## SavedObjectsImportError.id property

<b>Signature:</b>

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md)

## SavedObjectsImportError interface

Represents a failure to import.

<b>Signature:</b>

```typescript
export interface SavedObjectsImportError
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [error](./kibana-plugin-public.savedobjectsimporterror.error.md) | <code>SavedObjectsImportConflictError &#124; SavedObjectsImportUnsupportedTypeError &#124; SavedObjectsImportMissingReferencesError &#124; SavedObjectsImportUnknownError</code> | |
| [id](./kibana-plugin-public.savedobjectsimporterror.id.md) | <code>string</code> | |
| [title](./kibana-plugin-public.savedobjectsimporterror.title.md) | <code>string</code> | |
| [type](./kibana-plugin-public.savedobjectsimporterror.type.md) | <code>string</code> | |

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [title](./kibana-plugin-public.savedobjectsimporterror.title.md)

## SavedObjectsImportError.title property

<b>Signature:</b>

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-public.savedobjectsimporterror.md) &gt; [type](./kibana-plugin-public.savedobjectsimporterror.type.md)

## SavedObjectsImportError.type property

<b>Signature:</b>

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) &gt; [blocking](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.blocking.md)

## SavedObjectsImportMissingReferencesError.blocking property

<b>Signature:</b>

```typescript
blocking: Array<{
type: string;
id: string;
}>;
```
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-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md)

## SavedObjectsImportMissingReferencesError interface

Represents a failure to import due to missing references.

<b>Signature:</b>

```typescript
export interface SavedObjectsImportMissingReferencesError
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [blocking](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.blocking.md) | <code>Array&lt;{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }&gt;</code> | |
| [references](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.references.md) | <code>Array&lt;{</code><br/><code> type: string;</code><br/><code> id: string;</code><br/><code> }&gt;</code> | |
| [type](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.type.md) | <code>'missing_references'</code> | |

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) &gt; [references](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.references.md)

## SavedObjectsImportMissingReferencesError.references property

<b>Signature:</b>

```typescript
references: Array<{
type: string;
id: string;
}>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportMissingReferencesError](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.md) &gt; [type](./kibana-plugin-public.savedobjectsimportmissingreferenceserror.type.md)

## SavedObjectsImportMissingReferencesError.type property

<b>Signature:</b>

```typescript
type: 'missing_references';
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) &gt; [errors](./kibana-plugin-public.savedobjectsimportresponse.errors.md)

## SavedObjectsImportResponse.errors property

<b>Signature:</b>

```typescript
errors?: SavedObjectsImportError[];
```
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-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md)

## SavedObjectsImportResponse interface

The response describing the result of an import.

<b>Signature:</b>

```typescript
export interface SavedObjectsImportResponse
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [errors](./kibana-plugin-public.savedobjectsimportresponse.errors.md) | <code>SavedObjectsImportError[]</code> | |
| [success](./kibana-plugin-public.savedobjectsimportresponse.success.md) | <code>boolean</code> | |
| [successCount](./kibana-plugin-public.savedobjectsimportresponse.successcount.md) | <code>number</code> | |

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

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [SavedObjectsImportResponse](./kibana-plugin-public.savedobjectsimportresponse.md) &gt; [success](./kibana-plugin-public.savedobjectsimportresponse.success.md)

## SavedObjectsImportResponse.success property

<b>Signature:</b>

```typescript
success: boolean;
```
Loading

0 comments on commit c680314

Please sign in to comment.