[DOCS] Add assignees to case APIs (#143610)

This commit is contained in:
Lisa Cawley 2022-10-20 11:32:10 -07:00 committed by GitHub
parent d13bfa29c4
commit 6eb02d096f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 231 additions and 6 deletions

View file

@ -87,6 +87,11 @@ Any modifications made to this file will be overwritten.
"totalAlerts" : 0,
"closed_at" : "2000-01-23T04:56:07.000+00:00",
"comments" : [ null, null ],
"assignees" : [ {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
}, {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
} ],
"created_at" : "2022-05-13T09:16:17.416Z",
"description" : "A case description.",
"title" : "Case title 1",
@ -199,6 +204,11 @@ Any modifications made to this file will be overwritten.
"totalAlerts" : 0,
"closed_at" : "2000-01-23T04:56:07.000+00:00",
"comments" : [ null, null ],
"assignees" : [ {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
}, {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
} ],
"created_at" : "2022-05-13T09:16:17.416Z",
"description" : "A case description.",
"title" : "Case title 1",
@ -376,6 +386,11 @@ Any modifications made to this file will be overwritten.
"totalAlerts" : 0,
"closed_at" : "2000-01-23T04:56:07.000+00:00",
"comments" : [ null, null ],
"assignees" : [ {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
}, {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
} ],
"created_at" : "2022-05-13T09:16:17.416Z",
"description" : "A case description.",
"title" : "Case title 1",
@ -488,6 +503,11 @@ Any modifications made to this file will be overwritten.
"totalAlerts" : 0,
"closed_at" : "2000-01-23T04:56:07.000+00:00",
"comments" : [ null, null ],
"assignees" : [ {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
}, {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
} ],
"created_at" : "2022-05-13T09:16:17.416Z",
"description" : "A case description.",
"title" : "Case title 1",
@ -602,6 +622,11 @@ Any modifications made to this file will be overwritten.
"totalAlerts" : 0,
"closed_at" : "2000-01-23T04:56:07.000+00:00",
"comments" : [ null, null ],
"assignees" : [ {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
}, {
"uid" : "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
} ],
"created_at" : "2022-05-13T09:16:17.416Z",
"description" : "A case description.",
"title" : "Case title 1",
@ -677,6 +702,7 @@ Any modifications made to this file will be overwritten.
<li><a href="#case_response_closed_by_properties"><code>case_response_closed_by_properties</code> - Case response properties for closed_by</a></li>
<li><a href="#case_response_created_by_properties"><code>case_response_created_by_properties</code> - Case response properties for created_by</a></li>
<li><a href="#case_response_properties"><code>case_response_properties</code> - Case response properties</a></li>
<li><a href="#case_response_properties_assignees_inner"><code>case_response_properties_assignees_inner</code> - </a></li>
<li><a href="#case_response_pushed_by_properties"><code>case_response_pushed_by_properties</code> - Case response properties for pushed_by</a></li>
<li><a href="#case_response_updated_by_properties"><code>case_response_updated_by_properties</code> - Case response properties for updated_by</a></li>
<li><a href="#connector_properties_cases_webhook"><code>connector_properties_cases_webhook</code> - Create or upate case request properties for Cases Webhook connector</a></li>
@ -692,6 +718,7 @@ Any modifications made to this file will be overwritten.
<li><a href="#connector_properties_swimlane"><code>connector_properties_swimlane</code> - Create case request properties for a Swimlane connector</a></li>
<li><a href="#connector_properties_swimlane_fields"><code>connector_properties_swimlane_fields</code> - </a></li>
<li><a href="#create_case_request"><code>create_case_request</code> - Create case request</a></li>
<li><a href="#create_case_request_assignees_inner"><code>create_case_request_assignees_inner</code> - </a></li>
<li><a href="#create_case_request_connector"><code>create_case_request_connector</code> - </a></li>
<li><a href="#external_service"><code>external_service</code> - </a></li>
<li><a href="#owners"><code>owners</code> - </a></li>
@ -864,7 +891,8 @@ Any modifications made to this file will be overwritten.
<h3><a name="case_response_properties"><code>case_response_properties</code> - Case response properties</a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'></div>
<div class="field-items">
<div class="param">closed_at </div><div class="param-desc"><span class="param-type"><a href="#DateTime">Date</a></span> format: date-time</div>
<div class="param">assignees (optional)</div><div class="param-desc"><span class="param-type"><a href="#case_response_properties_assignees_inner">array[case_response_properties_assignees_inner]</a></span> An array containing users that are assigned to the case. </div>
<div class="param">closed_at </div><div class="param-desc"><span class="param-type"><a href="#DateTime">Date</a></span> format: date-time</div>
<div class="param">closed_by </div><div class="param-desc"><span class="param-type"><a href="#case_response_closed_by_properties">case_response_closed_by_properties</a></span> </div>
<div class="param">comments </div><div class="param-desc"><span class="param-type"><a href="#Case_response_properties_for_comments_inner">array[Case_response_properties_for_comments_inner]</a></span> An array of comment objects for the case. </div>
<div class="param">connector </div><div class="param-desc"><span class="param-type"><a href="#Case_response_properties_for_connectors">Case_response_properties_for_connectors</a></span> </div>
@ -887,6 +915,13 @@ Any modifications made to this file will be overwritten.
<div class="param">version </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="case_response_properties_assignees_inner"><code>case_response_properties_assignees_inner</code> - </a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'></div>
<div class="field-items">
<div class="param">uid </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> A unique identifier for the user profile. You can use the get user profile API to retrieve more details. </div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="case_response_pushed_by_properties"><code>case_response_pushed_by_properties</code> - Case response properties for pushed_by</a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'></div>
@ -1043,7 +1078,8 @@ Any modifications made to this file will be overwritten.
<h3><a name="create_case_request"><code>create_case_request</code> - Create case request</a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'>The create case API request body varies depending on the type of connector.</div>
<div class="field-items">
<div class="param">connector </div><div class="param-desc"><span class="param-type"><a href="#create_case_request_connector">create_case_request_connector</a></span> </div>
<div class="param">assignees (optional)</div><div class="param-desc"><span class="param-type"><a href="#create_case_request_assignees_inner">array[create_case_request_assignees_inner]</a></span> An array containing users that are assigned to the case. </div>
<div class="param">connector </div><div class="param-desc"><span class="param-type"><a href="#create_case_request_connector">create_case_request_connector</a></span> </div>
<div class="param">description </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The description for the case. </div>
<div class="param">owner </div><div class="param-desc"><span class="param-type"><a href="#owners">owners</a></span> </div>
<div class="param">settings </div><div class="param-desc"><span class="param-type"><a href="#settings">settings</a></span> </div>
@ -1052,6 +1088,13 @@ Any modifications made to this file will be overwritten.
<div class="param">title </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> A title for the case. </div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="create_case_request_assignees_inner"><code>create_case_request_assignees_inner</code> - </a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'></div>
<div class="field-items">
<div class="param">uid </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API. </div>
</div> <!-- field-items -->
</div>
<div class="model">
<h3><a name="create_case_request_connector"><code>create_case_request_connector</code> - </a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'></div>
@ -1152,7 +1195,8 @@ Any modifications made to this file will be overwritten.
<h3><a name="update_case_request_cases_inner"><code>update_case_request_cases_inner</code> - </a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'></div>
<div class="field-items">
<div class="param">connector (optional)</div><div class="param-desc"><span class="param-type"><a href="#create_case_request_connector">create_case_request_connector</a></span> </div>
<div class="param">assignees (optional)</div><div class="param-desc"><span class="param-type"><a href="#create_case_request_assignees_inner">array[create_case_request_assignees_inner]</a></span> An array containing users that are assigned to the case. </div>
<div class="param">connector (optional)</div><div class="param-desc"><span class="param-type"><a href="#create_case_request_connector">create_case_request_connector</a></span> </div>
<div class="param">description (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> An updated description for the case. </div>
<div class="param">id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The identifier for the case. </div>
<div class="param">settings (optional)</div><div class="param-desc"><span class="param-type"><a href="#settings">settings</a></span> </div>

View file

@ -34,6 +34,18 @@ default space is used.
[role="child_attributes"]
=== {api-request-body-title}
`assignees`::
(Optional, array of objects) Array containing users that are assigned to the case.
+
.Properties of assignee objects
[%collapsible%open]
=====
`uid`::
(Required, string) A unique identifier for the user profile. These identifiers
can be found by using the
{ref}/security-api-suggest-user-profile.html[suggest user profile API].
=====
`connector`::
(Required, object) An object that contains the connector configuration.
+
@ -207,6 +219,7 @@ the case identifier, version, and creation time. For example:
"totalAlerts": 0,
"title": "Case title 1",
"tags": [ "tag 1" ],
"assignees": [],
"settings": {
"syncAlerts": true
},

View file

@ -141,6 +141,7 @@ The API returns a JSON object listing the retrieved cases. For example:
"full_name": "Joe Smith",
"username": "jsmith"
},
"assignees": [],
"connector": {
"id": "none",
"name": "none",

View file

@ -86,6 +86,7 @@ The API returns a JSON object with the retrieved case. For example:
"status":"open",
"updated_at":"2022-07-13T15:40:32.335Z",
"updated_by":{"full_name":null,"email":null,"username":"elastic"},
"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],
"connector":{"id":"none","name":"none","type":".none","fields":null},
"external_service":null
}

View file

@ -40,6 +40,19 @@ default space is used.
.Properties of `cases` objects
[%collapsible%open]
====
`assignees`::
(Optional, array of objects) Array containing users that are assigned to the case.
+
.Properties of assignee objects
[%collapsible%open]
=====
`uid`::
(Required, string) A unique identifier for the user profile. These identifiers
can be found by using the
{ref}/security-api-suggest-user-profile.html[suggest user profile API].
=====
`connector`::
(Optional, object) An object that contains the connector configuration.
+
@ -203,6 +216,7 @@ PATCH api/cases
},
"description": "A new description.",
"tags": [ "tag-1", "tag-2" ],
"assignees": [],
"settings": {
"syncAlerts": true
}

