[8.8] [OAS] Add default spaces to case paths (#160831) (#160947)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[OAS] Add default spaces to case paths
(#160831)](https://github.com/elastic/kibana/pull/160831)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-06-29T15:41:58Z","message":"[OAS]
Add default spaces to case paths
(#160831)","sha":"8a1902c66eb1c5748a2300fd2e00f0a7b1bc5c76","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Cases","v8.9.0","v8.10.0"],"number":160831,"url":"https://github.com/elastic/kibana/pull/160831","mergeCommit":{"message":"[OAS]
Add default spaces to case paths
(#160831)","sha":"8a1902c66eb1c5748a2300fd2e00f0a7b1bc5c76"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/160918","number":160918,"state":"MERGED","mergeCommit":{"sha":"5f7237c4aecdb5ef0673713b51b9e58cf3b2aae8","message":"[8.9]
[OAS] Add default spaces to case paths (#160831) (#160918)\n\n#
Backport\r\n\r\nThis will backport the following commits from `main` to
`8.9`:\r\n- [[OAS] Add default spaces to case
paths\r\n(#160831)](https://github.com/elastic/kibana/pull/160831)\r\n\r\n<!---
Backport version: 8.9.7 -->
This commit is contained in:
Lisa Cawley 2023-06-29 14:54:06 -07:00 committed by GitHub
parent eec3f14c29
commit 2c36831c87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 6838 additions and 861 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
in: query
name: assignees
description: >
Filters the returned cases by assignees.
Valid values are `none` or unique identifiers for the user profiles.
These identifiers can be found by using the suggest user profile API.
schema:
oneOf:
- type: string
- type: array
items:
type: string

View file

@ -0,0 +1,7 @@
in: query
name: defaultSearchOperator
description: he default operator to use for the simple_query_string.
schema:
type: string
default: OR
example: OR

View file

@ -0,0 +1,7 @@
name: fields
in: query
description: The fields in the entity to return in the response.
schema:
type: array
items:
type: string

View file

@ -0,0 +1,10 @@
in: query
name: from
description: >
[preview] Returns only cases that were created after a specific date.
The date must be specified as a KQL data range or date match expression.
This functionality is in technical preview and may be changed or removed in a future release.
Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
schema:
type: string
example: now-1d

View file

@ -0,0 +1,12 @@
name: ids
description: >
The cases that you want to removed.
All non-ASCII characters must be URL encoded.
in: query
required: true
schema:
type: string
example: d4e7abb0-b462-11ec-9a8d-698504725a43

View file

@ -0,0 +1,7 @@
in: query
name: includeComments
description: Deprecated in 8.1.0. This parameter is deprecated and will be removed in a future release. It determines whether case comments are returned.
deprecated: true
schema:
type: boolean
default: true

View file

@ -0,0 +1,7 @@
name: page
in: query
description: The page number to return.
schema:
type: integer
default: 1
example: 1

View file

@ -0,0 +1,7 @@
name: perPage
in: query
description: The number of cases to return per page.
schema:
type: integer
default: 20
example: 20

View file

@ -0,0 +1,10 @@
in: query
name: reporters
description: Filters the returned cases by the user name of the reporter.
schema:
oneOf:
- type: string
- type: array
items:
type: string
example: elastic

View file

@ -0,0 +1,5 @@
in: query
name: search
description: An Elasticsearch simple_query_string query that filters the objects in the response.
schema:
type: string

View file

@ -0,0 +1,9 @@
in: query
name: searchFields
description: The fields to perform the simple_query_string parsed query against.
schema:
oneOf:
- type: string
- type: array
items:
type: string

View file

@ -0,0 +1,10 @@
in: query
name: sortField
description: Determines which field is used to sort the results.
schema:
type: string
enum:
- createdAt
- updatedAt
default: createdAt
example: updatedAt

View file

@ -0,0 +1,10 @@
name: sortOrder
in: query
description: Determines the sort order.
schema:
type: string
enum:
- asc
- desc
default: desc
example: asc

View file

@ -0,0 +1,10 @@
in: query
name: status
description: Filters the returned cases by state.
schema:
type: string
enum:
- closed
- in-progress
- open
example: open

View file

@ -0,0 +1,10 @@
in: query
name: tags
description: Filters the returned cases by tags.
schema:
oneOf:
- type: string
- type: array
items:
type: string
example: tag-1

View file

@ -0,0 +1,10 @@
in: query
name: to
description: >
[preview] Returns only cases that were created before a specific date.
The date must be specified as a KQL data range or date match expression.
This functionality is in technical preview and may be changed or removed in a future release.
Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
schema:
type: string
example: now+1d

View file

@ -0,0 +1,24 @@
name: types
in: query
description: Determines the types of user actions to return.
schema:
type: array
items:
type: string
enum:
- action
- alert
- assignees
- attachment
- comment
- connector
- create_case
- description
- pushed
- settings
- severity
- status
- tags
- title
- user
example: create_case

View file

@ -0,0 +1,32 @@
title: Set case configuration request
description: External connection details, such as the closure type and default connector for cases.
type: object
required:
- closure_type
- connector
- owner
properties:
closure_type:
$ref: 'closure_types.yaml'
connector:
description: An object that contains the connector configuration.
type: object
properties:
$ref: 'case_configure_connector_properties.yaml'
required:
- fields
- id
- name
- type
owner:
$ref: 'owners.yaml'
settings:
description: An object that contains the case settings.
type: object
properties:
syncAlerts:
description: Turns alert syncing on or off.
type: boolean
example: true
required:
- syncAlerts

View file

@ -0,0 +1,24 @@
title: Update case configuration request
description: External connection details, such as the closure type and default connector for cases.
type: object
required:
- version
properties:
closure_type:
$ref: 'closure_types.yaml'
connector:
description: An object that contains the connector configuration.
type: object
properties:
$ref: 'case_configure_connector_properties.yaml'
required:
- fields
- id
- name
- type
version:
description: >
The version of the connector.
To retrieve the version value, use the get configuration API.
type: string
example: WzIwMiwxXQ==

View file

@ -15,6 +15,40 @@ servers:
- url: 'http://localhost:5601'
description: local
paths:
# Paths in the default space
'/api/cases':
$ref: 'paths/api@cases.yaml'
'/api/cases/_find':
$ref: 'paths/api@cases@_find.yaml'
'/api/cases/alerts/{alertId}':
$ref: 'paths/api@cases@alerts@{alertid}.yaml'
'/api/cases/configure':
$ref: paths/api@cases@configure.yaml
'/api/cases/configure/{configurationId}':
$ref: paths/api@cases@configure@{configurationid}.yaml
'/api/cases/reporters':
$ref: 'paths/api@cases@reporters.yaml'
'/api/cases/status':
$ref: 'paths/api@cases@status.yaml'
'/api/cases/tags':
$ref: 'paths/api@cases@tags.yaml'
'/api/cases/{caseId}':
$ref: 'paths/api@cases@{caseid}.yaml'
'/api/cases/{caseId}/alerts':
$ref: 'paths/api@cases@{caseid}@alerts.yaml'
'/api/cases/{caseId}/comments':
$ref: 'paths/api@cases@{caseid}@comments.yaml'
'/api/cases/{caseId}/comments/{commentId}':
$ref: 'paths/api@cases@{caseid}@comments@{commentid}.yaml'
'/api/cases/{caseId}/connector/{connectorId}/_push':
$ref: 'paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml'
'/api/cases/{caseId}/user_actions':
$ref: 'paths/api@cases@{caseid}@user_actions.yaml'
'/api/cases/{caseId}/user_actions/_find':
$ref: 'paths/api@cases@{caseid}@user_actions@_find.yaml'
'/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':

View file

@ -0,0 +1,106 @@
post:
summary: Creates a case in the default space
operationId: createCaseDefaultSpace
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
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'
servers:
- url: https://localhost:5601
delete:
summary: Deletes one or more cases in the default space.
operationId: deleteCaseDefaultSpace
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'
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'
servers:
- url: https://localhost:5601
patch:
summary: Updates one or more cases in the default space.
operationId: updateCaseDefaultSpace
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
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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,63 @@
get:
summary: Retrieves a paginated subset of cases in the default space.
operationId: findCasesDefaultSpace
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/assignees.yaml'
- $ref: '../components/parameters/defaultSearchOperator.yaml'
- $ref: '../components/parameters/fields.yaml'
- $ref: '../components/parameters/from.yaml'
- $ref: '../components/parameters/owner.yaml'
- $ref: '../components/parameters/page.yaml'
- $ref: '../components/parameters/perPage.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/sortOrder.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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,42 @@
get:
summary: Returns cases in the default space associated with a specific alert.
operationId: getCasesByAlertDefaultSpace
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/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.
example:
- 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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,77 @@
get:
summary: Retrieves external connection details, such as the closure type and default connector for cases in the default space.
operationId: getCaseConfigurationDefaultSpace
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 configuration.
tags:
- cases
parameters:
- $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'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
servers:
- url: https://localhost:5601
post:
summary: Sets external connection details, such as the closure type and default connector for cases in the default space.
operationId: setCaseConfigurationDefaultSpace
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 configuration.
Connectors are used to interface with external systems. You must create a
connector before you can use it in your cases. Refer to the add connectors
API. 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.
tags:
- cases
parameters:
- $ref: ../components/headers/kbn_xsrf.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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,33 @@
get:
summary: Retrieves information about connectors in the default space.
operationId: findCaseConnectorsDefaultSpace
description: >
In particular, only the connectors that are supported for use in cases are
returned. You must have `read` privileges for the **Actions and Connectors**
feature in the **Management** section of the Kibana feature privileges.
tags:
- cases
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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,40 @@
patch:
summary: Updates external connection details, such as the closure type and default connector for cases in the default space.
operationId: updateCaseConfigurationDefaultSpace
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 configuration.
Connectors are used to interface with external systems. You must create a
connector before you can use it in your cases. Refer to the add connectors API.
tags:
- cases
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: ../components/parameters/configuration_id.yaml
requestBody:
content:
application/json:
schema:
$ref: '../components/schemas/update_case_configuration_request.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'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,39 @@
get:
summary: Returns information about the users who opened cases in the default space.
operationId: getCaseReportersDefaultSpace
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/owner.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
type: object
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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,40 @@
get:
summary: Returns the number of cases in the default space that are open, closed, and in progress.
operationId: getCaseStatusDefaultSpace
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/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
examples:
getStatusResponse:
$ref: '../components/examples/get_status_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,41 @@
get:
summary: Aggregates and returns a list of case tags in the default space.
operationId: getCaseTagsDefaultSpace
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:
- in: query
name: owner
description: A filter to limit the retrieved case statistics to a specific set of applications. If this parameter is omitted, the response contains tags from all cases that the user has access to read.
schema:
oneOf:
- $ref: '../components/schemas/owners.yaml'
- type: array
items:
$ref: '../components/schemas/owners.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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,32 @@
get:
summary: Retrieves information about a case in the default space.
operationId: getCaseDefaultSpace
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/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'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,34 @@
get:
summary: Gets all alerts attached to a case in the default space.
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: getCaseAlertsDefaultSpace
tags:
- cases
parameters:
- $ref: ../components/parameters/case_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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,137 @@
post:
summary: Adds a comment or alert to a case in the default space.
operationId: addCaseCommentDefaultSpace
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'
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'
servers:
- url: https://localhost:5601
delete:
summary: Deletes all comments and alerts from a case in the default space.
operationId: deleteCaseCommentsDefaultSpace
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'
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'
servers:
- url: https://localhost:5601
patch:
summary: Updates a comment or alert in a case in the default space.
operationId: updateCaseCommentDefaultSpace
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'
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'
servers:
- url: https://localhost:5601
get:
summary: Retrieves all the comments from a case in the default space.
operationId: getAllCaseCommentsDefaultSpace
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'
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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,59 @@
delete:
summary: Deletes a comment or alert from a case in the default space.
operationId: deleteCaseCommentDefaultSpace
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'
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'
servers:
- url: https://localhost:5601
get:
summary: Retrieves a comment from a case in the default space.
operationId: getCaseCommentDefaultSpace
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'
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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,41 @@
post:
summary: Pushes a case in the default space 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: pushCaseDefaultSpace
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/connector_id.yaml'
- $ref: '../components/headers/kbn_xsrf.yaml'
requestBody:
content:
application/json:
schema:
type: object
nullable: true
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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,35 @@
get:
summary: Returns all user activity for a case in the default space.
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: getCaseActivityDefaultSpace
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
type: array
items:
$ref: '../components/schemas/user_actions_response_properties.yaml'
examples:
getCaseActivityResponse:
$ref: '../components/examples/get_case_activity_response.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,67 @@
get:
summary: Finds user activity for a case in the default space.
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: findCaseActivityDefaultSpace
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- name: page
in: query
description: The page number to return.
schema:
type: string
default: "1"
example: "1"
- name: perPage
in: query
description: The number of user actions to return per page.
schema:
type: string
default: "20"
example: "20"
- name: sortOrder
in: query
description: Determines the sort order.
schema:
type: string
enum:
- asc
- desc
default: asc
example: asc
- $ref: '../components/parameters/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'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -49,15 +49,9 @@ delete:
tags:
- cases
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/headers/kbn_xsrf.yaml'
- $ref: '../components/parameters/space_id.yaml'
- name: ids
description: The cases that you want to removed. All non-ASCII characters must be URL encoded.
in: query
required: true
schema:
type: string
example: d4e7abb0-b462-11ec-9a8d-698504725a43
- $ref: '../components/parameters/ids.yaml'
responses:
'204':
description: Indicates a successful call.

View file

@ -9,133 +9,22 @@ get:
- cases
parameters:
- $ref: '../components/parameters/space_id.yaml'
- name: assignees
in: query
description: Filters the returned cases by assignees. Valid values are `none` or unique identifiers for the user profiles. These identifiers can be found by using the suggest user profile API.
schema:
oneOf:
- type: string
- type: array
items:
type: string
- name: defaultSearchOperator
in: query
description: The default operator to use for the simple_query_string.
schema:
type: string
default: OR
example: OR
- name: fields
in: query
description: The fields in the entity to return in the response.
schema:
type: array
items:
type: string
- name: from
in: query
description: >
[preview] Returns only cases that were created after a specific date.
The date must be specified as a KQL data range or date match expression.
This functionality is in technical preview and may be changed or removed
in a future release. Elastic will apply best effort to fix any issues,
but features in technical preview are not subject to the support SLA of
official GA features.
schema:
type: string
example: now-1d
- $ref: '../components/parameters/assignees.yaml'
- $ref: '../components/parameters/defaultSearchOperator.yaml'
- $ref: '../components/parameters/fields.yaml'
- $ref: '../components/parameters/from.yaml'
- $ref: '../components/parameters/owner.yaml'
- name: page
in: query
description: The page number to return.
schema:
type: integer
default: 1
example: 1
- name: perPage
in: query
description: The number of cases to return per page.
schema:
type: integer
default: 20
example: 20
- name: reporters
in: query
description: Filters the returned cases by the user name of the reporter.
schema:
oneOf:
- type: string
- type: array
items:
type: string
example: elastic
- name: search
in: query
description: An Elasticsearch simple_query_string query that filters the objects in the response.
schema:
type: string
- name: searchFields
in: query
description: The fields to perform the simple_query_string parsed query against.
schema:
oneOf:
- type: string
- type: array
items:
type: string
- $ref: '../components/parameters/page.yaml'
- $ref: '../components/parameters/perPage.yaml'
- $ref: '../components/parameters/reporters.yaml'
- $ref: '../components/parameters/search.yaml'
- $ref: '../components/parameters/searchFields.yaml'
- $ref: '../components/parameters/severity.yaml'
- name: sortField
in: query
description: Determines which field is used to sort the results.
schema:
type: string
enum:
- createdAt
- updatedAt
default: createdAt
example: updatedAt
- name: sortOrder
in: query
description: Determines the sort order.
schema:
type: string
enum:
- asc
- desc
default: desc
example: asc
- name: status
in: query
description: Filters the returned cases by state.
schema:
type: string
enum:
- closed
- in-progress
- open
example: open
- name: tags
in: query
description: Filters the returned cases by tags.
schema:
oneOf:
- type: string
- type: array
items:
type: string
example: tag-1
- name: to
in: query
description: >
[preview] Returns only cases that were created before a specific date.
The date must be specified as a KQL data range or date match expression.
This functionality is in technical preview and may be changed or removed
in a future release. Elastic will apply best effort to fix any issues,
but features in technical preview are not subject to the support SLA of
official GA features.
schema:
type: string
example: now+1d
- $ref: '../components/parameters/sortField.yaml'
- $ref: '../components/parameters/sortOrder.yaml'
- $ref: '../components/parameters/status.yaml'
- $ref: '../components/parameters/tags.yaml'
- $ref: '../components/parameters/to.yaml'
responses:
'200':
description: Indicates a successful call.

View file

@ -51,36 +51,7 @@ post:
content:
application/json:
schema:
type: object
properties:
closure_type:
$ref: '../components/schemas/closure_types.yaml'
connector:
description: An object that contains the connector configuration.
type: object
properties:
$ref: '../components/schemas/case_configure_connector_properties.yaml'
required:
- fields
- id
- name
- type
owner:
$ref: '../components/schemas/owners.yaml'
settings:
description: An object that contains the case settings.
type: object
properties:
syncAlerts:
description: Turns alert syncing on or off.
type: boolean
example: true
required:
- syncAlerts
required:
- closure_type
- connector
- owner
$ref: '../components/schemas/set_case_configuration_request.yaml'
examples:
setCaseConfigRequest:
$ref: '../components/examples/set_case_configuration_request.yaml'

View file

@ -17,28 +17,7 @@ patch:
content:
application/json:
schema:
type: object
properties:
closure_type:
$ref: '../components/schemas/closure_types.yaml'
connector:
description: An object that contains the connector configuration.
type: object
properties:
$ref: '../components/schemas/case_configure_connector_properties.yaml'
required:
- fields
- id
- name
- type
version:
description: >
The version of the connector. To retrieve the version value, use
the get configuration API.
type: string
example: WzIwMiwxXQ==
required:
- version
$ref: '../components/schemas/update_case_configuration_request.yaml'
responses:
'200':
description: Indicates a successful call.

View file

@ -10,13 +10,7 @@ get:
parameters:
- $ref: ../components/parameters/case_id.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: query
name: includeComments
description: Deprecated in 8.1.0. This parameter is deprecated and will be removed in a future release. It determines whether case comments are returned.
deprecated: true
schema:
type: boolean
default: true
- $ref: '../components/parameters/includeComments.yaml'
responses:
'200':
description: Indicates a successful call.

View file

@ -34,30 +34,7 @@ get:
- desc
default: asc
example: asc
- name: types
in: query
description: Determines the types of user actions to return.
schema:
type: array
items:
type: string
enum:
- action
- alert
- assignees
- attachment
- comment
- connector
- create_case
- description
- pushed
- settings
- severity
- status
- tags
- title
- user
example: create_case
- $ref: '../components/parameters/types.yaml'
responses:
'200':
description: Indicates a successful call.