diff --git a/packages/core/saved-objects/docs/openapi/README.md b/packages/core/saved-objects/docs/openapi/README.md index 71b3ceebec0b3..a64b4289935f8 100644 --- a/packages/core/saved-objects/docs/openapi/README.md +++ b/packages/core/saved-objects/docs/openapi/README.md @@ -16,19 +16,23 @@ To validate and bundle the docs, you can use [Redocly](https://redocly.com/docs/ For example, run the following commands from the `packages/core/saved-objects/docs/openapi/` folder: - ```bash - npx swagger-cli validate entrypoint.yaml - ``` +```bash +npx swagger-cli validate entrypoint.yaml +npx swagger-cli validate entrypoint-serverless.yaml +``` Then you can generate the `bundled` files by running the following commands: - ```bash - npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml - npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json - ``` +```bash +npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml +npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json +npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.yaml --ext yaml +npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.json --ext json +``` After generating the json bundle ensure that it is also valid by running the following command: - ```bash - npx @redocly/cli lint bundled.json - ``` +```bash +npx @redocly/cli lint bundled.json +npx @redocly/cli lint bundled_serverless.json +``` diff --git a/packages/core/saved-objects/docs/openapi/bundled.json b/packages/core/saved-objects/docs/openapi/bundled.json index 4382ee9b62d98..32e429e0d9c51 100644 --- a/packages/core/saved-objects/docs/openapi/bundled.json +++ b/packages/core/saved-objects/docs/openapi/bundled.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.0", + "openapi": "3.0.3", "info": { "title": "Saved objects", "description": "OpenAPI schema for saved object endpoints", @@ -34,7 +34,7 @@ "paths": { "/api/encrypted_saved_objects/_rotate_key": { "post": { - "summary": "Rotate the encryption key for encrypted saved objects.", + "summary": "Rotate a key for encrypted saved objects", "operationId": "rotateEncryptionKey", "description": "Superuser role required.\n\nIf a saved object cannot be decrypted using the primary encryption key, then Kibana will attempt to decrypt it using the specified decryption-only keys. In most of the cases this overhead is negligible, but if you're dealing with a large number of saved objects and experiencing performance issues, you may want to rotate the encryption key.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", "tags": [ @@ -116,7 +116,7 @@ }, "/api/saved_objects/_bulk_create": { "post": { - "summary": "Create multiple Kibana saved objects.", + "summary": "Create saved objects", "operationId": "bulkCreateSavedObjects", "deprecated": true, "tags": [ @@ -174,7 +174,7 @@ }, "/api/saved_objects/_bulk_delete": { "post": { - "summary": "Remove multiple Kibana saved objects.", + "summary": "Delete saved objects", "operationId": "bulkDeleteSavedObjects", "description": "WARNING: When you delete a saved object, it cannot be recovered.\n", "deprecated": true, @@ -233,7 +233,7 @@ }, "/api/saved_objects/_bulk_get": { "post": { - "summary": "Retrieve multiple Kibana saved objects by identifier.", + "summary": "Get saved objects", "operationId": "bulkGetSavedObjects", "deprecated": true, "tags": [ @@ -283,10 +283,10 @@ }, "/api/saved_objects/_bulk_resolve": { "post": { - "summary": "Retrieve multiple Kibana saved objects by identifier using any legacy URL aliases if they exist.", + "summary": "Resolve saved objects", "operationId": "bulkResolveSavedObjects", "deprecated": true, - "description": "Under certain circumstances when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved by the bulk resolve API using either its new ID or its old ID.\n", + "description": "Retrieve multiple Kibana saved objects by identifier using any legacy URL aliases if they exist. Under certain circumstances when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved by the bulk resolve API using either its new ID or its old ID.\n", "tags": [ "saved objects" ], @@ -334,8 +334,9 @@ }, "/api/saved_objects/_bulk_update": { "post": { - "summary": "Update the attributes for multiple Kibana saved objects.", + "summary": "Update saved objects", "operationId": "bulkUpdateSavedObjects", + "description": "Update the attributes for multiple Kibana saved objects.", "deprecated": true, "tags": [ "saved objects" @@ -384,9 +385,9 @@ }, "/api/saved_objects/_export": { "post": { - "summary": "Retrieve sets of saved objects that you want to import into Kibana.", - "operationId": "exportSavedObjects", - "description": "\nYou must include `type` or `objects` in the request body.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "summary": "Export saved objects in the default space", + "operationId": "exportSavedObjectsDefault", + "description": "Retrieve sets of saved objects that you want to import into Kibana.\nYou must include `type` or `objects` in the request body.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", "tags": [ "saved objects" ], @@ -474,8 +475,9 @@ }, "/api/saved_objects/_find": { "get": { - "summary": "Retrieve a paginated set of Kibana saved objects.", + "summary": "Search for saved objects", "operationId": "findSavedObjects", + "description": "Retrieve a paginated set of Kibana saved objects.", "deprecated": true, "tags": [ "saved objects" @@ -642,9 +644,9 @@ }, "/api/saved_objects/_import": { "post": { - "summary": "Create sets of Kibana saved objects from a file created by the export API.", - "operationId": "importSavedObjects", - "description": "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\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "summary": "Import saved objects in the default space", + "operationId": "importSavedObjectsDefault", + "description": "Create sets of Kibana saved objects from a file created by the export API.\nSaved 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\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", "tags": [ "saved objects" ], @@ -755,9 +757,9 @@ }, "/api/saved_objects/_resolve_import_errors": { "post": { - "summary": "Resolve errors from the Import objects API.", + "summary": "Resolve import errors", "operationId": "resolveImportErrors", - "description": "To resolve errors, you can:\n\n* Retry certain saved objects\n* Overwrite specific saved objects\n* Change references to different saved objects\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "description": "To resolve errors from the Import objects API, you can:\n\n* Retry certain saved objects\n* Overwrite specific saved objects\n* Change references to different saved objects\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", "tags": [ "saved objects" ], @@ -915,8 +917,9 @@ }, "/api/saved_objects/{type}": { "post": { - "summary": "Create Kibana saved objects with randomly generated identifiers.", + "summary": "Create a saved object", "operationId": "createSavedObject", + "description": "Create a Kibana saved object with a randomly generated identifier.", "deprecated": true, "tags": [ "saved objects" @@ -987,8 +990,9 @@ }, "/api/saved_objects/{type}/{id}": { "get": { - "summary": "Retrieve a single Kibana saved object by identifier.", + "summary": "Get a saved object", "operationId": "getSavedObject", + "description": "Retrieve a single Kibana saved object by identifier.", "deprecated": true, "tags": [ "saved objects" @@ -1025,8 +1029,9 @@ } }, "post": { - "summary": "Create Kibana saved objects.", + "summary": "Create a saved object", "operationId": "createSavedObjectId", + "description": "Create a Kibana saved object and specify its identifier instead of using a randomly generated ID.", "deprecated": true, "tags": [ "saved objects" @@ -1098,8 +1103,9 @@ } }, "put": { - "summary": "Update the attributes for Kibana saved objects.", + "summary": "Update a saved object", "operationId": "updateSavedObject", + "description": "Update the attributes for Kibana saved objects.", "deprecated": true, "tags": [ "saved objects" @@ -1161,9 +1167,9 @@ }, "/api/saved_objects/resolve/{type}/{id}": { "get": { - "summary": "Retrieve a single Kibana saved object by identifier using any legacy URL alias if it exists.", + "summary": "Resolve a saved object", "operationId": "resolveSavedObject", - "description": "Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved using either its new ID or its old ID.\n", + "description": "Retrieve a single Kibana saved object by identifier using any legacy URL alias if it exists. Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved using either its new ID or its old ID.\n", "deprecated": true, "tags": [ "saved objects" diff --git a/packages/core/saved-objects/docs/openapi/bundled.yaml b/packages/core/saved-objects/docs/openapi/bundled.yaml index a12e326ccdbe4..53874b9a469cf 100644 --- a/packages/core/saved-objects/docs/openapi/bundled.yaml +++ b/packages/core/saved-objects/docs/openapi/bundled.yaml @@ -1,4 +1,4 @@ -openapi: 3.1.0 +openapi: 3.0.3 info: title: Saved objects description: OpenAPI schema for saved object endpoints @@ -19,7 +19,7 @@ tags: paths: /api/encrypted_saved_objects/_rotate_key: post: - summary: Rotate the encryption key for encrypted saved objects. + summary: Rotate a key for encrypted saved objects operationId: rotateEncryptionKey description: | Superuser role required. @@ -84,7 +84,7 @@ paths: type: object /api/saved_objects/_bulk_create: post: - summary: Create multiple Kibana saved objects. + summary: Create saved objects operationId: bulkCreateSavedObjects deprecated: true tags: @@ -119,7 +119,7 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_bulk_delete: post: - summary: Remove multiple Kibana saved objects. + summary: Delete saved objects operationId: bulkDeleteSavedObjects description: | WARNING: When you delete a saved object, it cannot be recovered. @@ -158,7 +158,7 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_bulk_get: post: - summary: Retrieve multiple Kibana saved objects by identifier. + summary: Get saved objects operationId: bulkGetSavedObjects deprecated: true tags: @@ -188,11 +188,11 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_bulk_resolve: post: - summary: Retrieve multiple Kibana saved objects by identifier using any legacy URL aliases if they exist. + summary: Resolve saved objects operationId: bulkResolveSavedObjects deprecated: true description: | - Under certain circumstances when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved by the bulk resolve API using either its new ID or its old ID. + Retrieve multiple Kibana saved objects by identifier using any legacy URL aliases if they exist. Under certain circumstances when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved by the bulk resolve API using either its new ID or its old ID. tags: - saved objects parameters: @@ -221,8 +221,9 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_bulk_update: post: - summary: Update the attributes for multiple Kibana saved objects. + summary: Update saved objects operationId: bulkUpdateSavedObjects + description: Update the attributes for multiple Kibana saved objects. deprecated: true tags: - saved objects @@ -252,10 +253,10 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_export: post: - summary: Retrieve sets of saved objects that you want to import into Kibana. - operationId: exportSavedObjects + summary: Export saved objects in the default space + operationId: exportSavedObjectsDefault description: | - + Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. @@ -313,8 +314,9 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_find: get: - summary: Retrieve a paginated set of Kibana saved objects. + summary: Search for saved objects operationId: findSavedObjects + description: Retrieve a paginated set of Kibana saved objects. deprecated: true tags: - saved objects @@ -414,9 +416,10 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_import: post: - summary: Create sets of Kibana saved objects from a file created by the export API. - operationId: importSavedObjects + summary: Import saved objects in the default space + operationId: importSavedObjectsDefault description: | + Create sets of Kibana saved objects from a file created by the export API. 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. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. @@ -500,10 +503,10 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_resolve_import_errors: post: - summary: Resolve errors from the Import objects API. + summary: Resolve import errors operationId: resolveImportErrors description: | - To resolve errors, you can: + To resolve errors from the Import objects API, you can: * Retry certain saved objects * Overwrite specific saved objects @@ -623,8 +626,9 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/{type}: post: - summary: Create Kibana saved objects with randomly generated identifiers. + summary: Create a saved object operationId: createSavedObject + description: Create a Kibana saved object with a randomly generated identifier. deprecated: true tags: - saved objects @@ -666,8 +670,9 @@ paths: type: object /api/saved_objects/{type}/{id}: get: - summary: Retrieve a single Kibana saved object by identifier. + summary: Get a saved object operationId: getSavedObject + description: Retrieve a single Kibana saved object by identifier. deprecated: true tags: - saved objects @@ -688,8 +693,9 @@ paths: schema: $ref: '#/components/schemas/400_response' post: - summary: Create Kibana saved objects. + summary: Create a saved object operationId: createSavedObjectId + description: Create a Kibana saved object and specify its identifier instead of using a randomly generated ID. deprecated: true tags: - saved objects @@ -731,8 +737,9 @@ paths: schema: type: object put: - summary: Update the attributes for Kibana saved objects. + summary: Update a saved object operationId: updateSavedObject + description: Update the attributes for Kibana saved objects. deprecated: true tags: - saved objects @@ -767,10 +774,10 @@ paths: type: object /api/saved_objects/resolve/{type}/{id}: get: - summary: Retrieve a single Kibana saved object by identifier using any legacy URL alias if it exists. + summary: Resolve a saved object operationId: resolveSavedObject description: | - Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved using either its new ID or its old ID. + Retrieve a single Kibana saved object by identifier using any legacy URL alias if it exists. Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved using either its new ID or its old ID. deprecated: true tags: - saved objects diff --git a/packages/core/saved-objects/docs/openapi/bundled_serverless.json b/packages/core/saved-objects/docs/openapi/bundled_serverless.json new file mode 100644 index 0000000000000..9fdd5303eaf46 --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/bundled_serverless.json @@ -0,0 +1,603 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Serverless saved objects", + "description": "OpenAPI schema for serverless 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": "https://{kibana_url}", + "variables": { + "kibana_url": { + "default": "localhost:5601" + } + } + } + ], + "security": [ + { + "apiKeyAuth": [] + } + ], + "tags": [ + { + "name": "saved objects", + "description": "Manage Kibana saved objects, including dashboards, visualizations, and more." + } + ], + "paths": { + "/api/saved_objects/_export": { + "post": { + "summary": "Export saved objects in the default space", + "operationId": "exportSavedObjectsDefault", + "description": "Retrieve sets of saved objects that you want to import into Kibana.\nYou must include `type` or `objects` in the request body.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "tags": [ + "saved objects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "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. Use `*` to export all the types.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + }, + "examples": { + "exportSavedObjectsRequest": { + "$ref": "#/components/examples/export_objects_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/x-ndjson": { + "schema": { + "type": "object", + "additionalProperties": true + }, + "examples": { + "exportSavedObjectsResponse": { + "$ref": "#/components/examples/export_objects_response" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + } + } + } + }, + "/api/saved_objects/_import": { + "post": { + "summary": "Import saved objects in the default space", + "operationId": "importSavedObjectsDefault", + "description": "Create sets of Kibana saved objects from a file created by the export API.\nSaved 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\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "tags": [ + "saved objects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "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" + }, + { + "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" + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "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" + } + } + }, + "examples": { + "importObjectsRequest": { + "$ref": "#/components/examples/import_objects_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "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." + }, + "errors": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Indicates the import was unsuccessful and specifies the objects that failed to import.\n\nNOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error.\n" + }, + "successResults": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Indicates the objects that are successfully imported, with any metadata if applicable.\n\nNOTE: 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" + } + } + }, + "examples": { + "importObjectsResponse": { + "$ref": "#/components/examples/import_objects_response" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + } + } + } + }, + "/s/{spaceId}/api/saved_objects/_export": { + "post": { + "summary": "Export saved objects", + "operationId": "exportSavedObjects", + "description": "Retrieves sets of saved objects that you want to import into Kibana.\nYou must include `type` or `objects` in the request body.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "tags": [ + "saved objects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/export_objects_request" + }, + "examples": { + "exportSavedObjectsRequest": { + "$ref": "#/components/examples/export_objects_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/x-ndjson": { + "schema": { + "type": "object", + "additionalProperties": true + }, + "examples": { + "exportSavedObjectsResponse": { + "$ref": "#/components/examples/export_objects_response" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + } + } + } + }, + "/s/{spaceId}/api/saved_objects/_import": { + "post": { + "summary": "Import saved objects", + "operationId": "importSavedObjects", + "description": "Creates sets of Kibana saved objects from a file created by the export API.\nSaved 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\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "tags": [ + "saved objects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/space_id" + }, + { + "$ref": "#/components/parameters/compatibility_mode" + }, + { + "$ref": "#/components/parameters/create_new_copies" + }, + { + "$ref": "#/components/parameters/overwrite" + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/import_objects_request" + }, + "examples": { + "importObjectsRequest": { + "$ref": "#/components/examples/import_objects_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/200_import_objects_response" + }, + "examples": { + "importObjectsResponse": { + "$ref": "#/components/examples/import_objects_response" + } + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "apiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "Serverless APIs support only key-based authentication. You must create an API key and use the encoded value in the request header. For example: 'Authorization: ApiKey base64AccessApiKey'.\n" + } + }, + "parameters": { + "kbn_xsrf": { + "schema": { + "type": "string" + }, + "in": "header", + "name": "kbn-xsrf", + "description": "Cross-site request forgery protection", + "required": true + }, + "space_id": { + "in": "path", + "name": "spaceId", + "description": "An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.", + "required": true, + "schema": { + "type": "string", + "example": "default" + } + }, + "compatibility_mode": { + "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" + }, + "create_new_copies": { + "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" + }, + "overwrite": { + "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" + } + }, + "examples": { + "export_objects_request": { + "summary": "Export a specific saved object.", + "value": { + "objects": [ + { + "type": "map", + "id": "de71f4f0-1902-11e9-919b-ffe5949a18d2" + } + ], + "includeReferencesDeep": false, + "excludeExportDetails": true + } + }, + "export_objects_response": { + "summary": "The export objects API response contains a JSON record for each exported object.", + "value": { + "attributes": { + "description": "", + "layerListJSON": "[{\"id\":\"0hmz5\",\"alpha\":1,\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"isAutoSelect\":true,\"lightModeDefault\":\"road_map_desaturated\"},\"visible\":true,\"style\":{},\"type\":\"EMS_VECTOR_TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"edh66\",\"label\":\"Total Requests by Destination\",\"minZoom\":0,\"maxZoom\":24,\"alpha\":0.5,\"sourceDescriptor\":{\"type\":\"EMS_FILE\",\"id\":\"world_countries\",\"tooltipProperties\":[\"name\",\"iso2\"]},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"__kbnjoin__count__673ff994-fc75-4c67-909b-69fcb0e1060e\",\"origin\":\"join\"},\"color\":\"Greys\",\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\",\"joins\":[{\"leftField\":\"iso2\",\"right\":{\"type\":\"ES_TERM_SOURCE\",\"id\":\"673ff994-fc75-4c67-909b-69fcb0e1060e\",\"indexPatternTitle\":\"kibana_sample_data_logs\",\"term\":\"geo.dest\",\"indexPatternRefName\":\"layer_1_join_0_index_pattern\",\"metrics\":[{\"type\":\"count\",\"label\":\"web logs count\"}],\"applyGlobalQuery\":true}}]},{\"id\":\"gaxya\",\"label\":\"Actual Requests\",\"minZoom\":9,\"maxZoom\":24,\"alpha\":1,\"sourceDescriptor\":{\"id\":\"b7486535-171b-4d3b-bb2e-33c1a0a2854c\",\"type\":\"ES_SEARCH\",\"geoField\":\"geo.coordinates\",\"limit\":2048,\"filterByMapBounds\":true,\"tooltipProperties\":[\"clientip\",\"timestamp\",\"host\",\"request\",\"response\",\"machine.os\",\"agent\",\"bytes\"],\"indexPatternRefName\":\"layer_2_source_index_pattern\",\"applyGlobalQuery\":true,\"scalingType\":\"LIMIT\"},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#2200ff\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":2}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"bytes\",\"origin\":\"source\"},\"minSize\":1,\"maxSize\":23,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\"},{\"id\":\"tfi3f\",\"label\":\"Total Requests and Bytes\",\"minZoom\":0,\"maxZoom\":9,\"alpha\":1,\"sourceDescriptor\":{\"type\":\"ES_GEO_GRID\",\"resolution\":\"COARSE\",\"id\":\"8aaa65b5-a4e9-448b-9560-c98cb1c5ac5b\",\"geoField\":\"geo.coordinates\",\"requestType\":\"point\",\"metrics\":[{\"type\":\"count\",\"label\":\"web logs count\"},{\"type\":\"sum\",\"field\":\"bytes\"}],\"indexPatternRefName\":\"layer_3_source_index_pattern\",\"applyGlobalQuery\":true},\"visible\":true,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"color\":\"Blues\",\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#cccccc\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"sum_of_bytes\",\"origin\":\"source\"},\"minSize\":7,\"maxSize\":25,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"labelText\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"labelSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"name\":\"doc_count\",\"origin\":\"source\"},\"minSize\":12,\"maxSize\":24,\"fieldMetaOptions\":{\"isEnabled\":false,\"sigma\":3}}},\"symbolizeAs\":{\"options\":{\"value\":\"circle\"}},\"icon\":{\"type\":\"STATIC\",\"options\":{\"value\":\"marker\"}}}},\"type\":\"GEOJSON_VECTOR\"}]", + "mapStateJSON": "{\"zoom\":3.64,\"center\":{\"lon\":-88.92107,\"lat\":42.16337},\"timeFilters\":{\"from\":\"now-7d\",\"to\":\"now\"},\"refreshConfig\":{\"isPaused\":true,\"interval\":0},\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"settings\":{\"autoFitToDataBounds\":false}}", + "title": "[Logs] Total Requests and Bytes", + "uiStateJSON": "{\"isDarkMode\":false}" + }, + "coreMigrationVersion": "8.8.0", + "created_at": "2023-08-23T20:03:32.204Z", + "id": "de71f4f0-1902-11e9-919b-ffe5949a18d2", + "managed": false, + "references": [ + { + "id": "90943e30-9a47-11e8-b64d-95841ca0b247", + "name": "layer_1_join_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "90943e30-9a47-11e8-b64d-95841ca0b247", + "name": "layer_2_source_index_pattern", + "type": "index-pattern" + }, + { + "id": "90943e30-9a47-11e8-b64d-95841ca0b247", + "name": "layer_3_source_index_pattern", + "type": "index-pattern" + } + ], + "type": "map", + "typeMigrationVersion": "8.4.0", + "updated_at": "2023-08-23T20:03:32.204Z", + "version": "WzEzLDFd" + } + }, + "import_objects_request": { + "value": { + "file": "file.ndjson" + } + }, + "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, + "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" + } + ] + } + } + }, + "schemas": { + "400_response": { + "title": "Bad request", + "type": "object", + "required": [ + "error", + "message", + "statusCode" + ], + "properties": { + "error": { + "type": "string", + "enum": [ + "Bad Request" + ] + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "integer", + "enum": [ + 400 + ] + } + } + }, + "export_objects_request": { + "type": "object", + "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. Use `*` to export all the types.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + }, + "import_objects_request": { + "type": "object", + "properties": { + "file": { + "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" + } + } + }, + "200_import_objects_response": { + "type": "object", + "properties": { + "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." + }, + "errors": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Indicates the import was unsuccessful and specifies the objects that failed to import.\n\nNOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error.\n" + }, + "successResults": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Indicates the objects that are successfully imported, with any metadata if applicable.\n\nNOTE: 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" + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml b/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml new file mode 100644 index 0000000000000..cf07e2b72669c --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml @@ -0,0 +1,426 @@ +openapi: 3.0.3 +info: + title: Serverless saved objects + description: OpenAPI schema for serverless 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: https://{kibana_url} + variables: + kibana_url: + default: localhost:5601 +security: + - apiKeyAuth: [] +tags: + - name: saved objects + description: Manage Kibana saved objects, including dashboards, visualizations, and more. +paths: + /api/saved_objects/_export: + post: + summary: Export saved objects in the default space + operationId: exportSavedObjectsDefault + description: | + Retrieve sets of saved objects that you want to import into Kibana. + You must include `type` or `objects` in the request body. + + NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. + + This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + type: object + 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. Use `*` to export all the types. + oneOf: + - type: string + - type: array + items: + type: string + examples: + exportSavedObjectsRequest: + $ref: '#/components/examples/export_objects_request' + responses: + '200': + description: Indicates a successful call. + content: + application/x-ndjson: + schema: + type: object + additionalProperties: true + examples: + exportSavedObjectsResponse: + $ref: '#/components/examples/export_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + /api/saved_objects/_import: + post: + summary: Import saved objects in the default space + operationId: importSavedObjectsDefault + description: | + Create sets of Kibana saved objects from a file created by the export API. + 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. + + This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - 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. + - 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. + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + file: + 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. + examples: + importObjectsRequest: + $ref: '#/components/examples/import_objects_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + 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. + errors: + type: array + items: + type: object + description: | + Indicates the import was unsuccessful and specifies the objects that failed to import. + + NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error. + successResults: + type: array + items: + type: object + description: | + Indicates the objects that are successfully imported, with any metadata if applicable. + + NOTE: 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. + examples: + importObjectsResponse: + $ref: '#/components/examples/import_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + /s/{spaceId}/api/saved_objects/_export: + post: + summary: Export saved objects + operationId: exportSavedObjects + description: | + Retrieves sets of saved objects that you want to import into Kibana. + You must include `type` or `objects` in the request body. + + NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. + + This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/export_objects_request' + examples: + exportSavedObjectsRequest: + $ref: '#/components/examples/export_objects_request' + responses: + '200': + description: Indicates a successful call. + content: + application/x-ndjson: + schema: + type: object + additionalProperties: true + examples: + exportSavedObjectsResponse: + $ref: '#/components/examples/export_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + /s/{spaceId}/api/saved_objects/_import: + post: + summary: Import saved objects + operationId: importSavedObjects + description: | + Creates sets of Kibana saved objects from a file created by the export API. + 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. + + This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + - $ref: '#/components/parameters/compatibility_mode' + - $ref: '#/components/parameters/create_new_copies' + - $ref: '#/components/parameters/overwrite' + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/import_objects_request' + examples: + importObjectsRequest: + $ref: '#/components/examples/import_objects_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/200_import_objects_response' + examples: + importObjectsResponse: + $ref: '#/components/examples/import_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' +components: + securitySchemes: + apiKeyAuth: + type: apiKey + in: header + name: Authorization + description: | + Serverless APIs support only key-based authentication. You must create an API key and use the encoded value in the request header. For example: 'Authorization: ApiKey base64AccessApiKey'. + parameters: + kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + space_id: + in: path + name: spaceId + description: An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + required: true + schema: + type: string + example: default + compatibility_mode: + 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. + create_new_copies: + 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. + overwrite: + 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. + examples: + export_objects_request: + summary: Export a specific saved object. + value: + objects: + - type: map + id: de71f4f0-1902-11e9-919b-ffe5949a18d2 + includeReferencesDeep: false + excludeExportDetails: true + export_objects_response: + summary: The export objects API response contains a JSON record for each exported object. + value: + attributes: + description: '' + layerListJSON: '[{"id":"0hmz5","alpha":1,"sourceDescriptor":{"type":"EMS_TMS","isAutoSelect":true,"lightModeDefault":"road_map_desaturated"},"visible":true,"style":{},"type":"EMS_VECTOR_TILE","minZoom":0,"maxZoom":24},{"id":"edh66","label":"Total Requests by Destination","minZoom":0,"maxZoom":24,"alpha":0.5,"sourceDescriptor":{"type":"EMS_FILE","id":"world_countries","tooltipProperties":["name","iso2"]},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"__kbnjoin__count__673ff994-fc75-4c67-909b-69fcb0e1060e","origin":"join"},"color":"Greys","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"STATIC","options":{"size":10}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR","joins":[{"leftField":"iso2","right":{"type":"ES_TERM_SOURCE","id":"673ff994-fc75-4c67-909b-69fcb0e1060e","indexPatternTitle":"kibana_sample_data_logs","term":"geo.dest","indexPatternRefName":"layer_1_join_0_index_pattern","metrics":[{"type":"count","label":"web logs count"}],"applyGlobalQuery":true}}]},{"id":"gaxya","label":"Actual Requests","minZoom":9,"maxZoom":24,"alpha":1,"sourceDescriptor":{"id":"b7486535-171b-4d3b-bb2e-33c1a0a2854c","type":"ES_SEARCH","geoField":"geo.coordinates","limit":2048,"filterByMapBounds":true,"tooltipProperties":["clientip","timestamp","host","request","response","machine.os","agent","bytes"],"indexPatternRefName":"layer_2_source_index_pattern","applyGlobalQuery":true,"scalingType":"LIMIT"},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"STATIC","options":{"color":"#2200ff"}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":2}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"bytes","origin":"source"},"minSize":1,"maxSize":23,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"},{"id":"tfi3f","label":"Total Requests and Bytes","minZoom":0,"maxZoom":9,"alpha":1,"sourceDescriptor":{"type":"ES_GEO_GRID","resolution":"COARSE","id":"8aaa65b5-a4e9-448b-9560-c98cb1c5ac5b","geoField":"geo.coordinates","requestType":"point","metrics":[{"type":"count","label":"web logs count"},{"type":"sum","field":"bytes"}],"indexPatternRefName":"layer_3_source_index_pattern","applyGlobalQuery":true},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"color":"Blues","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#cccccc"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"sum_of_bytes","origin":"source"},"minSize":7,"maxSize":25,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelText":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelSize":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"minSize":12,"maxSize":24,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"}]' + mapStateJSON: '{"zoom":3.64,"center":{"lon":-88.92107,"lat":42.16337},"timeFilters":{"from":"now-7d","to":"now"},"refreshConfig":{"isPaused":true,"interval":0},"query":{"language":"kuery","query":""},"settings":{"autoFitToDataBounds":false}}' + title: '[Logs] Total Requests and Bytes' + uiStateJSON: '{"isDarkMode":false}' + coreMigrationVersion: 8.8.0 + created_at: '2023-08-23T20:03:32.204Z' + id: de71f4f0-1902-11e9-919b-ffe5949a18d2 + managed: false + references: + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_1_join_0_index_pattern + type: index-pattern + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_2_source_index_pattern + type: index-pattern + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_3_source_index_pattern + type: index-pattern + type: map + typeMigrationVersion: 8.4.0 + updated_at: '2023-08-23T20:03:32.204Z' + version: WzEzLDFd + import_objects_request: + value: + file: file.ndjson + 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 + 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 + schemas: + 400_response: + title: Bad request + type: object + required: + - error + - message + - statusCode + properties: + error: + type: string + enum: + - Bad Request + message: + type: string + statusCode: + type: integer + enum: + - 400 + export_objects_request: + type: object + 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. Use `*` to export all the types. + oneOf: + - type: string + - type: array + items: + type: string + import_objects_request: + type: object + properties: + file: + 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. + 200_import_objects_response: + type: object + properties: + 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. + errors: + type: array + items: + type: object + description: | + Indicates the import was unsuccessful and specifies the objects that failed to import. + + NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error. + successResults: + type: array + items: + type: object + description: | + Indicates the objects that are successfully imported, with any metadata if applicable. + + NOTE: 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. diff --git a/packages/core/saved-objects/docs/openapi/components/parameters/compatibility_mode.yaml b/packages/core/saved-objects/docs/openapi/components/parameters/compatibility_mode.yaml new file mode 100644 index 0000000000000..d191ef97bfbc8 --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/components/parameters/compatibility_mode.yaml @@ -0,0 +1,7 @@ +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. \ No newline at end of file diff --git a/packages/core/saved-objects/docs/openapi/components/parameters/create_new_copies.yaml b/packages/core/saved-objects/docs/openapi/components/parameters/create_new_copies.yaml new file mode 100644 index 0000000000000..b159fe894bc3d --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/components/parameters/create_new_copies.yaml @@ -0,0 +1,7 @@ +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. diff --git a/packages/core/saved-objects/docs/openapi/components/parameters/overwrite.yaml b/packages/core/saved-objects/docs/openapi/components/parameters/overwrite.yaml new file mode 100644 index 0000000000000..dcc6100438671 --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/components/parameters/overwrite.yaml @@ -0,0 +1,7 @@ +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. diff --git a/packages/core/saved-objects/docs/openapi/components/parameters/space_id.yaml b/packages/core/saved-objects/docs/openapi/components/parameters/space_id.yaml new file mode 100644 index 0000000000000..0a9fba457e3e7 --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/components/parameters/space_id.yaml @@ -0,0 +1,7 @@ +in: path +name: spaceId +description: An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. +required: true +schema: + type: string + example: default diff --git a/packages/core/saved-objects/docs/openapi/components/schemas/200_import_objects_response.yaml b/packages/core/saved-objects/docs/openapi/components/schemas/200_import_objects_response.yaml new file mode 100644 index 0000000000000..27f7c9df2dd9b --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/components/schemas/200_import_objects_response.yaml @@ -0,0 +1,25 @@ +type: object +properties: + 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. + errors: + type: array + items: + type: object + description: | + Indicates the import was unsuccessful and specifies the objects that failed to import. + + NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error. + successResults: + type: array + items: + type: object + description: | + Indicates the objects that are successfully imported, with any metadata if applicable. + + NOTE: 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. diff --git a/packages/core/saved-objects/docs/openapi/components/schemas/export_objects_request.yaml b/packages/core/saved-objects/docs/openapi/components/schemas/export_objects_request.yaml new file mode 100644 index 0000000000000..2820b5a9b3bfe --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/components/schemas/export_objects_request.yaml @@ -0,0 +1,21 @@ +type: object +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. Use `*` to export all the types. + oneOf: + - type: string + - type: array + items: + type: string \ No newline at end of file diff --git a/packages/core/saved-objects/docs/openapi/components/schemas/import_objects_request.yaml b/packages/core/saved-objects/docs/openapi/components/schemas/import_objects_request.yaml new file mode 100644 index 0000000000000..15a855ecb277b --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/components/schemas/import_objects_request.yaml @@ -0,0 +1,5 @@ +type: object +properties: + file: + 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. \ No newline at end of file diff --git a/packages/core/saved-objects/docs/openapi/entrypoint.yaml b/packages/core/saved-objects/docs/openapi/entrypoint.yaml index b4e58a6ef2171..9fbd1f0ab70cb 100644 --- a/packages/core/saved-objects/docs/openapi/entrypoint.yaml +++ b/packages/core/saved-objects/docs/openapi/entrypoint.yaml @@ -1,4 +1,4 @@ -openapi: 3.1.0 +openapi: 3.0.3 info: title: Saved objects description: OpenAPI schema for saved object endpoints diff --git a/packages/core/saved-objects/docs/openapi/entrypoint_serverless.yaml b/packages/core/saved-objects/docs/openapi/entrypoint_serverless.yaml new file mode 100644 index 0000000000000..b9500ccdbc570 --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/entrypoint_serverless.yaml @@ -0,0 +1,39 @@ +openapi: 3.0.3 +info: + title: Serverless saved objects + description: OpenAPI schema for serverless 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 +tags: + - name: saved objects + description: Manage Kibana saved objects, including dashboards, visualizations, and more. +servers: + - url: 'https://{kibana_url}' + variables: + kibana_url: + default: localhost:5601 +paths: + '/api/saved_objects/_export': + $ref: 'paths/api@saved_objects@_export.yaml' + '/api/saved_objects/_import': + $ref: 'paths/api@saved_objects@_import.yaml' + '/s/{spaceId}/api/saved_objects/_export': + $ref: 'paths/s@{spaceid}@api@saved_objects@_export.yaml' + '/s/{spaceId}/api/saved_objects/_import': + $ref: 'paths/s@{spaceid}@api@saved_objects@_import.yaml' +components: + securitySchemes: + apiKeyAuth: + type: apiKey + in: header + name: Authorization + description: > + Serverless APIs support only key-based authentication. + You must create an API key and use the encoded value in the request header. + For example: 'Authorization: ApiKey base64AccessApiKey'. +security: + - apiKeyAuth: [] diff --git a/packages/core/saved-objects/docs/openapi/paths/api@encrypted_saved_objects@_rotate_key.yaml b/packages/core/saved-objects/docs/openapi/paths/api@encrypted_saved_objects@_rotate_key.yaml index a863358622e3e..ae65d4da8539c 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@encrypted_saved_objects@_rotate_key.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@encrypted_saved_objects@_rotate_key.yaml @@ -1,5 +1,5 @@ post: - summary: Rotate the encryption key for encrypted saved objects. + summary: Rotate a key for encrypted saved objects operationId: rotateEncryptionKey description: | Superuser role required. diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_create.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_create.yaml index ab22ae13481fb..a35d61964c3b5 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_create.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_create.yaml @@ -1,5 +1,5 @@ post: - summary: Create multiple Kibana saved objects. + summary: Create saved objects operationId: bulkCreateSavedObjects deprecated: true tags: diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_delete.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_delete.yaml index bbbb848f94578..8b251d6d2fb14 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_delete.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_delete.yaml @@ -1,5 +1,5 @@ post: - summary: Remove multiple Kibana saved objects. + summary: Delete saved objects operationId: bulkDeleteSavedObjects description: > WARNING: When you delete a saved object, it cannot be recovered. diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_get.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_get.yaml index aba99de4bf4b5..007b51a2745b9 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_get.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_get.yaml @@ -1,5 +1,5 @@ post: - summary: Retrieve multiple Kibana saved objects by identifier. + summary: Get saved objects operationId: bulkGetSavedObjects deprecated: true tags: diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_resolve.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_resolve.yaml index 96ecd2eb0f13d..2be5950aca879 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_resolve.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_resolve.yaml @@ -1,8 +1,9 @@ post: - summary: Retrieve multiple Kibana saved objects by identifier using any legacy URL aliases if they exist. + summary: Resolve saved objects operationId: bulkResolveSavedObjects deprecated: true description: > + Retrieve multiple Kibana saved objects by identifier using any legacy URL aliases if they exist. Under certain circumstances when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved by the bulk resolve API using either its new ID or its old ID. diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_update.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_update.yaml index 497cae0e5b958..2d5c8fac7a65b 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_update.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_bulk_update.yaml @@ -1,6 +1,7 @@ post: - summary: Update the attributes for multiple Kibana saved objects. + summary: Update saved objects operationId: bulkUpdateSavedObjects + description: Update the attributes for multiple Kibana saved objects. deprecated: true tags: - saved objects diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_export.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_export.yaml index ad6817b5e2ebf..6b21922a0cabb 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_export.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_export.yaml @@ -1,8 +1,8 @@ post: - summary: Retrieve sets of saved objects that you want to import into Kibana. - operationId: exportSavedObjects + summary: Export saved objects in the default space + operationId: exportSavedObjectsDefault description: | - + Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_find.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_find.yaml index 673baa1f33f09..b129a20ad0071 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_find.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_find.yaml @@ -1,6 +1,7 @@ get: - summary: Retrieve a paginated set of Kibana saved objects. + summary: Search for saved objects operationId: findSavedObjects + description: Retrieve a paginated set of Kibana saved objects. deprecated: true tags: - saved objects diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_import.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_import.yaml index c1df23e8d11e0..6d61af2f85147 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_import.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_import.yaml @@ -1,7 +1,8 @@ post: - summary: Create sets of Kibana saved objects from a file created by the export API. - operationId: importSavedObjects + summary: Import saved objects in the default space + operationId: importSavedObjectsDefault description: | + Create sets of Kibana saved objects from a file created by the export API. 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. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_resolve_import_errors.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_resolve_import_errors.yaml index aa64b0f3b08af..bfca82dbe7274 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_resolve_import_errors.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_resolve_import_errors.yaml @@ -1,8 +1,8 @@ post: - summary: Resolve errors from the Import objects API. + summary: Resolve import errors operationId: resolveImportErrors description: | - To resolve errors, you can: + To resolve errors from the Import objects API, you can: * Retry certain saved objects * Overwrite specific saved objects diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@resolve@{type}@{id}.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@resolve@{type}@{id}.yaml index 45f8695d401a8..3f02bd5fc80bc 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@resolve@{type}@{id}.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@resolve@{type}@{id}.yaml @@ -1,7 +1,8 @@ get: - summary: Retrieve a single Kibana saved object by identifier using any legacy URL alias if it exists. + summary: Resolve a saved object operationId: resolveSavedObject description: > + Retrieve a single Kibana saved object by identifier using any legacy URL alias if it exists. Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved using either its new ID or its old ID. diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@{type}.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@{type}.yaml index 6fb4a6a2b046e..d58b1543021eb 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@{type}.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@{type}.yaml @@ -1,6 +1,7 @@ post: - summary: Create Kibana saved objects with randomly generated identifiers. + summary: Create a saved object operationId: createSavedObject + description: Create a Kibana saved object with a randomly generated identifier. deprecated: true tags: - saved objects diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@{type}@{id}.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@{type}@{id}.yaml index dc34bc339e2bb..fbbd772eeb836 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@{type}@{id}.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@{type}@{id}.yaml @@ -1,6 +1,7 @@ get: - summary: Retrieve a single Kibana saved object by identifier. + summary: Get a saved object operationId: getSavedObject + description: Retrieve a single Kibana saved object by identifier. deprecated: true tags: - saved objects @@ -22,8 +23,9 @@ get: $ref: '../components/schemas/400_response.yaml' post: - summary: Create Kibana saved objects. + summary: Create a saved object operationId: createSavedObjectId + description: Create a Kibana saved object and specify its identifier instead of using a randomly generated ID. deprecated: true tags: - saved objects @@ -66,8 +68,9 @@ post: type: object put: - summary: Update the attributes for Kibana saved objects. + summary: Update a saved object operationId: updateSavedObject + description: Update the attributes for Kibana saved objects. deprecated: true tags: - saved objects diff --git a/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_export.yaml b/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_export.yaml new file mode 100644 index 0000000000000..914c872ec05e8 --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_export.yaml @@ -0,0 +1,41 @@ +post: + summary: Export saved objects + operationId: exportSavedObjects + description: | + Retrieves sets of saved objects that you want to import into Kibana. + You must include `type` or `objects` in the request body. + + NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. + + This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - saved objects + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - $ref: '../components/parameters/space_id.yaml' + requestBody: + required: true + content: + application/json: + schema: + $ref: '../components/schemas/export_objects_request.yaml' + examples: + exportSavedObjectsRequest: + $ref: '../components/examples/export_objects_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/x-ndjson: + schema: + type: object + additionalProperties: true + examples: + exportSavedObjectsResponse: + $ref: '../components/examples/export_objects_response.yaml' + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' diff --git a/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_import.yaml b/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_import.yaml new file mode 100644 index 0000000000000..eac1b3810e0fd --- /dev/null +++ b/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_import.yaml @@ -0,0 +1,41 @@ +post: + summary: Import saved objects + operationId: importSavedObjects + description: | + Creates sets of Kibana saved objects from a file created by the export API. + 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. + + This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + tags: + - saved objects + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - $ref: '../components/parameters/space_id.yaml' + - $ref: '../components/parameters/compatibility_mode.yaml' + - $ref: '../components/parameters/create_new_copies.yaml' + - $ref: '../components/parameters/overwrite.yaml' + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: '../components/schemas/import_objects_request.yaml' + examples: + importObjectsRequest: + $ref: '../components/examples/import_objects_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '../components/schemas/200_import_objects_response.yaml' + examples: + importObjectsResponse: + $ref: '../components/examples/import_objects_response.yaml' + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml'