From 33736e330cfd578a84b7c5046c6b3e7c2a420311 Mon Sep 17 00:00:00 2001 From: neptunian Date: Mon, 5 Oct 2020 17:29:43 -0400 Subject: [PATCH] update the openAPI spec --- .../common/openapi/spec_oas3.json | 246 ++++++++++++++++++ 1 file changed, 246 insertions(+) diff --git a/x-pack/plugins/ingest_manager/common/openapi/spec_oas3.json b/x-pack/plugins/ingest_manager/common/openapi/spec_oas3.json index a780ae55997938..329137b063e660 100644 --- a/x-pack/plugins/ingest_manager/common/openapi/spec_oas3.json +++ b/x-pack/plugins/ingest_manager/common/openapi/spec_oas3.json @@ -3520,6 +3520,172 @@ } } }, + "/fleet/agents/{agentId}/upgrade": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "agentId", + "in": "path", + "required": true + } + ], + "post": { + "summary": "Fleet - Agent - Upgrade", + "tags": [], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeAgent" + }, + "examples": { + "success": { + "value": {} + } + } + } + } + }, + "400": { + "description": "BAD REQUEST", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeAgent" + }, + "examples": { + "bad request not upgradeable": { + "value": { + "statusCode": 400, + "error": "Bad Request", + "message": "agent d133b07d-5c2b-42f0-8e6b-bbae53bdce88 is not upgradeable" + } + }, + "bad request kibana version": { + "value": { + "statusCode": 400, + "error": "Bad Request", + "message": "cannot upgrade agent to 8.0.0 because it is different than the installed kibana version 7.9.10" + } + }, + "bad request agent unenrolling": { + "value": { + "statusCode": 400, + "error": "Bad Request", + "message": "cannot upgrade an unenrolling or unenrolled agent" + } + } + } + } + } + } + }, + "operationId": "post-fleet-agents-upgrade", + "parameters": [ + { + "$ref": "#/components/parameters/xsrfHeader" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeAgent" + }, + "examples":{ + "version":{ + "value": { + "version": "8.0.0" + } + }, + "version and source_uri":{ + "value": { + "version": "8.0.0", + "source_uri": "http://localhost:8000" + } + } + } + } + } + } + } + }, + "/fleet/agents/bulk_upgrade": { + "post": { + "summary": "Fleet - Agent - Bulk Upgrade", + "tags": [], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpgradeAgents" + }, + "examples": { + "success": { + "value": {} + } + } + } + } + }, + "400": { + "description": "BAD REQUEST", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeAgent" + }, + "examples": { + "bad request kibana version": { + "value": { + "statusCode": 400, + "error": "Bad Request", + "message": "cannot upgrade agent to 8.0.0 because it is different than the installed kibana version 7.9.10" + } + } + } + } + } + } + }, + "operationId": "post-fleet-agents-bulk-upgrade", + "parameters": [ + { + "$ref": "#/components/parameters/xsrfHeader" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpgradeAgents" + }, + "examples":{ + "version":{ + "value": { + "version": "8.0.0" + } + }, + "version and source_uri":{ + "value": { + "version": "8.0.0", + "source_uri": "http://localhost:8000" + } + } + } + } + } + } + } + }, "/fleet/agent-status": { "get": { "summary": "Fleet - Agent - Status for policy", @@ -4226,8 +4392,88 @@ "type": "string", "title": "EnrollmentApiKey", "format": "byte" + }, + "UpgradeAgent":{ + "title": "UpgradeAgent", + "oneOf": [ + { + "type": "object", + "properties": { + "version": { + "type": "string" + } + }, + "required": ["version"] + }, + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "source_uri": { + "type": "string" + } + }, + "required": ["version"] + } + ] + }, + "BulkUpgradeAgents":{ + "title": "BulkUpgradeAgents", + "oneOf": [ + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "agents":{ + "type": "array", + "items":{ + "type": "string" + } + } + }, + "required": ["version", "agents"] + }, + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "source_uri": { + "type": "string" + }, + "agents":{ + "type": "array", + "items":{ + "type": "string" + } + } + }, + "required": ["version", "agents"] + }, + { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "source_uri": { + "type": "string" + }, + "agents":{ + "type": "string" + } + }, + "required": ["version", "agents"] + } + ] } }, + "parameters": { "pageSizeParam": { "name": "perPage",