Skip to content

Commit af77ef6

Browse files
authored
[Docs] 7.11 Cases API updates (#445)
1 parent 91d4bdc commit af77ef6

21 files changed

+411
-314
lines changed

docs/cases/api/actions-api/cases-actions-api-intro.asciidoc

+31-227
Large diffs are not rendered by default.

docs/cases/api/cases-api/case-api-update-connector.asciidoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For {sn} connectors:
5959
* `severity` (string \| null): The severity of the incident.
6060
* `impact` (string \| null): The impact of the incident.
6161

62-
For Jira connectors:
62+
For {jira} connectors:
6363

6464
* `issueType` (string): The issue type of the issue.
6565
* `priority` (string \| null): The priority of the issue.
@@ -121,6 +121,7 @@ PATCH api/cases/configure
121121
"full_name": "Ms Admin",
122122
"username": "admin"
123123
},
124+
"error": null,
124125
"updated_at": "2020-03-31T06:21:35.759Z",
125126
"updated_by": {
126127
"email": "[email protected]",

docs/cases/api/cases-api/cases-api-add-comment.asciidoc

+9-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@ A JSON object with a `comment` field:
2020
|==============================================
2121
|Name |Type |Description |Required
2222

23-
|`comment` |String |The case's new comment. |Yes
23+
|`type` |String |The comment type, which can be `user` or `alert`. |Yes
24+
|`comment` |String |The case's new comment. |Yes, only when type is `user`.
25+
|`alertId` |String |The alert id. |Yes, only when type is `alert`.
26+
|`index` |String |The alert index. |Yes, only when type is `alert`.
2427
|==============================================
2528

29+
NOTE: Only alerts (signals) of {es-sec} are supported.
30+
2631
===== Example request
2732

2833
Adds a comment to case ID `293f1bc0-74f6-11ea-b83a-553aecdb28b6`:
@@ -31,6 +36,7 @@ Adds a comment to case ID `293f1bc0-74f6-11ea-b83a-553aecdb28b6`:
3136
--------------------------------------------------
3237
POST api/cases/293f1bc0-74f6-11ea-b83a-553aecdb28b6/comments
3338
{
39+
"type": "user",
3440
"comment": "That is nothing - Ethan Hunt answered a targeted social
3541
media campaign promoting phishy pension schemes to IMF operatives."
3642
}
@@ -58,6 +64,7 @@ comment, and the comment's ID, version, and creation time.
5864
{
5965
"id": "8af6ac20-74f6-11ea-b83a-553aecdb28b6",
6066
"version": "WzIwNDMxLDFd",
67+
"type": "user",
6168
"comment": "That is nothing - Ethan Hunt answered a targeted social media campaign promoting phishy pension schemes to IMF operatives.",
6269
"created_at": "2020-04-02T15:28:03.034Z",
6370
"created_by": {
@@ -71,7 +78,7 @@ comment, and the comment's ID, version, and creation time.
7178
"updated_by": null
7279
}
7380
],
74-
"totalComment": 0,
81+
"totalComment": 1,
7582
"title": "This case will self-destruct in 5 seconds",
7683
"tags": [
7784
"phishing",

docs/cases/api/cases-api/cases-api-assign-connector.asciidoc

+32-2
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ Must be one of these:
5555
|Yes
5656
|`fields` |Object a| Object containing the connector's fields.
5757

58-
For {sn} connectors:
58+
For {jira} connectors:
5959

6060
* `urgency` (string \| null): The urgency of the incident.
6161
* `severity` (string \| null): The severity of the incident.
6262
* `impact` (string \| null): The impact of the incident.
6363

64-
For Jira connectors:
64+
For {jira} connectors:
6565

6666
* `issueType` (string): The issue type of the issue.
6767
* `priority` (string \| null): The priority of the issue.
@@ -118,8 +118,38 @@ POST api/cases/configure
118118
"full_name": "Ms Moneypenny",
119119
"username": "moneypenny"
120120
},
121+
"error": null,
122+
"mappings":[
123+
{
124+
"source":"title", <1>
125+
"target":"summary",
126+
"action_type": "overwrite"
127+
},
128+
{
129+
"source":"description", <2>
130+
"target":"description",
131+
"action_type": "overwrite"
132+
},
133+
{
134+
"source":"comments", <3>
135+
"target":"comments",
136+
"action_type":"append"
137+
}
138+
],
121139
"updated_at": null,
122140
"updated_by": null,
123141
"version": "WzE3NywxXQ=="
124142
}
125143
--------------------------------------------------
144+
145+
<1> {es-sec} case `title` fields are mapped to {jira} `summary`
146+
fields. When a {es-sec} `title` field is updated and sent to {jira}, the {jira}
147+
`summary` field is overwritten.
148+
149+
<2> {es-sec} case `description` fields are mapped to {jira} `description`
150+
fields. When a {es-sec} `description` field is updated and sent to {jira},
151+
the {jira} `description` field is overwritten.
152+
153+
<3> {es-sec} case `comments` fields are mapped to {jira} `comments` fields.
154+
When a {es-sec} `comments` field is updated and sent to {jira}, the updated
155+
text is appended to the {jira} `comments` field.

