From 4dc008dd3db365d7979aea212bfd3f025839f1a5 Mon Sep 17 00:00:00 2001 From: Milosz Marcinkowski Date: Wed, 30 Oct 2024 16:01:22 +0100 Subject: [PATCH] add required headers, add 400 response spec --- .../apm/docs/openapi/apm/bundled.json | 260 ++++++++++++++++++ .../apm/docs/openapi/apm/bundled.yaml | 143 ++++++++++ .../headers/elastic_api_version.yaml | 9 + .../apm/components/headers/kbn_xsrf.yaml | 7 + .../apm/components/schemas/400_response.yaml | 11 + .../openapi/apm/paths/api@apm@agent_keys.yaml | 9 + .../api@apm@fleet@apm_server_schema.yaml | 9 + ...apm@services@{serviceName}@annotation.yaml | 8 + ...vices@{serviceName}@annotation@search.yaml | 7 + .../api@apm@settings@agent_configuration.yaml | 25 ++ ...ttings@agent_configuration@agent_name.yaml | 7 + ...m@settings@agent_configuration@search.yaml | 9 + ...apm@settings@agent_configuration@view.yaml | 7 + .../openapi/apm/paths/api@apm@sourcemaps.yaml | 16 ++ .../apm/paths/api@apm@sourcemaps@{id}.yaml | 8 + ...ings@agent_configuration@environments.yaml | 7 + 16 files changed, 542 insertions(+) create mode 100644 x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/headers/elastic_api_version.yaml create mode 100644 x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/headers/kbn_xsrf.yaml create mode 100644 x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/400_response.yaml diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.json b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.json index a852af2cef95..07af1bdbb9ea 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.json +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.json @@ -35,6 +35,14 @@ "tags": [ "APM agent keys" ], + "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, + { + "$ref": "#/components/parameters/kbn-xsrf" + } + ], "requestBody": { "required": true, "content": { @@ -55,6 +63,16 @@ } } } + }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } } } } @@ -68,6 +86,9 @@ "APM annotations" ], "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, { "name": "serviceName", "in": "path", @@ -115,6 +136,16 @@ } } } + }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } } } } @@ -128,6 +159,12 @@ "APM annotations" ], "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, + { + "$ref": "#/components/parameters/kbn-xsrf" + }, { "name": "serviceName", "in": "path", @@ -158,6 +195,16 @@ } } } + }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } } } } @@ -170,6 +217,11 @@ "tags": [ "APM agent configuration" ], + "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + } + ], "responses": { "200": { "description": "Successful response", @@ -181,6 +233,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "404": { "description": "Not found response", "content": { @@ -199,6 +261,14 @@ "tags": [ "APM agent configuration" ], + "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, + { + "$ref": "#/components/parameters/kbn-xsrf" + } + ], "requestBody": { "required": true, "content": { @@ -220,6 +290,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "404": { "description": "Not found response", "content": { @@ -239,6 +319,12 @@ "APM agent configuration" ], "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, + { + "$ref": "#/components/parameters/kbn-xsrf" + }, { "name": "overwrite", "in": "query", @@ -269,6 +355,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "404": { "description": "Not found response", "content": { @@ -290,6 +386,9 @@ "APM agent configuration" ], "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, { "name": "name", "in": "query", @@ -320,6 +419,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "404": { "description": "Not found response", "content": { @@ -341,6 +450,14 @@ "tags": [ "APM agent configuration" ], + "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, + { + "$ref": "#/components/parameters/kbn-xsrf" + } + ], "requestBody": { "required": true, "content": { @@ -362,6 +479,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "404": { "description": "Not found response", "content": { @@ -383,6 +510,9 @@ "APM agent configuration" ], "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, { "name": "serviceName", "in": "query", @@ -403,6 +533,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "404": { "description": "Not found response", "content": { @@ -425,6 +565,9 @@ "APM agent configuration" ], "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, { "name": "serviceName", "in": "query", @@ -446,6 +589,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "404": { "description": "Not found response", "content": { @@ -468,6 +621,9 @@ "APM sourcemaps" ], "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, { "name": "page", "in": "query", @@ -494,6 +650,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "500": { "description": "Internal Server Error response", "content": { @@ -523,6 +689,14 @@ "tags": [ "APM sourcemaps" ], + "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, + { + "$ref": "#/components/parameters/kbn-xsrf" + } + ], "requestBody": { "required": true, "content": { @@ -544,6 +718,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "500": { "description": "Internal Server Error response", "content": { @@ -576,6 +760,12 @@ "APM sourcemaps" ], "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, + { + "$ref": "#/components/parameters/kbn-xsrf" + }, { "name": "id", "in": "path", @@ -596,6 +786,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "500": { "description": "Internal Server Error response", "content": { @@ -626,6 +826,14 @@ "tags": [ "APM server schema" ], + "parameters": [ + { + "$ref": "#/components/parameters/elastic_api_version" + }, + { + "$ref": "#/components/parameters/kbn-xsrf" + } + ], "requestBody": { "required": true, "content": { @@ -658,6 +866,16 @@ } } }, + "400": { + "description": "Bad Request response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/400_response" + } + } + } + }, "404": { "description": "Not found response", "content": { @@ -673,6 +891,31 @@ } }, "components": { + "parameters": { + "elastic_api_version": { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "required": true, + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + "kbn-xsrf": { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + } + }, "schemas": { "agent_keys_object": { "type": "object", @@ -713,6 +956,23 @@ } } }, + "400_response": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "example": 400 + }, + "error": { + "type": "string", + "example": "Not Found" + }, + "message": { + "type": "string", + "example": "Not Found" + } + } + }, "annotation_search_response": { "type": "object", "properties": { diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml index aadf53fff92e..28b483cce5ad 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml @@ -24,6 +24,9 @@ paths: operationId: createAgentKey tags: - APM agent keys + parameters: + - $ref: '#/components/parameters/elastic_api_version' + - $ref: '#/components/parameters/kbn-xsrf' requestBody: required: true content: @@ -37,6 +40,12 @@ paths: application/json: schema: $ref: '#/components/schemas/agent_keys_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' /api/apm/services/{serviceName}/annotation/search: get: summary: Search for annotations @@ -45,6 +54,7 @@ paths: tags: - APM annotations parameters: + - $ref: '#/components/parameters/elastic_api_version' - name: serviceName in: path required: true @@ -76,6 +86,12 @@ paths: application/json: schema: $ref: '#/components/schemas/annotation_search_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' /api/apm/services/{serviceName}/annotation: post: summary: Create a service annotation @@ -84,6 +100,8 @@ paths: tags: - APM annotations parameters: + - $ref: '#/components/parameters/elastic_api_version' + - $ref: '#/components/parameters/kbn-xsrf' - name: serviceName in: path required: true @@ -103,6 +121,12 @@ paths: application/json: schema: $ref: '#/components/schemas/create_annotation_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' /api/apm/settings/agent-configuration: get: summary: List of agent configurations @@ -110,6 +134,8 @@ paths: operationId: getAgentConfigurations tags: - APM agent configuration + parameters: + - $ref: '#/components/parameters/elastic_api_version' responses: '200': description: Successful response @@ -117,6 +143,12 @@ paths: application/json: schema: $ref: '#/components/schemas/agent_configurations_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '404': description: Not found response content: @@ -128,6 +160,9 @@ paths: operationId: deleteAgentConfiguration tags: - APM agent configuration + parameters: + - $ref: '#/components/parameters/elastic_api_version' + - $ref: '#/components/parameters/kbn-xsrf' requestBody: required: true content: @@ -141,6 +176,12 @@ paths: application/json: schema: $ref: '#/components/schemas/delete_agent_configurations_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '404': description: Not found response content: @@ -153,6 +194,8 @@ paths: tags: - APM agent configuration parameters: + - $ref: '#/components/parameters/elastic_api_version' + - $ref: '#/components/parameters/kbn-xsrf' - name: overwrite in: query schema: @@ -171,6 +214,12 @@ paths: schema: type: object additionalProperties: false + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '404': description: Not found response content: @@ -184,6 +233,7 @@ paths: tags: - APM agent configuration parameters: + - $ref: '#/components/parameters/elastic_api_version' - name: name in: query description: Service name @@ -203,6 +253,12 @@ paths: application/json: schema: $ref: '#/components/schemas/single_agent_configuration_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '404': description: Not found response content: @@ -217,6 +273,9 @@ paths: operationId: searchSingleConfiguration tags: - APM agent configuration + parameters: + - $ref: '#/components/parameters/elastic_api_version' + - $ref: '#/components/parameters/kbn-xsrf' requestBody: required: true content: @@ -230,6 +289,12 @@ paths: application/json: schema: $ref: '#/components/schemas/search_agent_configuration_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '404': description: Not found response content: @@ -243,6 +308,7 @@ paths: tags: - APM agent configuration parameters: + - $ref: '#/components/parameters/elastic_api_version' - name: serviceName in: query description: The name of the service @@ -255,6 +321,12 @@ paths: application/json: schema: $ref: '#/components/schemas/service_environments_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '404': description: Not found response content: @@ -269,6 +341,7 @@ paths: tags: - APM agent configuration parameters: + - $ref: '#/components/parameters/elastic_api_version' - name: serviceName in: query description: The name of the service @@ -282,6 +355,12 @@ paths: application/json: schema: $ref: '#/components/schemas/service_agent_name_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '404': description: Not found response content: @@ -296,6 +375,7 @@ paths: tags: - APM sourcemaps parameters: + - $ref: '#/components/parameters/elastic_api_version' - name: page in: query schema: @@ -311,6 +391,12 @@ paths: application/json: schema: $ref: '#/components/schemas/source_maps_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '500': description: Internal Server Error response content: @@ -329,6 +415,9 @@ paths: operationId: uploadSourceMap tags: - APM sourcemaps + parameters: + - $ref: '#/components/parameters/elastic_api_version' + - $ref: '#/components/parameters/kbn-xsrf' requestBody: required: true content: @@ -342,6 +431,12 @@ paths: application/json: schema: $ref: '#/components/schemas/upload_source_maps_response' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '500': description: Internal Server Error response content: @@ -362,6 +457,8 @@ paths: tags: - APM sourcemaps parameters: + - $ref: '#/components/parameters/elastic_api_version' + - $ref: '#/components/parameters/kbn-xsrf' - name: id in: path schema: @@ -374,6 +471,12 @@ paths: schema: type: object additionalProperties: false + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '500': description: Internal Server Error response content: @@ -392,6 +495,9 @@ paths: operationId: saveApmServerSchema tags: - APM server schema + parameters: + - $ref: '#/components/parameters/elastic_api_version' + - $ref: '#/components/parameters/kbn-xsrf' requestBody: required: true content: @@ -413,6 +519,12 @@ paths: schema: type: object additionalProperties: false + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' '404': description: Not found response content: @@ -420,6 +532,25 @@ paths: schema: $ref: '#/components/schemas/404_response' components: + parameters: + elastic_api_version: + description: The version of the API to use + in: header + name: elastic-api-version + required: true + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + kbn-xsrf: + description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string schemas: agent_keys_object: type: object @@ -447,6 +578,18 @@ components: type: string encoded: type: string + 400_response: + type: object + properties: + statusCode: + type: number + example: 400 + error: + type: string + example: Not Found + message: + type: string + example: Not Found annotation_search_response: type: object properties: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/headers/elastic_api_version.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/headers/elastic_api_version.yaml new file mode 100644 index 000000000000..b11a093b7b58 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/headers/elastic_api_version.yaml @@ -0,0 +1,9 @@ +description: The version of the API to use +in: header +name: elastic-api-version +required: true +schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/headers/kbn_xsrf.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/headers/kbn_xsrf.yaml new file mode 100644 index 000000000000..25fcd49c04e6 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/headers/kbn_xsrf.yaml @@ -0,0 +1,7 @@ +description: A required header to protect against CSRF attacks +in: header +name: kbn-xsrf +required: true +schema: + example: 'true' + type: string diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/400_response.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/400_response.yaml new file mode 100644 index 000000000000..c58230d718ff --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/components/schemas/400_response.yaml @@ -0,0 +1,11 @@ +type: object +properties: + statusCode: + type: number + example: 400 + error: + type: string + example: Not Found + message: + type: string + example: Not Found diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@agent_keys.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@agent_keys.yaml index a354d49f734e..8baa9600f135 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@agent_keys.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@agent_keys.yaml @@ -4,6 +4,9 @@ post: operationId: createAgentKey tags: - APM agent keys + parameters: + - $ref: '../components/headers/elastic_api_version.yaml' + - $ref: '../components/headers/kbn_xsrf.yaml' requestBody: required: true content: @@ -17,3 +20,9 @@ post: application/json: schema: $ref: '../components/schemas/agent_keys_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@fleet@apm_server_schema.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@fleet@apm_server_schema.yaml index 8da273dc840f..70fb9de3df1d 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@fleet@apm_server_schema.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@fleet@apm_server_schema.yaml @@ -3,6 +3,9 @@ post: operationId: saveApmServerSchema tags: - APM server schema + parameters: + - $ref: '../components/headers/elastic_api_version.yaml' + - $ref: '../components/headers/kbn_xsrf.yaml' requestBody: required: true content: @@ -24,6 +27,12 @@ post: schema: type: object additionalProperties: false + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation.yaml index 2fc370dea1bc..17973858f771 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation.yaml @@ -5,6 +5,8 @@ post: tags: - APM annotations parameters: + - $ref: '../components/headers/elastic_api_version.yaml' + - $ref: '../components/headers/kbn_xsrf.yaml' - name: serviceName in: path required: true @@ -24,3 +26,9 @@ post: application/json: schema: $ref: '../components/schemas/create_annotation_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation@search.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation@search.yaml index 272161b540df..edb8bc2cb5b0 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation@search.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@services@{serviceName}@annotation@search.yaml @@ -5,6 +5,7 @@ get: tags: - APM annotations parameters: + - $ref: '../components/headers/elastic_api_version.yaml' - name: serviceName in: path required: true @@ -36,3 +37,9 @@ get: application/json: schema: $ref: '../components/schemas/annotation_search_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration.yaml index 6dad441ed6b5..45dc5a21f8b1 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration.yaml @@ -4,6 +4,8 @@ get: operationId: getAgentConfigurations tags: - APM agent configuration + parameters: + - $ref: '../components/headers/elastic_api_version.yaml' responses: '200': description: Successful response @@ -11,6 +13,12 @@ get: application/json: schema: $ref: '../components/schemas/agent_configurations_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '404': description: Not found response content: @@ -22,6 +30,9 @@ delete: operationId: deleteAgentConfiguration tags: - APM agent configuration + parameters: + - $ref: '../components/headers/elastic_api_version.yaml' + - $ref: '../components/headers/kbn_xsrf.yaml' requestBody: required: true content: @@ -35,6 +46,12 @@ delete: application/json: schema: $ref: '../components/schemas/delete_agent_configurations_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '404': description: Not found response content: @@ -47,6 +64,8 @@ put: tags: - APM agent configuration parameters: + - $ref: '../components/headers/elastic_api_version.yaml' + - $ref: '../components/headers/kbn_xsrf.yaml' - name: overwrite in: query schema: @@ -65,6 +84,12 @@ put: schema: type: object additionalProperties: false + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@agent_name.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@agent_name.yaml index 43ad49e5ffc3..af5689b021a3 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@agent_name.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@agent_name.yaml @@ -5,6 +5,7 @@ get: tags: - APM agent configuration parameters: + - $ref: '../components/headers/elastic_api_version.yaml' - name: serviceName in: query description: The name of the service @@ -18,6 +19,12 @@ get: application/json: schema: $ref: '../components/schemas/service_agent_name_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@search.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@search.yaml index 387b3dac7227..c253f20746c1 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@search.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@search.yaml @@ -5,6 +5,9 @@ post: operationId: searchSingleConfiguration tags: - APM agent configuration + parameters: + - $ref: '../components/headers/elastic_api_version.yaml' + - $ref: '../components/headers/kbn_xsrf.yaml' requestBody: required: true content: @@ -18,6 +21,12 @@ post: application/json: schema: $ref: '../components/schemas/search_agent_configuration_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@view.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@view.yaml index 3f89608003a3..127f877aa359 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@view.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@settings@agent_configuration@view.yaml @@ -4,6 +4,7 @@ get: tags: - APM agent configuration parameters: + - $ref: '../components/headers/elastic_api_version.yaml' - name: name in: query description: Service name @@ -23,6 +24,12 @@ get: application/json: schema: $ref: '../components/schemas/single_agent_configuration_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '404': description: Not found response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps.yaml index 944cb10666f2..48fbdebc949d 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps.yaml @@ -5,6 +5,7 @@ get: tags: - APM sourcemaps parameters: + - $ref: '../components/headers/elastic_api_version.yaml' - name: page in: query schema: @@ -20,6 +21,12 @@ get: application/json: schema: $ref: '../components/schemas/source_maps_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '500': description: Internal Server Error response content: @@ -38,6 +45,9 @@ post: operationId: uploadSourceMap tags: - APM sourcemaps + parameters: + - $ref: '../components/headers/elastic_api_version.yaml' + - $ref: '../components/headers/kbn_xsrf.yaml' requestBody: required: true content: @@ -51,6 +61,12 @@ post: application/json: schema: $ref: '../components/schemas/upload_source_maps_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '500': description: Internal Server Error response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps@{id}.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps@{id}.yaml index 1737f90ead10..57e7ce141652 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps@{id}.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/api@apm@sourcemaps@{id}.yaml @@ -5,6 +5,8 @@ delete: tags: - APM sourcemaps parameters: + - $ref: '../components/headers/elastic_api_version.yaml' + - $ref: '../components/headers/kbn_xsrf.yaml' - name: id in: path schema: @@ -17,6 +19,12 @@ delete: schema: type: object additionalProperties: false + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '500': description: Internal Server Error response content: diff --git a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/apm@settings@agent_configuration@environments.yaml b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/apm@settings@agent_configuration@environments.yaml index e8a678cee179..e40943cd23f4 100644 --- a/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/apm@settings@agent_configuration@environments.yaml +++ b/x-pack/plugins/observability_solution/apm/docs/openapi/apm/paths/apm@settings@agent_configuration@environments.yaml @@ -4,6 +4,7 @@ get: tags: - APM agent configuration parameters: + - $ref: '../components/headers/elastic_api_version.yaml' - name: serviceName in: query description: The name of the service @@ -16,6 +17,12 @@ get: application/json: schema: $ref: '../components/schemas/service_environments_response.yaml' + '400': + description: Bad Request response + content: + application/json: + schema: + $ref: '../components/schemas/400_response.yaml' '404': description: Not found response content: