[OAS] Refresh saved objects API document (#186134)

This commit is contained in:
Lisa Cawley 2024-06-13 10:11:59 -07:00 committed by GitHub
parent db425e3f4f
commit 88621152e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 1330 additions and 75 deletions

View file

@ -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
```

View file

@ -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"

View file

@ -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

View file

@ -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"
}
}
}
}
}
}

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -1,4 +1,4 @@
openapi: 3.1.0
openapi: 3.0.3
info:
title: Saved objects
description: OpenAPI schema for saved object endpoints

View file

@ -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: []

View file

@ -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.

View file

@ -1,5 +1,5 @@
post:
summary: Create multiple Kibana saved objects.
summary: Create saved objects
operationId: bulkCreateSavedObjects
deprecated: true
tags:

View file

@ -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.

View file

@ -1,5 +1,5 @@
post:
summary: Retrieve multiple Kibana saved objects by identifier.
summary: Get saved objects
operationId: bulkGetSavedObjects
deprecated: true
tags:

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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'

View file

@ -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'