docs/cases/api/cases-api/cases-api-associate-sn.asciidoc

+10-1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ The updated JSON case object.
9999
"title": "This case will self-destruct in 5 seconds",
100100
"tags": [],
101101
"description": "James Bond clicked on a highly suspicious email banner advertising cheap holidays for underpaid civil servants.",
102-
"status": "open"
102+
"status": "open",
103+
"connector": {
104+
"id": "61787f53-4eee-4741-8df6-8fe84fa616f7",
105+
"name": "ServiceNow",
106+
"type": ".servicenow",
107+
"fields": null
108+
},
109+
"settings": {
110+
"syncAlerts": true
111+
},
103112
}
104113
--------------------------------------------------

docs/cases/api/cases-api/cases-api-create.asciidoc

+18-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ A JSON object with these fields:
2121
categorize cases. |Yes, can be an empty array.
2222
|`connector` |<<create-case-connector-schema, connector>> |Object containing the connector's
2323
configuration. |Yes
24+
|`settings` |<<create-case-settings-schema, settings>> |Object containing the case's
25+
settings. |Yes
2426
|==============================================
2527

2628
[[create-case-connector-schema]]
@@ -51,7 +53,7 @@ For {sn} connectors:
5153
* `severity` (string \| null): The severity of the incident.
5254
* `impact` (string \| null): The impact of the incident.
5355

54-
For Jira connectors:
56+
For {jira} connectors:
5557

5658
* `issueType` (string): The issue type of the issue.
5759
* `priority` (string \| null): The priority of the issue.
@@ -65,6 +67,15 @@ For {ibm-r} connectors:
6567
|Yes
6668
|==============================================
6769

70+
[[create-case-settings-schema]]
71+
*`settings` schema*
72+
73+
[width="100%",options="header"]
74+
|==============================================
75+
|Name |Type |Description |Required
76+
|`syncAlerts` |Boolean| Turn on or off synching with alerts. | Yes
77+
|==============================================
78+
6879
===== Example request
6980

7081
[source,sh]
@@ -86,6 +97,9 @@ POST api/cases
8697
"issueType": "10006",
8798
"priority": "High",
8899
}
100+
},
101+
"settings": {
102+
"syncAlerts": true
89103
}
90104
}
91105
--------------------------------------------------
@@ -139,6 +153,9 @@ version, and creation time. The case's ID is also its saved object ID
139153
"issueType": "10006",
140154
"priority": "High",
141155
}
156+
},
157+
"settings": {
158+
"syncAlerts": true
142159
}
143160
}
144161
--------------------------------------------------

docs/cases/api/cases-api/cases-api-find-cases.asciidoc