View file

@ -816,6 +816,24 @@
"title"
],
"properties": {
"assignees": {
"type": "array",
"description": "An array containing users that are assigned to the case.",
"nullable": true,
"items": {
"type": "object",
"required": [
"uid"
],
"properties": {
"uid": {
"type": "string",
"description": "A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.",
"example": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
}
}
}
},
"connector": {
"oneOf": [
{
@ -1272,6 +1290,24 @@
"version"
],
"properties": {
"assignees": {
"type": "array",
"description": "An array containing users that are assigned to the case.",
"nullable": true,
"items": {
"type": "object",
"required": [
"uid"
],
"properties": {
"uid": {
"type": "string",
"description": "A unique identifier for the user profile. You can use the get user profile API to retrieve more details.",
"example": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
}
}
}
},
"closed_at": {
"type": "string",
"format": "date-time",
@ -1417,6 +1453,24 @@
"version"
],
"properties": {
"assignees": {
"type": "array",
"description": "An array containing users that are assigned to the case.",
"nullable": true,
"items": {
"type": "object",
"required": [
"uid"
],
"properties": {
"uid": {
"type": "string",
"description": "A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.",
"example": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0"
}
}
}
},
"connector": {
"oneOf": [
{
@ -1746,6 +1800,7 @@
"tags": [
"tag 1"
],
"assignees": [],
"description": "A case description.",
"settings": {
"syncAlerts": false
@ -1840,6 +1895,7 @@
"full_name": null,
"username": "elastic"
},
"assignees": [],
"connector": {
"id": "131d4448-abe0-4789-939d-8ef60680b498",
"name": "My connector",

View file

@ -560,6 +560,19 @@ components:
- tags
- title
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
connector:
oneOf:
- $ref: '#/components/schemas/connector_properties_none'
@ -896,6 +909,19 @@ components:
- updated_by
- version
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. You can use the get user profile API to retrieve more details.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
closed_at:
type: string
format: date-time
@ -992,6 +1018,19 @@ components:
- id
- version
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
connector:
oneOf:
- $ref: '#/components/schemas/connector_properties_none'
@ -1222,6 +1261,7 @@ components:
title: Case title 1
tags:
- tag 1
assignees: []
description: A case description.
settings:
syncAlerts: false
@ -1296,6 +1336,7 @@ components:
email: null
full_name: null
username: elastic
assignees: []
connector:
id: 131d4448-abe0-4789-939d-8ef60680b498
name: My connector

View file

@ -8,6 +8,7 @@ value:
title: Case title 1
tags:
- tag 1
assignees: []
description: A case description.
settings:
syncAlerts: false

View file

@ -33,6 +33,7 @@ value:
"full_name": null,
"username": "elastic"
},
"assignees": [],
"connector": {
"id": "none",
"name": "none",

View file

@ -34,7 +34,9 @@ value:
"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"},"connector":{
"updated_by":{"full_name":null,"email":null,"username":"elastic"},
"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],
"connector":{
"id":"none",
"name":"none",
"type":".none",

View file

@ -31,6 +31,7 @@ value:
"full_name": null,
"username": "elastic"
},
"assignees": [],
"connector": {
"id": "131d4448-abe0-4789-939d-8ef60680b498",
"name": "My connector",

View file

@ -1,6 +1,7 @@
type: string
description: The type of action.
enum:
- assignees
- create_case
- comment
- connector

View file

@ -22,7 +22,20 @@ required:
- updated_at
- updated_by
- version
properties:
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. You can use the get user profile API to retrieve more details.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
closed_at:
type: string
format: date-time

View file

@ -10,6 +10,19 @@ required:
- tags
- title
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
connector:
oneOf:
- $ref: 'connector_properties_none.yaml'

View file

@ -0,0 +1,9 @@
type: object
properties:
assignees:
type: array
items:
type: object
properties:
uid:
type: string

View file

@ -13,7 +13,20 @@ properties:
required:
- id
- version
properties:
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
connector:
oneOf:
- $ref: 'connector_properties_none.yaml'

View file

@ -24,6 +24,7 @@ properties:
payload:
oneOf:
- $ref: 'payload_alert_comment.yaml'
- $ref: 'payload_assignees.yaml'
- $ref: 'payload_connector.yaml'
- $ref: 'payload_create_case.yaml'
- $ref: 'payload_description.yaml'