diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index b7790b7198398..4bb73ec547acf 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -12101,6 +12101,19 @@ paths: summary: Delete cases tags: - cases + x-code-samples: + - label: curl + lang: curl + source: | + curl \ + --request DELETE 'https://localhost:5601/api/cases?ids=%5B%22030e6e34-6470-4001-864f-b229511ad188%22%2C%22e662ff34-0493-4538-b9d1-6706ced02ff2%22%5D' \ + --header "Authorization: $API_KEY" \ + --header "Content-Type: application/json" + --header "kbn-xsrf: true" + - label: Console + lang: console + source: | + DELETE kbn:/api/cases?ids=["030e6e34-6470-4001-864f-b229511ad188","e662ff34-0493-4538-b9d1-6706ced02ff2"] x-metaTags: - content: Kibana name: product_name @@ -89669,9 +89682,10 @@ components: id: 57af14a0-03b1-11ed-920c-974bfa104448 owner: cases payload: - comment: A new comment - owner: cases - type: user + comment: + comment: A new comment + owner: cases + type: user type: comment version: WzM1ODg4LDFa - action: add @@ -89686,7 +89700,7 @@ components: owner: cases payload: assignees: - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 type: assignees version: WzM1ODg4LDFb Cases_find_case_response: @@ -94061,7 +94075,7 @@ components: - $ref: '#/components/schemas/Cases_string' - $ref: '#/components/schemas/Cases_string_array' Cases_case_id: - description: The identifier for the case. To retrieve case IDs, use the find cases API. All non-ASCII characters must be URL encoded. + description: The identifier for the case. To retrieve case IDs, use the search cases (`_find)` API. All non-ASCII characters must be URL encoded. in: path name: caseId required: true @@ -94078,7 +94092,7 @@ components: - $ref: '#/components/schemas/Cases_case_categories' Cases_comment_id: description: | - The identifier for the comment. To retrieve comment IDs, use the get case or find cases APIs. + The identifier for the comment. To retrieve comment IDs, use the get case or search cases (`_find`) APIs. in: path name: commentId required: true @@ -94119,14 +94133,13 @@ components: type: string Cases_ids: description: | - The cases that you want to removed. All non-ASCII characters must be URL encoded. - example: - - d4e7abb0-b462-11ec-9a8d-698504725a43 + The cases that you want to removed. To get the case identifiers, use the search cases (`_find`) API. In the Dev Console, you can specify the array of cases in the following format: `ids=["e58e77e3-ef8e-4251-926f-efb115f3c4ec"]`. In `curl`, all non-ASCII characters must be URL encoded. For example: `ids=%5B%22e58e77e3-ef8e-4251-926f-efb115f3c4ec%22%5D` in: query name: ids required: true schema: items: + example: d4e7abb0-b462-11ec-9a8d-698504725a43 maxItems: 100 minItems: 1 type: string @@ -94264,7 +94277,6 @@ components: type: string Cases_user_action_types: description: Determines the types of user actions to return. - example: create_case in: query name: types schema: @@ -94285,6 +94297,7 @@ components: - tags - title - user + example: create_case type: string type: array Data_views_field_name: @@ -96072,9 +96085,9 @@ components: status: $ref: '#/components/schemas/Cases_case_status' tags: + example: + - tag-1 items: - example: - - tag-1 type: string type: array title: @@ -96535,7 +96548,8 @@ components: title: $ref: '#/components/schemas/Cases_case_title' version: - description: The current version of the case. To determine this value, use the get case or find cases APIs. + description: | + The current version of the case. To determine this value, use the get case or search cases (`_find`) APIs. type: string required: - id diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.json b/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.json index bbc787efa099b..2569f7a99f7e9 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.json +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.json @@ -109,7 +109,19 @@ } } } - } + }, + "x-code-samples": [ + { + "label": "curl", + "lang": "curl", + "source": "curl \\\n --request DELETE 'https://localhost:5601/api/cases?ids=%5B%22030e6e34-6470-4001-864f-b229511ad188%22%2C%22e662ff34-0493-4538-b9d1-6706ced02ff2%22%5D' \\\n --header \"Authorization: $API_KEY\" \\\n --header \"Content-Type: application/json\"\n --header \"kbn-xsrf: true\"\n" + }, + { + "label": "Console", + "lang": "console", + "source": "DELETE kbn:/api/cases?ids=[\"030e6e34-6470-4001-864f-b229511ad188\",\"e662ff34-0493-4538-b9d1-6706ced02ff2\"]\n" + } + ] }, "patch": { "summary": "Update cases", @@ -1813,20 +1825,18 @@ }, "ids": { "name": "ids", - "description": "The cases that you want to removed. All non-ASCII characters must be URL encoded.\n", "in": "query", + "description": "The cases that you want to removed. To get the case identifiers, use the search cases (`_find`) API. In the Dev Console, you can specify the array of cases in the following format: `ids=[\"e58e77e3-ef8e-4251-926f-efb115f3c4ec\"]`. In `curl`, all non-ASCII characters must be URL encoded. For example: `ids=%5B%22e58e77e3-ef8e-4251-926f-efb115f3c4ec%22%5D`\n", "required": true, "schema": { "type": "array", "items": { "type": "string", "minItems": 1, - "maxItems": 100 + "maxItems": 100, + "example": "d4e7abb0-b462-11ec-9a8d-698504725a43" } - }, - "example": [ - "d4e7abb0-b462-11ec-9a8d-698504725a43" - ] + } }, "assignees_filter": { "in": "query", @@ -2062,7 +2072,7 @@ "case_id": { "in": "path", "name": "caseId", - "description": "The identifier for the case. To retrieve case IDs, use the find cases API. All non-ASCII characters must be URL encoded.", + "description": "The identifier for the case. To retrieve case IDs, use the search cases (`_find)` API. All non-ASCII characters must be URL encoded.", "required": true, "schema": { "type": "string", @@ -2082,7 +2092,7 @@ "comment_id": { "in": "path", "name": "commentId", - "description": "The identifier for the comment. To retrieve comment IDs, use the get case or find cases APIs.\n", + "description": "The identifier for the comment. To retrieve comment IDs, use the get case or search cases (`_find`) APIs.\n", "required": true, "schema": { "type": "string", @@ -2123,10 +2133,10 @@ "tags", "title", "user" - ] + ], + "example": "create_case" } - }, - "example": "create_case" + } } }, "schemas": { @@ -3425,7 +3435,7 @@ "$ref": "#/components/schemas/case_title" }, "version": { - "description": "The current version of the case. To determine this value, use the get case or find cases APIs.", + "description": "The current version of the case. To determine this value, use the get case or search cases (`_find`) APIs.\n", "type": "string" } } @@ -4366,11 +4376,11 @@ "tags": { "type": "array", "items": { - "type": "string", - "example": [ - "tag-1" - ] - } + "type": "string" + }, + "example": [ + "tag-1" + ] }, "title": { "type": "string" @@ -5738,9 +5748,11 @@ }, "owner": "cases", "payload": { - "comment": "A new comment", - "owner": "cases", - "type": "user" + "comment": { + "comment": "A new comment", + "owner": "cases", + "type": "user" + } }, "version": "WzM1ODg4LDFa", "type": "comment" @@ -5758,9 +5770,11 @@ }, "owner": "cases", "payload": { - "assignees": { - "uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" - } + "assignees": [ + { + "uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + } + ] }, "version": "WzM1ODg4LDFb", "type": "assignees" diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.yaml index d53f13358b876..b521938c78bc7 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/bundled.yaml @@ -68,6 +68,19 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' + x-code-samples: + - label: curl + lang: curl + source: | + curl \ + --request DELETE 'https://localhost:5601/api/cases?ids=%5B%22030e6e34-6470-4001-864f-b229511ad188%22%2C%22e662ff34-0493-4538-b9d1-6706ced02ff2%22%5D' \ + --header "Authorization: $API_KEY" \ + --header "Content-Type: application/json" + --header "kbn-xsrf: true" + - label: Console + lang: console + source: | + DELETE kbn:/api/cases?ids=["030e6e34-6470-4001-864f-b229511ad188","e662ff34-0493-4538-b9d1-6706ced02ff2"] patch: summary: Update cases operationId: updateCaseDefaultSpace @@ -1174,9 +1187,9 @@ components: required: true ids: name: ids - description: | - The cases that you want to removed. All non-ASCII characters must be URL encoded. in: query + description: | + The cases that you want to removed. To get the case identifiers, use the search cases (`_find`) API. In the Dev Console, you can specify the array of cases in the following format: `ids=["e58e77e3-ef8e-4251-926f-efb115f3c4ec"]`. In `curl`, all non-ASCII characters must be URL encoded. For example: `ids=%5B%22e58e77e3-ef8e-4251-926f-efb115f3c4ec%22%5D` required: true schema: type: array @@ -1184,8 +1197,7 @@ components: type: string minItems: 1 maxItems: 100 - example: - - d4e7abb0-b462-11ec-9a8d-698504725a43 + example: d4e7abb0-b462-11ec-9a8d-698504725a43 assignees_filter: in: query name: assignees @@ -1354,7 +1366,7 @@ components: case_id: in: path name: caseId - description: The identifier for the case. To retrieve case IDs, use the find cases API. All non-ASCII characters must be URL encoded. + description: The identifier for the case. To retrieve case IDs, use the search cases (`_find)` API. All non-ASCII characters must be URL encoded. required: true schema: type: string @@ -1371,7 +1383,7 @@ components: in: path name: commentId description: | - The identifier for the comment. To retrieve comment IDs, use the get case or find cases APIs. + The identifier for the comment. To retrieve comment IDs, use the get case or search cases (`_find`) APIs. required: true schema: type: string @@ -1408,7 +1420,7 @@ components: - tags - title - user - example: create_case + example: create_case schemas: assignees: type: array @@ -2367,7 +2379,8 @@ components: title: $ref: '#/components/schemas/case_title' version: - description: The current version of the case. To determine this value, use the get case or find cases APIs. + description: | + The current version of the case. To determine this value, use the get case or search cases (`_find`) APIs. type: string string: type: string @@ -3055,8 +3068,8 @@ components: type: array items: type: string - example: - - tag-1 + example: + - tag-1 title: type: string payload_delete: @@ -4058,9 +4071,10 @@ components: profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 owner: cases payload: - comment: A new comment - owner: cases - type: user + comment: + comment: A new comment + owner: cases + type: user version: WzM1ODg4LDFa type: comment - id: 573c6980-6123-11ed-aa41-81a0a61fe447 @@ -4075,7 +4089,7 @@ components: owner: cases payload: assignees: - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 version: WzM1ODg4LDFb type: assignees find_connector_response: diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/components/examples/find_case_activity_response.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/components/examples/find_case_activity_response.yaml index cb5f9570845aa..8a2a185425a0d 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/components/examples/find_case_activity_response.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/components/examples/find_case_activity_response.yaml @@ -51,9 +51,10 @@ value: profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 owner: cases payload: - comment: A new comment - owner: cases - type: user + comment: + comment: A new comment + owner: cases + type: user version: WzM1ODg4LDFa type: comment - id: 573c6980-6123-11ed-aa41-81a0a61fe447 @@ -68,6 +69,6 @@ value: owner: cases payload: assignees: - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 version: WzM1ODg4LDFb type: assignees diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/case_id.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/case_id.yaml index eebde85823746..3573cc550134e 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/case_id.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/case_id.yaml @@ -1,6 +1,6 @@ in: path name: caseId -description: The identifier for the case. To retrieve case IDs, use the find cases API. All non-ASCII characters must be URL encoded. +description: The identifier for the case. To retrieve case IDs, use the search cases (`_find)` API. All non-ASCII characters must be URL encoded. required: true schema: type: string diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/comment_id.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/comment_id.yaml index a46f47569e8d2..7c24ea60dd1d4 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/comment_id.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/comment_id.yaml @@ -1,8 +1,7 @@ in: path name: commentId description: > - The identifier for the comment. To retrieve comment IDs, use the get case or - find cases APIs. + The identifier for the comment. To retrieve comment IDs, use the get case or search cases (`_find`) APIs. required: true schema: type: string diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/ids.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/ids.yaml index f357949cb62df..67f19a436cec2 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/ids.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/ids.yaml @@ -1,8 +1,11 @@ name: ids +in: query description: > The cases that you want to removed. - All non-ASCII characters must be URL encoded. -in: query + To get the case identifiers, use the search cases (`_find`) API. + In the Dev Console, you can specify the array of cases in the following format: `ids=["e58e77e3-ef8e-4251-926f-efb115f3c4ec"]`. + In `curl`, all non-ASCII characters must be URL encoded. + For example: `ids=%5B%22e58e77e3-ef8e-4251-926f-efb115f3c4ec%22%5D` required: true schema: type: array @@ -10,4 +13,4 @@ schema: type: string minItems: 1 maxItems: 100 -example: ["d4e7abb0-b462-11ec-9a8d-698504725a43"] + example: d4e7abb0-b462-11ec-9a8d-698504725a43 diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/user_action_types.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/user_action_types.yaml index 2b04b7c806620..3a1accf26f3f2 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/user_action_types.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/components/parameters/user_action_types.yaml @@ -21,4 +21,4 @@ schema: - tags - title - user -example: create_case \ No newline at end of file + example: create_case \ No newline at end of file diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/components/schemas/payload_create_case.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/components/schemas/payload_create_case.yaml index 08b2e6f56a61d..0349b34e89d8d 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/components/schemas/payload_create_case.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/components/schemas/payload_create_case.yaml @@ -20,6 +20,6 @@ properties: type: array items: type: string - example: ["tag-1"] + example: ["tag-1"] title: type: string diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/components/schemas/update_case_request.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/components/schemas/update_case_request.yaml index 8062128c03450..aed05b60dabc7 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/components/schemas/update_case_request.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/components/schemas/update_case_request.yaml @@ -61,5 +61,7 @@ properties: title: $ref: 'case_title.yaml' version: - description: The current version of the case. To determine this value, use the get case or find cases APIs. + description: > + The current version of the case. + To determine this value, use the get case or search cases (`_find`) APIs. type: string diff --git a/x-pack/platform/plugins/shared/cases/docs/openapi/paths/api@cases.yaml b/x-pack/platform/plugins/shared/cases/docs/openapi/paths/api@cases.yaml index d4b5cf73208f4..df24811cd1464 100644 --- a/x-pack/platform/plugins/shared/cases/docs/openapi/paths/api@cases.yaml +++ b/x-pack/platform/plugins/shared/cases/docs/openapi/paths/api@cases.yaml @@ -57,7 +57,19 @@ delete: application/json: schema: $ref: '../components/schemas/4xx_response.yaml' - + x-code-samples: + - label: curl + lang: curl + source: | + curl \ + --request DELETE 'https://localhost:5601/api/cases?ids=%5B%22030e6e34-6470-4001-864f-b229511ad188%22%2C%22e662ff34-0493-4538-b9d1-6706ced02ff2%22%5D' \ + --header "Authorization: $API_KEY" \ + --header "Content-Type: application/json" + --header "kbn-xsrf: true" + - label: Console + lang: console + source: | + DELETE kbn:/api/cases?ids=["030e6e34-6470-4001-864f-b229511ad188","e662ff34-0493-4538-b9d1-6706ced02ff2"] patch: summary: Update cases operationId: updateCaseDefaultSpace