+8-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ All parameters are optional:
2929

3030
|`sortOrder` |String |Determines the sort order, which can be `desc` or `asc`.
3131

32-
|`status` |String |Filters the returned cases by state, which can be `open` or
32+
|`status` |String |Filters the returned cases by state, which can be `open`, `in-progress`, or
3333
`closed`.
3434

3535
|`tags` |String |Filters the returned cases by tags.
@@ -103,12 +103,15 @@ A JSON object listing the retrieved cases.
103103
"priority": null,
104104
}
105105
},
106+
"settings": {
107+
"syncAlerts": true
108+
}
106109
},
107110
{
108111
"id": "a18b38a0-71b0-11ea-a0b2-c51ea50a58e2",
109112
"version": "Wzk4LDFd",
110113
"comments": [],
111-
"totalComment": 1,
114+
"totalComment": 0,
112115
"closed_at": null,
113116
"closed_by": null,
114117
"created_at": "2020-03-29T11:30:02.658Z",
@@ -136,6 +139,9 @@ A JSON object listing the retrieved cases.
136139
"severityCode": 6,
137140
}
138141
},
142+
"settings": {
143+
"syncAlerts": false
144+
},
139145
"tags": [
140146
"phishing",
141147
"social engineering",

docs/cases/api/cases-api/cases-api-find-connectors.asciidoc

+2-40
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[[cases-api-find-connectors]]
22
=== Find connectors
33

4-
Retrieves a paginated subset of all {sn} connectors.
4+
Retrieves a paginated subset of all connectors.
55

6-
NOTE: Only {sn} and Jira connectors are returned. For more information on
6+
NOTE: Only {sn}, {jira}, and {ibm-r} connectors are returned. For more information on
77
connectors, see <<actions-api-overview>>.
88

99
==== Request URL
@@ -41,25 +41,6 @@ A JSON object describing the connectors and their settings.
4141
"actionTypeId": ".servicenow",
4242
"name": "ServiceNow",
4343
"config": {
44-
"casesConfiguration": {
45-
"mapping": [
46-
{
47-
"actionType": "overwrite",
48-
"source": "title",
49-
"target": "short_description"
50-
},
51-
{
52-
"actionType": "append",
53-
"source": "description",
54-
"target": "description"
55-
},
56-
{
57-
"actionType": "append",
58-
"source": "comments",
59-
"target": "comments"
60-
}
61-
]
62-
},
6344
"apiUrl": "https://dev78437.service-now.com"
6445
},
6546
"referencedByCount": 0
@@ -70,25 +51,6 @@ A JSON object describing the connectors and their settings.
7051
"name": "Defector",
7152
"config": {
7253
"apiUrl": "https://dev87359.service-now.com",
73-
"casesConfiguration": {
74-
"mapping": [
75-
{
76-
"source": "title",
77-
"target": "short_description",
78-
"actionType": "append"
79-
},
80-
{
81-
"source": "description",
82-
"target": "description",
83-
"actionType": "append"
84-
},
85-
{
86-
"source": "comments",
87-
"target": "comments",
88-
"actionType": "append"
89-
}
90-
]
91-
}
9254
},
9355
"referencedByCount": 0
9456
}

docs/cases/api/cases-api/cases-api-get-case-activity.asciidoc

