[DOCS][OAS] Add cases to Kibana API bundle (#189020)

This commit is contained in:
Lisa Cawley 2024-07-30 07:48:04 -07:00 committed by GitHub
parent 2ed5fd9ade
commit d86e139343
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
124 changed files with 6083 additions and 6795 deletions

View file

@ -16,12 +16,12 @@
.PHONY: api-docs
api-docs: ## Generate kibana.serverless.yaml and kibana.yaml
@npx @redocly/cli join "kibana.info.serverless.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis_serverless.yaml" "../packages/core/saved-objects/docs/openapi/bundled_serverless.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" -o "output/kibana.serverless.yaml" "bundle.serverless.json" --prefix-components-with-info-prop title
@npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title
@npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title
.PHONY: api-docs-stateful
api-docs-stateful: ## Generate only kibana.yaml
@npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title
# Temporarily omit "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" and "../x-pack/plugins/cases/docs/openapi/bundled.yaml" due to OAS version
@npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title
# Temporarily omit "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" due to OAS version
# Temporarily omit "../x-pack/plugins/fleet/common/openapi/bundled.yaml" due to internals tag and tag sorting
.PHONY: api-docs-serverless

File diff suppressed because it is too large Load diff

View file

@ -13,22 +13,11 @@ A guide about the openApi specification can be found at [https://swagger.io/docs
## Tools
It is possible to validate the docs before bundling them with the following
command in the `x-pack/plugins/cases/docs/openapi/` folder:
```bash
npx swagger-cli validate entrypoint.yaml
```
Then you can generate the `bundled` files by running the following commands:
Generate the `bundled` files by running the following commands:
```bash
npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml
npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json
```
After generating the json bundle ensure that it is also valid by running the following command:
```bash
npx @redocly/cli lint bundled.json
```
Then join these files with the rest of the Kibana APIs per `oas_docs/README.md`

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4,5 +4,4 @@ description: An identifier for the alert.
required: true
schema:
type: string
examples:
- 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540
example: 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540

View file

@ -4,5 +4,4 @@ description: The identifier for the case. To retrieve case IDs, use the find cas
required: true
schema:
type: string
examples:
- 9c235210-6834-11ea-a78c-6ffb38a34414
example: 9c235210-6834-11ea-a78c-6ffb38a34414

View file

@ -4,9 +4,8 @@ description: Filters the returned cases by category.
schema:
oneOf:
- type: string
example: my-category
- type: array
items:
type: string
maxItems: 100
examples:
- [ my-category ]
maxItems: 100

View file

@ -6,5 +6,4 @@ description: >
required: true
schema:
type: string
examples:
- '71ec1870-725b-11ea-a0b2-c51ea50a58e2'
example: '71ec1870-725b-11ea-a0b2-c51ea50a58e2'

View file

@ -4,5 +4,4 @@ description: An identifier for the configuration.
required: true
schema:
type: string
examples:
- 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9
example: 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9

View file

@ -4,5 +4,4 @@ description: An identifier for the connector. To retrieve connector IDs, use the
required: true
schema:
type: string
examples:
- abed3a70-71bd-11ea-a0b2-c51ea50a58e2
example: abed3a70-71bd-11ea-a0b2-c51ea50a58e2

View file

@ -4,5 +4,4 @@ description: he default operator to use for the simple_query_string.
schema:
type: string
default: OR
examples:
- OR
example: OR

View file

@ -5,5 +5,4 @@ description: >
The date must be specified as a KQL data range or date match expression.
schema:
type: string
examples:
- now-1d
example: now-1d

View file

@ -10,5 +10,4 @@ schema:
type: string
minItems: 1
maxItems: 100
examples:
- [ d4e7abb0-b462-11ec-9a8d-698504725a43 ]
example: d4e7abb0-b462-11ec-9a8d-698504725a43

View file

@ -10,5 +10,4 @@ schema:
- type: array
items:
$ref: '../schemas/owners.yaml'
examples:
- [ cases ]
example: cases

View file

@ -5,5 +5,3 @@ required: false
schema:
type: integer
default: 1
examples:
- 1

View file

@ -8,5 +8,4 @@ schema:
items:
type: string
maxItems: 100
examples:
- [ elastic ]
example: elastic

View file

@ -12,5 +12,4 @@ schema:
- status
- severity
default: createdAt
examples:
- updatedAt
example: updatedAt

View file

@ -4,5 +4,4 @@ description: An identifier for the space. If `/s/` and the identifier are omitte
required: true
schema:
type: string
examples:
- default
example: default

View file

@ -7,5 +7,4 @@ schema:
- closed
- in-progress
- open
examples:
- open
example: open

View file

@ -8,5 +8,4 @@ schema:
items:
type: string
maxItems: 100
examples:
- [ tag-1 ]
example: tag-1

View file

@ -5,5 +5,4 @@ description: >
The date must be specified as a KQL data range or date match expression.
schema:
type: string
examples:
- now+1d
example: now+1d

View file

@ -21,5 +21,4 @@ schema:
- tags
- title
- user
examples:
- [ create_case ]
example: create_case

View file

@ -3,11 +3,9 @@ title: Unsuccessful cases API response
properties:
error:
type: string
examples:
- Unauthorized
example: Unauthorized
message:
type: string
statusCode:
type: integer
examples:
- 401
example: 401

View file

@ -13,5 +13,4 @@ enum:
- status
- settings
- severity
examples:
- create_case
example: create_case

View file

@ -5,5 +5,4 @@ enum:
- delete
- push_to_service
- update
examples:
- create
example: create

View file

@ -19,7 +19,6 @@ properties:
type:
description: The type of comment.
type: string
examples:
- alert
example: alert
enum:
- alert

View file

@ -6,15 +6,13 @@ properties:
description: The new comment. It is required only when `type` is `user`.
type: string
maxLength: 30000
examples:
- A new comment.
example: A new comment.
owner:
$ref: 'owners.yaml'
type:
type: string
description: The type of comment.
examples:
- user
example: user
enum:
- user
required:

View file

@ -7,13 +7,11 @@ properties:
type: array
items:
type: string
examples:
- a6e12ac4-7bce-457b-84f6-d7ce8deb8446
example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446
created_at:
type: string
format: date-time
examples:
- 2023-11-06T19:29:38.424Z
example: 2023-11-06T19:29:38.424Z
created_by:
type: object
required:
@ -24,52 +22,44 @@ properties:
$ref: 'user_properties.yaml'
id:
type: string
examples:
- 73362370-ab1a-11ec-985f-97e55adae8b9
example: 73362370-ab1a-11ec-985f-97e55adae8b9
index:
type: array
items:
type: string
examples:
- .internal.alerts-security.alerts-default-000001
example: .internal.alerts-security.alerts-default-000001
owner:
$ref: 'owners.yaml'
pushed_at:
type:
- "string"
- "null"
type: string
format: date-time
examples:
- null
example: null
nullable: true
pushed_by:
type:
- "object"
- "null"
type: object
required:
- email
- full_name
- username
properties:
$ref: 'user_properties.yaml'
nullable: true
rule:
type: object
properties:
$ref: 'rule_properties.yaml'
type:
type: string
examples:
- alert
example: alert
enum:
- alert
updated_at:
type:
- "string"
- "null"
type: string
format: date-time
nullable: true
updated_by:
type:
- "object"
- "null"
type: object
nullable: true
required:
- email
- full_name
@ -78,5 +68,4 @@ properties:
$ref: 'user_properties.yaml'
version:
type: string
examples:
- WzMwNDgsMV0=
example: WzMwNDgsMV0=

View file

@ -13,5 +13,4 @@ oneOf:
type: string
maxItems: 1000
x-technical-preview: true
examples:
- 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42
example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42

View file

@ -1,8 +1,7 @@
type:
- "array"
- "null"
type: array
description: An array containing users that are assigned to the case.
maxItems: 10
nullable: true
items:
type: object
required:
@ -11,5 +10,4 @@ items:
uid:
type: string
description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
examples:
- u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0

View file

@ -1,17 +1,14 @@
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`.
type:
- "object"
- "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
examples:
- none
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
examples:
- none
example: none
type:
$ref: 'connector_types.yaml'

View file

@ -7,8 +7,7 @@ connector:
created_at:
type: string
format: date-time
examples:
- 2022-06-01T17:07:17.767Z
example: 2022-06-01T17:07:17.767Z
created_by:
type: object
required:
@ -25,15 +24,12 @@ customFields:
properties:
$ref: 'case_configure_customfields.yaml'
error:
type:
- 'string'
- 'null'
examples:
- null
type: string
nullable: true
example: null
id:
type: string
examples:
- 4a97a440-e1cd-11ec-be9b-9b1838238ee6
example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6
mappings:
type: array
items:
@ -41,38 +37,31 @@ mappings:
properties:
action_type:
type: string
examples:
- overwrite
example: overwrite
source:
type: string
examples:
- title
example: title
target:
type: string
examples:
- summary
example: summary
owner:
$ref: 'owners.yaml'
templates:
$ref: 'templates.yaml'
updated_at:
type:
- 'string'
- 'null'
type: string
format: date-time
examples:
- 2022-06-01T19:58:48.169Z
nullable: true
example: 2022-06-01T19:58:48.169Z
updated_by:
type:
- 'object'
- 'null'
type: object
required:
- email
- full_name
- username
properties:
$ref: 'user_properties.yaml'
nullable: true
version:
type: string
examples:
- WzIwNzMsMV0=
example: WzIwNzMsMV0=

View file

@ -18,9 +18,8 @@ value:
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"
- "null"
- type: string
minLength: 1
maxLength: 160
nullable: true
- type: boolean

View file

@ -1,7 +1,6 @@
title: Case response properties for closed_by
type:
- "object"
- "null"
type: object
nullable: true
properties:
$ref: 'user_properties.yaml'
required:

View file

@ -1,8 +1,7 @@
title: Case response properties for connector fields
type:
- "object"
- "null"
type: object
description: An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.
nullable: true
properties:
caseId:
description: The case identifier for Swimlane connectors.
@ -12,9 +11,8 @@ properties:
type: string
destIp:
description: Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors.
type:
- "boolean"
- "null"
type: boolean
nullable: true
impact:
description: The effect an incident had on business for ServiceNow ITSM connectors.
type: string
@ -28,14 +26,12 @@ properties:
type: string
malwareHash:
description: Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors.
type:
- "boolean"
- "null"
type: boolean
nullable: true
malwareUrl:
description: Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors.
type:
- "boolean"
- "null"
type: boolean
nullable: true
parent:
description: The key of the parent issue, when the issue type is sub-task for Jira connectors.
type: string

View file

@ -26,15 +26,13 @@ properties:
assignees:
$ref: 'assignees.yaml'
category:
type:
- 'string'
- 'null'
type: string
description: The case category.
nullable: true
closed_at:
type:
- 'string'
- 'null'
type: string
format: date-time
nullable: true
closed_by:
$ref: 'case_response_closed_by_properties.yaml'
comments:
@ -74,8 +72,7 @@ properties:
created_at:
type: string
format: date-time
examples:
- '2022-05-13T09:16:17.416Z'
example: '2022-05-13T09:16:17.416Z'
created_by:
$ref: 'case_response_created_by_properties.yaml'
customFields:
@ -87,25 +84,21 @@ properties:
$ref: 'case_customfields.yaml'
description:
type: string
examples:
- A case description.
example: A case description.
duration:
type:
- 'integer'
- 'null'
type: integer
description: >
The elapsed time from the creation of the case to its closure (in seconds).
If the case has not been closed, the duration is set to null. If the case
was closed after less than half a second, the duration is rounded down to
zero.
examples:
- 120
nullable: true
example: 120
external_service:
$ref: 'external_service.yaml'
id:
type: string
examples:
- 66b9aa00-94fa-11ea-9f74-e7e108796192
example: 66b9aa00-94fa-11ea-9f74-e7e108796192
owner:
$ref: 'owners.yaml'
settings:
@ -118,28 +111,23 @@ properties:
type: array
items:
type: string
examples:
- [tag-1]
example:
- tag-1
title:
type: string
examples:
- Case title 1
example: Case title 1
totalAlerts:
type: integer
examples:
- 0
example: 0
totalComment:
type: integer
examples:
- 0
example: 0
updated_at:
type:
- 'string'
- 'null'
type: string
format: date-time
nullable: true
updated_by:
$ref: 'case_response_updated_by_properties.yaml'
version:
type: string
examples:
- WzUzMiwxXQ==
example: WzUzMiwxXQ==

View file

@ -1,7 +1,6 @@
title: Case response properties for pushed_by
type:
- "object"
- "null"
type: object
nullable: true
properties:
$ref: 'user_properties.yaml'
required:

View file

@ -1,7 +1,6 @@
title: Case response properties for updated_by
type:
- "object"
- "null"
type: object
nullable: true
properties:
$ref: 'user_properties.yaml'
required:

View file

@ -3,5 +3,4 @@ description: Indicates whether a case is automatically closed when it is pushed
enum:
- close-by-pushing
- close-by-user
examples:
- close-by-user
example: close-by-user

View file

@ -3,5 +3,4 @@ description: The type of comment.
enum:
- alert
- user
examples:
- user
example: user

View file

@ -1,11 +1,7 @@
fields:
description: >
An object containing the connector fields.
To create a case without a connector, specify null.
If you want to omit any individual field, specify null as its value.
type:
- "object"
- "null"
description: An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.
nullable: true
type: object
properties:
caseId:
description: The case identifier for Swimlane connectors.
@ -15,9 +11,8 @@ fields:
type: string
destIp:
description: Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors.
type:
- "boolean"
- "null"
type: boolean
nullable: true
impact:
description: The effect an incident had on business for ServiceNow ITSM connectors.
type: string
@ -31,14 +26,12 @@ fields:
type: string
malwareHash:
description: Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors.
type:
- "boolean"
- "null"
type: boolean
nullable: true
malwareUrl:
description: Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors.
type:
- "boolean"
- "null"
type: boolean
nullable: true
parent:
description: The key of the parent issue, when the issue type is sub-task for Jira connectors.
type: string
@ -53,26 +46,22 @@ fields:
type: string
sourceIp:
description: Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors.
type:
- "boolean"
- "null"
type: boolean
nullable: true
subcategory:
description: The subcategory of the incident for ServiceNow ITSM connectors.
type: string
urgency:
description: The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors.
type: string
examples:
- null
example: null
id:
description: The identifier for the connector. To create a case without a connector, use `none`.
type: string
examples:
- none
example: none
name:
description: The name of the connector. To create a case without a connector, use `none`.
type: string
examples:
- none
example: none
type:
$ref: 'connector_types.yaml'

View file

@ -8,11 +8,9 @@ description: Defines properties for connectors when type is `.cases-webhook`.
type: object
properties:
fields:
type:
- "string"
- "null"
examples:
- null
type: string
nullable: true
example: null
id:
description: The identifier for the connector. To retrieve connector IDs, use the find connectors API.
type: string
@ -22,7 +20,6 @@ properties:
type:
description: The type of connector.
type: string
examples:
- .cases-webhook
example: .cases-webhook
enum:
- .cases-webhook

View file

@ -17,19 +17,16 @@ properties:
properties:
issueType:
description: The type of issue.
type:
- "string"
- "null"
type: string
nullable: true
parent:
description: The key of the parent issue, when the issue type is sub-task.
type:
- "string"
- "null"
type: string
nullable: true
priority:
description: The priority of the issue.
type:
- "string"
- "null"
type: string
nullable: true
id:
description: The identifier for the connector. To retrieve connector IDs, use the find connectors API.
type: string
@ -39,7 +36,6 @@ properties:
type:
description: The type of connector.
type: string
examples:
- .jira
example: .jira
enum:
- .jira

View file

@ -9,25 +9,20 @@ type: object
properties:
fields:
description: An object containing the connector fields. To create a case without a connector, specify null. To update a case to remove the connector, specify null.
type:
- "string"
- "null"
examples:
- null
nullable: true
type: string
example: null
id:
description: The identifier for the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`.
type: string
examples:
- none
example: none
name:
description: The name of the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`.
type: string
examples:
- none
example: none
type:
description: The type of connector. To create a case without a connector, use `.none`. To update a case to remove the connector, specify `.none`.
type: string
examples:
- .none
example: .none
enum:
- .none

View file

@ -9,9 +9,8 @@ type: object
properties:
fields:
description: An object containing the connector fields. If you want to omit any individual field, specify null as its value.
type:
- "object"
- "null"
type: object
nullable: true
required:
- issueTypes
- severityCode
@ -33,7 +32,6 @@ properties:
type:
description: The type of connector.
type: string
examples:
- .resilient
example: .resilient
enum:
- .resilient

View file

@ -19,29 +19,24 @@ properties:
properties:
category:
description: The category of the incident.
type:
- "string"
- "null"
type: string
nullable: true
impact:
description: The effect an incident had on business.
type:
- "string"
- "null"
type: string
nullable: true
severity:
description: The severity of the incident.
type:
- "string"
- "null"
type: string
nullable: true
subcategory:
description: The subcategory of the incident.
type:
- "string"
- "null"
type: string
nullable: true
urgency:
description: The extent to which the incident resolution can be delayed.
type:
- "string"
- "null"
type: string
nullable: true
id:
description: The identifier for the connector. To retrieve connector IDs, use the find connectors API.
type: string
@ -51,7 +46,6 @@ properties:
type:
description: The type of connector.
type: string
examples:
- .servicenow
example: .servicenow
enum:
- .servicenow

View file

@ -21,39 +21,32 @@ properties:
properties:
category:
description: The category of the incident.
type:
- "string"
- "null"
type: string
nullable: true
destIp:
description: Indicates whether cases will send a comma-separated list of destination IPs.
type:
- "boolean"
- "null"
type: boolean
nullable: true
malwareHash:
description: Indicates whether cases will send a comma-separated list of malware hashes.
type:
- "boolean"
- "null"
type: boolean
nullable: true
malwareUrl:
description: Indicates whether cases will send a comma-separated list of malware URLs.
type:
- "boolean"
- "null"
type: boolean
nullable: true
priority:
description: The priority of the issue.
type:
- "string"
- "null"
type: string
nullable: true
sourceIp:
description: Indicates whether cases will send a comma-separated list of source IPs.
type:
- "boolean"
- "null"
type: boolean
nullable: true
subcategory:
description: The subcategory of the incident.
type:
- "string"
- "null"
type: string
nullable: true
id:
description: The identifier for the connector. To retrieve connector IDs, use the find connectors API.
type: string
@ -63,7 +56,6 @@ properties:
type:
description: The type of connector.
type: string
examples:
- .servicenow-sir
example: .servicenow-sir
enum:
- .servicenow-sir

View file

@ -15,9 +15,8 @@ properties:
properties:
caseId:
description: The case identifier for Swimlane connectors.
type:
- "string"
- "null"
type: string
nullable: true
id:
description: The identifier for the connector. To retrieve connector IDs, use the find connectors API.
type: string
@ -27,7 +26,6 @@ properties:
type:
description: The type of connector.
type: string
examples:
- .swimlane
example: .swimlane
enum:
- .swimlane

View file

@ -8,5 +8,4 @@ enum:
- .servicenow
- .servicenow-sir
- .swimlane
examples:
- .none
example: .none

View file

@ -1,6 +1,5 @@
type:
- "object"
- "null"
type: object
nullable: true
properties:
connector_id:
type: string
@ -16,8 +15,7 @@ properties:
type: string
format: date-time
pushed_by:
type:
- "object"
- "null"
type: object
properties:
$ref: 'user_properties.yaml'
$ref: 'user_properties.yaml'
nullable: true

View file

@ -6,5 +6,4 @@ enum:
- cases
- observability
- securitySolution
examples:
- cases
example: cases

View file

@ -6,16 +6,14 @@ properties:
alertId:
oneOf:
- type: string
examples:
- 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d
example: 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d
- type: array
items:
type: string
index:
oneOf:
- type: string
examples:
- .alerts-observability.logs.alerts-default
example: .alerts-observability.logs.alerts-default
- type: array
items:
type: string

View file

@ -20,7 +20,6 @@ properties:
type: array
items:
type: string
examples:
- ["tag-1"]
example: ["tag-1"]
title:
type: string

View file

@ -1,4 +1,3 @@
type:
- "object"
- "null"
description: If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable.
type: object
description: If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable.
nullable: true

View file

@ -4,5 +4,4 @@ properties:
type: array
items:
type: string
examples:
- ["tag-1"]
example: ["tag-1"]

View file

@ -10,10 +10,8 @@ properties:
id:
description: The rule identifier.
type: string
examples:
- 94d80550-aaf4-11ec-985f-97e55adae8b9
example: 94d80550-aaf4-11ec-985f-97e55adae8b9
name:
description: The rule name.
type: string
examples:
- security_rule
example: security_rule

View file

@ -1,10 +1,8 @@
id:
description: The rule identifier.
type: string
examples:
- 94d80550-aaf4-11ec-985f-97e55adae8b9
example: 94d80550-aaf4-11ec-985f-97e55adae8b9
name:
description: The rule name.
type: string
examples:
- security_rule
example: security_rule

View file

@ -6,5 +6,4 @@ properties:
syncAlerts:
description: Turns alert syncing on or off.
type: boolean
examples:
- true
example: true

View file

@ -17,8 +17,7 @@ properties:
description: >
The identifier for the comment. To retrieve comment IDs, use the
get comments API.
examples:
- 8af6ac20-74f6-11ea-b83a-553aecdb28b6
example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6
index:
$ref: 'alert_indices.yaml'
owner:
@ -30,12 +29,10 @@ properties:
type: string
enum:
- alert
examples:
- alert
example: alert
version:
description: >
The current comment version. To retrieve version values, use the get
comments API.
type: string
examples:
- Wzk1LDFd
example: Wzk1LDFd

View file

@ -36,5 +36,4 @@ properties:
The version of the connector.
To retrieve the version value, use the get configuration API.
type: string
examples:
- WzIwMiwxXQ==
example: WzIwMiwxXQ==

View file

@ -6,15 +6,13 @@ properties:
description: The new comment. It is required only when `type` is `user`.
type: string
maxLength: 30000
examples:
- A new comment.
example: A new comment.
id:
type: string
description: >
The identifier for the comment. To retrieve comment IDs, use the
get comments API.
examples:
- 8af6ac20-74f6-11ea-b83a-553aecdb28b6
example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6
owner:
$ref: 'owners.yaml'
type:
@ -22,15 +20,13 @@ properties:
description: The type of comment.
enum:
- user
examples:
- user
example: user
version:
description: >
The current comment version. To retrieve version values, use the get
comments API.
type: string
examples:
- Wzk1LDFd
example: Wzk1LDFd
required:
- comment
- id

View file

@ -13,16 +13,13 @@ properties:
action:
$ref: 'actions.yaml'
comment_id:
type:
- "string"
- "null"
examples:
- 578608d0-03b1-11ed-920c-974bfa104448
type: string
nullable: true
example: 578608d0-03b1-11ed-920c-974bfa104448
created_at:
type: string
format: date-time
examples:
- 2022-05-13T09:16:17.416Z
example: 2022-05-13T09:16:17.416Z
created_by:
type: object
properties:
@ -33,8 +30,7 @@ properties:
- username
id:
type: string
examples:
- 22fd3e30-03b1-11ed-920c-974bfa104448
example: 22fd3e30-03b1-11ed-920c-974bfa104448
owner:
$ref: 'owners.yaml'
payload:
@ -54,8 +50,7 @@ properties:
- $ref: 'payload_user_comment.yaml'
version:
type: string
examples:
- WzM1ODg4LDFd
example: WzM1ODg4LDFd
type:
type: string
description: The type of action.
@ -71,5 +66,4 @@ properties:
- status
- settings
- severity
examples:
- create_case
example: create_case

View file

@ -14,23 +14,18 @@ properties:
$ref: 'actions.yaml'
action_id:
type: string
examples:
- 22fd3e30-03b1-11ed-920c-974bfa104448
example: 22fd3e30-03b1-11ed-920c-974bfa104448
case_id:
type: string
examples:
- 22df07d0-03b1-11ed-920c-974bfa104448
example: 22df07d0-03b1-11ed-920c-974bfa104448
comment_id:
type:
- "string"
- "null"
examples:
- 578608d0-03b1-11ed-920c-974bfa104448
type: string
nullable: true
example: 578608d0-03b1-11ed-920c-974bfa104448
created_at:
type: string
format: date-time
examples:
- 2022-05-13T09:16:17.416Z
example: 2022-05-13T09:16:17.416Z
created_by:
type: object
properties:

View file

@ -5,46 +5,37 @@ required:
properties:
comment:
type: string
examples:
- A new comment.
example: A new comment.
created_at:
type: string
format: date-time
examples:
- 2022-05-13T09:16:17.416Z
example: 2022-05-13T09:16:17.416Z
created_by:
$ref: 'case_response_created_by_properties.yaml'
id:
type: string
examples:
- 8af6ac20-74f6-11ea-b83a-553aecdb28b6
example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6
owner:
$ref: 'owners.yaml'
pushed_at:
type:
- "string"
- "null"
type: string
format: date-time
examples:
- null
nullable: true
example: null
pushed_by:
$ref: 'case_response_pushed_by_properties.yaml'
type:
type: string
examples:
- user
example: user
enum:
- user
updated_at:
type:
- "string"
- "null"
type: string
format: date-time
examples:
- null
nullable: true
example: null
updated_by:
$ref: 'case_response_updated_by_properties.yaml'
version:
type: string
examples:
- WzIwNDMxLDFd
example: WzIwNDMxLDFd

View file

@ -1,22 +1,15 @@
email:
type:
- "string"
- "null"
examples:
- null
type: string
example: null
nullable: true
full_name:
type:
- "string"
- "null"
examples:
- null
type: string
example: null
nullable: true
username:
type: string
example: elastic
nullable: true
profile_uid:
type: string
examples:
- u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0
username:
type:
- "string"
- "null"
examples:
- elastic
example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0

View file

@ -1,8 +1,8 @@
openapi: 3.1.0
openapi: 3.0.1
info:
title: Cases
description: OpenAPI schema for Cases endpoints
version: '0.2'
version: '0.1'
contact:
name: Cases Team
license:
@ -37,6 +37,8 @@ paths:
$ref: 'paths/api@cases@{caseid}@alerts.yaml'
'/api/cases/{caseId}/comments':
$ref: 'paths/api@cases@{caseid}@comments.yaml'
'/api/cases/{caseId}/comments/_find':
$ref: 'paths/api@cases@{caseid}@comments@_find.yaml'
'/api/cases/{caseId}/comments/{commentId}':
$ref: 'paths/api@cases@{caseid}@comments@{commentid}.yaml'
'/api/cases/{caseId}/connector/{connectorId}/_push':
@ -48,50 +50,50 @@ paths:
'/api/cases/configure/connectors/_find':
$ref: paths/api@cases@configure@connectors@_find.yaml
# Paths with space identifiers
'/s/{spaceId}/api/cases':
$ref: 'paths/s@{spaceid}@api@cases.yaml'
'/s/{spaceId}/api/cases/_find':
$ref: 'paths/s@{spaceid}@api@cases@_find.yaml'
'/s/{spaceId}/api/cases/alerts/{alertId}':
$ref: 'paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml'
'/s/{spaceId}/api/cases/configure':
$ref: paths/s@{spaceid}@api@cases@configure.yaml
'/s/{spaceId}/api/cases/configure/{configurationId}':
$ref: paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml
'/s/{spaceId}/api/cases/configure/connectors/_find':
$ref: paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml
'/s/{spaceId}/api/cases/reporters':
$ref: 'paths/s@{spaceid}@api@cases@reporters.yaml'
'/s/{spaceId}/api/cases/status':
$ref: 'paths/s@{spaceid}@api@cases@status.yaml'
'/s/{spaceId}/api/cases/tags':
$ref: 'paths/s@{spaceid}@api@cases@tags.yaml'
'/s/{spaceId}/api/cases/{caseId}':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}.yaml'
'/s/{spaceId}/api/cases/{caseId}/alerts':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml'
'/s/{spaceId}/api/cases/{caseId}/comments':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments.yaml'
'/s/{spaceId}/api/cases/{caseId}/comments/_find':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml'
'/s/{spaceId}/api/cases/{caseId}/comments/{commentId}':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml'
'/s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml'
'/s/{spaceId}/api/cases/{caseId}/user_actions':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml'
'/s/{spaceId}/api/cases/{caseId}/user_actions/_find':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml'
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
apiKeyAuth:
type: apiKey
in: header
name: Authorization
description: 'e.g. Authorization: ApiKey base64AccessApiKey'
security:
- basicAuth: []
- apiKeyAuth: []
# '/s/{spaceId}/api/cases':
# $ref: 'paths/s@{spaceid}@api@cases.yaml'
# '/s/{spaceId}/api/cases/_find':
# $ref: 'paths/s@{spaceid}@api@cases@_find.yaml'
# '/s/{spaceId}/api/cases/alerts/{alertId}':
# $ref: 'paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml'
# '/s/{spaceId}/api/cases/configure':
# $ref: paths/s@{spaceid}@api@cases@configure.yaml
# '/s/{spaceId}/api/cases/configure/{configurationId}':
# $ref: paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml
# '/s/{spaceId}/api/cases/configure/connectors/_find':
# $ref: paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml
# '/s/{spaceId}/api/cases/reporters':
# $ref: 'paths/s@{spaceid}@api@cases@reporters.yaml'
# '/s/{spaceId}/api/cases/status':
# $ref: 'paths/s@{spaceid}@api@cases@status.yaml'
# '/s/{spaceId}/api/cases/tags':
# $ref: 'paths/s@{spaceid}@api@cases@tags.yaml'
# '/s/{spaceId}/api/cases/{caseId}':
# $ref: 'paths/s@{spaceid}@api@cases@{caseid}.yaml'
# '/s/{spaceId}/api/cases/{caseId}/alerts':
# $ref: 'paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml'
# '/s/{spaceId}/api/cases/{caseId}/comments':
# $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments.yaml'
# '/s/{spaceId}/api/cases/{caseId}/comments/_find':
# $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml'
# '/s/{spaceId}/api/cases/{caseId}/comments/{commentId}':
# $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml'
# '/s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push':
# $ref: 'paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml'
# '/s/{spaceId}/api/cases/{caseId}/user_actions':
# $ref: 'paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml'
# '/s/{spaceId}/api/cases/{caseId}/user_actions/_find':
# $ref: 'paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml'
# components:
# securitySchemes:
# basicAuth:
# type: http
# scheme: basic
# apiKeyAuth:
# type: apiKey
# in: header
# name: Authorization
# description: 'e.g. Authorization: ApiKey base64AccessApiKey'
# security:
# - basicAuth: []
# - apiKeyAuth: []

View file

@ -1,5 +1,5 @@
post:
summary: Creates a case in the default space.
summary: Create a case
operationId: createCaseDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
@ -36,7 +36,7 @@ post:
$ref: '../components/schemas/4xx_response.yaml'
delete:
summary: Deletes one or more cases in the default space.
summary: Delete cases
operationId: deleteCaseDefaultSpace
description: >
You must have `read` or `all` privileges and the `delete` sub-feature
@ -59,7 +59,7 @@ delete:
$ref: '../components/schemas/4xx_response.yaml'
patch:
summary: Updates one or more cases in the default space.
summary: Update cases
operationId: updateCaseDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the

View file

@ -1,5 +1,5 @@
get:
summary: Retrieves a paginated subset of cases in the default space.
summary: Search cases
operationId: findCasesDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the

View file

@ -1,5 +1,5 @@
get:
summary: Returns the cases associated with a specific alert in the default space.
summary: Get cases for an alert
operationId: getCasesByAlertDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
@ -28,7 +28,7 @@ get:
title:
type: string
description: The case title.
examples:
example:
- id: 06116b80-e1c3-11ec-be9b-9b1838238ee6
title: security_case
'401':

View file

@ -1,8 +1,8 @@
get:
summary: Get case settings in the default space
summary: Get case settings
operationId: getCaseConfigurationDefaultSpace
description: >
Retrieves setting details such as the closure type, custom fields, templatse, and the default connector for cases in the default space.
Get setting details such as the closure type, custom fields, templatse, and the default connector for cases.
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on where the cases were created.
@ -32,7 +32,7 @@ get:
$ref: '../components/schemas/4xx_response.yaml'
post:
summary: Add case settings in the default space
summary: Add case settings
operationId: setCaseConfigurationDefaultSpace
description: >
Case settings include external connection details, custom fields, and templates.

View file

@ -1,8 +1,8 @@
get:
summary: Get case connectors in the default space
summary: Get case connectors
operationId: findCaseConnectorsDefaultSpace
description: >
Retrieves information about connectors that are supported for use in cases in the default space.
Get information about connectors that are supported for use in cases.
You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.
tags:
- cases

View file

@ -1,8 +1,8 @@
patch:
summary: Update case settings in the default space
summary: Update case settings
operationId: updateCaseConfigurationDefaultSpace
description: >
Updates setting details such as the closure type, custom fields, templates, and the default connector for cases in the default space.
Updates setting details such as the closure type, custom fields, templates, and the default connector for cases.
Connectors are used to interface with external systems.
You must create a connector before you can use it in your cases.
You must have `all` privileges for the **Cases** feature in the

View file

@ -1,7 +1,8 @@
get:
summary: Returns information about the users who opened cases in the default space.
summary: Get case creators
operationId: getCaseReportersDefaultSpace
description: >
Returns information about the users who opened cases.
You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases.
The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address.
If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged.

View file

@ -1,11 +1,10 @@
get:
summary: Returns the number of cases that are open, closed, and in progress in the default space.
summary: Get case status summary
operationId: getCaseStatusDefaultSpace
description: >
Returns the number of cases that are open, closed, and in progress.
Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead.
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the cases you're seeking.
You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.
deprecated: true
tags:
- cases

View file

@ -1,7 +1,8 @@
get:
summary: Aggregates and returns a list of case tags in the default space.
summary: Get case tags
operationId: getCaseTagsDefaultSpace
description: >
Aggregates and returns a list of case tags.
You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.
tags:
- cases

View file

@ -1,5 +1,5 @@
get:
summary: Retrieves information about a case in the default space.
summary: Get case information
operationId: getCaseDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the

View file

@ -1,5 +1,5 @@
get:
summary: Gets all alerts attached to a case in the default space.
summary: Get all alerts for a case
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana

View file

@ -1,5 +1,5 @@
post:
summary: Adds a comment or alert to a case in the default space.
summary: Add a case comment or alert
operationId: addCaseCommentDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
@ -38,9 +38,10 @@ post:
$ref: '../components/schemas/4xx_response.yaml'
delete:
summary: Deletes all comments and alerts from a case in the default space.
summary: Delete all case comments and alerts
operationId: deleteCaseCommentsDefaultSpace
description: >
Deletes all comments and alerts from a case.
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 cases you're deleting.
@ -60,7 +61,7 @@ delete:
$ref: '../components/schemas/4xx_response.yaml'
patch:
summary: Updates a comment or alert in a case in the default space.
summary: Update a case comment or alert
operationId: updateCaseCommentDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
@ -99,7 +100,7 @@ patch:
$ref: '../components/schemas/4xx_response.yaml'
get:
summary: Retrieves all the comments from a case in the default space.
summary: Get all case comments
operationId: getAllCaseCommentsDefaultSpace
description: >
Deprecated in 8.1.0. This API is deprecated and will be removed in a future release;

View file

@ -1,10 +1,9 @@
get:
summary: Retrieves all the user comments from a case.
operationId: findCaseComments
summary: Find case comments and alerts
operationId: findCaseCommentsDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the **Management**,
**Observability**, or **Security** section of the Kibana feature privileges,
depending on the owner of the cases with the comments you're seeking.
Retrieves a paginated list of comments for a case.
You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.
tags:
- cases
parameters:
@ -12,7 +11,6 @@ get:
- $ref: '../components/parameters/page_index.yaml'
- $ref: '../components/parameters/page_size.yaml'
- $ref: '../components/parameters/sort_order.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.

View file

@ -1,5 +1,5 @@
delete:
summary: Deletes a comment or alert from a case in the default space.
summary: Delete a case comment or alert
operationId: deleteCaseCommentDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
@ -22,7 +22,7 @@ delete:
$ref: '../components/schemas/4xx_response.yaml'
get:
summary: Retrieves a comment from a case in the default space.
summary: Get a case comment or alert
operationId: getCaseCommentDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the **Management**,

View file

@ -1,5 +1,5 @@
post:
summary: Pushes a case in the default space to an external service.
summary: Push a case to an external service
description: >
You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.
You must also 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 you're pushing.
@ -14,9 +14,8 @@ post:
content:
application/json:
schema:
type:
- "object"
- "null"
type: object
nullable: true
responses:
'200':
description: Indicates a successful call.

View file

@ -1,6 +1,7 @@
get:
summary: Returns all user activity for a case in the default space.
summary: Get case activity
description: >
Returns all user activity for a case.
Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead.
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana

View file

@ -1,6 +1,7 @@
get:
summary: Finds user activity for a case in the default space.
summary: Find case activity
description: >
Retrives a paginated list of user activity for a case.
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the case you're seeking.

View file

@ -1,100 +0,0 @@
post:
summary: Creates a case.
operationId: createCase
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 you're creating.
tags:
- cases
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../components/schemas/create_case_request.yaml'
examples:
createCaseRequest:
$ref: '../components/examples/create_case_request.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '../components/schemas/case_response_properties.yaml'
examples:
createCaseResponse:
$ref: '../components/examples/create_case_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
delete:
summary: Deletes one or more cases.
operationId: deleteCase
description: >
You must have `read` or `all` privileges and the `delete` sub-feature
privilege for the **Cases** feature in the **Management**,
**Observability**, or **Security** section of the Kibana feature privileges,
depending on the owner of the cases you're deleting.
tags:
- cases
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/ids.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
patch:
summary: Updates one or more cases.
operationId: updateCase
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 you're updating.
tags:
- cases
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
requestBody:
content:
application/json:
schema:
$ref: '../components/schemas/update_case_request.yaml'
examples:
updateCaseRequest:
$ref: '../components/examples/update_case_request.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
$ref: '../components/schemas/case_response_properties.yaml'
examples:
updateCaseResponse:
$ref: '../components/examples/update_case_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,60 +0,0 @@
get:
summary: Retrieves a paginated subset of cases.
operationId: findCases
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the cases you're seeking.
tags:
- cases
parameters:
- $ref: '../components/parameters/space_id.yaml'
- $ref: '../components/parameters/assignees.yaml'
- $ref: '../components/parameters/category.yaml'
- $ref: '../components/parameters/defaultSearchOperator.yaml'
- $ref: '../components/parameters/from.yaml'
- $ref: '../components/parameters/owner.yaml'
- $ref: '../components/parameters/page_index.yaml'
- $ref: '../components/parameters/page_size.yaml'
- $ref: '../components/parameters/reporters.yaml'
- $ref: '../components/parameters/search.yaml'
- $ref: '../components/parameters/searchFields.yaml'
- $ref: '../components/parameters/severity.yaml'
- $ref: '../components/parameters/sortField.yaml'
- $ref: '../components/parameters/sort_order.yaml'
- $ref: '../components/parameters/status.yaml'
- $ref: '../components/parameters/tags.yaml'
- $ref: '../components/parameters/to.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: object
properties:
cases:
type: array
items:
$ref: '../components/schemas/case_response_properties.yaml'
count_closed_cases:
type: integer
count_in_progress_cases:
type: integer
count_open_cases:
type: integer
page:
type: integer
per_page:
type: integer
total:
type: integer
examples:
findCaseResponse:
$ref: '../components/examples/find_case_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,39 +0,0 @@
get:
summary: Returns the cases associated with a specific alert.
operationId: getCasesByAlert
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the cases you're seeking.
x-technical-preview: true
tags:
- cases
parameters:
- $ref: ../components/parameters/alert_id.yaml
- $ref: '../components/parameters/space_id.yaml'
- $ref: '../components/parameters/owner.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
description: The case identifier.
title:
type: string
description: The case title.
examples:
- id: 06116b80-e1c3-11ec-be9b-9b1838238ee6
title: security_case
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,75 +0,0 @@
get:
summary: Get case settings
operationId: getCaseConfiguration
description: >
Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases.
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on where the cases were created.
tags:
- cases
parameters:
- $ref: '../components/parameters/space_id.yaml'
- $ref: '../components/parameters/owner.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'
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'
post:
summary: Add case settings
operationId: setCaseConfiguration
description: >
Case settings include external connection details, custom fields, and templates.
Connectors are used to interface with external systems.
You must create a connector before you can use it in your cases.
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.
You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.
tags:
- cases
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
requestBody:
content:
application/json:
schema:
$ref: '../components/schemas/set_case_configuration_request.yaml'
examples:
setCaseConfigRequest:
$ref: '../components/examples/set_case_configuration_request.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: object
properties:
$ref: '../components/schemas/case_configure_response_properties.yaml'
examples:
setCaseConfigResponse:
$ref: '../components/examples/set_case_configuration_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,30 +0,0 @@
get:
summary: Get case connectors
operationId: findCaseConnectors
description: >
Retrieves information about connectors that are supported for use in cases.
You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.
tags:
- cases
parameters:
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
type: object
properties:
$ref: '../components/schemas/connector_response_properties.yaml'
examples:
findConnectorResponse:
$ref: '../components/examples/find_connector_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,42 +0,0 @@
patch:
summary: Update case settings
operationId: updateCaseConfiguration
description: >
Updates setting details such as the closure type, custom fields, templates, and the default connector for cases.
Connectors are used to interface with external systems.
You must create a connector before you can use it in your cases.
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on where the case was created.
tags:
- cases
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: ../components/parameters/configuration_id.yaml
- $ref: '../components/parameters/space_id.yaml'
requestBody:
content:
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: 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'

View file

@ -1,40 +0,0 @@
get:
summary: Returns information about the users who opened cases.
operationId: getCaseReporters
description: >
You must have read privileges for the **Cases** feature in the **Management**,
**Observability**, or **Security** section of the Kibana feature privileges,
depending on the owner of the cases.
The API returns information about the users as they existed at the time of
the case creation, including their name, full name, and email address. If
any of those details change thereafter or if a user is deleted, the
information returned by this API is unchanged.
tags:
- cases
parameters:
- $ref: '../components/parameters/space_id.yaml'
- $ref: '../components/parameters/owner.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
type: object
required:
- email
- full_name
- username
properties:
$ref: '../components/schemas/user_properties.yaml'
examples:
getReportersResponse:
$ref: '../components/examples/get_reporters_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,35 +0,0 @@
get:
summary: Returns the number of cases that are open, closed, and in progress.
operationId: getCaseStatus
description: >
Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead.
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the cases you're seeking.
deprecated: true
tags:
- cases
parameters:
- $ref: '../components/parameters/space_id.yaml'
- $ref: '../components/parameters/owner.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: object
properties:
count_closed_cases:
type: integer
count_in_progress_cases:
type: integer
count_open_cases:
type: integer
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,30 +0,0 @@
get:
summary: Aggregates and returns a list of case tags.
operationId: getCaseTags
description: >
You must have read privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the cases you're seeking.
tags:
- cases
parameters:
- $ref: '../components/parameters/space_id.yaml'
- $ref: '../components/parameters/owner.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
type: string
examples:
getTagsResponse:
$ref: '../components/examples/get_tags_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,31 +0,0 @@
get:
summary: Retrieves information about a case.
operationId: getCase
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the case you're seeking.
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
- $ref: '../components/parameters/includeComments.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '../components/schemas/case_response_properties.yaml'
examples:
getCaseResponse:
$ref: '../components/examples/get_case_response.yaml'
getObservabilityCaseReponse:
$ref: '../components/examples/get_case_observability_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,31 +0,0 @@
get:
summary: Gets all alerts attached to a case.
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the cases you're seeking.
x-technical-preview: true
operationId: getCaseAlerts
tags:
- cases
parameters:
- $ref: ../components/parameters/case_id.yaml
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
$ref: '../components/schemas/alert_response_properties.yaml'
examples:
getCaseAlertsResponse:
$ref: '../components/examples/get_case_alerts_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,131 +0,0 @@
post:
summary: Adds a comment or alert to a case.
operationId: addCaseComment
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 you're creating.
NOTE: Each case can have a maximum of 1,000 alerts.
tags:
- cases
parameters:
- $ref: '../components/headers/kbn_xsrf.yaml'
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../components/schemas/add_case_comment_request.yaml'
examples:
createCaseCommentRequest:
$ref: '../components/examples/add_comment_request.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '../components/schemas/case_response_properties.yaml'
examples:
createCaseCommentResponse:
$ref: '../components/examples/add_comment_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
delete:
summary: Deletes all comments and alerts from a case.
operationId: deleteCaseComments
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 cases you're deleting.
tags:
- cases
parameters:
- $ref: '../components/headers/kbn_xsrf.yaml'
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
patch:
summary: Updates a comment or alert in a case.
operationId: updateCaseComment
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 you're updating.
NOTE: You cannot change the comment type or the owner of a comment.
tags:
- cases
parameters:
- $ref: '../components/headers/kbn_xsrf.yaml'
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../components/schemas/update_case_comment_request.yaml'
examples:
updateCaseCommentRequest:
$ref: '../components/examples/update_comment_request.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '../components/schemas/case_response_properties.yaml'
examples:
updateCaseCommentResponse:
$ref: '../components/examples/update_comment_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
get:
summary: Retrieves all the comments from a case.
operationId: getAllCaseComments
description: >
Deprecated in 8.1.0. This API is deprecated and will be removed in a future release;
instead, use the get case comment API, which requires a comment identifier in the path.
You must have `read` privileges for the **Cases** feature in the **Management**,
**Observability**, or **Security** section of the Kibana feature privileges,
depending on the owner of the cases with the comments you're seeking.
deprecated: true
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '../components/schemas/case_response_properties.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,55 +0,0 @@
delete:
summary: Deletes a comment or alert from a case.
operationId: deleteCaseComment
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 cases you're deleting.
tags:
- cases
parameters:
- $ref: '../components/headers/kbn_xsrf.yaml'
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/comment_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
get:
summary: Retrieves a comment from a case.
operationId: getCaseComment
description: >
You must have `read` privileges for the **Cases** feature in the **Management**,
**Observability**, or **Security** section of the Kibana feature privileges,
depending on the owner of the cases with the comments you're seeking.
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/comment_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
oneOf:
- $ref: '../components/schemas/alert_comment_response_properties.yaml'
- $ref: '../components/schemas/user_comment_response_properties.yaml'
examples:
getCaseCommentResponse:
$ref: '../components/examples/get_comment_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,39 +0,0 @@
post:
summary: Pushes a case to an external service.
description: >
You must have `all` privileges for the **Actions and Connectors** feature in
the **Management** section of the Kibana feature privileges. You must also
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 you're pushing.
operationId: pushCase
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/connector_id.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
- $ref: '../components/parameters/space_id.yaml'
requestBody:
content:
application/json:
schema:
type:
- "object"
- "null"
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '../components/schemas/case_response_properties.yaml'
examples:
pushCaseResponse:
$ref: '../components/examples/push_case_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,29 +0,0 @@
get:
summary: Returns all user activity for a case.
description: >
Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead.
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the case you're seeking.
deprecated: true
operationId: getCaseActivity
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
$ref: '../components/schemas/user_actions_response_properties.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

View file

@ -1,43 +0,0 @@
get:
summary: Finds user activity for a case.
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
feature privileges, depending on the owner of the case you're seeking.
operationId: findCaseActivity
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
- $ref: '../components/parameters/page_index.yaml'
- $ref: '../components/parameters/page_size.yaml'
- $ref: '../components/parameters/sort_order.yaml'
- $ref: '../components/parameters/user_action_types.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: object
properties:
page:
type: integer
perPage:
type: integer
total:
type: integer
userActions:
type: array
items:
$ref: '../components/schemas/user_actions_find_response_properties.yaml'
examples:
findCaseActivityResponse:
$ref: '../components/examples/find_case_activity_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'

Some files were not shown because too many files have changed in this diff Show more