From 39ff81c4f5f2760e644227857c0f480d418d4d33 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Tue, 1 Aug 2023 17:05:53 -0700 Subject: [PATCH 1/9] Update app service link --- docs/developer/architecture/core/application_service.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/architecture/core/application_service.asciidoc b/docs/developer/architecture/core/application_service.asciidoc index 2aa50ebafad8d..4e619799b40f4 100644 --- a/docs/developer/architecture/core/application_service.asciidoc +++ b/docs/developer/architecture/core/application_service.asciidoc @@ -29,7 +29,7 @@ export class MyPlugin implements Plugin { } } ---- -<1> See {kib-repo}blob/{branch}/docs/development/core/public/kibana-plugin-core-public.applicationsetup.register.md[application.register interface] +<1> See https://github.com/elastic/kibana/blob/main/packages/core/application/core-application-browser/src/contracts.ts[application.register interface] <2> Application specific URL. <3> `mount` callback is invoked when a user navigates to the application-specific URL. <4> `core.getStartServices` method provides API available during `start` lifecycle. From 88d0de67dda4bae8df29443ccc334ebdf201cc20 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Wed, 2 Aug 2023 17:07:15 -0700 Subject: [PATCH 2/9] Replaces broken core doc links --- .../core/configuration-service.asciidoc | 2 +- .../architecture/core/http-service.asciidoc | 4 ++-- .../core/patterns-scoped-services.asciidoc | 14 +++++--------- .../architecture/core/uisettings-service.asciidoc | 6 +++--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/docs/developer/architecture/core/configuration-service.asciidoc b/docs/developer/architecture/core/configuration-service.asciidoc index fdc4ad9b0a922..570bea37ddf09 100644 --- a/docs/developer/architecture/core/configuration-service.asciidoc +++ b/docs/developer/architecture/core/configuration-service.asciidoc @@ -17,7 +17,7 @@ const basePath = core.http.basePath.get(request); To have access to your plugin config, you _should_: * Declare plugin-specific `configPath` (will fallback to plugin `id` -if not specified) in {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.pluginmanifest.md[`kibana.json`] manifest file. +if not specified) in your plugin definition. * Export schema validation for the config from plugin's main file. Schema is mandatory. If a plugin reads from the config without schema declaration, `ConfigService` will throw an error. diff --git a/docs/developer/architecture/core/http-service.asciidoc b/docs/developer/architecture/core/http-service.asciidoc index 6cc171aa7969a..ced5ac9f9a3d1 100644 --- a/docs/developer/architecture/core/http-service.asciidoc +++ b/docs/developer/architecture/core/http-service.asciidoc @@ -12,7 +12,7 @@ The service allows plugins to: * to execute custom logic on an incoming request or server response. * implement custom authentication and authorization strategy. -See {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md[HTTP service API docs] +See [HTTP service types](https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server-internal/src/types.ts) [source,typescript] ---- @@ -64,4 +64,4 @@ async function fetchData(core: CoreStart) { ); } ---- -See {kib-repo}blob/{branch}/docs/development/core/public/kibana-plugin-core-public.httpsetup.md[for all available API]. +See [for the client-side APIs](https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-browser/src/types.ts). diff --git a/docs/developer/architecture/core/patterns-scoped-services.asciidoc b/docs/developer/architecture/core/patterns-scoped-services.asciidoc index bfd8b42dbb951..ca7300d2e7082 100644 --- a/docs/developer/architecture/core/patterns-scoped-services.asciidoc +++ b/docs/developer/architecture/core/patterns-scoped-services.asciidoc @@ -7,9 +7,7 @@ should perform a check whether an end-user has access to the data. The Kibana Platform introduced a handler interface on the server-side to perform that association internally. Core services, that require impersonation with an incoming request, are exposed via `context` argument of -{kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.requesthandler.md[the -request handler interface.] -as +[the request handler interface](https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/router/request_handler.ts). [source,js] ---- @@ -18,13 +16,11 @@ async function handler(context, req, res) { } ---- -The -{kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.requesthandlercontext.md[request -handler context] exposes the following scoped *core* services: +The [request handler context]((https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/router/request_handler.ts)) exposes the following scoped *core* services: -* {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.savedobjectsclient.md[`context.savedObjects.client`] -* {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.iscopedclusterclient.md[`context.elasticsearch.client`] -* {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.iuisettingsclient.md[`context.uiSettings.client`] +* [`context.savedObjects.client`](https://github.com/elastic/kibana/blob/main/packages/core/saved-objects/core-saved-objects-api-server/src/saved_objects_client.ts) +* [`context.elasticsearch.client`](https://github.com/elastic/kibana/blob/main/packages/core/elasticsearch/core-elasticsearch-server/src/client/scoped_cluster_client.ts) +* [`context.uiSettings.client`](https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts) ==== Declare a custom scoped service diff --git a/docs/developer/architecture/core/uisettings-service.asciidoc b/docs/developer/architecture/core/uisettings-service.asciidoc index 2d24465b69c32..1c5a48db72209 100644 --- a/docs/developer/architecture/core/uisettings-service.asciidoc +++ b/docs/developer/architecture/core/uisettings-service.asciidoc @@ -38,9 +38,9 @@ uiSettings: [[client-side-usage]] === Client side usage -On the client, the `uiSettings` service is exposed directly from `core` and the {kib-repo}blob/{branch}/docs/development/core/public/kibana-plugin-core-public.iuisettingsclient.md[client] provides plugins access to the `config` entries stored in {es}. +On the client, the `uiSettings` service is exposed directly from `core` and the [client](https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts) provides plugins access to the `config` entries stored in {es} -In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` {kib-repo}blob/{branch}/docs/development/core/public/kibana-plugin-core-public.uisettingsparams.md[parameter]. +In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` [parameter](https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts). [source,typescript] ---- @@ -77,7 +77,7 @@ export class MyPlugin implements Plugin { === Server side usage On the server, `uiSettings` are exposed directly from `core`. -The following example shows how to {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.uisettingsservicesetup.register.md[register] a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other {kib-repo}blob/{branch}/docs/development/core/server/kibana-plugin-core-server.uisettingsparams.md[parameters] are optional. +The following example shows how to register a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other [parameters](https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts) are optional. [source,typescript] ---- From 4561d503998a17d8c6c171e83c6d7d0c6df5af03 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Wed, 2 Aug 2023 17:24:50 -0700 Subject: [PATCH 3/9] fix links --- docs/developer/architecture/core/http-service.asciidoc | 4 ++-- .../core/patterns-scoped-services.asciidoc | 10 +++++----- .../architecture/core/uisettings-service.asciidoc | 7 ++++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/developer/architecture/core/http-service.asciidoc b/docs/developer/architecture/core/http-service.asciidoc index ced5ac9f9a3d1..803aedfb159aa 100644 --- a/docs/developer/architecture/core/http-service.asciidoc +++ b/docs/developer/architecture/core/http-service.asciidoc @@ -12,7 +12,7 @@ The service allows plugins to: * to execute custom logic on an incoming request or server response. * implement custom authentication and authorization strategy. -See [HTTP service types](https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server-internal/src/types.ts) +See https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/types.ts[HTTP service types]. [source,typescript] ---- @@ -64,4 +64,4 @@ async function fetchData(core: CoreStart) { ); } ---- -See [for the client-side APIs](https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-browser/src/types.ts). +See https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-browser/src/types.ts[for the client-side APIs]. diff --git a/docs/developer/architecture/core/patterns-scoped-services.asciidoc b/docs/developer/architecture/core/patterns-scoped-services.asciidoc index ca7300d2e7082..a29a8d24bcd4c 100644 --- a/docs/developer/architecture/core/patterns-scoped-services.asciidoc +++ b/docs/developer/architecture/core/patterns-scoped-services.asciidoc @@ -7,7 +7,7 @@ should perform a check whether an end-user has access to the data. The Kibana Platform introduced a handler interface on the server-side to perform that association internally. Core services, that require impersonation with an incoming request, are exposed via `context` argument of -[the request handler interface](https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/router/request_handler.ts). +https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/router/request_handler.ts[the request handler interface]. [source,js] ---- @@ -16,11 +16,11 @@ async function handler(context, req, res) { } ---- -The [request handler context]((https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/router/request_handler.ts)) exposes the following scoped *core* services: +The https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/router/request_handler.ts[request handler context] exposes the following scoped *core* services: -* [`context.savedObjects.client`](https://github.com/elastic/kibana/blob/main/packages/core/saved-objects/core-saved-objects-api-server/src/saved_objects_client.ts) -* [`context.elasticsearch.client`](https://github.com/elastic/kibana/blob/main/packages/core/elasticsearch/core-elasticsearch-server/src/client/scoped_cluster_client.ts) -* [`context.uiSettings.client`](https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts) +* https://github.com/elastic/kibana/blob/main/packages/core/saved-objects/core-saved-objects-api-server/src/saved_objects_client.ts[`context.savedObjects.client`] +* https://github.com/elastic/kibana/blob/main/packages/core/elasticsearch/core-elasticsearch-server/src/client/scoped_cluster_client.ts[`context.elasticsearch.client`] +* https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts[`context.uiSettings.client`] ==== Declare a custom scoped service diff --git a/docs/developer/architecture/core/uisettings-service.asciidoc b/docs/developer/architecture/core/uisettings-service.asciidoc index 1c5a48db72209..f468e8b53f60d 100644 --- a/docs/developer/architecture/core/uisettings-service.asciidoc +++ b/docs/developer/architecture/core/uisettings-service.asciidoc @@ -38,9 +38,10 @@ uiSettings: [[client-side-usage]] === Client side usage -On the client, the `uiSettings` service is exposed directly from `core` and the [client](https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts) provides plugins access to the `config` entries stored in {es} +On the client, the `uiSettings` service is exposed directly from `core` and the https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts[client] +provides plugins access to the `config` entries stored in {es}. -In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` [parameter](https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts). +In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts[parameter]. [source,typescript] ---- @@ -77,7 +78,7 @@ export class MyPlugin implements Plugin { === Server side usage On the server, `uiSettings` are exposed directly from `core`. -The following example shows how to register a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other [parameters](https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts) are optional. +The following example shows how to register a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts[parameters] are optional. [source,typescript] ---- From 4820858f4a744de31afdacb2074cc14c52fd9905 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Wed, 2 Aug 2023 19:22:08 -0700 Subject: [PATCH 4/9] point link to github --- docs/developer/architecture/core/http-service.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/architecture/core/http-service.asciidoc b/docs/developer/architecture/core/http-service.asciidoc index 803aedfb159aa..897085ed96949 100644 --- a/docs/developer/architecture/core/http-service.asciidoc +++ b/docs/developer/architecture/core/http-service.asciidoc @@ -12,7 +12,7 @@ The service allows plugins to: * to execute custom logic on an incoming request or server response. * implement custom authentication and authorization strategy. -See https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/types.ts[HTTP service types]. +See https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/http_contract.ts[HTTP service contract types]. [source,typescript] ---- From bdfea30dd7bcc25139bf1fc81899ef8eef4a1423 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Thu, 3 Aug 2023 16:50:25 -0700 Subject: [PATCH 5/9] starts intro to core as packages --- .../architecture/core/index.asciidoc | 5 ++++ .../architecture/core/packages.asciidoc | 28 +++++++++++++++++++ docs/developer/architecture/index.asciidoc | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 docs/developer/architecture/core/packages.asciidoc diff --git a/docs/developer/architecture/core/index.asciidoc b/docs/developer/architecture/core/index.asciidoc index b03e98ffbb57d..04cac6091c61a 100644 --- a/docs/developer/architecture/core/index.asciidoc +++ b/docs/developer/architecture/core/index.asciidoc @@ -27,6 +27,8 @@ export class MyPlugin { } ---- + + The services that core provides are: * <> @@ -36,3 +38,6 @@ The services that core provides are: * <> * <> * <> + +NOTE: Core provides the {kib} building blocks for plugins and is implemented as a collection of packages. +* <> diff --git a/docs/developer/architecture/core/packages.asciidoc b/docs/developer/architecture/core/packages.asciidoc new file mode 100644 index 0000000000000..22fde502f1646 --- /dev/null +++ b/docs/developer/architecture/core/packages.asciidoc @@ -0,0 +1,28 @@ +[[core-packages]] +== Core packages + +experimental[] + +Core packages have well defined boundaries, have a single responsibility, are organized by domain and follow the following naming scheme: + +`@kbn/core-domain-component-type` +For example: +* +* +* +* +* +* + +Generally, every domain has a specific package for: +* public types available everywhere in {kib} `src` and `x-pack` +* implementation and unit tests + +In addition, domains contain separate packages for the client-side and server-side and, in some cases, a base, that +supports both client and server needs. When a domain shares code between the server and client, that code lives in +a `common` package. Mocks have their own dedicated package. + +All of core's public API's have inline `jsdocs` that include examples as nescessary. + + + diff --git a/docs/developer/architecture/index.asciidoc b/docs/developer/architecture/index.asciidoc index 90a0972d65f2f..36be54a384b17 100644 --- a/docs/developer/architecture/index.asciidoc +++ b/docs/developer/architecture/index.asciidoc @@ -48,6 +48,8 @@ include::core/uisettings-service.asciidoc[leveloffset=+1] include::core/patterns-scoped-services.asciidoc[leveloffset=+1] +include::core/packages.asciidoc[leveloffset=+1] + include::security/index.asciidoc[leveloffset=+1] include::add-data-tutorials.asciidoc[leveloffset=+1] From f4f860fa3ae180aa5294c883df35dcf490124362 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Wed, 16 Aug 2023 16:01:16 -0700 Subject: [PATCH 6/9] small fixes --- bundle/bundled.json | 326 ++++++++++++++++++ bundle/bundled.yaml | 209 +++++++++++ bundle/entrypoint.json | 326 ++++++++++++++++++ bundle/entrypoint.yaml | 209 +++++++++++ .../architecture/core/index.asciidoc | 3 +- .../architecture/core/packages.asciidoc | 26 +- .../core/uisettings-service.asciidoc | 2 +- 7 files changed, 1084 insertions(+), 17 deletions(-) create mode 100644 bundle/bundled.json create mode 100644 bundle/bundled.yaml create mode 100644 bundle/entrypoint.json create mode 100644 bundle/entrypoint.yaml diff --git a/bundle/bundled.json b/bundle/bundled.json new file mode 100644 index 0000000000000..21c305d6f4216 --- /dev/null +++ b/bundle/bundled.json @@ -0,0 +1,326 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Saved objects", + "description": "OpenAPI schema for saved object endpoints", + "version": "0.1", + "contact": { + "name": "Kibana Core Team" + }, + "license": { + "name": "Elastic License 2.0", + "url": "https://www.elastic.co/licensing/elastic-license" + } + }, + "servers": [ + { + "url": "http://localhost:5601", + "description": "local" + } + ], + "security": [ + { + "basicAuth": [] + }, + { + "apiKeyAuth": [] + } + ], + "tags": [ + { + "name": "saved objects", + "description": "Manage Kibana saved objects, including dashboards, visualizations, and more." + } + ], + "paths": { + "/api/saved_objects/_export": { + "post": { + "summary": "Retrieve sets of saved objects that you want to import into Kibana.", + "operationId": "exportSavedObjects", + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n", + "tags": [ + "saved objects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "anyOf": [ + { + "required": [ + "type" + ] + }, + { + "required": [ + "objects" + ] + } + ], + "properties": { + "excludeExportDetails": { + "description": "Do not add export details entry at the end of the stream.", + "type": "boolean", + "default": false + }, + "includeReferencesDeep": { + "description": "Includes all of the referenced objects in the exported objects.", + "type": "boolean" + }, + "objects": { + "description": "A list of objects to export.", + "type": "array", + "items": { + "type": "object" + } + }, + "type": { + "description": "The saved object types to include in the export.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + }, + "examples": { + "exportSavedObjectsRequest": { + "$ref": "#/components/examples/export_objects_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "multipart/form-data": { + "schema": { + "type": "string" + }, + "examples": { + "exportSavedObjectsResponse": { + "$ref": "#/components/examples/export_objects_response" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/api/saved_objects/_import": { + "post": { + "summary": "Create sets of Kibana saved objects from a file created by the export API.", + "operationId": "importSavedObjects", + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Saved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n", + "tags": [ + "saved objects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "in": "query", + "name": "compatibilityMode", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the `createNewCopies` option.\n" + }, + { + "in": "query", + "name": "createNewCopies", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options.\n" + }, + { + "in": "query", + "name": "overwrite", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the `createNewCopies` option.\n" + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "description": "A file exported using the export API. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be included in this file. Similarly, the `savedObjects.maxImportPayloadBytes` setting limits the overall size of the file that can be imported.\n" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "description": "Indicates the import was unsuccessful and specifies the objects that failed to import. One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error.\n" + }, + "success": { + "type": "boolean", + "description": "Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties.\n" + }, + "successCount": { + "type": "integer", + "description": "Indicates the number of successfully imported records." + }, + "successResults": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Indicates the objects that are successfully imported, with any metadata if applicable. Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the `successResults` array includes a `destinationId` attribute.\n" + }, + "warnings": { + "type": "array" + } + } + }, + "examples": { + "importObjectsResponse": { + "$ref": "#/components/examples/import_objects_response" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + } + }, + "components": { + "securitySchemes": { + "basicAuth": { + "type": "http", + "scheme": "basic" + }, + "apiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "ApiKey" + } + }, + "parameters": { + "kbn_xsrf": { + "schema": { + "type": "string" + }, + "in": "header", + "name": "kbn-xsrf", + "description": "Cross-site request forgery protection", + "required": true + } + }, + "examples": { + "export_objects_request": { + "summary": "Export a specific saved object.", + "value": { + "objects": [ + { + "type": "index-pattern", + "id": "90943e30-9a47-11e8-b64d-95841ca0b247" + } + ], + "includeReferencesDeep": false + } + }, + "export_objects_response": { + "summary": "The export objects API response contains a JSON record for each exported object and an export result details record.", + "value": "{\"attributes\":{\"fieldFormatMap\":\"{\\\"hour_of_day\\\":{}}\",\"name\":\"Kibana Sample Data Logs\",\"runtimeFieldMap\":\"{\\\"hour_of_day\\\":{\\\"type\\\":\\\"long\\\",\\\"script\\\":{\\\"source\\\":\\\"emit(doc['timestamp'].value.getHour());\\\"}}}\",\"timeFieldName\":\"timestamp\",\"title\":\"kibana_sample_data_logs\"},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2023-07-25T19:36:36.695Z\",\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"managed\":false,\"references\":[],\"type\":\"index-pattern\",\"typeMigrationVersion\":\"8.0.0\",\"updated_at\":\"2023-07-25T19:36:36.695Z\",\"version\":\"WzM5LDJd\"}\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":1,\"missingRefCount\":0,\"missingReferences\":[]}\n" + }, + "import_objects_response": { + "summary": "The import objects API response indicates a successful import and the objects are created. Since these objects are created as new copies, each entry in the successResults array includes a destinationId attribute.", + "value": { + "successCount": 1, + "success": true, + "warnings": [], + "successResults": [ + { + "type": "index-pattern", + "id": "90943e30-9a47-11e8-b64d-95841ca0b247", + "meta": { + "title": "Kibana Sample Data Logs", + "icon": "indexPatternApp" + }, + "managed": false, + "destinationId": "82d2760c-468f-49cf-83aa-b9a35b6a8943" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/bundle/bundled.yaml b/bundle/bundled.yaml new file mode 100644 index 0000000000000..0facbd5446640 --- /dev/null +++ b/bundle/bundled.yaml @@ -0,0 +1,209 @@ +openapi: 3.1.0 +info: + title: Saved objects + description: OpenAPI schema for saved object endpoints + version: '0.1' + contact: + name: Kibana Core Team + license: + name: Elastic License 2.0 + url: https://www.elastic.co/licensing/elastic-license +servers: + - url: http://localhost:5601 + description: local +security: + - basicAuth: [] + - apiKeyAuth: [] +tags: + - name: saved objects + description: Manage Kibana saved objects, including dashboards, visualizations, and more. +paths: + /api/saved_objects/_export: + post: + summary: Retrieve sets of saved objects that you want to import into Kibana. + operationId: exportSavedObjects + description: | + This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + type: object + anyOf: + - required: + - type + - required: + - objects + properties: + excludeExportDetails: + description: Do not add export details entry at the end of the stream. + type: boolean + default: false + includeReferencesDeep: + description: Includes all of the referenced objects in the exported objects. + type: boolean + objects: + description: A list of objects to export. + type: array + items: + type: object + type: + description: The saved object types to include in the export. + oneOf: + - type: string + - type: array + items: + type: string + examples: + exportSavedObjectsRequest: + $ref: '#/components/examples/export_objects_request' + responses: + '200': + description: Indicates a successful call. + content: + multipart/form-data: + schema: + type: string + examples: + exportSavedObjectsResponse: + $ref: '#/components/examples/export_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + type: object + additionalProperties: true + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 + /api/saved_objects/_import: + post: + summary: Create sets of Kibana saved objects from a file created by the export API. + operationId: importSavedObjects + description: | + This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Saved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - in: query + name: compatibilityMode + schema: + type: boolean + required: false + description: | + Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the `createNewCopies` option. + - in: query + name: createNewCopies + schema: + type: boolean + required: false + description: | + Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options. + - in: query + name: overwrite + schema: + type: boolean + required: false + description: | + Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the `createNewCopies` option. + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + description: | + A file exported using the export API. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be included in this file. Similarly, the `savedObjects.maxImportPayloadBytes` setting limits the overall size of the file that can be imported. + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + errors: + type: array + description: | + Indicates the import was unsuccessful and specifies the objects that failed to import. One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error. + success: + type: boolean + description: | + Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties. + successCount: + type: integer + description: Indicates the number of successfully imported records. + successResults: + type: array + items: + type: object + description: | + Indicates the objects that are successfully imported, with any metadata if applicable. Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the `successResults` array includes a `destinationId` attribute. + warnings: + type: array + examples: + importObjectsResponse: + $ref: '#/components/examples/import_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + type: object + additionalProperties: true + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 +components: + securitySchemes: + basicAuth: + type: http + scheme: basic + apiKeyAuth: + type: apiKey + in: header + name: ApiKey + parameters: + kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + examples: + export_objects_request: + summary: Export a specific saved object. + value: + objects: + - type: index-pattern + id: 90943e30-9a47-11e8-b64d-95841ca0b247 + includeReferencesDeep: false + export_objects_response: + summary: The export objects API response contains a JSON record for each exported object and an export result details record. + value: | + {"attributes":{"fieldFormatMap":"{\"hour_of_day\":{}}","name":"Kibana Sample Data Logs","runtimeFieldMap":"{\"hour_of_day\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['timestamp'].value.getHour());\"}}}","timeFieldName":"timestamp","title":"kibana_sample_data_logs"},"coreMigrationVersion":"8.8.0","created_at":"2023-07-25T19:36:36.695Z","id":"90943e30-9a47-11e8-b64d-95841ca0b247","managed":false,"references":[],"type":"index-pattern","typeMigrationVersion":"8.0.0","updated_at":"2023-07-25T19:36:36.695Z","version":"WzM5LDJd"} + {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]} + import_objects_response: + summary: The import objects API response indicates a successful import and the objects are created. Since these objects are created as new copies, each entry in the successResults array includes a destinationId attribute. + value: + successCount: 1 + success: true + warnings: [] + successResults: + - type: index-pattern + id: 90943e30-9a47-11e8-b64d-95841ca0b247 + meta: + title: Kibana Sample Data Logs + icon: indexPatternApp + managed: false + destinationId: 82d2760c-468f-49cf-83aa-b9a35b6a8943 diff --git a/bundle/entrypoint.json b/bundle/entrypoint.json new file mode 100644 index 0000000000000..21c305d6f4216 --- /dev/null +++ b/bundle/entrypoint.json @@ -0,0 +1,326 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Saved objects", + "description": "OpenAPI schema for saved object endpoints", + "version": "0.1", + "contact": { + "name": "Kibana Core Team" + }, + "license": { + "name": "Elastic License 2.0", + "url": "https://www.elastic.co/licensing/elastic-license" + } + }, + "servers": [ + { + "url": "http://localhost:5601", + "description": "local" + } + ], + "security": [ + { + "basicAuth": [] + }, + { + "apiKeyAuth": [] + } + ], + "tags": [ + { + "name": "saved objects", + "description": "Manage Kibana saved objects, including dashboards, visualizations, and more." + } + ], + "paths": { + "/api/saved_objects/_export": { + "post": { + "summary": "Retrieve sets of saved objects that you want to import into Kibana.", + "operationId": "exportSavedObjects", + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n", + "tags": [ + "saved objects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "anyOf": [ + { + "required": [ + "type" + ] + }, + { + "required": [ + "objects" + ] + } + ], + "properties": { + "excludeExportDetails": { + "description": "Do not add export details entry at the end of the stream.", + "type": "boolean", + "default": false + }, + "includeReferencesDeep": { + "description": "Includes all of the referenced objects in the exported objects.", + "type": "boolean" + }, + "objects": { + "description": "A list of objects to export.", + "type": "array", + "items": { + "type": "object" + } + }, + "type": { + "description": "The saved object types to include in the export.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + }, + "examples": { + "exportSavedObjectsRequest": { + "$ref": "#/components/examples/export_objects_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "multipart/form-data": { + "schema": { + "type": "string" + }, + "examples": { + "exportSavedObjectsResponse": { + "$ref": "#/components/examples/export_objects_response" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/api/saved_objects/_import": { + "post": { + "summary": "Create sets of Kibana saved objects from a file created by the export API.", + "operationId": "importSavedObjects", + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Saved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n", + "tags": [ + "saved objects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "in": "query", + "name": "compatibilityMode", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the `createNewCopies` option.\n" + }, + { + "in": "query", + "name": "createNewCopies", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options.\n" + }, + { + "in": "query", + "name": "overwrite", + "schema": { + "type": "boolean" + }, + "required": false, + "description": "Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the `createNewCopies` option.\n" + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "description": "A file exported using the export API. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be included in this file. Similarly, the `savedObjects.maxImportPayloadBytes` setting limits the overall size of the file that can be imported.\n" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "description": "Indicates the import was unsuccessful and specifies the objects that failed to import. One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error.\n" + }, + "success": { + "type": "boolean", + "description": "Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties.\n" + }, + "successCount": { + "type": "integer", + "description": "Indicates the number of successfully imported records." + }, + "successResults": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Indicates the objects that are successfully imported, with any metadata if applicable. Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the `successResults` array includes a `destinationId` attribute.\n" + }, + "warnings": { + "type": "array" + } + } + }, + "examples": { + "importObjectsResponse": { + "$ref": "#/components/examples/import_objects_response" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + } + }, + "components": { + "securitySchemes": { + "basicAuth": { + "type": "http", + "scheme": "basic" + }, + "apiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "ApiKey" + } + }, + "parameters": { + "kbn_xsrf": { + "schema": { + "type": "string" + }, + "in": "header", + "name": "kbn-xsrf", + "description": "Cross-site request forgery protection", + "required": true + } + }, + "examples": { + "export_objects_request": { + "summary": "Export a specific saved object.", + "value": { + "objects": [ + { + "type": "index-pattern", + "id": "90943e30-9a47-11e8-b64d-95841ca0b247" + } + ], + "includeReferencesDeep": false + } + }, + "export_objects_response": { + "summary": "The export objects API response contains a JSON record for each exported object and an export result details record.", + "value": "{\"attributes\":{\"fieldFormatMap\":\"{\\\"hour_of_day\\\":{}}\",\"name\":\"Kibana Sample Data Logs\",\"runtimeFieldMap\":\"{\\\"hour_of_day\\\":{\\\"type\\\":\\\"long\\\",\\\"script\\\":{\\\"source\\\":\\\"emit(doc['timestamp'].value.getHour());\\\"}}}\",\"timeFieldName\":\"timestamp\",\"title\":\"kibana_sample_data_logs\"},\"coreMigrationVersion\":\"8.8.0\",\"created_at\":\"2023-07-25T19:36:36.695Z\",\"id\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"managed\":false,\"references\":[],\"type\":\"index-pattern\",\"typeMigrationVersion\":\"8.0.0\",\"updated_at\":\"2023-07-25T19:36:36.695Z\",\"version\":\"WzM5LDJd\"}\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":1,\"missingRefCount\":0,\"missingReferences\":[]}\n" + }, + "import_objects_response": { + "summary": "The import objects API response indicates a successful import and the objects are created. Since these objects are created as new copies, each entry in the successResults array includes a destinationId attribute.", + "value": { + "successCount": 1, + "success": true, + "warnings": [], + "successResults": [ + { + "type": "index-pattern", + "id": "90943e30-9a47-11e8-b64d-95841ca0b247", + "meta": { + "title": "Kibana Sample Data Logs", + "icon": "indexPatternApp" + }, + "managed": false, + "destinationId": "82d2760c-468f-49cf-83aa-b9a35b6a8943" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/bundle/entrypoint.yaml b/bundle/entrypoint.yaml new file mode 100644 index 0000000000000..0facbd5446640 --- /dev/null +++ b/bundle/entrypoint.yaml @@ -0,0 +1,209 @@ +openapi: 3.1.0 +info: + title: Saved objects + description: OpenAPI schema for saved object endpoints + version: '0.1' + contact: + name: Kibana Core Team + license: + name: Elastic License 2.0 + url: https://www.elastic.co/licensing/elastic-license +servers: + - url: http://localhost:5601 + description: local +security: + - basicAuth: [] + - apiKeyAuth: [] +tags: + - name: saved objects + description: Manage Kibana saved objects, including dashboards, visualizations, and more. +paths: + /api/saved_objects/_export: + post: + summary: Retrieve sets of saved objects that you want to import into Kibana. + operationId: exportSavedObjects + description: | + This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + type: object + anyOf: + - required: + - type + - required: + - objects + properties: + excludeExportDetails: + description: Do not add export details entry at the end of the stream. + type: boolean + default: false + includeReferencesDeep: + description: Includes all of the referenced objects in the exported objects. + type: boolean + objects: + description: A list of objects to export. + type: array + items: + type: object + type: + description: The saved object types to include in the export. + oneOf: + - type: string + - type: array + items: + type: string + examples: + exportSavedObjectsRequest: + $ref: '#/components/examples/export_objects_request' + responses: + '200': + description: Indicates a successful call. + content: + multipart/form-data: + schema: + type: string + examples: + exportSavedObjectsResponse: + $ref: '#/components/examples/export_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + type: object + additionalProperties: true + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 + /api/saved_objects/_import: + post: + summary: Create sets of Kibana saved objects from a file created by the export API. + operationId: importSavedObjects + description: | + This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Saved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - in: query + name: compatibilityMode + schema: + type: boolean + required: false + description: | + Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the `createNewCopies` option. + - in: query + name: createNewCopies + schema: + type: boolean + required: false + description: | + Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options. + - in: query + name: overwrite + schema: + type: boolean + required: false + description: | + Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the `createNewCopies` option. + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + description: | + A file exported using the export API. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be included in this file. Similarly, the `savedObjects.maxImportPayloadBytes` setting limits the overall size of the file that can be imported. + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + errors: + type: array + description: | + Indicates the import was unsuccessful and specifies the objects that failed to import. One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error. + success: + type: boolean + description: | + Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties. + successCount: + type: integer + description: Indicates the number of successfully imported records. + successResults: + type: array + items: + type: object + description: | + Indicates the objects that are successfully imported, with any metadata if applicable. Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the `successResults` array includes a `destinationId` attribute. + warnings: + type: array + examples: + importObjectsResponse: + $ref: '#/components/examples/import_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + type: object + additionalProperties: true + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 +components: + securitySchemes: + basicAuth: + type: http + scheme: basic + apiKeyAuth: + type: apiKey + in: header + name: ApiKey + parameters: + kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + examples: + export_objects_request: + summary: Export a specific saved object. + value: + objects: + - type: index-pattern + id: 90943e30-9a47-11e8-b64d-95841ca0b247 + includeReferencesDeep: false + export_objects_response: + summary: The export objects API response contains a JSON record for each exported object and an export result details record. + value: | + {"attributes":{"fieldFormatMap":"{\"hour_of_day\":{}}","name":"Kibana Sample Data Logs","runtimeFieldMap":"{\"hour_of_day\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['timestamp'].value.getHour());\"}}}","timeFieldName":"timestamp","title":"kibana_sample_data_logs"},"coreMigrationVersion":"8.8.0","created_at":"2023-07-25T19:36:36.695Z","id":"90943e30-9a47-11e8-b64d-95841ca0b247","managed":false,"references":[],"type":"index-pattern","typeMigrationVersion":"8.0.0","updated_at":"2023-07-25T19:36:36.695Z","version":"WzM5LDJd"} + {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]} + import_objects_response: + summary: The import objects API response indicates a successful import and the objects are created. Since these objects are created as new copies, each entry in the successResults array includes a destinationId attribute. + value: + successCount: 1 + success: true + warnings: [] + successResults: + - type: index-pattern + id: 90943e30-9a47-11e8-b64d-95841ca0b247 + meta: + title: Kibana Sample Data Logs + icon: indexPatternApp + managed: false + destinationId: 82d2760c-468f-49cf-83aa-b9a35b6a8943 diff --git a/docs/developer/architecture/core/index.asciidoc b/docs/developer/architecture/core/index.asciidoc index 04cac6091c61a..e866fefb38530 100644 --- a/docs/developer/architecture/core/index.asciidoc +++ b/docs/developer/architecture/core/index.asciidoc @@ -39,5 +39,4 @@ The services that core provides are: * <> * <> -NOTE: Core provides the {kib} building blocks for plugins and is implemented as a collection of packages. -* <> +NOTE: Core provides the {kib} building blocks for plugins and is implemented as a collection of <>. diff --git a/docs/developer/architecture/core/packages.asciidoc b/docs/developer/architecture/core/packages.asciidoc index 22fde502f1646..b19c6d6441356 100644 --- a/docs/developer/architecture/core/packages.asciidoc +++ b/docs/developer/architecture/core/packages.asciidoc @@ -3,20 +3,18 @@ experimental[] -Core packages have well defined boundaries, have a single responsibility, are organized by domain and follow the following naming scheme: - -`@kbn/core-domain-component-type` -For example: -* -* -* -* -* -* - -Generally, every domain has a specific package for: -* public types available everywhere in {kib} `src` and `x-pack` -* implementation and unit tests +Core packages have well defined boundaries, have a single responsibility, and are organized by domain. Core packages follow a specific naming schema, according to what the contain: + +For example, core capapability packages are: + +* `core-capabilities-browser-internal` +* `core-capabilities-browser-mocks` +* `core-capabilities-common` +* `core-capabilities-server` +* `core-capabilities-server-internal` +* `core-capabilities-server-mocks` + +Every domain has a specific package for public types, importable from everywhere in Kibana code, implementation and unit tests, internal to core, not intended for public use, and mocks, exposed to plugins for unit testing. In addition, domains contain separate packages for the client-side and server-side and, in some cases, a base, that supports both client and server needs. When a domain shares code between the server and client, that code lives in diff --git a/docs/developer/architecture/core/uisettings-service.asciidoc b/docs/developer/architecture/core/uisettings-service.asciidoc index f468e8b53f60d..306491118a3c0 100644 --- a/docs/developer/architecture/core/uisettings-service.asciidoc +++ b/docs/developer/architecture/core/uisettings-service.asciidoc @@ -115,7 +115,7 @@ export class MyPlugin implements Plugin { Migrations for 3rd party plugin advanced settings are not currently supported. If a 3rd party plugin registers an advanced setting, the setting is essentially permanent and cannot be fixed without manual intervention. ============================================== -To change or remove a `uiSetting`, the whole `config` Saved Object needs to be migrated. `uiSettings` {kib-repo}blob/{branch}/src/core/server/ui_settings/saved_objects/migrations.ts[migrations] are declared directly in the service. +To change or remove a `uiSetting`, the whole `config` Saved Object needs to be migrated. For example, if we wanted to remove a `custom` setting, or rename `my_setting:fourtyTwo` to `my_other_setting:fourtyTwo`, we'd need two migration entries, one for each change targeting the version in which these changes apply: From 72e0bb9e9f80f2173a894684307318174679bb5f Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Thu, 17 Aug 2023 12:15:14 -0700 Subject: [PATCH 7/9] point to concrete repo branch, use shared docs attributes --- .../architecture/core/application_service.asciidoc | 2 +- docs/developer/architecture/core/http-service.asciidoc | 4 ++-- .../core/patterns-scoped-services.asciidoc | 10 +++++----- .../architecture/core/uisettings-service.asciidoc | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/developer/architecture/core/application_service.asciidoc b/docs/developer/architecture/core/application_service.asciidoc index 4e619799b40f4..31b0a3d2a4356 100644 --- a/docs/developer/architecture/core/application_service.asciidoc +++ b/docs/developer/architecture/core/application_service.asciidoc @@ -29,7 +29,7 @@ export class MyPlugin implements Plugin { } } ---- -<1> See https://github.com/elastic/kibana/blob/main/packages/core/application/core-application-browser/src/contracts.ts[application.register interface] +<1> Refer to {kib-repo}/blob/8.9/packages/core/application/core-application-browser/src/contracts.ts[application.register interface] <2> Application specific URL. <3> `mount` callback is invoked when a user navigates to the application-specific URL. <4> `core.getStartServices` method provides API available during `start` lifecycle. diff --git a/docs/developer/architecture/core/http-service.asciidoc b/docs/developer/architecture/core/http-service.asciidoc index 897085ed96949..da4f0a3f7f5e1 100644 --- a/docs/developer/architecture/core/http-service.asciidoc +++ b/docs/developer/architecture/core/http-service.asciidoc @@ -12,7 +12,7 @@ The service allows plugins to: * to execute custom logic on an incoming request or server response. * implement custom authentication and authorization strategy. -See https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/http_contract.ts[HTTP service contract types]. +Refer to {kib-repo}/blob/8.9/packages/core/http/core-http-server/src/http_contract.ts[HTTP service contract types]. [source,typescript] ---- @@ -64,4 +64,4 @@ async function fetchData(core: CoreStart) { ); } ---- -See https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-browser/src/types.ts[for the client-side APIs]. +Refer to {kib-repo}/blob/8.9/packages/core/http/core-http-browser/src/types.ts[the client-side APIs]. diff --git a/docs/developer/architecture/core/patterns-scoped-services.asciidoc b/docs/developer/architecture/core/patterns-scoped-services.asciidoc index a29a8d24bcd4c..ba993a6da3af3 100644 --- a/docs/developer/architecture/core/patterns-scoped-services.asciidoc +++ b/docs/developer/architecture/core/patterns-scoped-services.asciidoc @@ -7,7 +7,7 @@ should perform a check whether an end-user has access to the data. The Kibana Platform introduced a handler interface on the server-side to perform that association internally. Core services, that require impersonation with an incoming request, are exposed via `context` argument of -https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/router/request_handler.ts[the request handler interface]. +{kib-repo}/blob/8.9/packages/core/http/core-http-server/src/router/request_handler.ts[the request handler interface]. [source,js] ---- @@ -16,11 +16,11 @@ async function handler(context, req, res) { } ---- -The https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server/src/router/request_handler.ts[request handler context] exposes the following scoped *core* services: +The {kib-repo}/blob/8.9/packages/core/http/core-http-server/src/router/request_handler.ts[request handler context] exposes the following scoped *core* services: -* https://github.com/elastic/kibana/blob/main/packages/core/saved-objects/core-saved-objects-api-server/src/saved_objects_client.ts[`context.savedObjects.client`] -* https://github.com/elastic/kibana/blob/main/packages/core/elasticsearch/core-elasticsearch-server/src/client/scoped_cluster_client.ts[`context.elasticsearch.client`] -* https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts[`context.uiSettings.client`] +* {kib-repo}/blob/8.9/packages/core/saved-objects/core-saved-objects-api-server/src/saved_objects_client.ts[`context.savedObjects.client`] +* {kib-repo}/blob/8.9/packages/core/elasticsearch/core-elasticsearch-server/src/client/scoped_cluster_client.ts[`context.elasticsearch.client`] +* {kib-repo}/blob/8.9/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts[`context.uiSettings.client`] ==== Declare a custom scoped service diff --git a/docs/developer/architecture/core/uisettings-service.asciidoc b/docs/developer/architecture/core/uisettings-service.asciidoc index 306491118a3c0..f70180b72d928 100644 --- a/docs/developer/architecture/core/uisettings-service.asciidoc +++ b/docs/developer/architecture/core/uisettings-service.asciidoc @@ -38,10 +38,10 @@ uiSettings: [[client-side-usage]] === Client side usage -On the client, the `uiSettings` service is exposed directly from `core` and the https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts[client] +On the client, the `uiSettings` service is exposed directly from `core` and the {kib-repo}/blob/8.9/packages/core/ui-settings/core-ui-settings-server/src/ui_settings_client.ts[client] provides plugins access to the `config` entries stored in {es}. -In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts[parameter]. +In the interest of performance, `uiSettings` are cached. Any changes that require cache refreshes should register an instruction to reload the page when settings are configured in Advanced Settings using the `requiresPageReload` {kib-repo}/blob/8.9/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts[parameter]. [source,typescript] ---- @@ -78,7 +78,7 @@ export class MyPlugin implements Plugin { === Server side usage On the server, `uiSettings` are exposed directly from `core`. -The following example shows how to register a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other https://github.com/elastic/kibana/blob/main/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts[parameters] are optional. +The following example shows how to register a new `custom` setting with a default value of '42'. When registering a new setting, you must provide a schema against which validations are performed on read and write. All the other {kib-repo}/blob/8.9/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts[parameters] are optional. [source,typescript] ---- From 681f10e25814a9dbeb65e04a3d5ff5d7104ba7b1 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Mon, 21 Aug 2023 12:22:19 -0700 Subject: [PATCH 8/9] Update docs/developer/architecture/core/packages.asciidoc Co-authored-by: amyjtechwriter <61687663+amyjtechwriter@users.noreply.github.com> --- docs/developer/architecture/core/packages.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/architecture/core/packages.asciidoc b/docs/developer/architecture/core/packages.asciidoc index b19c6d6441356..919f1a035e43a 100644 --- a/docs/developer/architecture/core/packages.asciidoc +++ b/docs/developer/architecture/core/packages.asciidoc @@ -3,7 +3,7 @@ experimental[] -Core packages have well defined boundaries, have a single responsibility, and are organized by domain. Core packages follow a specific naming schema, according to what the contain: +Core packages have well defined boundaries, have a single responsibility, and are organized by domain. Core packages follow a specific naming schema, according to what they contain: For example, core capapability packages are: From cf0fb39c0e594d4572f1e17598c34304e9d14bf3 Mon Sep 17 00:00:00 2001 From: "Christiane (Tina) Heiligers" Date: Mon, 21 Aug 2023 12:23:20 -0700 Subject: [PATCH 9/9] Update docs/developer/architecture/core/packages.asciidoc Co-authored-by: amyjtechwriter <61687663+amyjtechwriter@users.noreply.github.com> --- docs/developer/architecture/core/packages.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/architecture/core/packages.asciidoc b/docs/developer/architecture/core/packages.asciidoc index 919f1a035e43a..bc544e3540d2e 100644 --- a/docs/developer/architecture/core/packages.asciidoc +++ b/docs/developer/architecture/core/packages.asciidoc @@ -14,7 +14,7 @@ For example, core capapability packages are: * `core-capabilities-server-internal` * `core-capabilities-server-mocks` -Every domain has a specific package for public types, importable from everywhere in Kibana code, implementation and unit tests, internal to core, not intended for public use, and mocks, exposed to plugins for unit testing. +Each domain has a specific package for public types, which can be imported and used throughout the Kibana codebase including in its implementation and unit tests. These packages are internal to core and not intended for public use, but they can be used by plugins to create mock versions for unit testing. In addition, domains contain separate packages for the client-side and server-side and, in some cases, a base, that supports both client and server needs. When a domain shares code between the server and client, that code lives in