Skip to content

Commit

Permalink
[DOCS] Add assignees to case APIs (elastic#143610)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6eb02d0)
  • Loading branch information
lcawl committed Oct 21, 2022
1 parent 4bab938 commit 1b87e9e
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 3 deletions.
13 changes: 13 additions & 0 deletions docs/api/cases/cases-api-create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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.
+
Expand Down Expand Up @@ -201,6 +213,7 @@ the case identifier, version, and creation time. For example:
"totalAlerts": 0,
"title": "Case title 1",
"tags": [ "tag 1" ],
"assignees": [],
"settings": {
"syncAlerts": true
},
Expand Down
1 change: 1 addition & 0 deletions docs/api/cases/cases-api-find-cases.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions docs/api/cases/cases-api-get-case.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
14 changes: 14 additions & 0 deletions docs/api/cases/cases-api-update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,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.
+
Expand Down Expand Up @@ -197,6 +210,7 @@ PATCH api/cases
},
"description": "A new description.",
"tags": [ "tag-1", "tag-2" ],
"assignees": [],
"settings": {
"syncAlerts": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ value:
title: Case title 1
tags:
- tag 1
assignees: []
description: A case description.
settings:
syncAlerts: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ value:
"full_name": null,
"username": "elastic"
},
"assignees": [],
"connector": {
"id": "none",
"name": "none",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ value:
"full_name": null,
"username": "elastic"
},
"assignees": [],
"connector": {
"id": "131d4448-abe0-4789-939d-8ef60680b498",
"name": "My connector",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type: string
description: The type of action.
enum:
- assignees
- create_case
- comment
- connector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: object
properties:
assignees:
type: array
items:
type: object
properties:
uid:
type: string
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1b87e9e

Please sign in to comment.