+37-18
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ A JSON array containing all user activity for the specified case.
4141
"description",
4242
"status",
4343
"tags",
44-
"title"
44+
"title",
45+
"connector",
46+
"settings"
4547
],
4648
"action": "create",
4749
"action_at": "2020-04-02T15:25:19.088Z",
@@ -50,7 +52,7 @@ A JSON array containing all user activity for the specified case.
5052
"full_name": "Alan Hunley",
5153
"username": "ahunley"
5254
},
53-
"new_value": "{\"title\":\"This case will self-destruct in 5 seconds\",\"tags\":[\"phishing\",\"social engineering\"],\"description\":\"James Bond clicked on a highly suspicious email banner advertising cheap holidays for underpaid civil servants.\"}",
55+
"new_value": "{\"title\":\"This case will self-destruct in 5 seconds\",\"tags\":[\"phishing\",\"social engineering\"],\"description\":\"James Bond clicked on a highly suspicious email banner advertising cheap holidays for underpaid civil servants.\"},\"connector\":{\"id\":\"none\",\"name\":\"none\",\"type\":\".none\",\"fields\":null},\"settings\":{\"syncAlerts\":true}",
5456
"old_value": null,
5557
"action_id": "29ce6370-74f6-11ea-b83a-553aecdb28b6",
5658
"case_id": "293f1bc0-74f6-11ea-b83a-553aecdb28b6",
@@ -108,21 +110,38 @@ A JSON array containing all user activity for the specified case.
108110
"comment_id": "21a844e0-750a-11ea-b83a-553aecdb28b6"
109111
},
110112
{
111-
"action_field":[
112-
"connector"
113-
],
114-
"action":"update",
115-
"action_at":"2020-10-12T16:03:34.940Z",
116-
"action_by":{
117-
"email":"[email protected]",
118-
"full_name":"Christos Nasikas",
119-
"username":"cnasikas"
120-
},
121-
"new_value":"{\"id\":\"18bc18cf-bd5d-4c88-bcdd-c7bb52a692cd\",\"name\":\"Resilient\",\"type\":\".resilient\",\"fields\":{\"incidentTypes\":[\"1001\"],\"severityCode\":\"5\"}}",
122-
"old_value":"{\"id\":\"72b9fa3a-b081-487d-9358-61d5da2968c1\",\"name\":\"Jira\",\"type\":\".jira\",\"fields\":{\"issueType\":\"10006\",\"parent\":null,\"priority\":\"Medium\"}}",
123-
"action_id":"7c326760-0ca4-11eb-8a58-a3c589db8483",
124-
"case_id":"7498ae50-0c8c-11eb-aefc-797bf7d42db4",
125-
"comment_id":null
126-
}
113+
"action_field":[
114+
"connector"
115+
],
116+
"action":"update",
117+
"action_at":"2020-10-12T16:03:34.940Z",
118+
"action_by":{
119+
"email":"[email protected]",
120+
"full_name":"Classified",
121+
"username":"M"
122+
},
123+
"new_value":"{\"id\":\"18bc18cf-bd5d-4c88-bcdd-c7bb52a692cd\",\"name\":\"Resilient\",\"type\":\".resilient\",\"fields\":{\"incidentTypes\":[\"1001\"],\"severityCode\":\"5\"}}",
124+
"old_value":"{\"id\":\"72b9fa3a-b081-487d-9358-61d5da2968c1\",\"name\":\"Jira\",\"type\":\".jira\",\"fields\":{\"issueType\":\"10006\",\"parent\":null,\"priority\":\"Medium\"}}",
125+
"action_id":"7c326760-0ca4-11eb-8a58-a3c589db8483",
126+
"case_id":"7498ae50-0c8c-11eb-aefc-797bf7d42db4",
127+
"comment_id":null
128+
},
129+
{
130+
"action_field":[
131+
"settings"
132+
],
133+
"action":"update",
134+
"action_at":"2020-10-12T16:03:34.940Z",
135+
"action_by":{
136+
"email":"[email protected]",
137+
"full_name":"Classified",
138+
"username":"M"
139+
},
140+
"new_value":"{\"syncAlerts\":false}",
141+
"old_value":"{\"syncAlerts\":true}",
142+
"action_id":"6c326760-0ca4-21eb-8a58-a3c589db8483",
143+
"case_id":"4498ae50-0c8c-11eb-eefc-797bf7d42db4",
144+
"comment_id":null
145+
}
127146
]
128147
--------------------------------------------------

0 commit comments

Comments
 (0)