From 1659434b94a8557e6f735166f7be59f0d692b3dd Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Mon, 23 Oct 2023 13:24:13 -0700 Subject: [PATCH] [OAS] Custom fields in case APIs (#169327) --- .../plugins/cases/docs/openapi/bundled.json | 2047 +++++++++-------- .../plugins/cases/docs/openapi/bundled.yaml | 1324 +++++++---- .../examples/add_comment_response.yaml | 13 +- .../examples/create_case_request.yaml | 9 +- .../examples/create_case_response.yaml | 14 +- .../examples/find_case_activity_response.yaml | 31 +- .../examples/find_case_response.yaml | 23 +- .../examples/get_case_activity_response.yaml | 72 - .../get_case_configuration_response.yaml | 25 + .../examples/get_case_response.yaml | 36 +- .../examples/get_comment_response.yaml | 5 +- .../examples/get_reporters_response.yaml | 17 +- .../examples/get_status_response.yaml | 7 - .../set_case_configuration_request.yaml | 7 +- .../set_case_configuration_response.yaml | 10 +- .../update_case_configuration_request.yaml | 18 + .../update_case_configuration_response.yaml | 43 + .../examples/update_case_request.yaml | 16 +- .../examples/update_case_response.yaml | 25 +- .../examples/update_comment_response.yaml | 21 +- .../alert_comment_response_properties.yaml | 12 + .../schemas/case_configure_customfields.yaml | 24 + .../case_configure_response_properties.yaml | 16 + .../components/schemas/case_customfields.yaml | 25 + .../schemas/case_response_properties.yaml | 12 + .../schemas/create_case_request.yaml | 18 +- .../schemas/custom_fields_property.yaml | 31 - .../set_case_configuration_request.yaml | 25 +- .../update_case_configuration_request.yaml | 13 + .../schemas/update_case_request.yaml | 26 +- .../cases/docs/openapi/entrypoint.yaml | 6 +- .../cases/docs/openapi/paths/api@cases.yaml | 11 +- .../docs/openapi/paths/api@cases@_find.yaml | 4 - .../paths/api@cases@alerts@{alertid}.yaml | 6 +- .../openapi/paths/api@cases@configure.yaml | 13 +- .../api@cases@configure@connectors@_find.yaml | 4 - ...api@cases@configure@{configurationid}.yaml | 20 +- .../openapi/paths/api@cases@reporters.yaml | 10 +- .../docs/openapi/paths/api@cases@status.yaml | 7 - .../docs/openapi/paths/api@cases@tags.yaml | 6 +- .../openapi/paths/api@cases@{caseid}.yaml | 6 +- .../paths/api@cases@{caseid}@alerts.yaml | 6 +- .../paths/api@cases@{caseid}@comments.yaml | 11 - ...i@cases@{caseid}@comments@{commentid}.yaml | 8 +- ...caseid}@connector@{connectorid}@_push.yaml | 6 +- .../api@cases@{caseid}@user_actions.yaml | 7 - ...api@cases@{caseid}@user_actions@_find.yaml | 4 - .../openapi/paths/s@{spaceid}@api@cases.yaml | 9 - .../paths/s@{spaceid}@api@cases@_find.yaml | 4 - ...@{spaceid}@api@cases@alerts@{alertid}.yaml | 6 +- .../s@{spaceid}@api@cases@configure.yaml | 11 +- ...@api@cases@configure@connectors@_find.yaml | 4 - ...api@cases@configure@{configurationid}.yaml | 18 +- .../s@{spaceid}@api@cases@reporters.yaml | 8 +- .../paths/s@{spaceid}@api@cases@status.yaml | 8 +- .../paths/s@{spaceid}@api@cases@tags.yaml | 4 - .../paths/s@{spaceid}@api@cases@{caseid}.yaml | 4 - ...s@{spaceid}@api@cases@{caseid}@alerts.yaml | 4 - ...{spaceid}@api@cases@{caseid}@comments.yaml | 11 - ...id}@api@cases@{caseid}@comments@_find.yaml | 5 - ...i@cases@{caseid}@comments@{commentid}.yaml | 8 +- ...caseid}@connector@{connectorid}@_push.yaml | 4 - ...ceid}@api@cases@{caseid}@user_actions.yaml | 9 +- ...api@cases@{caseid}@user_actions@_find.yaml | 4 - 64 files changed, 2409 insertions(+), 1812 deletions(-) delete mode 100644 x-pack/plugins/cases/docs/openapi/components/examples/get_case_activity_response.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/examples/get_case_configuration_response.yaml delete mode 100644 x-pack/plugins/cases/docs/openapi/components/examples/get_status_response.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_request.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_response.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_customfields.yaml create mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml delete mode 100644 x-pack/plugins/cases/docs/openapi/components/schemas/custom_fields_property.yaml diff --git a/x-pack/plugins/cases/docs/openapi/bundled.json b/x-pack/plugins/cases/docs/openapi/bundled.json index 9ef79cb9203ed4..e0b2171463f985 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.json +++ b/x-pack/plugins/cases/docs/openapi/bundled.json @@ -14,8 +14,12 @@ }, "servers": [ { - "url": "http://localhost:5601", - "description": "local" + "url": "https://{kibanaUrl}", + "variables": { + "kibanaUrl": { + "default": "localhost:5601" + } + } } ], "security": [ @@ -87,12 +91,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "delete": { "summary": "Deletes one or more cases in the default space.", @@ -123,12 +122,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "patch": { "summary": "Updates one or more cases in the default space.", @@ -185,18 +179,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/_find": { "get": { @@ -309,18 +293,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/alerts/{alertId}": { "get": { @@ -380,18 +354,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601s" } - ] + } }, "/api/cases/configure": { "get": { @@ -419,6 +383,40 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "connector": { "type": "object", "properties": { @@ -449,6 +447,11 @@ }, "created_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -511,6 +514,11 @@ }, "updated_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -540,6 +548,11 @@ } } } + }, + "examples": { + "getConfigurationResponse": { + "$ref": "#/components/examples/get_case_configuration_response" + } } } } @@ -554,15 +567,10 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "post": { - "summary": "Sets external connection details, such as the closure type and default connector for cases in the default space.", + "summary": "Creates a case specific configuration that includes external connection details and custom fields.", "operationId": "setCaseConfigurationDefaultSpace", "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details.\n", "tags": [ @@ -598,6 +606,40 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "connector": { "type": "object", "properties": { @@ -628,6 +670,11 @@ }, "created_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -690,6 +737,11 @@ }, "updated_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -737,18 +789,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/configure/{configurationId}": { "patch": { @@ -771,6 +813,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/update_case_configuration_request" + }, + "examples": { + "updateCaseConfigurationRequest": { + "$ref": "#/components/examples/update_case_configuration_request" + } } } } @@ -781,134 +828,180 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "closure_type": { - "$ref": "#/components/schemas/closure_types" - }, - "connector": { - "type": "object", - "properties": { - "fields": { - "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "nullable": true, - "type": "object" - }, - "id": { - "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", - "type": "string", - "example": "none" - }, - "name": { - "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", - "type": "string", - "example": "none" - }, - "type": { - "$ref": "#/components/schemas/connector_types" - } - } - }, - "created_at": { - "type": "string", - "format": "date-time", - "example": "2022-06-01T17:07:17.767Z" - }, - "created_by": { + "type": "object", + "properties": { + "closure_type": { + "$ref": "#/components/schemas/closure_types" + }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { "type": "object", "properties": { - "email": { + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", "type": "string", - "example": null, - "nullable": true + "minLength": 1, + "maxLength": 36 }, - "full_name": { + "label": { + "description": "The custom field label that is displayed in the case.", "type": "string", - "example": null, - "nullable": true + "minLength": 1, + "maxLength": 50 }, - "username": { - "type": "string", - "example": "elastic", - "nullable": true + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" }, - "profile_uid": { + "type": { + "description": "The type of the custom field.", "type": "string", - "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" + "enum": [ + "text", + "toggle" + ] } } - }, - "error": { - "type": "string", - "nullable": true, - "example": null - }, - "id": { - "type": "string", - "example": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" - }, - "mappings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "action_type": { - "type": "string", - "example": "overwrite" - }, - "source": { - "type": "string", - "example": "title" - }, - "target": { - "type": "string", - "example": "summary" - } - } + } + }, + "connector": { + "type": "object", + "properties": { + "fields": { + "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", + "nullable": true, + "type": "object" + }, + "id": { + "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", + "type": "string", + "example": "none" + }, + "name": { + "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", + "type": "string", + "example": "none" + }, + "type": { + "$ref": "#/components/schemas/connector_types" } - }, - "owner": { - "$ref": "#/components/schemas/owners" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "example": "2022-06-01T19:58:48.169Z" - }, - "updated_by": { + } + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2022-06-01T17:07:17.767Z" + }, + "created_by": { + "type": "object", + "required": [ + "email", + "full_name", + "username" + ], + "properties": { + "email": { + "type": "string", + "example": null, + "nullable": true + }, + "full_name": { + "type": "string", + "example": null, + "nullable": true + }, + "username": { + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" + } + } + }, + "error": { + "type": "string", + "nullable": true, + "example": null + }, + "id": { + "type": "string", + "example": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" + }, + "mappings": { + "type": "array", + "items": { "type": "object", "properties": { - "email": { - "type": "string", - "example": null, - "nullable": true - }, - "full_name": { + "action_type": { "type": "string", - "example": null, - "nullable": true + "example": "overwrite" }, - "username": { + "source": { "type": "string", - "example": "elastic", - "nullable": true + "example": "title" }, - "profile_uid": { + "target": { "type": "string", - "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" + "example": "summary" } - }, - "nullable": true - }, - "version": { - "type": "string", - "example": "WzIwNzMsMV0=" + } } + }, + "owner": { + "$ref": "#/components/schemas/owners" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "example": "2022-06-01T19:58:48.169Z" + }, + "updated_by": { + "type": "object", + "required": [ + "email", + "full_name", + "username" + ], + "properties": { + "email": { + "type": "string", + "example": null, + "nullable": true + }, + "full_name": { + "type": "string", + "example": null, + "nullable": true + }, + "username": { + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" + } + }, + "nullable": true + }, + "version": { + "type": "string", + "example": "WzIwNzMsMV0=" } } + }, + "examples": { + "updateCaseConfigurationResponse": { + "$ref": "#/components/examples/update_case_configuration_response" + } } } } @@ -923,18 +1016,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/reporters": { "get": { @@ -959,6 +1042,11 @@ "maxItems": 10000, "items": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -1000,18 +1088,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/status": { "get": { @@ -1045,11 +1123,6 @@ "type": "integer" } } - }, - "examples": { - "getStatusResponse": { - "$ref": "#/components/examples/get_status_response" - } } } } @@ -1064,18 +1137,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/tags": { "get": { @@ -1120,18 +1183,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/{caseId}": { "get": { @@ -1175,18 +1228,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/{caseId}/alerts": { "get": { @@ -1231,18 +1274,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/{caseId}/comments": { "post": { @@ -1301,12 +1334,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "delete": { "summary": "Deletes all comments and alerts from a case in the default space.", @@ -1337,12 +1365,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "patch": { "summary": "Updates a comment or alert in a case in the default space.", @@ -1400,12 +1423,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "get": { "summary": "Retrieves all the comments from a case in the default space.", @@ -1441,18 +1459,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/{caseId}/comments/{commentId}": { "delete": { @@ -1487,12 +1495,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "get": { "summary": "Retrieves a comment from a case in the default space.", @@ -1542,18 +1545,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/{caseId}/connector/{connectorId}/_push": { "post": { @@ -1610,18 +1603,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/{caseId}/user_actions": { "get": { @@ -1647,11 +1630,6 @@ "items": { "$ref": "#/components/schemas/user_actions_response_properties" } - }, - "examples": { - "getCaseActivityResponse": { - "$ref": "#/components/examples/get_case_activity_response" - } } } } @@ -1666,18 +1644,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/{caseId}/user_actions/_find": { "get": { @@ -1748,18 +1716,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/api/cases/configure/connectors/_find": { "get": { @@ -1834,18 +1792,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases": { "post": { @@ -1904,12 +1852,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "delete": { "summary": "Deletes one or more cases.", @@ -1943,12 +1886,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "patch": { "summary": "Updates one or more cases.", @@ -2008,18 +1946,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/_find": { "get": { @@ -2134,18 +2062,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/alerts/{alertId}": { "get": { @@ -2207,18 +2125,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/configure": { "get": { @@ -2249,6 +2157,40 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "connector": { "type": "object", "properties": { @@ -2279,6 +2221,11 @@ }, "created_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -2341,6 +2288,11 @@ }, "updated_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -2370,6 +2322,11 @@ } } } + }, + "examples": { + "getConfigurationResponse": { + "$ref": "#/components/examples/get_case_configuration_response" + } } } } @@ -2384,15 +2341,10 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "post": { - "summary": "Sets external connection details, such as the closure type and default connector for cases.", + "summary": "Creates a case specific configuration that includes external connection details and custom fields.", "operationId": "setCaseConfiguration", "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details.\n", "tags": [ @@ -2431,6 +2383,40 @@ "closure_type": { "$ref": "#/components/schemas/closure_types" }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { + "type": "object", + "properties": { + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "connector": { "type": "object", "properties": { @@ -2461,6 +2447,11 @@ }, "created_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -2523,6 +2514,11 @@ }, "updated_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -2570,18 +2566,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/configure/{configurationId}": { "patch": { @@ -2607,6 +2593,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/update_case_configuration_request" + }, + "examples": { + "updateCaseConfigurationRequest": { + "$ref": "#/components/examples/update_case_configuration_request" + } } } } @@ -2617,134 +2608,180 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "closure_type": { - "$ref": "#/components/schemas/closure_types" - }, - "connector": { - "type": "object", - "properties": { - "fields": { - "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "nullable": true, - "type": "object" - }, - "id": { - "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", - "type": "string", - "example": "none" - }, - "name": { - "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", - "type": "string", - "example": "none" - }, - "type": { - "$ref": "#/components/schemas/connector_types" - } - } - }, - "created_at": { - "type": "string", - "format": "date-time", - "example": "2022-06-01T17:07:17.767Z" - }, - "created_by": { + "type": "object", + "properties": { + "closure_type": { + "$ref": "#/components/schemas/closure_types" + }, + "customFields": { + "type": "array", + "x-technical-preview": true, + "description": "Custom fields configuration details.", + "items": { "type": "object", "properties": { - "email": { + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", "type": "string", - "example": null, - "nullable": true + "minLength": 1, + "maxLength": 36 }, - "full_name": { + "label": { + "description": "The custom field label that is displayed in the case.", "type": "string", - "example": null, - "nullable": true + "minLength": 1, + "maxLength": 50 }, - "username": { - "type": "string", - "example": "elastic", - "nullable": true + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" }, - "profile_uid": { + "type": { + "description": "The type of the custom field.", "type": "string", - "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" + "enum": [ + "text", + "toggle" + ] } } - }, - "error": { - "type": "string", - "nullable": true, - "example": null - }, - "id": { - "type": "string", - "example": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" - }, - "mappings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "action_type": { - "type": "string", - "example": "overwrite" - }, - "source": { - "type": "string", - "example": "title" - }, - "target": { - "type": "string", - "example": "summary" - } - } + } + }, + "connector": { + "type": "object", + "properties": { + "fields": { + "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", + "nullable": true, + "type": "object" + }, + "id": { + "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", + "type": "string", + "example": "none" + }, + "name": { + "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", + "type": "string", + "example": "none" + }, + "type": { + "$ref": "#/components/schemas/connector_types" } - }, - "owner": { - "$ref": "#/components/schemas/owners" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "example": "2022-06-01T19:58:48.169Z" - }, - "updated_by": { + } + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2022-06-01T17:07:17.767Z" + }, + "created_by": { + "type": "object", + "required": [ + "email", + "full_name", + "username" + ], + "properties": { + "email": { + "type": "string", + "example": null, + "nullable": true + }, + "full_name": { + "type": "string", + "example": null, + "nullable": true + }, + "username": { + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" + } + } + }, + "error": { + "type": "string", + "nullable": true, + "example": null + }, + "id": { + "type": "string", + "example": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" + }, + "mappings": { + "type": "array", + "items": { "type": "object", "properties": { - "email": { - "type": "string", - "example": null, - "nullable": true - }, - "full_name": { + "action_type": { "type": "string", - "example": null, - "nullable": true + "example": "overwrite" }, - "username": { + "source": { "type": "string", - "example": "elastic", - "nullable": true + "example": "title" }, - "profile_uid": { + "target": { "type": "string", - "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" + "example": "summary" } + } + } + }, + "owner": { + "$ref": "#/components/schemas/owners" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "example": "2022-06-01T19:58:48.169Z" + }, + "updated_by": { + "type": "object", + "required": [ + "email", + "full_name", + "username" + ], + "properties": { + "email": { + "type": "string", + "example": null, + "nullable": true }, - "nullable": true + "full_name": { + "type": "string", + "example": null, + "nullable": true + }, + "username": { + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" + } }, - "version": { - "type": "string", - "example": "WzIwNzMsMV0=" - } + "nullable": true + }, + "version": { + "type": "string", + "example": "WzIwNzMsMV0=" } } + }, + "examples": { + "updateCaseConfigurationResponse": { + "$ref": "#/components/examples/update_case_configuration_response" + } } } } @@ -2759,18 +2796,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/configure/connectors/_find": { "get": { @@ -2849,18 +2876,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/reporters": { "get": { @@ -2887,6 +2904,11 @@ "type": "array", "items": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -2928,18 +2950,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/status": { "get": { @@ -2976,11 +2988,6 @@ "type": "integer" } } - }, - "examples": { - "getStatusResponse": { - "$ref": "#/components/examples/get_status_response" - } } } } @@ -2995,18 +3002,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/tags": { "get": { @@ -3053,18 +3050,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/{caseId}": { "get": { @@ -3111,18 +3098,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/{caseId}/alerts": { "get": { @@ -3170,18 +3147,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/{caseId}/comments": { "post": { @@ -3243,12 +3210,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "delete": { "summary": "Deletes all comments and alerts from a case.", @@ -3282,12 +3244,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "patch": { "summary": "Updates a comment or alert in a case.", @@ -3348,12 +3305,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "get": { "summary": "Retrieves all the comments from a case.", @@ -3392,18 +3344,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/{caseId}/comments/_find": { "get": { @@ -3451,18 +3393,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/{caseId}/comments/{commentId}": { "delete": { @@ -3500,12 +3432,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "get": { "summary": "Retrieves a comment from a case.", @@ -3558,18 +3485,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push": { "post": { @@ -3629,18 +3546,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/{caseId}/user_actions": { "get": { @@ -3669,11 +3576,6 @@ "items": { "$ref": "#/components/schemas/user_actions_response_properties" } - }, - "examples": { - "getCaseActivityResponse": { - "$ref": "#/components/examples/get_case_activity_response" - } } } } @@ -3688,18 +3590,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } }, "/s/{spaceId}/api/cases/{caseId}/user_actions/_find": { "get": { @@ -3773,18 +3665,8 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" } - ] + } } }, "components": { @@ -4579,54 +4461,6 @@ ], "default": "low" }, - "custom_fields_property": { - "type": "array", - "description": "Values for custom fields of a case", - "minItems": 0, - "maxItems": 5, - "items": { - "type": "object", - "required": [ - "key", - "type", - "field" - ], - "properties": { - "key": { - "description": "The key identifying the custom field.", - "type": "string" - }, - "type": { - "description": "The type of the custom field. Should match the key and how the custom field was configured", - "type": "string" - }, - "field": { - "description": "An object containing the value of the field.", - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "description": "The value of the field.", - "nullable": true, - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "boolean" - } - ] - } - } - } - } - } - } - }, "create_case_request": { "title": "Create case request", "description": "The create case API request body varies depending on the type of connector.", @@ -4692,7 +4526,7 @@ } }, "category": { - "description": "Category for the case. It could be a word or a phrase to categorize the case.", + "description": "A word or phrase that categorizes the case.", "type": "string", "maxLength": 50 }, @@ -4702,7 +4536,47 @@ "maxLength": 160 }, "customFields": { - "$ref": "#/components/schemas/custom_fields_property" + "type": "array", + "description": "Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.\n", + "x-technical-preview": true, + "minItems": 0, + "maxItems": 10, + "items": { + "type": "object", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "description": "The unique identifier for the custom field. The key value must exist in the case configuration settings.\n", + "type": "string" + }, + "type": { + "description": "The custom field type. It must match the type specified in the case configuration settings.\n", + "type": "string", + "enum": [ + "text", + "toggle" + ] + }, + "value": { + "description": "The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n", + "oneOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 160, + "nullable": true + }, + { + "type": "boolean" + } + ] + } + } + } } } }, @@ -4755,6 +4629,11 @@ }, "created_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -4796,6 +4675,11 @@ }, "pushed_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -4848,6 +4732,11 @@ }, "updated_by": { "type": "object", + "required": [ + "email", + "full_name", + "username" + ], "properties": { "email": { "type": "string", @@ -5114,6 +5003,11 @@ "assignees": { "$ref": "#/components/schemas/assignees" }, + "category": { + "type": "string", + "description": "The case category.", + "nullable": true + }, "closed_at": { "type": "string", "format": "date-time", @@ -5178,6 +5072,42 @@ "created_by": { "$ref": "#/components/schemas/case_response_created_by_properties" }, + "customFields": { + "type": "array", + "description": "Custom field values for the case.", + "x-technical-preview": true, + "items": { + "type": "object", + "properties": { + "key": { + "description": "The unique identifier for the custom field. The key value must exist in the case configuration settings.\n", + "type": "string" + }, + "type": { + "description": "The custom field type. It must match the type specified in the case configuration settings.\n", + "type": "string", + "enum": [ + "text", + "toggle" + ] + }, + "value": { + "description": "The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n", + "oneOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 160, + "nullable": true + }, + { + "type": "boolean" + } + ] + } + } + } + }, "description": { "type": "string", "example": "A case description." @@ -5282,6 +5212,11 @@ "assignees": { "$ref": "#/components/schemas/assignees" }, + "category": { + "description": "A word or phrase that categorizes the case.", + "type": "string", + "maxLength": 50 + }, "connector": { "oneOf": [ { @@ -5307,6 +5242,49 @@ } ] }, + "customFields": { + "type": "array", + "description": "Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.\n", + "x-technical-preview": true, + "minItems": 0, + "maxItems": 10, + "items": { + "type": "object", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "description": "The unique identifier for the custom field. The key value must exist in the case configuration settings.\n", + "type": "string" + }, + "type": { + "description": "The custom field type. It must match the type specified in the case configuration settings.\n", + "type": "string", + "enum": [ + "text", + "toggle" + ] + }, + "value": { + "description": "The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n", + "oneOf": [ + { + "type": "string", + "minLength": 1, + "maxLength": 160, + "nullable": true + }, + { + "type": "boolean" + } + ] + } + } + } + }, "description": { "description": "An updated description for the case.", "type": "string" @@ -5334,11 +5312,6 @@ "maxLength": 256 } }, - "category": { - "description": "Category for the case. It could be a word or a phrase to categorize the case.", - "type": "string", - "maxLength": 50 - }, "title": { "description": "A title for the case.", "type": "string", @@ -5347,9 +5320,6 @@ "version": { "description": "The current version of the case. To determine this value, use the get case or find cases APIs.", "type": "string" - }, - "customFields": { - "$ref": "#/components/schemas/custom_fields_property" } } } @@ -5430,22 +5400,50 @@ "type" ] }, + "customFields": { + "type": "array", + "description": "Custom fields case configuration.", + "x-technical-preview": true, + "minItems": 0, + "maxItems": 10, + "items": { + "type": "object", + "required": [ + "key", + "label", + "required", + "type" + ], + "properties": { + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } + }, "owner": { "$ref": "#/components/schemas/owners" - }, - "settings": { - "description": "An object that contains the case settings.", - "type": "object", - "properties": { - "syncAlerts": { - "description": "Turns alert syncing on or off.", - "type": "boolean", - "example": true - } - }, - "required": [ - "syncAlerts" - ] } } }, @@ -5482,13 +5480,53 @@ "type": { "$ref": "#/components/schemas/connector_types" } - }, - "required": [ - "fields", - "id", - "name", - "type" - ] + }, + "required": [ + "fields", + "id", + "name", + "type" + ] + }, + "customFields": { + "type": "array", + "description": "Custom fields case configuration.", + "x-technical-preview": true, + "items": { + "type": "object", + "required": [ + "key", + "label", + "required", + "type" + ], + "properties": { + "key": { + "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", + "type": "string", + "minLength": 1, + "maxLength": 36 + }, + "label": { + "description": "The custom field label that is displayed in the case.", + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "required": { + "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", + "type": "boolean" + }, + "type": { + "description": "The type of the custom field.", + "type": "string", + "enum": [ + "text", + "toggle" + ] + } + } + } }, "version": { "description": "The version of the connector. To retrieve the version value, use the get configuration API.\n", @@ -6430,7 +6468,14 @@ "settings": { "syncAlerts": true }, - "owner": "cases" + "owner": "cases", + "customFields": [ + { + "type": "text", + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "value": "My field value" + } + ] } }, "create_case_response": { @@ -6440,7 +6485,7 @@ "totalAlerts": 0, "id": "66b9aa00-94fa-11ea-9f74-e7e108796192", "version": "WzUzMiwxXQ==", - "totalComment": 1, + "totalComment": 0, "title": "Case title 1", "tags": [ "tag 1" @@ -6448,18 +6493,31 @@ "assignees": [], "description": "A case description.", "settings": { - "syncAlerts": false + "syncAlerts": true }, "owner": "cases", + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "My field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": null + } + ], "duration": null, "severity": "low", "closed_at": null, "closed_by": null, - "created_at": "2022-03-24T00:37:03.906Z", + "created_at": "2022-10-13T15:33:50.604Z", "created_by": { "username": "elastic", "full_name": null, - "email": null + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "status": "open", "updated_at": null, @@ -6500,7 +6558,19 @@ ], "settings": { "syncAlerts": true - } + }, + "customFields": [ + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": false + }, + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "My new field value" + } + ] } ] } @@ -6527,20 +6597,35 @@ "severity": "low", "closed_at": null, "closed_by": null, - "created_at": "2022-05-13T09:16:17.416Z", + "created_at": "2023-10-13T09:16:17.416Z", "created_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "status": "open", - "updated_at": "2022-05-13T09:48:33.043Z", + "updated_at": "2023-10-13T09:48:33.043Z", "updated_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "assignees": [], + "category": null, + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "My new field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": false + } + ], "connector": { "id": "131d4448-abe0-4789-939d-8ef60680b498", "name": "My connector", @@ -6559,7 +6644,7 @@ "username": "elastic" }, "external_url": "https://hms.atlassian.net/browse/IS-4", - "pushed_at": "2022-05-13T09:20:40.672Z", + "pushed_at": "2023-10-13T09:20:40.672Z", "connector_id": "05da469f-1fde-4058-99a3-91e4807e2de8", "external_id": "10003", "connector_name": "Jira" @@ -6589,24 +6674,39 @@ "syncAlerts": true }, "owner": "cases", + "customFields": [ + { + "type": "text", + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "value": "My field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": null + } + ], "duration": null, "severity": "low", "closed_at": null, "closed_by": null, - "created_at": "2022-05-12T00:16:36.371Z", + "created_at": "2023-10-12T00:16:36.371Z", "created_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "status": "open", - "updated_at": "2022-05-12T00:27:58.162Z", + "updated_at": "2023-10-12T00:27:58.162Z", "updated_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "assignees": [], + "category": null, "connector": { "id": "none", "name": "none", @@ -6621,6 +6721,41 @@ "count_closed_cases": 0 } }, + "get_case_configuration_response": { + "summary": "Get the case configuration.", + "value": [ + { + "id": "856ee650-6c82-11ee-a20a-6164169afa58", + "closure_type": "close-by-user", + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "label": "my-text-field", + "required": false, + "type": "text" + } + ], + "owner": "cases", + "created_at": "2023-06-01T17:07:17.767Z", + "created_by": { + "username": "elastic", + "email": null, + "full_name": null + }, + "updated_at": null, + "updated_by": null, + "connector": { + "id": "none", + "name": "none", + "type": ".none", + "fields": null + }, + "mappings": [], + "version": "WzUxLDRd", + "error": null + } + ] + }, "set_case_configuration_request": { "summary": "Set the closure type and default connector for Stack Management cases.", "value": { @@ -6631,19 +6766,36 @@ "type": ".jira", "fields": null }, - "closure_type": "close-by-user" + "closure_type": "close-by-user", + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "label": "my-text-field", + "required": false, + "type": "text" + } + ] } }, "set_case_configuration_response": { - "summary": "This is an example response when the case configuration was updated.", + "summary": "This is an example response for case settings.", "value": { "closure_type": "close-by-user", + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "label": "my-text-field", + "required": false, + "type": "text" + } + ], "owner": "cases", - "created_at": "2022-06-01T17:07:17.767Z", + "created_at": "2023-10-01T17:07:17.767Z", "created_by": { "username": "elastic", "email": "null,", - "full_name": null + "full_name": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "updated_at": null, "updated_by": null, @@ -6675,34 +6827,111 @@ "id": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" } }, + "update_case_configuration_request": { + "summary": "Update the case settings.", + "value": { + "version": "WzExOSw0XQ==", + "connector": { + "id": "5e656730-e1ca-11ec-be9b-9b1838238ee6", + "name": "my-jira-connector", + "type": ".jira", + "fields": null + }, + "closure_type": "close-by-user", + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "label": "my-text-field", + "required": true, + "type": "text" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "label": "my-toggle", + "required": false, + "type": "toggle" + } + ] + } + }, + "update_case_configuration_response": { + "summary": "This is an example response when the case configuration was updated.", + "value": { + "closure_type": "close-by-user", + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "label": "my-text-field", + "required": true, + "type": "text" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "label": "my-toggle", + "required": false, + "type": "toggle" + } + ], + "owner": "cases", + "created_at": "2023-10-01T17:07:17.767Z", + "created_by": { + "username": "elastic", + "email": "null,", + "full_name": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "updated_at": "2023-10-19T00:52:42.401Z", + "updated_by": { + "username": "elastic", + "full_name": null, + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "connector": { + "id": "5e656730-e1ca-11ec-be9b-9b1838238ee6", + "name": "my-jira-connector", + "type": ".jira", + "fields": null + }, + "mappings": [ + { + "source": "title", + "target": "summary", + "action_type": "overwrite" + }, + { + "source": "description", + "target": "description", + "action_type": "overwrite" + }, + { + "source": "comments", + "target": "comments", + "action_type": "append" + } + ], + "version": "zEzNSw1XQ==", + "error": null, + "id": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" + } + }, "get_reporters_response": { - "summary": "A list of three users that opened cases", + "summary": "A list of two users that opened cases", "value": [ { "username": "elastic", "full_name": null, - "email": null - }, - { - "username": "user1", - "full_name": "User 1", - "email": "user1@elastic.co" + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, { - "username": "user2", - "full_name": "User 2", - "email": "user2@elastic.co" + "username": "jdoe", + "full_name": "Jane Doe", + "email": "jdoe@example.com", + "profile_uid": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0" } ] }, - "get_status_response": { - "summary": "Get the number of cases in each state.", - "value": { - "count_open_cases": 27, - "count_in_progress_cases": 50, - "count_closed_cases": 198 - } - }, "get_tags_response": { "summary": "A list of tags that are used in cases", "value": [ @@ -6724,11 +6953,12 @@ "type": "user", "owner": "cases", "comment": "A new comment", - "created_at": "2022-07-13T15:40:32.335Z", + "created_at": "2023-10-13T15:40:32.335Z", "created_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "pushed_at": null, "pushed_by": null, @@ -6746,23 +6976,37 @@ "syncAlerts": true }, "owner": "cases", + "customFields": [ + { + "type": "text", + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "value": "My field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": null + } + ], "description": "A case description", "duration": null, "severity": "low", "closed_at": null, "closed_by": null, - "created_at": "2022-07-13T15:33:50.604Z", + "created_at": "2023-10-13T15:33:50.604Z", "created_by": { "username": "elastic", "email": null, - "full_name": null + "full_name": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "status": "open", - "updated_at": "2022-07-13T15:40:32.335Z", + "updated_at": "2023-10-13T15:40:32.335Z", "updated_by": { "full_name": null, "email": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "assignees": [ { @@ -6806,7 +7050,7 @@ "type": "user", "owner": "cases", "comment": "A new comment.", - "created_at": "2022-06-02T00:49:47.716Z", + "created_at": "2022-10-02T00:49:47.716Z", "created_by": { "username": "elastic", "email": null, @@ -6823,6 +7067,20 @@ "tag 1" ], "description": "A case description.", + "category": null, + "assignees": [], + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "Field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": true + } + ], "settings": { "syncAlerts": false }, @@ -6835,14 +7093,16 @@ "created_by": { "username": "elastic", "full_name": null, - "email": null + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "status": "open", "updated_at": "2022-06-03T00:49:47.716Z", "updated_by": { "username": "elastic", "email": null, - "full_name": null + "full_name": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "connector": { "id": "none", @@ -6873,19 +7133,21 @@ "comment": "An updated comment.", "type": "user", "owner": "cases", - "created_at": "2022-03-24T00:37:10.832Z", + "created_at": "2023-10-24T00:37:10.832Z", "created_by": { "username": "elastic", "full_name": null, - "email": null + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "pushed_at": null, "pushed_by": null, - "updated_at": "2022-03-24T01:27:06.210Z", + "updated_at": "2023-10-24T01:27:06.210Z", "updated_by": { "username": "elastic", "full_name": null, - "email": null + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" } } ], @@ -6902,22 +7164,38 @@ "syncAlerts": false }, "owner": "cases", + "category": null, + "assignees": [], + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "My new field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": false + } + ], "duration": null, "severity": "low", "closed_at": null, "closed_by": null, - "created_at": "2022-03-24T00:37:03.906Z", + "created_at": "2023-10-24T00:37:03.906Z", "created_by": { "username": "elastic", "full_name": null, - "email": null + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "status": "open", - "updated_at": "2022-03-24T01:27:06.210Z", + "updated_at": "2023-10-24T01:27:06.210Z", "updated_by": { "username": "elastic", "full_name": null, - "email": null + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "connector": { "id": "none", @@ -6936,11 +7214,12 @@ "type": "user", "owner": "cases", "comment": "A new comment", - "created_at": "2022-07-07T19:32:13.104Z", + "created_at": "2023-10-07T19:32:13.104Z", "created_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "pushed_at": null, "pushed_by": null, @@ -7007,151 +7286,71 @@ } } }, - "get_case_activity_response": { - "summary": "Retrieves all activity for a case", - "value": [ - { - "action_id": "b4cd0770-07c9-11ed-a5fd-47154cb8767e", - "action": "create", - "case_id": "22df07d0-03b1-11ed-920c-974bfa104448", - "comment_id": "578608d0-03b1-11ed-920c-974bfa104448", - "created_at": "2022-07-20T01:17:22.150Z", - "created_by": { - "username": "elastic", - "email": null, - "full_name": null - }, - "owner": "cases", - "payload": { - "assignees": null, - "connector": { - "name": "none", - "type": ".none", - "fields": null, - "id": "none" - }, - "description": "test", - "tags": [ - "mine" - ], - "title": "test-case", - "owner": "cases", - "settings": { - "syncAlerts": false - }, - "severity": "low", - "status": "open", - "type": "create_case" - }, - "type": "comment" - }, - { - "action_id": "57af14a0-03b1-11ed-920c-974bfa104448", - "action": "create", - "case_id": "22df07d0-03b1-11ed-920c-974bfa104448", - "comment_id": "578608d0-03b1-11ed-920c-974bfa104448", - "created_at": "2022-07-14T20:12:53.354Z", - "created_by": { - "username": "elastic", - "email": null, - "full_name": null - }, - "owner": "cases", - "payload": { - "comment": "A new comment", - "owner": "cases", - "type": "user" - }, - "type": "comment" - }, - { - "action_id": "573c6980-6123-11ed-aa41-81a0a61fe447", - "action": "add", - "case_id": "22df07d0-03b1-11ed-920c-974bfa104448", - "comment_id": null, - "created_at": "2022-07-20T01:10:28.238Z", - "created_by": { - "username": "elastic", - "email": null, - "full_name": null, - "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" - }, - "owner": "cases", - "payload": { - "assignees": { - "uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" - } - }, - "type": "assignees" - }, - { - "action_id": "fff460e0-07c9-11ed-a5fd-47154cb8767e", - "action": "delete", - "case_id": "22df07d0-03b1-11ed-920c-974bfa104448", - "comment_id": null, - "created_at": "2022-07-20T01:19:28.238Z", - "created_by": { - "username": "elastic", - "email": null, - "full_name": null - }, - "owner": "cases", - "payload": null, - "type": "delete_case" - } - ] - }, "find_case_activity_response": { "summary": "Retrieves all activity for a case", "value": { "page": 1, "perPage": 20, - "total": 4, + "total": 3, "userActions": [ { "id": "b4cd0770-07c9-11ed-a5fd-47154cb8767e", "action": "create", - "comment_id": "578608d0-03b1-11ed-920c-974bfa104448", - "created_at": "2022-07-20T01:17:22.150Z", + "comment_id": null, + "created_at": "2023-10-20T01:17:22.150Z", "created_by": { "username": "elastic", "email": null, - "full_name": null + "full_name": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "owner": "cases", "payload": { - "assignees": null, + "assignees": [], "connector": { "name": "none", "type": ".none", "fields": null, "id": "none" }, - "description": "test", + "description": "A case description.", "tags": [ - "mine" + "tag 1" ], - "title": "test-case", + "title": "Case title 1", "owner": "cases", "settings": { "syncAlerts": false }, "severity": "low", "status": "open", - "type": "create_case" + "category": null, + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "My field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": null + } + ] }, "version": "WzM1ODg4LDFd", - "type": "comment" + "type": "create_case" }, { "id": "57af14a0-03b1-11ed-920c-974bfa104448", "action": "create", "comment_id": "578608d0-03b1-11ed-920c-974bfa104448", - "created_at": "2022-07-14T20:12:53.354Z", + "created_at": "2023-10-14T20:12:53.354Z", "created_by": { "username": "elastic", "email": null, - "full_name": null + "full_name": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "owner": "cases", "payload": { @@ -7166,7 +7365,7 @@ "id": "573c6980-6123-11ed-aa41-81a0a61fe447", "action": "add", "comment_id": null, - "created_at": "2022-07-20T01:10:28.238Z", + "created_at": "2023-10-20T01:10:28.238Z", "created_by": { "username": "elastic", "email": null, diff --git a/x-pack/plugins/cases/docs/openapi/bundled.yaml b/x-pack/plugins/cases/docs/openapi/bundled.yaml index c24f9f3c67fa37..96b6bdebaa864a 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.yaml +++ b/x-pack/plugins/cases/docs/openapi/bundled.yaml @@ -9,8 +9,10 @@ info: name: Elastic License 2.0 url: https://www.elastic.co/licensing/elastic-license servers: - - url: http://localhost:5601 - description: local + - url: https://{kibanaUrl} + variables: + kibanaUrl: + default: localhost:5601 security: - basicAuth: [] - apiKeyAuth: [] @@ -53,8 +55,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 delete: summary: Deletes one or more cases in the default space. operationId: deleteCaseDefaultSpace @@ -74,8 +74,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 patch: summary: Updates one or more cases in the default space. operationId: updateCaseDefaultSpace @@ -111,10 +109,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/_find: get: summary: Retrieves a paginated subset of cases in the default space. @@ -174,10 +168,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/alerts/{alertId}: get: summary: Returns the cases associated with a specific alert in the default space. @@ -216,10 +206,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601s /api/cases/configure: get: summary: Retrieves external connection details, such as the closure type and default connector for cases in the default space. @@ -242,6 +228,34 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle connector: type: object properties: @@ -265,6 +279,10 @@ paths: example: '2022-06-01T17:07:17.767Z' created_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -311,6 +329,10 @@ paths: example: '2022-06-01T19:58:48.169Z' updated_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -331,16 +353,17 @@ paths: version: type: string example: WzIwNzMsMV0= + examples: + getConfigurationResponse: + $ref: '#/components/examples/get_case_configuration_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 post: - summary: Sets external connection details, such as the closure type and default connector for cases in the default space. + summary: Creates a case specific configuration that includes external connection details and custom fields. operationId: setCaseConfigurationDefaultSpace description: | You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. @@ -366,6 +389,34 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle connector: type: object properties: @@ -389,6 +440,10 @@ paths: example: '2022-06-01T17:07:17.767Z' created_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -435,6 +490,10 @@ paths: example: '2022-06-01T19:58:48.169Z' updated_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -464,10 +523,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/configure/{configurationId}: patch: summary: Updates external connection details, such as the closure type and default connector for cases in the default space. @@ -484,117 +539,153 @@ paths: application/json: schema: $ref: '#/components/schemas/update_case_configuration_request' + examples: + updateCaseConfigurationRequest: + $ref: '#/components/examples/update_case_configuration_request' responses: '200': description: Indicates a successful call. content: application/json: schema: - type: array - items: - type: object - properties: - closure_type: - $ref: '#/components/schemas/closure_types' - connector: + type: object + properties: + closure_type: + $ref: '#/components/schemas/closure_types' + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: type: object properties: - fields: - description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - nullable: true - type: object - id: - description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. type: string - example: none - name: - description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. type: string - example: none + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean type: - $ref: '#/components/schemas/connector_types' - created_at: - type: string - format: date-time - example: '2022-06-01T17:07:17.767Z' - created_by: - type: object - properties: - email: + description: The type of the custom field. type: string - example: null - nullable: true - full_name: - type: string - example: null - nullable: true - username: - type: string - example: elastic - nullable: true - profile_uid: - type: string - example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - error: - type: string - nullable: true - example: null - id: - type: string - example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 - mappings: - type: array - items: + enum: + - text + - toggle + connector: + type: object + properties: + fields: + description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. + nullable: true type: object - properties: - action_type: - type: string - example: overwrite - source: - type: string - example: title - target: - type: string - example: summary - owner: - $ref: '#/components/schemas/owners' - updated_at: - type: string - format: date-time - nullable: true - example: '2022-06-01T19:58:48.169Z' - updated_by: + id: + description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. + type: string + example: none + name: + description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. + type: string + example: none + type: + $ref: '#/components/schemas/connector_types' + created_at: + type: string + format: date-time + example: '2022-06-01T17:07:17.767Z' + created_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + error: + type: string + nullable: true + example: null + id: + type: string + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + mappings: + type: array + items: type: object properties: - email: - type: string - example: null - nullable: true - full_name: + action_type: type: string - example: null - nullable: true - username: + example: overwrite + source: type: string - example: elastic - nullable: true - profile_uid: + example: title + target: type: string - example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - nullable: true - version: - type: string - example: WzIwNzMsMV0= + example: summary + owner: + $ref: '#/components/schemas/owners' + updated_at: + type: string + format: date-time + nullable: true + example: '2022-06-01T19:58:48.169Z' + updated_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true + version: + type: string + example: WzIwNzMsMV0= + examples: + updateCaseConfigurationResponse: + $ref: '#/components/examples/update_case_configuration_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/reporters: get: summary: Returns information about the users who opened cases in the default space. @@ -615,6 +706,10 @@ paths: maxItems: 10000 items: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -640,10 +735,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/status: get: summary: Returns the number of cases that are open, closed, and in progress in the default space. @@ -669,19 +760,12 @@ paths: type: integer count_open_cases: type: integer - examples: - getStatusResponse: - $ref: '#/components/examples/get_status_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/tags: get: summary: Aggregates and returns a list of case tags in the default space. @@ -711,10 +795,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/{caseId}: get: summary: Retrieves information about a case in the default space. @@ -742,10 +822,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/{caseId}/alerts: get: summary: Gets all alerts attached to a case in the default space. @@ -775,10 +851,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/{caseId}/comments: post: summary: Adds a comment or alert to a case in the default space. @@ -815,8 +887,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 delete: summary: Deletes all comments and alerts from a case in the default space. operationId: deleteCaseCommentsDefaultSpace @@ -836,8 +906,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 patch: summary: Updates a comment or alert in a case in the default space. operationId: updateCaseCommentDefaultSpace @@ -873,8 +941,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 get: summary: Retrieves all the comments from a case in the default space. operationId: getAllCaseCommentsDefaultSpace @@ -898,10 +964,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/{caseId}/comments/{commentId}: delete: summary: Deletes a comment or alert from a case in the default space. @@ -923,8 +985,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 get: summary: Retrieves a comment from a case in the default space. operationId: getCaseCommentDefaultSpace @@ -953,10 +1013,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/{caseId}/connector/{connectorId}/_push: post: summary: Pushes a case in the default space to an external service. @@ -991,10 +1047,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/{caseId}/user_actions: get: summary: Returns all user activity for a case in the default space. @@ -1015,19 +1067,12 @@ paths: type: array items: $ref: '#/components/schemas/user_actions_response_properties' - examples: - getCaseActivityResponse: - $ref: '#/components/examples/get_case_activity_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/{caseId}/user_actions/_find: get: summary: Finds user activity for a case in the default space. @@ -1070,10 +1115,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /api/cases/configure/connectors/_find: get: summary: Retrieves information about connectors in the default space. @@ -1124,10 +1165,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases: post: summary: Creates a case. @@ -1164,8 +1201,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 delete: summary: Deletes one or more cases. operationId: deleteCase @@ -1186,8 +1221,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 patch: summary: Updates one or more cases. operationId: updateCase @@ -1224,10 +1257,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/_find: get: summary: Retrieves a paginated subset of cases. @@ -1287,10 +1316,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/alerts/{alertId}: get: summary: Returns the cases associated with a specific alert. @@ -1329,10 +1354,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/configure: get: summary: Retrieves external connection details, such as the closure type and default connector for cases. @@ -1356,6 +1377,34 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle connector: type: object properties: @@ -1379,6 +1428,10 @@ paths: example: '2022-06-01T17:07:17.767Z' created_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -1425,6 +1478,10 @@ paths: example: '2022-06-01T19:58:48.169Z' updated_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -1445,16 +1502,17 @@ paths: version: type: string example: WzIwNzMsMV0= + examples: + getConfigurationResponse: + $ref: '#/components/examples/get_case_configuration_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 post: - summary: Sets external connection details, such as the closure type and default connector for cases. + summary: Creates a case specific configuration that includes external connection details and custom fields. operationId: setCaseConfiguration description: | You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. Refer to the add connectors API. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. @@ -1481,6 +1539,34 @@ paths: properties: closure_type: $ref: '#/components/schemas/closure_types' + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle connector: type: object properties: @@ -1504,6 +1590,10 @@ paths: example: '2022-06-01T17:07:17.767Z' created_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -1550,6 +1640,10 @@ paths: example: '2022-06-01T19:58:48.169Z' updated_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -1579,10 +1673,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/configure/{configurationId}: patch: summary: Updates external connection details, such as the closure type and default connector for cases. @@ -1600,117 +1690,153 @@ paths: application/json: schema: $ref: '#/components/schemas/update_case_configuration_request' + examples: + updateCaseConfigurationRequest: + $ref: '#/components/examples/update_case_configuration_request' responses: '200': description: Indicates a successful call. content: application/json: schema: - type: array - items: - type: object - properties: - closure_type: - $ref: '#/components/schemas/closure_types' - connector: + type: object + properties: + closure_type: + $ref: '#/components/schemas/closure_types' + customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: type: object properties: - fields: - description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - nullable: true - type: object - id: - description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. type: string - example: none - name: - description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. type: string - example: none + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean type: - $ref: '#/components/schemas/connector_types' - created_at: - type: string - format: date-time - example: '2022-06-01T17:07:17.767Z' - created_by: - type: object - properties: - email: - type: string - example: null - nullable: true - full_name: - type: string - example: null - nullable: true - username: - type: string - example: elastic - nullable: true - profile_uid: + description: The type of the custom field. type: string - example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - error: - type: string - nullable: true - example: null - id: - type: string - example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 - mappings: - type: array - items: + enum: + - text + - toggle + connector: + type: object + properties: + fields: + description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. + nullable: true type: object - properties: - action_type: - type: string - example: overwrite - source: - type: string - example: title - target: - type: string - example: summary - owner: - $ref: '#/components/schemas/owners' - updated_at: - type: string - format: date-time - nullable: true - example: '2022-06-01T19:58:48.169Z' - updated_by: - type: object - properties: - email: - type: string - example: null - nullable: true - full_name: + id: + description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. + type: string + example: none + name: + description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. + type: string + example: none + type: + $ref: '#/components/schemas/connector_types' + created_at: + type: string + format: date-time + example: '2022-06-01T17:07:17.767Z' + created_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + error: + type: string + nullable: true + example: null + id: + type: string + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + mappings: + type: array + items: + type: object + properties: + action_type: type: string - example: null - nullable: true - username: + example: overwrite + source: type: string - example: elastic - nullable: true - profile_uid: + example: title + target: type: string - example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - nullable: true - version: - type: string - example: WzIwNzMsMV0= + example: summary + owner: + $ref: '#/components/schemas/owners' + updated_at: + type: string + format: date-time + nullable: true + example: '2022-06-01T19:58:48.169Z' + updated_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true + version: + type: string + example: WzIwNzMsMV0= + examples: + updateCaseConfigurationResponse: + $ref: '#/components/examples/update_case_configuration_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/configure/connectors/_find: get: summary: Retrieves information about connectors. @@ -1762,10 +1888,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/reporters: get: summary: Returns information about the users who opened cases. @@ -1786,6 +1908,10 @@ paths: type: array items: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -1811,10 +1937,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/status: get: summary: Returns the number of cases that are open, closed, and in progress. @@ -1841,19 +1963,12 @@ paths: type: integer count_open_cases: type: integer - examples: - getStatusResponse: - $ref: '#/components/examples/get_status_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/tags: get: summary: Aggregates and returns a list of case tags. @@ -1883,10 +1998,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/{caseId}: get: summary: Retrieves information about a case. @@ -1915,10 +2026,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/{caseId}/alerts: get: summary: Gets all alerts attached to a case. @@ -1949,10 +2056,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/{caseId}/comments: post: summary: Adds a comment or alert to a case. @@ -1990,8 +2093,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 delete: summary: Deletes all comments and alerts from a case. operationId: deleteCaseComments @@ -2012,8 +2113,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 patch: summary: Updates a comment or alert in a case. operationId: updateCaseComment @@ -2050,8 +2149,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 get: summary: Retrieves all the comments from a case. operationId: getAllCaseComments @@ -2076,10 +2173,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/{caseId}/comments/_find: get: summary: Retrieves all the user comments from a case. @@ -2107,10 +2200,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/{caseId}/comments/{commentId}: delete: summary: Deletes a comment or alert from a case. @@ -2133,8 +2222,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 get: summary: Retrieves a comment from a case. operationId: getCaseComment @@ -2164,10 +2251,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push: post: summary: Pushes a case to an external service. @@ -2203,10 +2286,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/{caseId}/user_actions: get: summary: Returns all user activity for a case. @@ -2228,19 +2307,12 @@ paths: type: array items: $ref: '#/components/schemas/user_actions_response_properties' - examples: - getCaseActivityResponse: - $ref: '#/components/examples/get_case_activity_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 /s/{spaceId}/api/cases/{caseId}/user_actions/_find: get: summary: Finds user activity for a case. @@ -2284,10 +2356,6 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' - servers: - - url: https://localhost:5601 - servers: - - url: https://localhost:5601 components: securitySchemes: basicAuth: @@ -2890,38 +2958,6 @@ components: - low - medium default: low - custom_fields_property: - type: array - description: Values for custom fields of a case - minItems: 0 - maxItems: 5 - items: - type: object - required: - - key - - type - - field - properties: - key: - description: The key identifying the custom field. - type: string - type: - description: The type of the custom field. Should match the key and how the custom field was configured - type: string - field: - description: An object containing the value of the field. - type: object - required: - - value - properties: - value: - description: The value of the field. - nullable: true - type: array - items: - anyOf: - - type: string - - type: boolean create_case_request: title: Create case request description: The create case API request body varies depending on the type of connector. @@ -2963,7 +2999,7 @@ components: type: string maxLength: 256 category: - description: Category for the case. It could be a word or a phrase to categorize the case. + description: A word or phrase that categorizes the case. type: string maxLength: 50 title: @@ -2971,7 +3007,39 @@ components: type: string maxLength: 160 customFields: - $ref: '#/components/schemas/custom_fields_property' + type: array + description: | + Custom field values for a case. Any optional custom fields that are not specified in the request are set to null. + x-technical-preview: true + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - type + - value + properties: + key: + description: | + The unique identifier for the custom field. The key value must exist in the case configuration settings. + type: string + type: + description: | + The custom field type. It must match the type specified in the case configuration settings. + type: string + enum: + - text + - toggle + value: + description: | + The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`. + oneOf: + - type: string + minLength: 1 + maxLength: 160 + nullable: true + - type: boolean case_response_closed_by_properties: title: Case response properties for closed_by type: object @@ -3011,6 +3079,10 @@ components: example: '2022-03-24T02:31:03.210Z' created_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -3042,6 +3114,10 @@ components: nullable: true pushed_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -3081,6 +3157,10 @@ components: example: null updated_by: type: object + required: + - email + - full_name + - username properties: email: type: string @@ -3284,6 +3364,10 @@ components: properties: assignees: $ref: '#/components/schemas/assignees' + category: + type: string + description: The case category. + nullable: true closed_at: type: string format: date-time @@ -3319,6 +3403,33 @@ components: example: '2022-05-13T09:16:17.416Z' created_by: $ref: '#/components/schemas/case_response_created_by_properties' + customFields: + type: array + description: Custom field values for the case. + x-technical-preview: true + items: + type: object + properties: + key: + description: | + The unique identifier for the custom field. The key value must exist in the case configuration settings. + type: string + type: + description: | + The custom field type. It must match the type specified in the case configuration settings. + type: string + enum: + - text + - toggle + value: + description: | + The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`. + oneOf: + - type: string + minLength: 1 + maxLength: 160 + nullable: true + - type: boolean description: type: string example: A case description. @@ -3397,6 +3508,10 @@ components: properties: assignees: $ref: '#/components/schemas/assignees' + category: + description: A word or phrase that categorizes the case. + type: string + maxLength: 50 connector: oneOf: - $ref: '#/components/schemas/connector_properties_none' @@ -3406,6 +3521,40 @@ components: - $ref: '#/components/schemas/connector_properties_servicenow' - $ref: '#/components/schemas/connector_properties_servicenow_sir' - $ref: '#/components/schemas/connector_properties_swimlane' + customFields: + type: array + description: | + Custom field values for a case. Any optional custom fields that are not specified in the request are set to null. + x-technical-preview: true + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - type + - value + properties: + key: + description: | + The unique identifier for the custom field. The key value must exist in the case configuration settings. + type: string + type: + description: | + The custom field type. It must match the type specified in the case configuration settings. + type: string + enum: + - text + - toggle + value: + description: | + The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`. + oneOf: + - type: string + minLength: 1 + maxLength: 160 + nullable: true + - type: boolean description: description: An updated description for the case. type: string @@ -3426,10 +3575,6 @@ components: items: type: string maxLength: 256 - category: - description: Category for the case. It could be a word or a phrase to categorize the case. - type: string - maxLength: 50 title: description: A title for the case. type: string @@ -3437,8 +3582,6 @@ components: version: description: The current version of the case. To determine this value, use the get case or find cases APIs. type: string - customFields: - $ref: '#/components/schemas/custom_fields_property' searchFieldsType: type: string description: The fields to perform the `simple_query_string` parsed query against. @@ -3498,18 +3641,43 @@ components: - id - name - type + customFields: + type: array + description: Custom fields case configuration. + x-technical-preview: true + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - label + - required + - type + properties: + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle owner: $ref: '#/components/schemas/owners' - settings: - description: An object that contains the case settings. - type: object - properties: - syncAlerts: - description: Turns alert syncing on or off. - type: boolean - example: true - required: - - syncAlerts update_case_configuration_request: title: Update case configuration request description: External connection details, such as the closure type and default connector for cases. @@ -3542,6 +3710,39 @@ components: - id - name - type + customFields: + type: array + description: Custom fields case configuration. + x-technical-preview: true + items: + type: object + required: + - key + - label + - required + - type + properties: + key: + description: | + A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: | + Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle version: description: | The version of the connector. To retrieve the version value, use the get configuration API. @@ -4195,6 +4396,10 @@ components: settings: syncAlerts: true owner: cases + customFields: + - type: text + key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: My field value create_case_response: summary: The create case API returns a JSON object that contains details about the case. value: @@ -4202,24 +4407,32 @@ components: totalAlerts: 0 id: 66b9aa00-94fa-11ea-9f74-e7e108796192 version: WzUzMiwxXQ== - totalComment: 1 + totalComment: 0 title: Case title 1 tags: - tag 1 assignees: [] description: A case description. settings: - syncAlerts: false + syncAlerts: true owner: cases + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null duration: null severity: low closed_at: null closed_by: null - created_at: '2022-03-24T00:37:03.906Z' + created_at: '2022-10-13T15:33:50.604Z' created_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open updated_at: null updated_by: null @@ -4251,6 +4464,13 @@ components: - tag-1 settings: syncAlerts: true + customFields: + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value update_case_response: summary: This is an example response when the case description, tags, and connector were updated. value: @@ -4270,18 +4490,28 @@ components: severity: low closed_at: null closed_by: null - created_at: '2022-05-13T09:16:17.416Z' + created_at: '2023-10-13T09:16:17.416Z' created_by: email: null full_name: null username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open - updated_at: '2022-05-13T09:48:33.043Z' + updated_at: '2023-10-13T09:48:33.043Z' updated_by: email: null full_name: null username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 assignees: [] + category: null + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false connector: id: 131d4448-abe0-4789-939d-8ef60680b498 name: My connector @@ -4297,7 +4527,7 @@ components: email: null username: elastic external_url: https://hms.atlassian.net/browse/IS-4 - pushed_at: '2022-05-13T09:20:40.672Z' + pushed_at: '2023-10-13T09:20:40.672Z' connector_id: 05da469f-1fde-4058-99a3-91e4807e2de8 external_id: '10003' connector_name: Jira @@ -4320,22 +4550,32 @@ components: settings: syncAlerts: true owner: cases + customFields: + - type: text + key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null duration: null severity: low closed_at: null closed_by: null - created_at: '2022-05-12T00:16:36.371Z' + created_at: '2023-10-12T00:16:36.371Z' created_by: email: null full_name: null username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open - updated_at: '2022-05-12T00:27:58.162Z' + updated_at: '2023-10-12T00:27:58.162Z' updated_by: email: null full_name: null username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 assignees: [] + category: null connector: id: none name: none @@ -4345,6 +4585,32 @@ components: count_open_cases: 1 count_in_progress_cases: 0 count_closed_cases: 0 + get_case_configuration_response: + summary: Get the case configuration. + value: + - id: 856ee650-6c82-11ee-a20a-6164169afa58 + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: false + type: text + owner: cases + created_at: '2023-06-01T17:07:17.767Z' + created_by: + username: elastic + email: null + full_name: null + updated_at: null + updated_by: null + connector: + id: none + name: none + type: .none + fields: null + mappings: [] + version: WzUxLDRd + error: null set_case_configuration_request: summary: Set the closure type and default connector for Stack Management cases. value: @@ -4355,16 +4621,27 @@ components: type: .jira fields: null closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: false + type: text set_case_configuration_response: - summary: This is an example response when the case configuration was updated. + summary: This is an example response for case settings. value: closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: false + type: text owner: cases - created_at: '2022-06-01T17:07:17.767Z' + created_at: '2023-10-01T17:07:17.767Z' created_by: username: elastic email: null, full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 updated_at: null updated_by: null connector: @@ -4385,24 +4662,80 @@ components: version: WzIwNzMsMV0= error: null id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + update_case_configuration_request: + summary: Update the case settings. + value: + version: WzExOSw0XQ== + connector: + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + fields: null + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: true + type: text + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + label: my-toggle + required: false + type: toggle + update_case_configuration_response: + summary: This is an example response when the case configuration was updated. + value: + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: true + type: text + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + label: my-toggle + required: false + type: toggle + owner: cases + created_at: '2023-10-01T17:07:17.767Z' + created_by: + username: elastic + email: null, + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + updated_at: '2023-10-19T00:52:42.401Z' + updated_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + fields: null + mappings: + - source: title + target: summary + action_type: overwrite + - source: description + target: description + action_type: overwrite + - source: comments + target: comments + action_type: append + version: zEzNSw1XQ== + error: null + id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 get_reporters_response: - summary: A list of three users that opened cases + summary: A list of two users that opened cases value: - username: elastic full_name: null email: null - - username: user1 - full_name: User 1 - email: user1@elastic.co - - username: user2 - full_name: User 2 - email: user2@elastic.co - get_status_response: - summary: Get the number of cases in each state. - value: - count_open_cases: 27 - count_in_progress_cases: 50 - count_closed_cases: 198 + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + - username: jdoe + full_name: Jane Doe + email: jdoe@example.com + profile_uid: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 get_tags_response: summary: A list of tags that are used in cases value: @@ -4421,11 +4754,12 @@ components: type: user owner: cases comment: A new comment - created_at: '2022-07-13T15:40:32.335Z' + created_at: '2023-10-13T15:40:32.335Z' created_by: email: null full_name: null username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 pushed_at: null pushed_by: null updated_at: null @@ -4438,22 +4772,31 @@ components: settings: syncAlerts: true owner: cases + customFields: + - type: text + key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null description: A case description duration: null severity: low closed_at: null closed_by: null - created_at: '2022-07-13T15:33:50.604Z' + created_at: '2023-10-13T15:33:50.604Z' created_by: username: elastic email: null full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open - updated_at: '2022-07-13T15:40:32.335Z' + updated_at: '2023-10-13T15:40:32.335Z' updated_by: full_name: null email: null username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 assignees: - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 connector: @@ -4483,7 +4826,7 @@ components: type: user owner: cases comment: A new comment. - created_at: '2022-06-02T00:49:47.716Z' + created_at: '2022-10-02T00:49:47.716Z' created_by: username: elastic email: null @@ -4496,6 +4839,15 @@ components: tags: - tag 1 description: A case description. + category: null + assignees: [] + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: Field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: true settings: syncAlerts: false owner: cases @@ -4508,12 +4860,14 @@ components: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open updated_at: '2022-06-03T00:49:47.716Z' updated_by: username: elastic email: null full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 connector: id: none name: none @@ -4537,18 +4891,20 @@ components: comment: An updated comment. type: user owner: cases - created_at: '2022-03-24T00:37:10.832Z' + created_at: '2023-10-24T00:37:10.832Z' created_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 pushed_at: null pushed_by: null - updated_at: '2022-03-24T01:27:06.210Z' + updated_at: '2023-10-24T01:27:06.210Z' updated_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 totalAlerts: 0 id: 293f1bc0-74f6-11ea-b83a-553aecdb28b6 version: WzIwNjM2LDFd @@ -4560,21 +4916,32 @@ components: settings: syncAlerts: false owner: cases + category: null + assignees: [] + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false duration: null severity: low closed_at: null closed_by: null - created_at: '2022-03-24T00:37:03.906Z' + created_at: '2023-10-24T00:37:03.906Z' created_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open - updated_at: '2022-03-24T01:27:06.210Z' + updated_at: '2023-10-24T01:27:06.210Z' updated_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 connector: id: none name: none @@ -4589,11 +4956,12 @@ components: type: user owner: cases comment: A new comment - created_at: '2022-07-07T19:32:13.104Z' + created_at: '2023-10-07T19:32:13.104Z' created_by: email: null full_name: null username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 pushed_at: null pushed_by: null updated_at: null @@ -4647,122 +5015,58 @@ components: external_title: ES-554 external_url: https://cases.jira.com connector_id: 09f8c0b0-0eda-11ed-bd18-65557fe66949 - get_case_activity_response: - summary: Retrieves all activity for a case - value: - - action_id: b4cd0770-07c9-11ed-a5fd-47154cb8767e - action: create - case_id: 22df07d0-03b1-11ed-920c-974bfa104448 - comment_id: 578608d0-03b1-11ed-920c-974bfa104448 - created_at: '2022-07-20T01:17:22.150Z' - created_by: - username: elastic - email: null - full_name: null - owner: cases - payload: - assignees: null - connector: - name: none - type: .none - fields: null - id: none - description: test - tags: - - mine - title: test-case - owner: cases - settings: - syncAlerts: false - severity: low - status: open - type: create_case - type: comment - - action_id: 57af14a0-03b1-11ed-920c-974bfa104448 - action: create - case_id: 22df07d0-03b1-11ed-920c-974bfa104448 - comment_id: 578608d0-03b1-11ed-920c-974bfa104448 - created_at: '2022-07-14T20:12:53.354Z' - created_by: - username: elastic - email: null - full_name: null - owner: cases - payload: - comment: A new comment - owner: cases - type: user - type: comment - - action_id: 573c6980-6123-11ed-aa41-81a0a61fe447 - action: add - case_id: 22df07d0-03b1-11ed-920c-974bfa104448 - comment_id: null - created_at: '2022-07-20T01:10:28.238Z' - created_by: - username: elastic - email: null - full_name: null - profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 - owner: cases - payload: - assignees: - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 - type: assignees - - action_id: fff460e0-07c9-11ed-a5fd-47154cb8767e - action: delete - case_id: 22df07d0-03b1-11ed-920c-974bfa104448 - comment_id: null - created_at: '2022-07-20T01:19:28.238Z' - created_by: - username: elastic - email: null - full_name: null - owner: cases - payload: null - type: delete_case find_case_activity_response: summary: Retrieves all activity for a case value: page: 1 perPage: 20 - total: 4 + total: 3 userActions: - id: b4cd0770-07c9-11ed-a5fd-47154cb8767e action: create - comment_id: 578608d0-03b1-11ed-920c-974bfa104448 - created_at: '2022-07-20T01:17:22.150Z' + comment_id: null + created_at: '2023-10-20T01:17:22.150Z' created_by: username: elastic email: null full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 owner: cases payload: - assignees: null + assignees: [] connector: name: none type: .none fields: null id: none - description: test + description: A case description. tags: - - mine - title: test-case + - tag 1 + title: Case title 1 owner: cases settings: syncAlerts: false severity: low status: open - type: create_case + category: null + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null version: WzM1ODg4LDFd - type: comment + type: create_case - id: 57af14a0-03b1-11ed-920c-974bfa104448 action: create comment_id: 578608d0-03b1-11ed-920c-974bfa104448 - created_at: '2022-07-14T20:12:53.354Z' + created_at: '2023-10-14T20:12:53.354Z' created_by: username: elastic email: null full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 owner: cases payload: comment: A new comment @@ -4773,7 +5077,7 @@ components: - id: 573c6980-6123-11ed-aa41-81a0a61fe447 action: add comment_id: null - created_at: '2022-07-20T01:10:28.238Z' + created_at: '2023-10-20T01:10:28.238Z' created_by: username: elastic email: null diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/add_comment_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/add_comment_response.yaml index 382629e4fab085..d47129cad1defb 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/add_comment_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/add_comment_response.yaml @@ -6,7 +6,7 @@ value: type: user owner: cases comment: A new comment. - created_at: '2022-06-02T00:49:47.716Z' + created_at: '2022-10-02T00:49:47.716Z' created_by: username: elastic email: null @@ -19,6 +19,15 @@ value: tags: - tag 1 description: A case description. + category: null + assignees: [] + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: Field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: true settings: syncAlerts: false owner: cases @@ -31,12 +40,14 @@ value: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open updated_at: '2022-06-03T00:49:47.716Z' updated_by: username: elastic email: null full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 connector: id: none name: none diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/create_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/create_case_request.yaml index 0e5b6c01aa3b69..7f726021ad550a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/create_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/create_case_request.yaml @@ -17,5 +17,12 @@ value: "settings": { "syncAlerts": true }, - "owner": "cases" + "owner": "cases", + "customFields": [ + { + "type": "text", + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "value": "My field value" + } + ] } diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/create_case_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/create_case_response.yaml index 8cd80595abf30e..3fd4a41b87ae4a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/create_case_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/create_case_response.yaml @@ -4,24 +4,32 @@ value: totalAlerts: 0 id: 66b9aa00-94fa-11ea-9f74-e7e108796192 version: WzUzMiwxXQ== - totalComment: 1 + totalComment: 0 title: Case title 1 tags: - tag 1 assignees: [] description: A case description. settings: - syncAlerts: false + syncAlerts: true owner: cases + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null duration: null severity: low closed_at: null closed_by: null - created_at: '2022-03-24T00:37:03.906Z' + created_at: '2022-10-13T15:33:50.604Z' created_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open updated_at: null updated_by: null diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/find_case_activity_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/find_case_activity_response.yaml index 49d5bd7684a740..cb5f9570845aa5 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/find_case_activity_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/find_case_activity_response.yaml @@ -2,44 +2,53 @@ summary: Retrieves all activity for a case value: page: 1 perPage: 20 - total: 4 + total: 3 userActions: - id: b4cd0770-07c9-11ed-a5fd-47154cb8767e action: create - comment_id: 578608d0-03b1-11ed-920c-974bfa104448 - created_at: 2022-07-20T01:17:22.150Z + comment_id: null + created_at: 2023-10-20T01:17:22.150Z created_by: username: elastic email: null full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 owner: cases payload: - assignees: + assignees: [] connector: name: none type: .none fields: null id: none - description: test + description: A case description. tags: - - mine - title: test-case + - tag 1 + title: Case title 1 owner: cases settings: syncAlerts: false severity: low status: open - type: create_case + category: null + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null version: WzM1ODg4LDFd - type: comment + type: create_case - id: 57af14a0-03b1-11ed-920c-974bfa104448 action: create comment_id: 578608d0-03b1-11ed-920c-974bfa104448 - created_at: 2022-07-14T20:12:53.354Z + created_at: 2023-10-14T20:12:53.354Z created_by: username: elastic email: null full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 owner: cases payload: comment: A new comment @@ -50,7 +59,7 @@ value: - id: 573c6980-6123-11ed-aa41-81a0a61fe447 action: add comment_id: null - created_at: 2022-07-20T01:10:28.238Z + created_at: 2023-10-20T01:10:28.238Z created_by: username: elastic email: null diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/find_case_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/find_case_response.yaml index 6f744d03a1365d..4c7448c12a9ab1 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/find_case_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/find_case_response.yaml @@ -16,24 +16,39 @@ value: "description": "Case description", "settings": { "syncAlerts": true }, "owner": "cases", + "customFields": [ + { + "type": "text", + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "value": "My field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": null + } + ], "duration": null, "severity": "low", "closed_at": null, "closed_by": null, - "created_at": "2022-05-12T00:16:36.371Z", + "created_at": "2023-10-12T00:16:36.371Z", "created_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "status": "open", - "updated_at": "2022-05-12T00:27:58.162Z", + "updated_at": "2023-10-12T00:27:58.162Z", "updated_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "assignees": [], + "category": null, "connector": { "id": "none", "name": "none", diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_activity_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_activity_response.yaml deleted file mode 100644 index 3cdafb4b26ef89..00000000000000 --- a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_activity_response.yaml +++ /dev/null @@ -1,72 +0,0 @@ -summary: Retrieves all activity for a case -value: - - action_id: b4cd0770-07c9-11ed-a5fd-47154cb8767e - action: create - case_id: 22df07d0-03b1-11ed-920c-974bfa104448 - comment_id: 578608d0-03b1-11ed-920c-974bfa104448 - created_at: 2022-07-20T01:17:22.150Z - created_by: - username: elastic - email: null - full_name: null - owner: cases - payload: - assignees: - connector: - name: none - type: .none - fields: null - id: none - description: test - tags: - - mine - title: test-case - owner: cases - settings: - syncAlerts: false - severity: low - status: open - type: create_case - type: comment - - action_id: 57af14a0-03b1-11ed-920c-974bfa104448 - action: create - case_id: 22df07d0-03b1-11ed-920c-974bfa104448 - comment_id: 578608d0-03b1-11ed-920c-974bfa104448 - created_at: 2022-07-14T20:12:53.354Z - created_by: - username: elastic - email: null - full_name: null - owner: cases - payload: - comment: A new comment - owner: cases - type: user - type: comment - - action_id: 573c6980-6123-11ed-aa41-81a0a61fe447 - action: add - case_id: 22df07d0-03b1-11ed-920c-974bfa104448 - comment_id: null - created_at: 2022-07-20T01:10:28.238Z - created_by: - username: elastic - email: null - full_name: null - profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 - owner: cases - payload: - assignees: - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 - type: assignees - - action_id: fff460e0-07c9-11ed-a5fd-47154cb8767e - action: delete - case_id: 22df07d0-03b1-11ed-920c-974bfa104448 - comment_id: null - created_at: 2022-07-20T01:19:28.238Z - created_by: - username: elastic - email: null - full_name: null - owner: cases - payload: - type: delete_case \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_configuration_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_configuration_response.yaml new file mode 100644 index 00000000000000..8b9197600917f1 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_configuration_response.yaml @@ -0,0 +1,25 @@ +summary: Get the case configuration. +value: + - id: 856ee650-6c82-11ee-a20a-6164169afa58 + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: false + type: text + owner: cases + created_at: 2023-06-01T17:07:17.767Z + created_by: + username: elastic + email: null + full_name: null + updated_at: null + updated_by: null + connector: + id: none + name: none + type: .none + fields: null + mappings: [] + version: WzUxLDRd + error: null diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml index bd74fa423bb9c5..d4fc3db97a169a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml @@ -9,11 +9,12 @@ value: "type":"user", "owner":"cases", "comment":"A new comment", - "created_at":"2022-07-13T15:40:32.335Z", + "created_at":"2023-10-13T15:40:32.335Z", "created_by":{ "email":null, "full_name":null, - "username":"elastic" + "username":"elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "pushed_at":null, "pushed_by":null, @@ -26,15 +27,38 @@ value: "tags":["tag 1"], "settings":{"syncAlerts":true}, "owner":"cases", + "customFields": [ + { + "type": "text", + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "value": "My field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": null + } + ], "description":"A case description", "duration":null, "severity":"low", "closed_at":null, "closed_by":null, - "created_at":"2022-07-13T15:33:50.604Z", - "created_by":{"username":"elastic","email":null,"full_name":null},"status":"open", - "updated_at":"2022-07-13T15:40:32.335Z", - "updated_by":{"full_name":null,"email":null,"username":"elastic"}, + "created_at":"2023-10-13T15:33:50.604Z", + "created_by":{ + "username":"elastic", + "email":null, + "full_name":null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "status":"open", + "updated_at":"2023-10-13T15:40:32.335Z", + "updated_by":{ + "full_name":null, + "email":null, + "username":"elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, "assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}], "connector":{ "id":"none", diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_comment_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_comment_response.yaml index dd2baedd8eda35..8a022ae7d7503a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/get_comment_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_comment_response.yaml @@ -6,11 +6,12 @@ value: "type":"user", "owner":"cases", "comment":"A new comment", - "created_at":"2022-07-07T19:32:13.104Z", + "created_at":"2023-10-07T19:32:13.104Z", "created_by":{ "email":null, "full_name":null, - "username":"elastic" + "username":"elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "pushed_at":null, "pushed_by":null, diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_reporters_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_reporters_response.yaml index 3651f31c97d6bf..f68df281fb5094 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/get_reporters_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_reporters_response.yaml @@ -1,7 +1,16 @@ -summary: A list of three users that opened cases +summary: A list of two users that opened cases value: [ - {"username":"elastic","full_name":null,"email":null}, - {"username":"user1","full_name":"User 1","email":"user1@elastic.co"}, - {"username":"user2","full_name":"User 2","email":"user2@elastic.co"} + { + "username":"elastic", + "full_name":null, + "email":null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + { + "username":"jdoe", + "full_name":"Jane Doe", + "email":"jdoe@example.com", + "profile_uid": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0" + } ] \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_status_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_status_response.yaml deleted file mode 100644 index 8a3883fe928730..00000000000000 --- a/x-pack/plugins/cases/docs/openapi/components/examples/get_status_response.yaml +++ /dev/null @@ -1,7 +0,0 @@ -summary: Get the number of cases in each state. -value: - { - "count_open_cases": 27, - "count_in_progress_cases": 50, - "count_closed_cases": 198 - } \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_request.yaml index 4aa5a56b1ad0fe..472a33d9feacbc 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_request.yaml @@ -6,4 +6,9 @@ value: name: my-jira-connector type: .jira fields: null - closure_type: close-by-user \ No newline at end of file + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: false + type: text \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_response.yaml index 9290e1ed432685..d5a9f7205e23db 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/set_case_configuration_response.yaml @@ -1,12 +1,18 @@ -summary: This is an example response when the case configuration was updated. +summary: This is an example response for case settings. value: closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: false + type: text owner: cases - created_at: 2022-06-01T17:07:17.767Z + created_at: 2023-10-01T17:07:17.767Z created_by: username: elastic email: null, full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 updated_at: null updated_by: null connector: diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_request.yaml new file mode 100644 index 00000000000000..83d617b17946b1 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_request.yaml @@ -0,0 +1,18 @@ +summary: Update the case settings. +value: + version: WzExOSw0XQ== + connector: + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + fields: null + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: true + type: text + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + label: my-toggle + required: false + type: toggle \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_response.yaml new file mode 100644 index 00000000000000..6dd1da4d6f1f10 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_configuration_response.yaml @@ -0,0 +1,43 @@ +summary: This is an example response when the case configuration was updated. +value: + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: true + type: text + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + label: my-toggle + required: false + type: toggle + owner: cases + created_at: 2023-10-01T17:07:17.767Z + created_by: + username: elastic + email: null, + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + updated_at: 2023-10-19T00:52:42.401Z + updated_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + fields: null + mappings: + - source: title + target: summary + action_type: overwrite + - source: description + target: description + action_type: overwrite + - source: comments + target: comments + action_type: append + version: zEzNSw1XQ== + error: null + id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_request.yaml index 0cc85214566701..948227a85ee6d1 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_request.yaml @@ -19,7 +19,19 @@ value: "tags": [ "tag-1" ], "settings": { "syncAlerts": true - } + }, + "customFields": [ + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": false + }, + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "My new field value" + } + ] } ] -} \ No newline at end of file + } \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_response.yaml index eaf421771b51e9..7a40d9a3a7cf90 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/update_case_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/update_case_response.yaml @@ -18,20 +18,35 @@ value: "severity": "low", "closed_at": null, "closed_by": null, - "created_at": "2022-05-13T09:16:17.416Z", + "created_at": "2023-10-13T09:16:17.416Z", "created_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "status": "open", - "updated_at": "2022-05-13T09:48:33.043Z", + "updated_at": "2023-10-13T09:48:33.043Z", "updated_by": { "email": null, "full_name": null, - "username": "elastic" + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" }, "assignees": [], + "category": null, + "customFields": [ + { + "key": "d312efda-ec2b-42ec-9e2c-84981795c581", + "type": "text", + "value": "My new field value" + }, + { + "key": "fcc6840d-eb14-42df-8aaf-232201a705ec", + "type": "toggle", + "value": false + } + ], "connector": { "id": "131d4448-abe0-4789-939d-8ef60680b498", "name": "My connector", @@ -50,7 +65,7 @@ value: "username": "elastic" }, "external_url": "https://hms.atlassian.net/browse/IS-4", - "pushed_at": "2022-05-13T09:20:40.672Z", + "pushed_at": "2023-10-13T09:20:40.672Z", "connector_id": "05da469f-1fde-4058-99a3-91e4807e2de8", "external_id": "10003", "connector_name": "Jira" diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/update_comment_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/update_comment_response.yaml index 4c81e759a92f98..bbd32c3b1e9fd7 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/update_comment_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/update_comment_response.yaml @@ -6,18 +6,20 @@ value: comment: An updated comment. type: user owner: cases - created_at: '2022-03-24T00:37:10.832Z' + created_at: '2023-10-24T00:37:10.832Z' created_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 pushed_at: null pushed_by: null - updated_at: '2022-03-24T01:27:06.210Z' + updated_at: '2023-10-24T01:27:06.210Z' updated_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 totalAlerts: 0 id: 293f1bc0-74f6-11ea-b83a-553aecdb28b6 version: WzIwNjM2LDFd @@ -29,21 +31,32 @@ value: settings: syncAlerts: false owner: cases + category: null + assignees: [] + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false duration: null severity: low closed_at: null closed_by: null - created_at: '2022-03-24T00:37:03.906Z' + created_at: '2023-10-24T00:37:03.906Z' created_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 status: open - updated_at: '2022-03-24T01:27:06.210Z' + updated_at: '2023-10-24T01:27:06.210Z' updated_by: username: elastic full_name: null email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 connector: id: none name: none diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml index 056abad0a300bf..aa39aad1381a02 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml @@ -12,6 +12,10 @@ properties: example: 2022-03-24T02:31:03.210Z created_by: type: object + required: + - email + - full_name + - username properties: $ref: 'user_properties.yaml' id: @@ -29,6 +33,10 @@ properties: nullable: true pushed_by: type: object + required: + - email + - full_name + - username properties: $ref: 'user_properties.yaml' nullable: true @@ -47,6 +55,10 @@ properties: example: null updated_by: type: object + required: + - email + - full_name + - username properties: $ref: 'user_properties.yaml' version: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_customfields.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_customfields.yaml new file mode 100644 index 00000000000000..344e17b00617dc --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_customfields.yaml @@ -0,0 +1,24 @@ +key: + description: > + A unique key for the custom field. + Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. + It is used in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 +label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 +required: + description: > + Indicates whether the field is required. + If `false`, the custom field can be set to null or omitted when a case is created or updated. + type: boolean +type: + description: The type of the custom field. + type: string + enum: + - text + - toggle \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml index 90c969990f2e5f..62bddb7a2597b2 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml @@ -1,5 +1,13 @@ closure_type: $ref: 'closure_types.yaml' +customFields: + type: array + x-technical-preview: true + description: Custom fields configuration details. + items: + type: object + properties: + $ref: 'case_configure_customfields.yaml' connector: type: object properties: @@ -10,6 +18,10 @@ created_at: example: 2022-06-01T17:07:17.767Z created_by: type: object + required: + - email + - full_name + - username properties: $ref: 'user_properties.yaml' error: @@ -42,6 +54,10 @@ updated_at: example: 2022-06-01T19:58:48.169Z updated_by: type: object + required: + - email + - full_name + - username properties: $ref: 'user_properties.yaml' nullable: true diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml new file mode 100644 index 00000000000000..4170833e818cc8 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml @@ -0,0 +1,25 @@ +key: + description: > + The unique identifier for the custom field. + The key value must exist in the case configuration settings. + type: string +type: + description: > + The custom field type. + It must match the type specified in the case configuration settings. + type: string + enum: + - text + - toggle +value: + description: > + The custom field value. + If the custom field is required, it cannot be explicitly set to null. + However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. + The value returned in the API and user interface in this case is `null`. + oneOf: + - type: string + minLength: 1 + maxLength: 160 + nullable: true + - type: boolean diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml index cda4361ab4cc4f..60c6520d2f4c3d 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml @@ -25,6 +25,10 @@ required: properties: assignees: $ref: 'assignees.yaml' + category: + type: string + description: The case category. + nullable: true closed_at: type: string format: date-time @@ -60,6 +64,14 @@ properties: example: '2022-05-13T09:16:17.416Z' created_by: $ref: 'case_response_created_by_properties.yaml' + customFields: + type: array + description: Custom field values for the case. + x-technical-preview: true + items: + type: object + properties: + $ref: 'case_customfields.yaml' description: type: string example: A case description. diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml index 7b3d8d8219ff79..71d3e036ac94b4 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml @@ -39,7 +39,7 @@ properties: type: string maxLength: 256 category: - description: Category for the case. It could be a word or a phrase to categorize the case. + description: A word or phrase that categorizes the case. type: string maxLength: 50 title: @@ -47,4 +47,18 @@ properties: type: string maxLength: 160 customFields: - $ref: 'custom_fields_property.yaml' + type: array + description: > + Custom field values for a case. + Any optional custom fields that are not specified in the request are set to null. + x-technical-preview: true + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - type + - value + properties: + $ref: 'case_customfields.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/custom_fields_property.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/custom_fields_property.yaml deleted file mode 100644 index 2b682960bd1f0e..00000000000000 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/custom_fields_property.yaml +++ /dev/null @@ -1,31 +0,0 @@ -type: array -description: Values for custom fields of a case -minItems: 0 -maxItems: 5 -items: - type: object - required: - - key - - type - - field - properties: - key: - description: The key identifying the custom field. - type: string - type: - description: The type of the custom field. Should match the key and how the custom field was configured - type: string - field: - description: An object containing the value of the field. - type: object - required: - - value - properties: - value: - description: The value of the field. - nullable: true - type: array - items: - anyOf: - - type: string - - type: boolean diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml index 44a3a8709a9399..043febb36c8b6c 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/set_case_configuration_request.yaml @@ -18,15 +18,20 @@ properties: - id - name - type + customFields: + type: array + description: Custom fields case configuration. + x-technical-preview: true + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - label + - required + - type + properties: + $ref: 'case_configure_customfields.yaml' owner: $ref: 'owners.yaml' - settings: - description: An object that contains the case settings. - type: object - properties: - syncAlerts: - description: Turns alert syncing on or off. - type: boolean - example: true - required: - - syncAlerts diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml index 89c03715944c47..86ba2794ea19d2 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml @@ -16,6 +16,19 @@ properties: - id - name - type + customFields: + type: array + description: Custom fields case configuration. + x-technical-preview: true + items: + type: object + required: + - key + - label + - required + - type + properties: + $ref: 'case_configure_customfields.yaml' version: description: > The version of the connector. diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml index 4bbac95630e47d..3fa99d40e50026 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml @@ -18,6 +18,10 @@ properties: properties: assignees: $ref: 'assignees.yaml' + category: + description: A word or phrase that categorizes the case. + type: string + maxLength: 50 connector: oneOf: - $ref: 'connector_properties_none.yaml' @@ -27,6 +31,22 @@ properties: - $ref: 'connector_properties_servicenow.yaml' - $ref: 'connector_properties_servicenow_sir.yaml' - $ref: 'connector_properties_swimlane.yaml' + customFields: + type: array + description: > + Custom field values for a case. + Any optional custom fields that are not specified in the request are set to null. + x-technical-preview: true + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - type + - value + properties: + $ref: 'case_customfields.yaml' description: description: An updated description for the case. type: string @@ -47,10 +67,6 @@ properties: items: type: string maxLength: 256 - category: - description: Category for the case. It could be a word or a phrase to categorize the case. - type: string - maxLength: 50 title: description: A title for the case. type: string @@ -58,5 +74,3 @@ properties: version: description: The current version of the case. To determine this value, use the get case or find cases APIs. type: string - customFields: - $ref: 'custom_fields_property.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/entrypoint.yaml b/x-pack/plugins/cases/docs/openapi/entrypoint.yaml index 142dcd2706fd38..fed1e2011b38fc 100644 --- a/x-pack/plugins/cases/docs/openapi/entrypoint.yaml +++ b/x-pack/plugins/cases/docs/openapi/entrypoint.yaml @@ -12,8 +12,10 @@ tags: - name: cases description: Case APIs enable you to open and track issues. servers: - - url: 'http://localhost:5601' - description: local + - url: https://{kibanaUrl} + variables: + kibanaUrl: + default: localhost:5601 paths: # Paths in the default space '/api/cases': diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases.yaml index 98e97b6af7d5bb..f92df59625dc27 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases.yaml @@ -34,9 +34,7 @@ post: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 - + delete: summary: Deletes one or more cases in the default space. operationId: deleteCaseDefaultSpace @@ -59,8 +57,6 @@ delete: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 patch: summary: Updates one or more cases in the default space. @@ -99,8 +95,3 @@ patch: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 - -servers: - - url: https://localhost:5601 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml index 6fd7f65ced3ad6..aa926636802a28 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml @@ -58,7 +58,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml index 24e91369a6422a..64ff49d17b8cd1 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml @@ -36,8 +36,4 @@ get: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601s \ No newline at end of file + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml index ebbae5e333103c..5de3de67182b0c 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml @@ -20,17 +20,18 @@ get: type: object properties: $ref: '../components/schemas/case_configure_response_properties.yaml' + examples: + getConfigurationResponse: + $ref: '../components/examples/get_case_configuration_response.yaml' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 post: - summary: Sets external connection details, such as the closure type and default connector for cases in the default space. + summary: Creates a case specific configuration that includes external connection details and custom fields. operationId: setCaseConfigurationDefaultSpace description: > You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case configuration. @@ -67,8 +68,4 @@ post: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml index b0b3111094218f..53a5ebf537e576 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml @@ -28,7 +28,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml index 507842e6f47f44..d31299128b076f 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml @@ -16,24 +16,24 @@ patch: application/json: schema: $ref: '../components/schemas/update_case_configuration_request.yaml' + examples: + updateCaseConfigurationRequest: + $ref: '../components/examples/update_case_configuration_request.yaml' responses: '200': description: Indicates a successful call. content: application/json: schema: - type: array - items: - type: object - properties: - $ref: '../components/schemas/case_configure_response_properties.yaml' + type: object + properties: + $ref: '../components/schemas/case_configure_response_properties.yaml' + examples: + updateCaseConfigurationResponse: + $ref: '../components/examples/update_case_configuration_response.yaml' '401': description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@reporters.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@reporters.yaml index 7bf256e3c33a35..15fca2baef2476 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@reporters.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@reporters.yaml @@ -19,6 +19,10 @@ get: maxItems: 10000 items: type: object + required: + - email + - full_name + - username properties: $ref: '../components/schemas/user_properties.yaml' examples: @@ -29,8 +33,4 @@ get: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@status.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@status.yaml index 17dedefd164506..cd0792b7b3174e 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@status.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@status.yaml @@ -25,16 +25,9 @@ get: type: integer count_open_cases: type: integer - examples: - getStatusResponse: - $ref: '../components/examples/get_status_response.yaml' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@tags.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@tags.yaml index 3ce4e0578178e9..5f0083d087b5c9 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@tags.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@tags.yaml @@ -25,8 +25,4 @@ get: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml index 48238dcdcf4de8..9629049c9b3428 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml @@ -25,8 +25,4 @@ get: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@alerts.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@alerts.yaml index 80e40933031369..525fb25f4b6d58 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@alerts.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@alerts.yaml @@ -27,8 +27,4 @@ get: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments.yaml index 160a5a5f221ca5..fa25d6263143df 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments.yaml @@ -36,8 +36,6 @@ post: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 delete: summary: Deletes all comments and alerts from a case in the default space. @@ -60,8 +58,6 @@ delete: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 patch: summary: Updates a comment or alert in a case in the default space. @@ -101,8 +97,6 @@ patch: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 get: summary: Retrieves all the comments from a case in the default space. @@ -131,8 +125,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 - -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@{commentid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@{commentid}.yaml index 0eb35a7bb1c9af..354b0082014060 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@{commentid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@{commentid}.yaml @@ -20,8 +20,6 @@ delete: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 get: summary: Retrieves a comment from a case in the default space. @@ -52,8 +50,4 @@ get: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml index 4731c69bab76a2..321f2f6938c508 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml @@ -31,8 +31,4 @@ post: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions.yaml index b0e38a119fd34e..83657ecc123b3a 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions.yaml @@ -20,16 +20,9 @@ get: type: array items: $ref: '../components/schemas/user_actions_response_properties.yaml' - examples: - getCaseActivityResponse: - $ref: '../components/examples/get_case_activity_response.yaml' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions@_find.yaml index ab8c16a641fdcb..99caec414b1324 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions@_find.yaml @@ -41,7 +41,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases.yaml index 58e73f6a68d171..1703dc5eecdc59 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases.yaml @@ -35,8 +35,6 @@ post: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 delete: summary: Deletes one or more cases. @@ -61,8 +59,6 @@ delete: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 patch: summary: Updates one or more cases. @@ -102,8 +98,3 @@ patch: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 - -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@_find.yaml index fa9687b439f84b..a688b10389ecd4 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@_find.yaml @@ -58,7 +58,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml index 940f343c893868..f1e287e05d304c 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml @@ -36,8 +36,4 @@ get: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml index c991005af9d700..d12262379df810 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml @@ -21,17 +21,18 @@ get: type: object properties: $ref: '../components/schemas/case_configure_response_properties.yaml' + examples: + getConfigurationResponse: + $ref: '../components/examples/get_case_configuration_response.yaml' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 post: - summary: Sets external connection details, such as the closure type and default connector for cases. + summary: Creates a case specific configuration that includes external connection details and custom fields. operationId: setCaseConfiguration description: > You must have `all` privileges for the **Cases** feature in the @@ -73,7 +74,3 @@ post: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml index bfe60072b8f50a..f04f802ba3245f 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml @@ -29,7 +29,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml index 749f1ece724b25..c8656181aca937 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml @@ -18,24 +18,24 @@ patch: application/json: schema: $ref: '../components/schemas/update_case_configuration_request.yaml' + examples: + updateCaseConfigurationRequest: + $ref: '../components/examples/update_case_configuration_request.yaml' responses: '200': description: Indicates a successful call. content: application/json: schema: - type: array - items: - type: object - properties: - $ref: '../components/schemas/case_configure_response_properties.yaml' + type: object + properties: + $ref: '../components/schemas/case_configure_response_properties.yaml' + examples: + updateCaseConfigurationResponse: + $ref: '../components/examples/update_case_configuration_response.yaml' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@reporters.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@reporters.yaml index 51e57615f12164..b2a3bd11d5c9ce 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@reporters.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@reporters.yaml @@ -23,6 +23,10 @@ get: type: array items: type: object + required: + - email + - full_name + - username properties: $ref: '../components/schemas/user_properties.yaml' examples: @@ -34,7 +38,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@status.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@status.yaml index d3c4b40fa3aea9..d4a6292e6e0fbd 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@status.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@status.yaml @@ -26,16 +26,10 @@ get: type: integer count_open_cases: type: integer - examples: - getStatusResponse: - $ref: '../components/examples/get_status_response.yaml' '401': description: Authorization information is missing or invalid. content: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 + diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@tags.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@tags.yaml index ff448041dd712a..88025633b12d1b 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@tags.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@tags.yaml @@ -28,7 +28,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml index fb4f735f322eb7..32e3434f15adda 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml @@ -27,7 +27,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml index aca587fe4886c7..7784c49bf9ca0c 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml @@ -29,7 +29,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments.yaml index 1e1c73838abb9b..0551151b613f1d 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments.yaml @@ -37,8 +37,6 @@ post: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 delete: summary: Deletes all comments and alerts from a case. @@ -62,8 +60,6 @@ delete: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 patch: summary: Updates a comment or alert in a case. @@ -104,8 +100,6 @@ patch: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 get: summary: Retrieves all the comments from a case. @@ -135,8 +129,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 - -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml index b1dd32a6595153..b027660aaf1eae 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml @@ -26,8 +26,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 - -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml index e43a2b2d81d65b..2db1929ae43734 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml @@ -21,8 +21,6 @@ delete: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 get: summary: Retrieves a comment from a case. @@ -54,8 +52,4 @@ get: content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml index c378192592ce94..bee91522dde299 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml @@ -36,7 +36,3 @@ post: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml index 4aa52bdbc44b55..0cb3770be5b13b 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml @@ -21,16 +21,9 @@ get: type: array items: $ref: '../components/schemas/user_actions_response_properties.yaml' - examples: - getCaseActivityResponse: - $ref: '../components/examples/get_case_activity_response.yaml' '401': description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 + $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml index 61a1290c7c5a6f..0b5a6e660da8b9 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml @@ -42,7 +42,3 @@ get: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601