diff --git a/oas_docs/bundle.json b/oas_docs/bundle.json index d378331392dc0..19094b82be094 100644 --- a/oas_docs/bundle.json +++ b/oas_docs/bundle.json @@ -17554,14 +17554,6 @@ "type": "boolean" } }, - { - "in": "query", - "name": "experimental", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "include_policy_templates", @@ -17606,36 +17598,6 @@ "type": "object" }, "type": "array" - }, - "response": { - "items": { - "additionalProperties": false, - "deprecated": true, - "properties": { - "count": { - "type": "number" - }, - "id": { - "type": "string" - }, - "parent_id": { - "type": "string" - }, - "parent_title": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "title", - "count" - ], - "type": "object" - }, - "type": "array" } }, "required": [ @@ -17844,79 +17806,6 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ @@ -18119,14 +18008,6 @@ "type": "boolean" } }, - { - "in": "query", - "name": "experimental", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "excludeInstallStatus", @@ -18577,7 +18458,6 @@ ], "type": "string" }, - "savedObject": {}, "signature_path": { "type": "string" }, @@ -18619,7 +18499,6 @@ } }, "required": [ - "savedObject", "name", "version", "title", @@ -18628,497 +18507,197 @@ "type": "object" }, "type": "array" + } + }, + "required": [ + "items" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" }, - "response": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "post": { + "description": "Install package by upload", + "operationId": "post-fleet-epm-packages", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "query", + "name": "ignoreMappingUpdateErrors", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "skipDataStreamRollover", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { + "schema": { + "format": "binary", + "type": "string" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "_meta": { + "additionalProperties": false, + "properties": { + "install_source": { + "type": "string" + } + }, + "required": [ + "install_source" + ], + "type": "object" + }, + "items": { "items": { - "additionalProperties": true, - "deprecated": true, - "properties": { - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, + "anyOf": [ + { + "additionalProperties": false, "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" + "id": { + "type": "string" }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" + "originId": { + "type": "string" + }, + "type": { + "enum": [ + "dashboard", + "lens", + "visualization", + "search", + "index-pattern", + "map", + "ml-module", + "security-rule", + "csp-rule-template", + "osquery-pack-asset", + "osquery-saved-query", + "tag" + ], + "type": "string" } }, + "required": [ + "id", + "type" + ], "type": "object" }, - "download": { - "type": "string" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "installationInfo": { - "additionalProperties": true, + { + "additionalProperties": false, "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" + "deferred": { + "type": "boolean" }, - "install_format_schema_version": { + "id": { "type": "string" }, - "install_source": { + "type": { "enum": [ - "registry", - "upload", - "bundled", - "custom" + "index", + "index_template", + "component_template", + "ingest_pipeline", + "ilm_policy", + "data_stream_ilm_policy", + "transform", + "ml_model" ], "type": "string" }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "integration": { - "type": "string" - }, - "internal": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { + "version": { "type": "string" } }, "required": [ - "license" + "id", + "type" ], "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" } - }, - "required": [ - "savedObject", - "name", - "version", - "title", - "id" - ], - "type": "object" + ] }, "type": "array" } }, "required": [ - "items" + "items", + "_meta" ], "type": "object" } @@ -19127,7 +18706,7 @@ }, "400": { "content": { - "application/json; Elastic-Api-Version=2023-10-31": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { "schema": { "additionalProperties": false, "description": "Generic Error", @@ -19155,10 +18734,12 @@ "tags": [ "Elastic Package Manager (EPM)" ] - }, + } + }, + "/api/fleet/epm/packages/_bulk": { "post": { - "description": "Install package by upload", - "operationId": "post-fleet-epm-packages", + "description": "Bulk install packages", + "operationId": "post-fleet-epm-packages-bulk", "parameters": [ { "description": "The version of the API to use", @@ -19184,278 +18765,16 @@ }, { "in": "query", - "name": "ignoreMappingUpdateErrors", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "skipDataStreamRollover", + "name": "prerelease", "required": false, "schema": { - "default": false, "type": "boolean" } } ], "requestBody": { "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "format": "binary", - "type": "string" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "_meta": { - "additionalProperties": false, - "properties": { - "install_source": { - "type": "string" - } - }, - "required": [ - "install_source" - ], - "type": "object" - }, - "items": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - } - }, - "required": [ - "items", - "_meta" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/_bulk": { - "post": { - "description": "Bulk install packages", - "operationId": "post-fleet-epm-packages-bulk", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { + "application/json; Elastic-Api-Version=2023-10-31": { "schema": { "additionalProperties": false, "properties": { @@ -19653,152 +18972,6 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "result": { - "additionalProperties": false, - "properties": { - "assets": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "error": {}, - "installSource": { - "type": "string" - }, - "installType": { - "type": "string" - }, - "status": { - "enum": [ - "installed", - "already_installed" - ], - "type": "string" - } - }, - "required": [ - "error", - "installType" - ], - "type": "object" - }, - "version": { - "type": "string" - } - }, - "required": [ - "name", - "version", - "result" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "error": { - "anyOf": [ - { - "type": "string" - }, - {} - ] - }, - "name": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "name", - "statusCode", - "error" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ @@ -20102,1641 +19275,106 @@ ], "responses": { "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/{pkgName}/stats": { - "get": { - "description": "Get package stats", - "operationId": "get-fleet-epm-packages-pkgname-stats", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "response": { - "additionalProperties": false, - "properties": { - "agent_policy_count": { - "type": "number" - } - }, - "required": [ - "agent_policy_count" - ], - "type": "object" - } - }, - "required": [ - "response" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { - "delete": { - "description": "Delete package", - "operationId": "delete-fleet-epm-packages-pkgname-pkgversion", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "force", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "items": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - }, - "get": { - "description": "Get package", - "operationId": "get-fleet-epm-packages-pkgname-pkgversion", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "ignoreUnverified", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "full", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "withMetadata", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "item": { - "additionalProperties": true, - "properties": { - "agent": { - "additionalProperties": false, - "properties": { - "privileges": { - "additionalProperties": false, - "properties": { - "root": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "asset_tags": { - "items": { - "additionalProperties": false, - "properties": { - "asset_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "asset_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object" - }, - "type": "array" - }, - "assets": { - "additionalProperties": {}, - "type": "object" - }, - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, - "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" - }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "download": { - "type": "string" - }, - "elasticsearch": { - "additionalProperties": {}, - "type": "object" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "installationInfo": { - "additionalProperties": true, - "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" - }, - "install_format_schema_version": { - "type": "string" - }, - "install_source": { - "enum": [ - "registry", - "upload", - "bundled", - "custom" - ], - "type": "string" - }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "internal": { - "type": "boolean" - }, - "keepPoliciesUpToDate": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "license": { - "type": "string" - }, - "licensePath": { - "type": "string" - }, - "name": { - "type": "string" - }, - "notice": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { - "additionalProperties": false, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" - } - }, - "required": [ - "savedObject", - "name", - "version", - "title", - "assets" - ], - "type": "object" - }, - "metadata": { - "additionalProperties": false, - "properties": { - "has_policies": { - "type": "boolean" - } - }, - "required": [ - "has_policies" - ], - "type": "object" - }, - "response": { - "additionalProperties": true, - "deprecated": true, - "properties": { - "agent": { - "additionalProperties": false, - "properties": { - "privileges": { - "additionalProperties": false, - "properties": { - "root": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "asset_tags": { - "items": { - "additionalProperties": false, - "properties": { - "asset_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "asset_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object" - }, - "type": "array" - }, - "assets": { - "additionalProperties": {}, - "type": "object" - }, - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, - "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" - }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "download": { - "type": "string" - }, - "elasticsearch": { - "additionalProperties": {}, - "type": "object" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "installationInfo": { - "additionalProperties": true, - "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" - }, - "install_format_schema_version": { - "type": "string" - }, - "install_source": { - "enum": [ - "registry", - "upload", - "bundled", - "custom" - ], - "type": "string" - }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "internal": { - "type": "boolean" - }, - "keepPoliciesUpToDate": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "license": { - "type": "string" - }, - "licensePath": { - "type": "string" - }, - "name": { - "type": "string" - }, - "notice": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { - "additionalProperties": false, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "items" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + } + }, + "/api/fleet/epm/packages/{pkgName}/stats": { + "get": { + "description": "Get package stats", + "operationId": "get-fleet-epm-packages-pkgname-stats", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "response": { + "additionalProperties": false, + "properties": { + "agent_policy_count": { + "type": "number" } }, "required": [ - "savedObject", - "name", - "version", - "title", - "assets" + "agent_policy_count" ], "type": "object" } }, "required": [ - "item" + "response" ], "type": "object" } @@ -21773,10 +19411,12 @@ "tags": [ "Elastic Package Manager (EPM)" ] - }, - "post": { - "description": "Install package from registry", - "operationId": "post-fleet-epm-packages-pkgname-pkgversion", + } + }, + "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { + "delete": { + "description": "Delete package", + "operationId": "delete-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "description": "The version of the API to use", @@ -21811,59 +19451,20 @@ { "in": "path", "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "ignoreMappingUpdateErrors", "required": false, "schema": { - "default": false, - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "skipDataStreamRollover", + "name": "force", "required": false, "schema": { - "default": false, "type": "boolean" } } ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "default": false, - "type": "boolean" - }, - "ignore_constraints": { - "default": false, - "type": "boolean" - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { "content": { @@ -21871,18 +19472,6 @@ "schema": { "additionalProperties": false, "properties": { - "_meta": { - "additionalProperties": false, - "properties": { - "install_source": { - "type": "string" - } - }, - "required": [ - "install_source" - ], - "type": "object" - }, "items": { "items": { "anyOf": [ @@ -21954,84 +19543,10 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ - "items", - "_meta" + "items" ], "type": "object" } @@ -22069,9 +19584,9 @@ "Elastic Package Manager (EPM)" ] }, - "put": { - "description": "Update package settings", - "operationId": "put-fleet-epm-packages-pkgname-pkgversion", + "get": { + "description": "Get package", + "operationId": "get-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "description": "The version of the API to use", @@ -22080,18 +19595,8 @@ "schema": { "default": "2023-10-31", "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", + "2023-10-31" + ], "type": "string" } }, @@ -22106,30 +19611,45 @@ { "in": "path", "name": "pkgVersion", - "required": true, + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "keepPoliciesUpToDate": { - "type": "boolean" - } - }, - "required": [ - "keepPoliciesUpToDate" - ], - "type": "object" - } + }, + { + "in": "query", + "name": "ignoreUnverified", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "prerelease", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "full", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "withMetadata", + "required": false, + "schema": { + "default": false, + "type": "boolean" } } - }, + ], "responses": { "200": { "content": { @@ -22625,90 +20145,429 @@ "experimental" ], "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { + }, + "screenshots": { + "items": { + "additionalProperties": false, + "properties": { + "dark_mode": { + "type": "boolean" + }, + "path": { + "type": "string" + }, + "size": { + "type": "string" + }, + "src": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "src" + ], + "type": "object" + }, + "type": "array" + }, + "signature_path": { + "type": "string" + }, + "source": { + "additionalProperties": true, + "properties": { + "license": { + "type": "string" + } + }, + "required": [ + "license" + ], + "type": "object" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "enum": [ + "integration", + "input", + "content" + ], + "type": "string" + }, + "vars": { + "items": { + "additionalProperties": {}, + "type": "object" + }, + "type": "array" + }, + "version": { + "type": "string" + } + }, + "required": [ + "name", + "version", + "title", + "assets" + ], + "type": "object" + }, + "metadata": { + "additionalProperties": false, + "properties": { + "has_policies": { + "type": "boolean" + } + }, + "required": [ + "has_policies" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "post": { + "description": "Install package from registry", + "operationId": "post-fleet-epm-packages-pkgname-pkgversion", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "pkgVersion", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "prerelease", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "ignoreMappingUpdateErrors", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "skipDataStreamRollover", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "nullable": true, + "properties": { + "force": { + "default": false, + "type": "boolean" + }, + "ignore_constraints": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "_meta": { + "additionalProperties": false, + "properties": { + "install_source": { + "type": "string" + } + }, + "required": [ + "install_source" + ], + "type": "object" + }, + "items": { + "items": { + "anyOf": [ + { "additionalProperties": false, "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { + "id": { "type": "string" }, - "size": { + "originId": { "type": "string" }, - "src": { + "type": { + "enum": [ + "dashboard", + "lens", + "visualization", + "search", + "index-pattern", + "map", + "ml-module", + "security-rule", + "csp-rule-template", + "osquery-pack-asset", + "osquery-saved-query", + "tag" + ], "type": "string" + } + }, + "required": [ + "id", + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "deferred": { + "type": "boolean" }, - "title": { + "id": { "type": "string" }, "type": { + "enum": [ + "index", + "index_template", + "component_template", + "ingest_pipeline", + "ilm_policy", + "data_stream_ilm_policy", + "transform", + "ml_model" + ], + "type": "string" + }, + "version": { "type": "string" } }, "required": [ - "src" + "id", + "type" ], "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" - } + } + ] }, - "required": [ - "savedObject", - "name", - "version", - "title", - "assets" - ], - "type": "object" + "type": "array" + } + }, + "required": [ + "items", + "_meta" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" }, - "response": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "put": { + "description": "Update package settings", + "operationId": "put-fleet-epm-packages-pkgname-pkgversion", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "pkgVersion", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "keepPoliciesUpToDate": { + "type": "boolean" + } + }, + "required": [ + "keepPoliciesUpToDate" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { "additionalProperties": true, - "deprecated": true, "properties": { "agent": { "additionalProperties": false, @@ -23196,7 +21055,6 @@ ], "type": "string" }, - "savedObject": {}, "screenshots": { "items": { "additionalProperties": false, @@ -23268,7 +21126,6 @@ } }, "required": [ - "savedObject", "name", "version", "title", @@ -23543,265 +21400,6 @@ ] } }, - "/api/fleet/epm/packages/{pkgkey}": { - "delete": { - "operationId": "delete-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - }, - "get": { - "operationId": "get-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "ignoreUnverified", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "full", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "withMetadata", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - }, - "post": { - "operationId": "post-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "ignoreMappingUpdateErrors", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "skipDataStreamRollover", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - }, - "put": { - "operationId": "put-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "keepPoliciesUpToDate": { - "type": "boolean" - } - }, - "required": [ - "keepPoliciesUpToDate" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - } - }, "/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs": { "get": { "description": "Get inputs template", diff --git a/oas_docs/bundle.serverless.json b/oas_docs/bundle.serverless.json index 972712045a1c6..bc3d45fe67960 100644 --- a/oas_docs/bundle.serverless.json +++ b/oas_docs/bundle.serverless.json @@ -17554,14 +17554,6 @@ "type": "boolean" } }, - { - "in": "query", - "name": "experimental", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "include_policy_templates", @@ -17606,36 +17598,6 @@ "type": "object" }, "type": "array" - }, - "response": { - "items": { - "additionalProperties": false, - "deprecated": true, - "properties": { - "count": { - "type": "number" - }, - "id": { - "type": "string" - }, - "parent_id": { - "type": "string" - }, - "parent_title": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "title", - "count" - ], - "type": "object" - }, - "type": "array" } }, "required": [ @@ -17844,79 +17806,6 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ @@ -18119,14 +18008,6 @@ "type": "boolean" } }, - { - "in": "query", - "name": "experimental", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "excludeInstallStatus", @@ -18577,7 +18458,6 @@ ], "type": "string" }, - "savedObject": {}, "signature_path": { "type": "string" }, @@ -18619,7 +18499,6 @@ } }, "required": [ - "savedObject", "name", "version", "title", @@ -18628,497 +18507,197 @@ "type": "object" }, "type": "array" + } + }, + "required": [ + "items" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" }, - "response": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "post": { + "description": "Install package by upload", + "operationId": "post-fleet-epm-packages", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "query", + "name": "ignoreMappingUpdateErrors", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "skipDataStreamRollover", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { + "schema": { + "format": "binary", + "type": "string" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "_meta": { + "additionalProperties": false, + "properties": { + "install_source": { + "type": "string" + } + }, + "required": [ + "install_source" + ], + "type": "object" + }, + "items": { "items": { - "additionalProperties": true, - "deprecated": true, - "properties": { - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, + "anyOf": [ + { + "additionalProperties": false, "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" + "id": { + "type": "string" }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" + "originId": { + "type": "string" + }, + "type": { + "enum": [ + "dashboard", + "lens", + "visualization", + "search", + "index-pattern", + "map", + "ml-module", + "security-rule", + "csp-rule-template", + "osquery-pack-asset", + "osquery-saved-query", + "tag" + ], + "type": "string" } }, + "required": [ + "id", + "type" + ], "type": "object" }, - "download": { - "type": "string" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "installationInfo": { - "additionalProperties": true, + { + "additionalProperties": false, "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" + "deferred": { + "type": "boolean" }, - "install_format_schema_version": { + "id": { "type": "string" }, - "install_source": { + "type": { "enum": [ - "registry", - "upload", - "bundled", - "custom" + "index", + "index_template", + "component_template", + "ingest_pipeline", + "ilm_policy", + "data_stream_ilm_policy", + "transform", + "ml_model" ], "type": "string" }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "integration": { - "type": "string" - }, - "internal": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { + "version": { "type": "string" } }, "required": [ - "license" + "id", + "type" ], "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" } - }, - "required": [ - "savedObject", - "name", - "version", - "title", - "id" - ], - "type": "object" + ] }, "type": "array" } }, "required": [ - "items" + "items", + "_meta" ], "type": "object" } @@ -19127,7 +18706,7 @@ }, "400": { "content": { - "application/json; Elastic-Api-Version=2023-10-31": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { "schema": { "additionalProperties": false, "description": "Generic Error", @@ -19155,10 +18734,12 @@ "tags": [ "Elastic Package Manager (EPM)" ] - }, + } + }, + "/api/fleet/epm/packages/_bulk": { "post": { - "description": "Install package by upload", - "operationId": "post-fleet-epm-packages", + "description": "Bulk install packages", + "operationId": "post-fleet-epm-packages-bulk", "parameters": [ { "description": "The version of the API to use", @@ -19184,278 +18765,16 @@ }, { "in": "query", - "name": "ignoreMappingUpdateErrors", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "skipDataStreamRollover", + "name": "prerelease", "required": false, "schema": { - "default": false, "type": "boolean" } } ], "requestBody": { "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "format": "binary", - "type": "string" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "_meta": { - "additionalProperties": false, - "properties": { - "install_source": { - "type": "string" - } - }, - "required": [ - "install_source" - ], - "type": "object" - }, - "items": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - } - }, - "required": [ - "items", - "_meta" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/_bulk": { - "post": { - "description": "Bulk install packages", - "operationId": "post-fleet-epm-packages-bulk", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { + "application/json; Elastic-Api-Version=2023-10-31": { "schema": { "additionalProperties": false, "properties": { @@ -19653,152 +18972,6 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "result": { - "additionalProperties": false, - "properties": { - "assets": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "error": {}, - "installSource": { - "type": "string" - }, - "installType": { - "type": "string" - }, - "status": { - "enum": [ - "installed", - "already_installed" - ], - "type": "string" - } - }, - "required": [ - "error", - "installType" - ], - "type": "object" - }, - "version": { - "type": "string" - } - }, - "required": [ - "name", - "version", - "result" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "error": { - "anyOf": [ - { - "type": "string" - }, - {} - ] - }, - "name": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "name", - "statusCode", - "error" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ @@ -20104,1639 +19277,104 @@ "200": { "content": { "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/{pkgName}/stats": { - "get": { - "description": "Get package stats", - "operationId": "get-fleet-epm-packages-pkgname-stats", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "response": { - "additionalProperties": false, - "properties": { - "agent_policy_count": { - "type": "number" - } - }, - "required": [ - "agent_policy_count" - ], - "type": "object" - } - }, - "required": [ - "response" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { - "delete": { - "description": "Delete package", - "operationId": "delete-fleet-epm-packages-pkgname-pkgversion", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "force", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "items": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - }, - "get": { - "description": "Get package", - "operationId": "get-fleet-epm-packages-pkgname-pkgversion", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "ignoreUnverified", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "full", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "withMetadata", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "item": { - "additionalProperties": true, - "properties": { - "agent": { - "additionalProperties": false, - "properties": { - "privileges": { - "additionalProperties": false, - "properties": { - "root": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "asset_tags": { - "items": { - "additionalProperties": false, - "properties": { - "asset_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "asset_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object" - }, - "type": "array" - }, - "assets": { - "additionalProperties": {}, - "type": "object" - }, - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, - "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" - }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "download": { - "type": "string" - }, - "elasticsearch": { - "additionalProperties": {}, - "type": "object" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "installationInfo": { - "additionalProperties": true, - "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" - }, - "install_format_schema_version": { - "type": "string" - }, - "install_source": { - "enum": [ - "registry", - "upload", - "bundled", - "custom" - ], - "type": "string" - }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "internal": { - "type": "boolean" - }, - "keepPoliciesUpToDate": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "license": { - "type": "string" - }, - "licensePath": { - "type": "string" - }, - "name": { - "type": "string" - }, - "notice": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { - "additionalProperties": false, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" - } - }, - "required": [ - "savedObject", - "name", - "version", - "title", - "assets" - ], - "type": "object" - }, - "metadata": { - "additionalProperties": false, - "properties": { - "has_policies": { - "type": "boolean" - } - }, - "required": [ - "has_policies" - ], - "type": "object" - }, - "response": { - "additionalProperties": true, - "deprecated": true, - "properties": { - "agent": { - "additionalProperties": false, - "properties": { - "privileges": { - "additionalProperties": false, - "properties": { - "root": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "asset_tags": { - "items": { - "additionalProperties": false, - "properties": { - "asset_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "asset_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object" - }, - "type": "array" - }, - "assets": { - "additionalProperties": {}, - "type": "object" - }, - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, - "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" - }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "download": { - "type": "string" - }, - "elasticsearch": { - "additionalProperties": {}, - "type": "object" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "installationInfo": { - "additionalProperties": true, - "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" - }, - "install_format_schema_version": { - "type": "string" - }, - "install_source": { - "enum": [ - "registry", - "upload", - "bundled", - "custom" - ], - "type": "string" - }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "internal": { - "type": "boolean" - }, - "keepPoliciesUpToDate": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "license": { - "type": "string" - }, - "licensePath": { - "type": "string" - }, - "name": { - "type": "string" - }, - "notice": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { - "additionalProperties": false, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" + "schema": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "items" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + } + }, + "/api/fleet/epm/packages/{pkgName}/stats": { + "get": { + "description": "Get package stats", + "operationId": "get-fleet-epm-packages-pkgname-stats", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "response": { + "additionalProperties": false, + "properties": { + "agent_policy_count": { + "type": "number" } }, "required": [ - "savedObject", - "name", - "version", - "title", - "assets" + "agent_policy_count" ], "type": "object" } }, "required": [ - "item" + "response" ], "type": "object" } @@ -21773,10 +19411,12 @@ "tags": [ "Elastic Package Manager (EPM)" ] - }, - "post": { - "description": "Install package from registry", - "operationId": "post-fleet-epm-packages-pkgname-pkgversion", + } + }, + "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { + "delete": { + "description": "Delete package", + "operationId": "delete-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "description": "The version of the API to use", @@ -21811,59 +19451,20 @@ { "in": "path", "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "ignoreMappingUpdateErrors", "required": false, "schema": { - "default": false, - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "skipDataStreamRollover", + "name": "force", "required": false, "schema": { - "default": false, "type": "boolean" } } ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "default": false, - "type": "boolean" - }, - "ignore_constraints": { - "default": false, - "type": "boolean" - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { "content": { @@ -21871,18 +19472,6 @@ "schema": { "additionalProperties": false, "properties": { - "_meta": { - "additionalProperties": false, - "properties": { - "install_source": { - "type": "string" - } - }, - "required": [ - "install_source" - ], - "type": "object" - }, "items": { "items": { "anyOf": [ @@ -21954,84 +19543,10 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ - "items", - "_meta" + "items" ], "type": "object" } @@ -22069,29 +19584,19 @@ "Elastic Package Manager (EPM)" ] }, - "put": { - "description": "Update package settings", - "operationId": "put-fleet-epm-packages-pkgname-pkgversion", + "get": { + "description": "Get package", + "operationId": "get-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "description": "The version of the API to use", "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, + "name": "elastic-api-version", "schema": { - "example": "true", + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], "type": "string" } }, @@ -22106,30 +19611,45 @@ { "in": "path", "name": "pkgVersion", - "required": true, + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "keepPoliciesUpToDate": { - "type": "boolean" - } - }, - "required": [ - "keepPoliciesUpToDate" - ], - "type": "object" - } + }, + { + "in": "query", + "name": "ignoreUnverified", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "prerelease", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "full", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "withMetadata", + "required": false, + "schema": { + "default": false, + "type": "boolean" } } - }, + ], "responses": { "200": { "content": { @@ -22625,90 +20145,429 @@ "experimental" ], "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { + }, + "screenshots": { + "items": { + "additionalProperties": false, + "properties": { + "dark_mode": { + "type": "boolean" + }, + "path": { + "type": "string" + }, + "size": { + "type": "string" + }, + "src": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "src" + ], + "type": "object" + }, + "type": "array" + }, + "signature_path": { + "type": "string" + }, + "source": { + "additionalProperties": true, + "properties": { + "license": { + "type": "string" + } + }, + "required": [ + "license" + ], + "type": "object" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "enum": [ + "integration", + "input", + "content" + ], + "type": "string" + }, + "vars": { + "items": { + "additionalProperties": {}, + "type": "object" + }, + "type": "array" + }, + "version": { + "type": "string" + } + }, + "required": [ + "name", + "version", + "title", + "assets" + ], + "type": "object" + }, + "metadata": { + "additionalProperties": false, + "properties": { + "has_policies": { + "type": "boolean" + } + }, + "required": [ + "has_policies" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "post": { + "description": "Install package from registry", + "operationId": "post-fleet-epm-packages-pkgname-pkgversion", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "pkgVersion", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "prerelease", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "ignoreMappingUpdateErrors", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "skipDataStreamRollover", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "nullable": true, + "properties": { + "force": { + "default": false, + "type": "boolean" + }, + "ignore_constraints": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "_meta": { + "additionalProperties": false, + "properties": { + "install_source": { + "type": "string" + } + }, + "required": [ + "install_source" + ], + "type": "object" + }, + "items": { + "items": { + "anyOf": [ + { "additionalProperties": false, "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { + "id": { "type": "string" }, - "size": { + "originId": { "type": "string" }, - "src": { + "type": { + "enum": [ + "dashboard", + "lens", + "visualization", + "search", + "index-pattern", + "map", + "ml-module", + "security-rule", + "csp-rule-template", + "osquery-pack-asset", + "osquery-saved-query", + "tag" + ], "type": "string" + } + }, + "required": [ + "id", + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "deferred": { + "type": "boolean" }, - "title": { + "id": { "type": "string" }, "type": { + "enum": [ + "index", + "index_template", + "component_template", + "ingest_pipeline", + "ilm_policy", + "data_stream_ilm_policy", + "transform", + "ml_model" + ], + "type": "string" + }, + "version": { "type": "string" } }, "required": [ - "src" + "id", + "type" ], "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" - } + } + ] }, - "required": [ - "savedObject", - "name", - "version", - "title", - "assets" - ], - "type": "object" + "type": "array" + } + }, + "required": [ + "items", + "_meta" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" }, - "response": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "put": { + "description": "Update package settings", + "operationId": "put-fleet-epm-packages-pkgname-pkgversion", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "pkgVersion", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "keepPoliciesUpToDate": { + "type": "boolean" + } + }, + "required": [ + "keepPoliciesUpToDate" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { "additionalProperties": true, - "deprecated": true, "properties": { "agent": { "additionalProperties": false, @@ -23196,7 +21055,6 @@ ], "type": "string" }, - "savedObject": {}, "screenshots": { "items": { "additionalProperties": false, @@ -23268,7 +21126,6 @@ } }, "required": [ - "savedObject", "name", "version", "title", @@ -23543,265 +21400,6 @@ ] } }, - "/api/fleet/epm/packages/{pkgkey}": { - "delete": { - "operationId": "delete-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - }, - "get": { - "operationId": "get-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "ignoreUnverified", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "full", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "withMetadata", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - }, - "post": { - "operationId": "post-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "ignoreMappingUpdateErrors", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "skipDataStreamRollover", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - }, - "put": { - "operationId": "put-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "keepPoliciesUpToDate": { - "type": "boolean" - } - }, - "required": [ - "keepPoliciesUpToDate" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - } - }, "/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs": { "get": { "description": "Get inputs template", diff --git a/oas_docs/output/kibana.serverless.yaml b/oas_docs/output/kibana.serverless.yaml index a1cc60cbe7bd0..78c8541059d26 100644 --- a/oas_docs/output/kibana.serverless.yaml +++ b/oas_docs/output/kibana.serverless.yaml @@ -18230,11 +18230,6 @@ paths: required: false schema: type: boolean - - in: query - name: experimental - required: false - schema: - type: boolean - in: query name: include_policy_templates required: false @@ -18268,27 +18263,6 @@ paths: - title - count type: array - response: - items: - additionalProperties: false - deprecated: true - type: object - properties: - count: - type: number - id: - type: string - parent_id: - type: string - parent_title: - type: string - title: - type: string - required: - - id - - title - - count - type: array required: - items '400': @@ -18431,59 +18405,6 @@ paths: - id - type type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array required: - items - _meta @@ -18612,11 +18533,6 @@ paths: required: false schema: type: boolean - - in: query - name: experimental - required: false - schema: - type: boolean - in: query name: excludeInstallStatus required: false @@ -18941,7 +18857,6 @@ paths: - beta - experimental type: string - savedObject: {} signature_path: type: string source: @@ -18970,536 +18885,135 @@ paths: version: type: string required: - - savedObject - name - version - title - id type: array - response: + required: + - items + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + post: + description: Install package by upload + operationId: post-fleet-epm-packages + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/gzip; application/zip; Elastic-Api-Version=2023-10-31: + schema: + format: binary + type: string + responses: + '200': + content: + application/gzip; application/zip; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + required: + - install_source + items: items: - additionalProperties: true - deprecated: true - type: object - properties: - categories: - items: - type: string - type: array - conditions: - additionalProperties: true + anyOf: + - additionalProperties: false type: object properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false type: object properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - id: - type: string - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: + deferred: + type: boolean + id: type: string - namespaces: - items: - type: string - type: array type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: enum: - - unverified - - verified - - unknown + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model type: string version: type: string required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - integration: - type: string - internal: - type: boolean - latestVersion: - type: string - name: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} - type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - id - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - post: - description: Install package by upload - operationId: post-fleet-epm-packages - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/gzip; application/zip; Elastic-Api-Version=2023-10-31: - schema: - format: binary - type: string - responses: - '200': - content: - application/gzip; application/zip; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - required: - - install_source - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id + - id - type type: array required: @@ -19589,1442 +19103,105 @@ paths: properties: items: items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - error: {} - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - {} - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - - error - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - error: {} - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - {} - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - - error - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - /api/fleet/epm/packages/{pkgkey}: - delete: - operationId: delete-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: {} - summary: '' - tags: [] - get: - operationId: get-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: full - required: false - schema: - type: boolean - - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean - responses: {} - summary: '' - tags: [] - post: - operationId: post-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: {} - summary: '' - tags: [] - put: - operationId: put-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - required: - - keepPoliciesUpToDate - responses: {} - summary: '' - tags: [] - /api/fleet/epm/packages/{pkgName}/{pkgVersion}: - delete: - description: Delete package - operationId: delete-fleet-epm-packages-pkgname-pkgversion - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgName - required: true - schema: - type: string - - in: path - name: pkgVersion - required: true - schema: - type: string - - in: query - name: force - required: false - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - get: - description: Get package - operationId: get-fleet-epm-packages-pkgname-pkgversion - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: pkgName - required: true - schema: - type: string - - in: path - name: pkgVersion - required: true - schema: - type: string - - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: full - required: false - schema: - type: boolean - - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - type: array - asset_types: - items: - type: string - type: array - text: - type: string - required: - - text - type: array - assets: - additionalProperties: {} - type: object - categories: - items: - type: string - type: array - conditions: - additionalProperties: true - type: object - properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - elasticsearch: - additionalProperties: {} - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: - type: string - namespaces: - items: - type: string - type: array - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} - type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - assets - metadata: - additionalProperties: false - type: object - properties: - has_policies: - type: boolean - required: - - has_policies - response: - additionalProperties: true - deprecated: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - type: array - asset_types: - items: - type: string - type: array - text: - type: string - required: - - text - type: array - assets: - additionalProperties: {} - type: object - categories: - items: - type: string - type: array - conditions: - additionalProperties: true - type: object - properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - elasticsearch: - additionalProperties: {} - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: - type: string - namespaces: - items: - type: string - type: array - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: + anyOf: + - additionalProperties: false + type: object + properties: + name: type: string - type: + result: + additionalProperties: false + type: object + properties: + assets: + items: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + type: string + version: + type: string + required: + - id + - type + type: array + error: {} + installSource: + type: string + installType: + type: string + status: + enum: + - installed + - already_installed + type: string + required: + - error + - installType + version: type: string required: - - src - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} + - name + - version + - result + - additionalProperties: false type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - assets + properties: + error: + anyOf: + - type: string + - {} + name: + type: string + statusCode: + type: number + required: + - name + - statusCode + - error + type: array required: - - item + - items '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -21044,9 +19221,10 @@ paths: summary: '' tags: - Elastic Package Manager (EPM) - post: - description: Install package from registry - operationId: post-fleet-epm-packages-pkgname-pkgversion + /api/fleet/epm/packages/{pkgName}/{pkgVersion}: + delete: + description: Delete package + operationId: delete-fleet-epm-packages-pkgname-pkgversion parameters: - description: The version of the API to use in: header @@ -21070,40 +19248,14 @@ paths: type: string - in: path name: pkgVersion - required: true - schema: - type: string - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: ignoreMappingUpdateErrors required: false schema: - default: false - type: boolean + type: string - in: query - name: skipDataStreamRollover + name: force required: false schema: - default: false type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - default: false - type: boolean - ignore_constraints: - default: false - type: boolean responses: '200': content: @@ -21112,14 +19264,6 @@ paths: additionalProperties: false type: object properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - required: - - install_source items: items: anyOf: @@ -21172,62 +19316,8 @@ paths: - id - type type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array required: - items - - _meta '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -21247,9 +19337,9 @@ paths: summary: '' tags: - Elastic Package Manager (EPM) - put: - description: Update package settings - operationId: put-fleet-epm-packages-pkgname-pkgversion + get: + description: Get package + operationId: get-fleet-epm-packages-pkgname-pkgversion parameters: - description: The version of the API to use in: header @@ -21259,13 +19349,6 @@ paths: enum: - '2023-10-31' type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - in: path name: pkgName required: true @@ -21273,20 +19356,30 @@ paths: type: string - in: path name: pkgVersion - required: true + required: false + schema: + type: string + - in: query + name: ignoreUnverified + required: false + schema: + type: boolean + - in: query + name: prerelease + required: false + schema: + type: boolean + - in: query + name: full + required: false schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - required: - - keepPoliciesUpToDate + type: boolean + - in: query + name: withMetadata + required: false + schema: + default: false + type: boolean responses: '200': content: @@ -21643,7 +19736,6 @@ paths: - beta - experimental type: string - savedObject: {} screenshots: items: additionalProperties: false @@ -21692,14 +19784,239 @@ paths: version: type: string required: - - savedObject - name - version - title - assets - response: + metadata: + additionalProperties: false + type: object + properties: + has_policies: + type: boolean + required: + - has_policies + required: + - item + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + post: + description: Install package from registry + operationId: post-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: false + schema: + type: string + - in: query + name: prerelease + required: false + schema: + type: boolean + - in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + nullable: true + type: object + properties: + force: + default: false + type: boolean + ignore_constraints: + default: false + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + required: + - install_source + items: + items: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + type: string + version: + type: string + required: + - id + - type + type: array + required: + - items + - _meta + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + put: + description: Update package settings + operationId: put-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: false + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + keepPoliciesUpToDate: + type: boolean + required: + - keepPoliciesUpToDate + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: additionalProperties: true - deprecated: true type: object properties: agent: @@ -22046,7 +20363,6 @@ paths: - beta - experimental type: string - savedObject: {} screenshots: items: additionalProperties: false @@ -22095,7 +20411,6 @@ paths: version: type: string required: - - savedObject - name - version - title @@ -22500,11 +20815,6 @@ paths: items: type: string type: array - response: - deprecated: true - items: - type: string - type: array required: - items '400': diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index 0dd1586ef8b37..64d227b91979d 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -21663,11 +21663,6 @@ paths: required: false schema: type: boolean - - in: query - name: experimental - required: false - schema: - type: boolean - in: query name: include_policy_templates required: false @@ -21701,27 +21696,6 @@ paths: - title - count type: array - response: - items: - additionalProperties: false - deprecated: true - type: object - properties: - count: - type: number - id: - type: string - parent_id: - type: string - parent_title: - type: string - title: - type: string - required: - - id - - title - - count - type: array required: - items '400': @@ -21864,59 +21838,6 @@ paths: - id - type type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array required: - items - _meta @@ -22045,11 +21966,6 @@ paths: required: false schema: type: boolean - - in: query - name: experimental - required: false - schema: - type: boolean - in: query name: excludeInstallStatus required: false @@ -22374,7 +22290,6 @@ paths: - beta - experimental type: string - savedObject: {} signature_path: type: string source: @@ -22403,536 +22318,135 @@ paths: version: type: string required: - - savedObject - name - version - title - id type: array - response: + required: + - items + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + post: + description: Install package by upload + operationId: post-fleet-epm-packages + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/gzip; application/zip; Elastic-Api-Version=2023-10-31: + schema: + format: binary + type: string + responses: + '200': + content: + application/gzip; application/zip; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + required: + - install_source + items: items: - additionalProperties: true - deprecated: true - type: object - properties: - categories: - items: - type: string - type: array - conditions: - additionalProperties: true + anyOf: + - additionalProperties: false type: object properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false type: object properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - id: - type: string - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: + deferred: + type: boolean + id: type: string - namespaces: - items: - type: string - type: array type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: enum: - - unverified - - verified - - unknown + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model type: string version: type: string required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - integration: - type: string - internal: - type: boolean - latestVersion: - type: string - name: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} - type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - id - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - post: - description: Install package by upload - operationId: post-fleet-epm-packages - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/gzip; application/zip; Elastic-Api-Version=2023-10-31: - schema: - format: binary - type: string - responses: - '200': - content: - application/gzip; application/zip; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - required: - - install_source - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id + - id - type type: array required: @@ -23022,1442 +22536,105 @@ paths: properties: items: items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - error: {} - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - {} - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - - error - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - error: {} - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - {} - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - - error - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - /api/fleet/epm/packages/{pkgkey}: - delete: - operationId: delete-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: {} - summary: '' - tags: [] - get: - operationId: get-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: full - required: false - schema: - type: boolean - - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean - responses: {} - summary: '' - tags: [] - post: - operationId: post-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: {} - summary: '' - tags: [] - put: - operationId: put-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - required: - - keepPoliciesUpToDate - responses: {} - summary: '' - tags: [] - /api/fleet/epm/packages/{pkgName}/{pkgVersion}: - delete: - description: Delete package - operationId: delete-fleet-epm-packages-pkgname-pkgversion - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgName - required: true - schema: - type: string - - in: path - name: pkgVersion - required: true - schema: - type: string - - in: query - name: force - required: false - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - get: - description: Get package - operationId: get-fleet-epm-packages-pkgname-pkgversion - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: pkgName - required: true - schema: - type: string - - in: path - name: pkgVersion - required: true - schema: - type: string - - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: full - required: false - schema: - type: boolean - - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - type: array - asset_types: - items: - type: string - type: array - text: - type: string - required: - - text - type: array - assets: - additionalProperties: {} - type: object - categories: - items: - type: string - type: array - conditions: - additionalProperties: true - type: object - properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - elasticsearch: - additionalProperties: {} - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: - type: string - namespaces: - items: - type: string - type: array - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} - type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - assets - metadata: - additionalProperties: false - type: object - properties: - has_policies: - type: boolean - required: - - has_policies - response: - additionalProperties: true - deprecated: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - type: array - asset_types: - items: - type: string - type: array - text: - type: string - required: - - text - type: array - assets: - additionalProperties: {} - type: object - categories: - items: - type: string - type: array - conditions: - additionalProperties: true - type: object - properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - elasticsearch: - additionalProperties: {} - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: - type: string - namespaces: - items: - type: string - type: array - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: + anyOf: + - additionalProperties: false + type: object + properties: + name: type: string - type: + result: + additionalProperties: false + type: object + properties: + assets: + items: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + type: string + version: + type: string + required: + - id + - type + type: array + error: {} + installSource: + type: string + installType: + type: string + status: + enum: + - installed + - already_installed + type: string + required: + - error + - installType + version: type: string required: - - src - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} + - name + - version + - result + - additionalProperties: false type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - assets + properties: + error: + anyOf: + - type: string + - {} + name: + type: string + statusCode: + type: number + required: + - name + - statusCode + - error + type: array required: - - item + - items '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -24477,9 +22654,10 @@ paths: summary: '' tags: - Elastic Package Manager (EPM) - post: - description: Install package from registry - operationId: post-fleet-epm-packages-pkgname-pkgversion + /api/fleet/epm/packages/{pkgName}/{pkgVersion}: + delete: + description: Delete package + operationId: delete-fleet-epm-packages-pkgname-pkgversion parameters: - description: The version of the API to use in: header @@ -24503,40 +22681,14 @@ paths: type: string - in: path name: pkgVersion - required: true - schema: - type: string - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: ignoreMappingUpdateErrors required: false schema: - default: false - type: boolean + type: string - in: query - name: skipDataStreamRollover + name: force required: false schema: - default: false type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - default: false - type: boolean - ignore_constraints: - default: false - type: boolean responses: '200': content: @@ -24545,14 +22697,6 @@ paths: additionalProperties: false type: object properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - required: - - install_source items: items: anyOf: @@ -24605,62 +22749,8 @@ paths: - id - type type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array required: - items - - _meta '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -24680,9 +22770,9 @@ paths: summary: '' tags: - Elastic Package Manager (EPM) - put: - description: Update package settings - operationId: put-fleet-epm-packages-pkgname-pkgversion + get: + description: Get package + operationId: get-fleet-epm-packages-pkgname-pkgversion parameters: - description: The version of the API to use in: header @@ -24692,13 +22782,6 @@ paths: enum: - '2023-10-31' type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - in: path name: pkgName required: true @@ -24706,20 +22789,30 @@ paths: type: string - in: path name: pkgVersion - required: true + required: false + schema: + type: string + - in: query + name: ignoreUnverified + required: false + schema: + type: boolean + - in: query + name: prerelease + required: false + schema: + type: boolean + - in: query + name: full + required: false schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - required: - - keepPoliciesUpToDate + type: boolean + - in: query + name: withMetadata + required: false + schema: + default: false + type: boolean responses: '200': content: @@ -25076,7 +23169,6 @@ paths: - beta - experimental type: string - savedObject: {} screenshots: items: additionalProperties: false @@ -25125,14 +23217,239 @@ paths: version: type: string required: - - savedObject - name - version - title - assets - response: + metadata: + additionalProperties: false + type: object + properties: + has_policies: + type: boolean + required: + - has_policies + required: + - item + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + post: + description: Install package from registry + operationId: post-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: false + schema: + type: string + - in: query + name: prerelease + required: false + schema: + type: boolean + - in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + nullable: true + type: object + properties: + force: + default: false + type: boolean + ignore_constraints: + default: false + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + required: + - install_source + items: + items: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + type: string + version: + type: string + required: + - id + - type + type: array + required: + - items + - _meta + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + put: + description: Update package settings + operationId: put-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: false + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + keepPoliciesUpToDate: + type: boolean + required: + - keepPoliciesUpToDate + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: additionalProperties: true - deprecated: true type: object properties: agent: @@ -25479,7 +23796,6 @@ paths: - beta - experimental type: string - savedObject: {} screenshots: items: additionalProperties: false @@ -25528,7 +23844,6 @@ paths: version: type: string required: - - savedObject - name - version - title @@ -25933,11 +24248,6 @@ paths: items: type: string type: array - response: - deprecated: true - items: - type: string - type: array required: - items '400': diff --git a/x-pack/plugins/fleet/common/constants/routes.ts b/x-pack/plugins/fleet/common/constants/routes.ts index 4b40b4fb51092..436d476db16d2 100644 --- a/x-pack/plugins/fleet/common/constants/routes.ts +++ b/x-pack/plugins/fleet/common/constants/routes.ts @@ -23,19 +23,21 @@ export const LIMITED_CONCURRENCY_ROUTE_TAG = 'ingest:limited-concurrency'; const EPM_PACKAGES_MANY = `${EPM_API_ROOT}/packages`; const EPM_PACKAGES_INSTALLED = `${EPM_API_ROOT}/packages/installed`; const EPM_PACKAGES_BULK = `${EPM_PACKAGES_MANY}/_bulk`; -const EPM_PACKAGES_ONE_DEPRECATED = `${EPM_PACKAGES_MANY}/{pkgkey}`; +const EPM_PACKAGES_ONE_WITHOUT_VERSION = `${EPM_PACKAGES_MANY}/{pkgName}`; const EPM_PACKAGES_ONE = `${EPM_PACKAGES_MANY}/{pkgName}/{pkgVersion}`; +const EPM_PACKAGES_ONE_WITH_OPTIONAL_VERSION = `${EPM_PACKAGES_MANY}/{pkgName}/{pkgVersion?}`; export const EPM_API_ROUTES = { BULK_INSTALL_PATTERN: EPM_PACKAGES_BULK, LIST_PATTERN: EPM_PACKAGES_MANY, INSTALLED_LIST_PATTERN: EPM_PACKAGES_INSTALLED, LIMITED_LIST_PATTERN: `${EPM_PACKAGES_MANY}/limited`, - INFO_PATTERN: EPM_PACKAGES_ONE, + INFO_WITHOUT_VERSION_PATTERN: EPM_PACKAGES_ONE_WITHOUT_VERSION, + INFO_PATTERN: EPM_PACKAGES_ONE_WITH_OPTIONAL_VERSION, DATA_STREAMS_PATTERN: `${EPM_API_ROOT}/data_streams`, - INSTALL_FROM_REGISTRY_PATTERN: EPM_PACKAGES_ONE, + INSTALL_FROM_REGISTRY_PATTERN: EPM_PACKAGES_ONE_WITH_OPTIONAL_VERSION, INSTALL_BY_UPLOAD_PATTERN: EPM_PACKAGES_MANY, CUSTOM_INTEGRATIONS_PATTERN: `${EPM_API_ROOT}/custom_integrations`, - DELETE_PATTERN: EPM_PACKAGES_ONE, + DELETE_PATTERN: EPM_PACKAGES_ONE_WITH_OPTIONAL_VERSION, INSTALL_KIBANA_ASSETS_PATTERN: `${EPM_PACKAGES_ONE}/kibana_assets`, DELETE_KIBANA_ASSETS_PATTERN: `${EPM_PACKAGES_ONE}/kibana_assets`, FILEPATH_PATTERN: `${EPM_PACKAGES_ONE}/{filePath*}`, @@ -45,10 +47,6 @@ export const EPM_API_ROUTES = { BULK_ASSETS_PATTERN: `${EPM_API_ROOT}/bulk_assets`, INPUTS_PATTERN: `${EPM_API_ROOT}/templates/{pkgName}/{pkgVersion}/inputs`, - INFO_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED, - INSTALL_FROM_REGISTRY_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED, - DELETE_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED, - REAUTHORIZE_TRANSFORMS: `${EPM_PACKAGES_ONE}/transforms/authorize`, }; diff --git a/x-pack/plugins/fleet/common/services/route.test.ts b/x-pack/plugins/fleet/common/services/route.test.ts new file mode 100644 index 0000000000000..1075f4f2605ea --- /dev/null +++ b/x-pack/plugins/fleet/common/services/route.test.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { epmRouteService } from './routes'; + +describe('Route services', () => { + describe('epmRouteService', () => { + describe('getInfoPath', () => { + it('should generate path with pkgVersion', () => { + expect(epmRouteService.getInfoPath('test', '1.0.0')).toBe( + '/api/fleet/epm/packages/test/1.0.0' + ); + }); + it('should generate path without pkgVersion', () => { + expect(epmRouteService.getInfoPath('test')).toBe('/api/fleet/epm/packages/test'); + }); + }); + describe('getInstallPath', () => { + it('should generate path with pkgVersion', () => { + expect(epmRouteService.getInstallPath('test', '1.0.0')).toBe( + '/api/fleet/epm/packages/test/1.0.0' + ); + }); + it('should generate path without pkgVersion', () => { + expect(epmRouteService.getInstallPath('test')).toBe('/api/fleet/epm/packages/test'); + }); + }); + describe('getRemovePath', () => { + it('should generate path with pkgVersion', () => { + expect(epmRouteService.getRemovePath('test', '1.0.0')).toBe( + '/api/fleet/epm/packages/test/1.0.0' + ); + }); + it('should generate path without pkgVersion', () => { + expect(epmRouteService.getRemovePath('test')).toBe('/api/fleet/epm/packages/test'); + }); + }); + }); +}); diff --git a/x-pack/plugins/fleet/common/services/routes.ts b/x-pack/plugins/fleet/common/services/routes.ts index 520a71e1bdc0a..56f7096cf9766 100644 --- a/x-pack/plugins/fleet/common/services/routes.ts +++ b/x-pack/plugins/fleet/common/services/routes.ts @@ -47,11 +47,14 @@ export const epmRouteService = { getInfoPath: (pkgName: string, pkgVersion?: string) => { if (pkgVersion) { return EPM_API_ROUTES.INFO_PATTERN.replace('{pkgName}', pkgName).replace( - '{pkgVersion}', + '{pkgVersion?}', pkgVersion ); } else { - return EPM_API_ROUTES.INFO_PATTERN.replace('{pkgName}', pkgName).replace('/{pkgVersion}', ''); + return EPM_API_ROUTES.INFO_PATTERN.replace('{pkgName}', pkgName).replace( + '/{pkgVersion?}', + '' + ); } }, @@ -63,20 +66,32 @@ export const epmRouteService = { return `${EPM_API_ROOT}${filePath.replace('/package', '/packages')}`; }, - getInstallPath: (pkgName: string, pkgVersion: string) => { - return EPM_API_ROUTES.INSTALL_FROM_REGISTRY_PATTERN.replace('{pkgName}', pkgName) - .replace('{pkgVersion}', pkgVersion) - .replace(/\/$/, ''); // trim trailing slash + getInstallPath: (pkgName: string, pkgVersion?: string) => { + if (pkgVersion) { + return EPM_API_ROUTES.INSTALL_FROM_REGISTRY_PATTERN.replace('{pkgName}', pkgName) + .replace('{pkgVersion?}', pkgVersion) + .replace(/\/$/, ''); // trim trailing slash + } else { + return EPM_API_ROUTES.INSTALL_FROM_REGISTRY_PATTERN.replace('{pkgName}', pkgName) + .replace('/{pkgVersion?}', '') + .replace(/\/$/, ''); // trim trailing slash + } }, getBulkInstallPath: () => { return EPM_API_ROUTES.BULK_INSTALL_PATTERN; }, - getRemovePath: (pkgName: string, pkgVersion: string) => { - return EPM_API_ROUTES.DELETE_PATTERN.replace('{pkgName}', pkgName) - .replace('{pkgVersion}', pkgVersion) - .replace(/\/$/, ''); // trim trailing slash + getRemovePath: (pkgName: string, pkgVersion?: string) => { + if (pkgVersion) { + return EPM_API_ROUTES.DELETE_PATTERN.replace('{pkgName}', pkgName) + .replace('{pkgVersion?}', pkgVersion) + .replace(/\/$/, ''); // trim trailing slash + } else { + return EPM_API_ROUTES.DELETE_PATTERN.replace('{pkgName}', pkgName) + .replace('/{pkgVersion?}', '') + .replace(/\/$/, ''); // trim trailing slash + } }, getInstallKibanaAssetsPath: (pkgName: string, pkgVersion: string) => { diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index 827130d802f22..f1cd9e5ee4a7f 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -546,8 +546,8 @@ export type PackageList = PackageListItem[]; export type PackageListItem = Installable & { id: string; integration?: string; - installationInfo?: InstallationInfo; savedObject?: InstallableSavedObject; + installationInfo?: InstallationInfo; }; export type PackagesGroupedByStatus = Record, PackageList>; export type PackageInfo = diff --git a/x-pack/plugins/fleet/common/types/rest_spec/epm.ts b/x-pack/plugins/fleet/common/types/rest_spec/epm.ts index e8dee14e40b30..68c09eeb5e9dc 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/epm.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/epm.ts @@ -25,8 +25,6 @@ import type { export interface GetCategoriesRequest { query: { - // deprecated in 8.6 - experimental?: boolean; prerelease?: boolean; include_policy_templates?: boolean; }; @@ -34,15 +32,11 @@ export interface GetCategoriesRequest { export interface GetCategoriesResponse { items: CategorySummaryList; - // deprecated in 8.0 - response?: CategorySummaryList; } export interface GetPackagesRequest { query: { category?: string; - // deprecated in 8.6 - experimental?: boolean; prerelease?: boolean; excludeInstallStatus?: boolean; }; @@ -50,8 +44,6 @@ export interface GetPackagesRequest { export interface GetPackagesResponse { items: PackageList; - // deprecated in 8.0 - response?: PackageList; } export interface InstalledPackage { @@ -79,8 +71,6 @@ export interface GetEpmDataStreamsResponse { } export interface GetLimitedPackagesResponse { items: string[]; - // deprecated in 8.0 - response?: string[]; } export interface GetFileRequest { @@ -93,8 +83,6 @@ export interface GetFileRequest { export interface GetInfoRequest { params: { - // deprecated in 8.0 - pkgkey?: string; pkgName: string; pkgVersion: string; }; @@ -103,14 +91,10 @@ export interface GetInfoRequest { export interface GetInfoResponse { item: PackageInfo; metadata?: PackageMetadata; - // deprecated in 8.0 - response?: PackageInfo; } export interface UpdatePackageRequest { params: { - // deprecated in 8.0 - pkgkey?: string; pkgName: string; pkgVersion: string; }; @@ -121,8 +105,6 @@ export interface UpdatePackageRequest { export interface UpdatePackageResponse { item: PackageInfo; - // deprecated in 8.0 - response?: PackageInfo; } export interface GetStatsRequest { @@ -137,8 +119,6 @@ export interface GetStatsResponse { export interface InstallPackageRequest { params: { - // deprecated in 8.0 - pkgkey?: string; pkgName: string; pkgVersion: string; }; @@ -149,8 +129,6 @@ export interface InstallPackageResponse { _meta: { install_source: InstallSource; }; - // deprecated in 8.0 - response?: AssetReference[]; } export interface IBulkInstallPackageHTTPError { @@ -175,8 +153,6 @@ export interface BulkInstallPackageInfo { export interface BulkInstallPackagesResponse { items: Array; - // deprecated in 8.0 - response?: Array; } export interface BulkInstallPackagesRequest { @@ -191,8 +167,6 @@ export interface MessageResponse { export interface DeletePackageRequest { params: { - // deprecated in 8.0 - pkgkey?: string; pkgName: string; pkgVersion: string; }; @@ -202,8 +176,6 @@ export interface DeletePackageRequest { } export interface DeletePackageResponse { - // deprecated in 8.0 - response?: AssetReference[]; items: AssetReference[]; } export interface GetVerificationKeyIdResponse { diff --git a/x-pack/plugins/fleet/public/components/home_integration/tutorial_module_notice.tsx b/x-pack/plugins/fleet/public/components/home_integration/tutorial_module_notice.tsx index 905f2c82e85c7..f3b7b0cb77f84 100644 --- a/x-pack/plugins/fleet/public/components/home_integration/tutorial_module_notice.tsx +++ b/x-pack/plugins/fleet/public/components/home_integration/tutorial_module_notice.tsx @@ -23,8 +23,8 @@ const TutorialModuleNotice: TutorialModuleNoticeComponent = memo(({ moduleName } const pkgInfo = !isLoading && - packagesData?.response && - packagesData.response.find((pkg) => pkg.name === moduleName && pkg.name !== FLEET_APM_PACKAGE); // APM needs special handling + packagesData?.items && + packagesData.items.find((pkg) => pkg.name === moduleName && pkg.name !== FLEET_APM_PACKAGE); // APM needs special handling if (hasIntegrationsPermissions && pkgInfo) { return ( diff --git a/x-pack/plugins/fleet/public/search_provider.test.ts b/x-pack/plugins/fleet/public/search_provider.test.ts index 5f95eef60546c..68ba3042a8e76 100644 --- a/x-pack/plugins/fleet/public/search_provider.test.ts +++ b/x-pack/plugins/fleet/public/search_provider.test.ts @@ -133,7 +133,7 @@ describe('Package search provider', () => { test('returns formatted results', () => { getTestScheduler().run(({ expectObservable, hot }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any @@ -217,7 +217,7 @@ describe('Package search provider', () => { test('calls EPR once only', () => { getTestScheduler().run(({ hot }) => { - mockSendGetPackages.mockReturnValue(hot('--(a|)', { a: { data: { response: [] } } })); + mockSendGetPackages.mockReturnValue(hot('--(a|)', { a: { data: { items: [] } } })); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any ); @@ -237,7 +237,7 @@ describe('Package search provider', () => { test('completes without returning results if aborted', () => { getTestScheduler().run(({ expectObservable, hot }) => { - mockSendGetPackages.mockReturnValue(hot('--(a|)', { a: { data: { response: [] } } })); + mockSendGetPackages.mockReturnValue(hot('--(a|)', { a: { data: { items: [] } } })); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any ); @@ -258,7 +258,7 @@ describe('Package search provider', () => { test('respect maximum results', () => { getTestScheduler().run(({ hot, expectObservable }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any @@ -292,7 +292,7 @@ describe('Package search provider', () => { test('without packages tag, without search term', () => { getTestScheduler().run(({ hot, expectObservable }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any @@ -314,7 +314,7 @@ describe('Package search provider', () => { test('with integration tag, with no search term', () => { getTestScheduler().run(({ hot, expectObservable }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any @@ -397,7 +397,7 @@ describe('Package search provider', () => { test('with integration tag, with search term', () => { getTestScheduler().run(({ hot, expectObservable }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any diff --git a/x-pack/plugins/fleet/public/search_provider.ts b/x-pack/plugins/fleet/public/search_provider.ts index ce1ddd10ac5a2..a6810633c428e 100644 --- a/x-pack/plugins/fleet/public/search_provider.ts +++ b/x-pack/plugins/fleet/public/search_provider.ts @@ -30,7 +30,7 @@ const createPackages$ = () => if (error) { throw error; } - return data?.response ?? []; + return data?.items ?? []; }), shareReplay(1) ); @@ -86,7 +86,7 @@ export const createPackageSearchProvider = (core: CoreSetup): GlobalSearchResult shareReplay(1) ); - let packages$: undefined | Observable; + let packages$: undefined | Observable; const getPackages$ = () => { if (!packages$) { diff --git a/x-pack/plugins/fleet/server/routes/epm/handlers.ts b/x-pack/plugins/fleet/server/routes/epm/handlers.ts index 7d7fea6d693a7..1fcd0e26a6ef0 100644 --- a/x-pack/plugins/fleet/server/routes/epm/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/epm/handlers.ts @@ -9,7 +9,7 @@ import type { TypeOf } from '@kbn/config-schema'; import semverValid from 'semver/functions/valid'; import type { HttpResponseOptions } from '@kbn/core/server'; -import { pick } from 'lodash'; +import { omit, pick } from 'lodash'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../../../common'; @@ -98,12 +98,11 @@ export const getCategoriesHandler: FleetRequestHandler< TypeOf > = async (context, request, response) => { try { - const res = await getCategories({ + const items = await getCategories({ ...request.query, }); const body: GetCategoriesResponse = { - items: res, - response: res, + items, }; return response.ok({ body, headers: { ...CACHE_CONTROL_10_MINUTES_HEADER } }); } catch (error) { @@ -124,7 +123,6 @@ export const getListHandler: FleetRequestHandler< const flattenedRes = res.map((pkg) => soToInstallationInfo(pkg)) as PackageList; const body: GetPackagesResponse = { items: flattenedRes, - response: res, }; return response.ok({ body, @@ -199,7 +197,6 @@ export const getLimitedListHandler: FleetRequestHandler< }); const body: GetLimitedPackagesResponse = { items: res, - response: res, }; return response.ok({ body, @@ -460,7 +457,6 @@ export const bulkInstallPackagesFromRegistryHandler: FleetRequestHandler< const payload = bulkInstalledResponses.map(bulkInstallServiceResponseToHttpEntry); const body: BulkInstallPackagesResponse = { items: payload, - response: payload, }; return response.ok({ body }); }; @@ -494,7 +490,6 @@ export const installPackageByUploadHandler: FleetRequestHandler< if (!res.error) { const body: InstallPackageResponse = { items: res.assets || [], - response: res.assets || [], _meta: { install_source: res.installSource ?? installSource, }, @@ -519,8 +514,7 @@ export const installPackageByUploadHandler: FleetRequestHandler< export const deletePackageHandler: FleetRequestHandler< TypeOf, - TypeOf, - TypeOf + TypeOf > = async (context, request, response) => { try { const { pkgName, pkgVersion } = request.params; @@ -676,8 +670,7 @@ const soToInstallationInfo = (pkg: PackageListItem | PackageInfo) => { }; return { - // When savedObject gets removed, replace `pkg` with `...omit(pkg, 'savedObject')` - ...pkg, + ...omit(pkg, 'savedObject'), installationInfo, }; } diff --git a/x-pack/plugins/fleet/server/routes/epm/index.test.ts b/x-pack/plugins/fleet/server/routes/epm/index.test.ts index a054b02aae1d1..d736cb7c318ba 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.test.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.test.ts @@ -323,7 +323,6 @@ describe('schema validation', () => { }; const expectedResponse: GetCategoriesResponse = { items: [category], - response: [category], }; (getCategoriesHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -386,7 +385,6 @@ describe('schema validation', () => { }; const expectedResponse: GetPackagesResponse = { items: [packageItem], - response: [packageItem], }; (getListHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -444,7 +442,6 @@ describe('schema validation', () => { it('get limited packages should return valid response', async () => { const expectedResponse: GetLimitedPackagesResponse = { items: ['test'], - response: ['test'], }; (getLimitedListHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -513,7 +510,6 @@ describe('schema validation', () => { metadata: { has_policies: true, }, - response: packageInfo, }; (getInfoHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -530,7 +526,6 @@ describe('schema validation', () => { it('update package should return valid response', async () => { const expectedResponse: UpdatePackageResponse = { item: packageInfo, - response: packageInfo, }; (updatePackageHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -556,13 +551,6 @@ describe('schema validation', () => { _meta: { install_source: 'registry', }, - response: [ - { - id: 'test', - type: KibanaSavedObjectType.dashboard, - originId: 'test', - }, - ], }; (installPackageFromRegistryHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -612,7 +600,6 @@ describe('schema validation', () => { }; const expectedResponse: BulkInstallPackagesResponse = { items: [item, { name: 'test', statusCode: 400, error: 'test' }], - response: [item], }; (bulkInstallPackagesFromRegistryHandler as jest.Mock).mockImplementation( (ctx, request, res) => { diff --git a/x-pack/plugins/fleet/server/routes/epm/index.ts b/x-pack/plugins/fleet/server/routes/epm/index.ts index 0e3c5e76eb825..283f8d6a1b0a0 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.ts @@ -5,8 +5,6 @@ * 2.0. */ -import type { IKibanaResponse } from '@kbn/core/server'; - import { parseExperimentalConfigValue } from '../../../common/experimental_features'; import { API_VERSIONS } from '../../../common/constants'; @@ -20,32 +18,20 @@ import { } from '../../services/security'; import type { FleetAuthzRouteConfig } from '../../services/security/types'; -import type { - DeletePackageResponse, - GetInfoResponse, - InstallPackageResponse, - UpdatePackageResponse, -} from '../../../common/types'; - import { EPM_API_ROUTES } from '../../constants'; -import { splitPkgKey } from '../../services/epm/registry'; import { GetCategoriesRequestSchema, GetPackagesRequestSchema, GetInstalledPackagesRequestSchema, GetFileRequestSchema, GetInfoRequestSchema, - GetInfoRequestSchemaDeprecated, GetBulkAssetsRequestSchema, InstallPackageFromRegistryRequestSchema, - InstallPackageFromRegistryRequestSchemaDeprecated, InstallPackageByUploadRequestSchema, DeletePackageRequestSchema, - DeletePackageRequestSchemaDeprecated, BulkInstallPackagesFromRegistryRequestSchema, GetStatsRequestSchema, UpdatePackageRequestSchema, - UpdatePackageRequestSchemaDeprecated, ReauthorizeTransformRequestSchema, GetDataStreamsRequestSchema, CreateCustomIntegrationRequestSchema, @@ -648,124 +634,6 @@ export const registerRoutes = (router: FleetAuthzRouter, config: FleetConfigType getBulkAssetsHandler ); - // deprecated since 8.0 - // This endpoint should be marked as internal but the router selects this endpoint over the new GET one - // For now keeping it public - router.versioned - .get({ - path: EPM_API_ROUTES.INFO_PATTERN_DEPRECATED, - fleetAuthz: (fleetAuthz: FleetAuthz): boolean => - calculateRouteAuthz( - fleetAuthz, - getRouteRequiredAuthz('get', EPM_API_ROUTES.INFO_PATTERN_DEPRECATED) - ).granted, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: GetInfoRequestSchemaDeprecated }, - }, - async (context, request, response) => { - const newRequest = { ...request, params: splitPkgKey(request.params.pkgkey) } as any; - const resp: IKibanaResponse = await getInfoHandler( - context, - newRequest, - response - ); - if (resp.payload?.item) { - // returning item as well here, because pkgVersion is optional in new GET endpoint, and if not specified, the router selects the deprecated route - return response.ok({ body: { item: resp.payload.item, response: resp.payload.item } }); - } - return resp; - } - ); - - router.versioned - .put({ - path: EPM_API_ROUTES.INFO_PATTERN_DEPRECATED, - fleetAuthz: { - integrations: { writePackageSettings: true }, - }, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: UpdatePackageRequestSchemaDeprecated }, - }, - async (context, request, response) => { - const newRequest = { ...request, params: splitPkgKey(request.params.pkgkey) } as any; - const resp: IKibanaResponse = await updatePackageHandler( - context, - newRequest, - response - ); - if (resp.payload?.item) { - return response.ok({ body: { response: resp.payload.item } }); - } - return resp; - } - ); - - // This endpoint should be marked as internal but the router selects this endpoint over the new POST - router.versioned - .post({ - path: EPM_API_ROUTES.INSTALL_FROM_REGISTRY_PATTERN_DEPRECATED, - fleetAuthz: INSTALL_PACKAGES_AUTHZ, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: InstallPackageFromRegistryRequestSchemaDeprecated }, - }, - async (context, request, response) => { - const newRequest = { - ...request, - params: splitPkgKey(request.params.pkgkey), - query: request.query, - } as any; - const resp: IKibanaResponse = - await installPackageFromRegistryHandler(context, newRequest, response); - if (resp.payload?.items) { - return response.ok({ body: { ...resp.payload, response: resp.payload.items } }); - } - return resp; - } - ); - - router.versioned - .delete({ - path: EPM_API_ROUTES.DELETE_PATTERN_DEPRECATED, - fleetAuthz: { - integrations: { removePackages: true }, - }, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: DeletePackageRequestSchemaDeprecated }, - }, - async (context, request, response) => { - const newRequest = { ...request, params: splitPkgKey(request.params.pkgkey) } as any; - const resp: IKibanaResponse = await deletePackageHandler( - context, - newRequest, - response - ); - if (resp.payload?.items) { - return response.ok({ body: { response: resp.payload.items } }); - } - return resp; - } - ); - // Update transforms with es-secondary-authorization headers, // append authorized_by to transform's _meta, and start transforms router.versioned diff --git a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts index 3892eaa951e5f..84c8a8eb9e104 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts @@ -57,14 +57,15 @@ const MAX_ASSETS_TO_DELETE = 1000; export async function removeInstallation(options: { savedObjectsClient: SavedObjectsClientContract; pkgName: string; - pkgVersion: string; + pkgVersion?: string; esClient: ElasticsearchClient; force?: boolean; }): Promise { - const { savedObjectsClient, pkgName, pkgVersion, esClient } = options; + const { savedObjectsClient, pkgName, esClient } = options; const installation = await getInstallation({ savedObjectsClient, pkgName }); - if (!installation) throw new PackageRemovalError(`${pkgName} is not installed`); - + if (!installation) { + throw new PackageRemovalError(`${pkgName} is not installed`); + } const { total, items } = await packagePolicyService.list( appContextService.getInternalUserSOClientWithoutSpaceExtension(), { @@ -115,7 +116,7 @@ export async function removeInstallation(options: { // a fresh copy from the registry deletePackageCache({ name: pkgName, - version: pkgVersion, + version: installation.version, }); await removeArchiveEntries({ savedObjectsClient, refs: installation.package_assets }); diff --git a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts index bbc1b07010fb7..37ab96b96afb7 100644 --- a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts +++ b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts @@ -164,7 +164,7 @@ const ROUTE_AUTHZ_REQUIREMENTS = deepFreeze p.status === 'installed') .map((p: any) => p.name) .sort(); diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/helper.ts b/x-pack/test/fleet_api_integration/apis/package_policy/helper.ts new file mode 100644 index 0000000000000..2c53248905521 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/package_policy/helper.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Agent } from 'supertest'; + +export async function getInstallationInfo(supertest: Agent, name: string, version: string) { + const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); + return res.body.item.installationInfo; +} diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts index 481f4e09c68d9..bbd55641ce916 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { sortBy } from 'lodash'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; +import { getInstallationInfo } from './helper'; const PACKAGE_NAME = 'input_package_upgrade'; const START_VERSION = '1.0.0'; const UPGRADE_VERSION = '1.1.0'; @@ -33,11 +34,6 @@ export default function (providerContext: FtrProviderContext) { .expect(200); }; - const getInstallationSavedObject = async (name: string, version: string) => { - const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); - return res.body.item.savedObject.attributes; - }; - const createPackagePolicyWithDataset = async ( agentPolicyId: string, dataset: string, @@ -195,13 +191,13 @@ export default function (providerContext: FtrProviderContext) { }); it('should not have created any ES assets on install', async () => { - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); expect(installation.installed_es).to.eql([]); }); it('should create index templates and update installed_es on package policy creation', async () => { await createPackagePolicyWithDataset(agentPolicyId, 'dataset1'); - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); expectIdArraysEqual(installation.installed_es, [ { id: 'logs-dataset1-1.0.0', type: 'ingest_pipeline' }, { id: 'logs-dataset1', type: 'index_template' }, @@ -249,7 +245,7 @@ export default function (providerContext: FtrProviderContext) { it('should create index templates and update installed_es on second package policy creation', async () => { await createPackagePolicyWithDataset(agentPolicyId, 'dataset2'); - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); let found = 0; [ { id: 'logs-dataset2-1.0.0', type: 'ingest_pipeline' }, @@ -268,7 +264,7 @@ export default function (providerContext: FtrProviderContext) { await createFakeFleetDataStream('dataset3'); await createPackagePolicyWithDataset(agentPolicyId, 'dataset3'); - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); let found = 0; [ { id: 'logs-dataset3-1.0.0', type: 'ingest_pipeline' }, diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts index 2ea9c64ee2507..7ccd2fad8bdde 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { sortBy } from 'lodash'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; +import { getInstallationInfo } from './helper'; const PACKAGE_NAME = 'input_package_upgrade'; const START_VERSION = '1.0.0'; @@ -31,11 +32,6 @@ export default function (providerContext: FtrProviderContext) { .expect(200); }; - const getInstallationSavedObject = async (name: string, version: string) => { - const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); - return res.body.item.savedObject.attributes; - }; - const getPackage = async (name: string, version: string) => { const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); return res.body.item; @@ -131,7 +127,7 @@ export default function (providerContext: FtrProviderContext) { await installPackage(PACKAGE_NAME, START_VERSION); await createPackagePolicyWithDataset(agentPolicyId, 'test*', 400); - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); expectIdArraysEqual(installation.installed_es, []); await uninstallPackage(PACKAGE_NAME, START_VERSION); diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/update.ts b/x-pack/test/fleet_api_integration/apis/package_policy/update.ts index 273f051dfcec6..619ddeb0544e7 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/update.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/update.ts @@ -15,6 +15,7 @@ import { enableSecrets, } from '../../helpers'; import { testUsers } from '../test_users'; +import { getInstallationInfo } from './helper'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; @@ -28,11 +29,6 @@ export default function (providerContext: FtrProviderContext) { expect(sortBy(arr1, 'id')).to.eql(sortBy(arr2, 'id')); }; - const getInstallationSavedObject = async (name: string, version: string) => { - const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); - return res.body.item.savedObject.attributes; - }; - const getPackagePolicyById = async (id: string) => { const { body } = await supertest.get(`/api/fleet/package_policies/${id}`); return body; @@ -935,7 +931,7 @@ export default function (providerContext: FtrProviderContext) { }) .expect(200); - const installation = await getInstallationSavedObject('integration_to_input', '2.0.0'); + const installation = await getInstallationInfo(supertest, 'integration_to_input', '2.0.0'); expectIdArraysEqual(installation.installed_es, [ // assets from version 1.0.0 diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts b/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts index 021eebcdcc0c1..e0fbddb578a91 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts @@ -12,6 +12,7 @@ import { import { sortBy } from 'lodash'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; +import { getInstallationInfo } from './helper'; const expectIdArraysEqual = (arr1: any[], arr2: any[]) => { expect(sortBy(arr1, 'id')).to.eql(sortBy(arr2, 'id')); @@ -36,11 +37,6 @@ export default function (providerContext: FtrProviderContext) { }); } - const getInstallationSavedObject = async (name: string, version: string) => { - const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); - return res.body.item.savedObject.attributes; - }; - const getComponentTemplate = async (name: string) => { try { const { component_templates: templates } = await es.cluster.getComponentTemplate({ name }); @@ -1358,7 +1354,11 @@ export default function (providerContext: FtrProviderContext) { }) .expect(200); - const installation = await getInstallationSavedObject('integration_to_input', '3.0.0'); + const installation = await getInstallationInfo( + supertest, + 'integration_to_input', + '3.0.0' + ); expectIdArraysEqual(installation.installed_es, expectedAssets); const expectedComponentTemplates = expectedAssets.filter( diff --git a/x-pack/test/functional/services/ml/test_resources.ts b/x-pack/test/functional/services/ml/test_resources.ts index 5035b6844b9c3..915060b152f24 100644 --- a/x-pack/test/functional/services/ml/test_resources.ts +++ b/x-pack/test/functional/services/ml/test_resources.ts @@ -594,12 +594,12 @@ export function MachineLearningTestResourcesProvider( await retry.tryForTime(10 * 1000, async () => { const { body, status } = await supertest - .get(`/api/fleet/epm/packages?experimental=true`) + .get(`/api/fleet/epm/packages?prerelease=true`) .set(getCommonRequestHeader(`${API_VERSIONS.public.v1}`)); mlApi.assertResponseStatusCode(200, status, body); packageVersion = - body.response.find( + body.items.find( ({ name, version }: { name: string; version: string }) => name === packageName && version )?.version ?? ''; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts index e53e24f98de3b..cea8363d9085c 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts @@ -21,9 +21,9 @@ export async function deleteEndpointFleetPackage(supertest: SuperTest.Agent) { .set('elastic-api-version', '2023-10-31') .send(); - if (resp.status === 200 && resp.body.response.status === 'installed') { + if (resp.status === 200 && resp.body.item.status === 'installed') { await supertest - .delete(epmRouteService.getRemovePath(ENDPOINT_PACKAGE_NAME, resp.body.response.version)) + .delete(epmRouteService.getRemovePath(ENDPOINT_PACKAGE_NAME, resp.body.item.version)) .set('kbn-xsrf', 'true') .send({ force: true }); } diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts index 930c9d39757f4..084d59c55df0d 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts @@ -21,11 +21,9 @@ export async function deletePrebuiltRulesFleetPackage(supertest: SuperTest.Agent .set('elastic-api-version', '2023-10-31') .send(); - if (resp.status === 200 && resp.body.response.status === 'installed') { + if (resp.status === 200 && resp.body.item.status === 'installed') { await supertest - .delete( - epmRouteService.getRemovePath(PREBUILT_RULES_PACKAGE_NAME, resp.body.response.version) - ) + .delete(epmRouteService.getRemovePath(PREBUILT_RULES_PACKAGE_NAME, resp.body.item.version)) .set('kbn-xsrf', 'true') .send({ force: true }); }