Create 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 case you're creating.
Body
Required
-
assignees
array[object] | null An array containing users that are assigned to the case.
Not more than
10
elements. -
category
string A word or phrase that categorizes the case.
Maximum length is
50
. connector
object Required One of: Cases_connector_properties_noneobject Cases_connector_properties_cases_webhookobject Cases_connector_properties_jiraobject Cases_connector_properties_resilientobject Cases_connector_properties_servicenowobject Cases_connector_properties_servicenow_sirobject Cases_connector_properties_swimlaneobject Defines properties for connectors when type is
.none
.-
customFields
array[object] Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.
At least
0
but not more than10
elements. -
description
string Required The description for the case.
Maximum length is
30000
. -
owner
string Required The application that owns the cases: Stack Management, Observability, or Elastic Security.
Values are
cases
,observability
, orsecuritySolution
. -
settings
object Required An object that contains the case settings.
-
severity
string The severity of the case.
Values are
critical
,high
,low
, ormedium
. Default value islow
. -
title
string Required A title for the case.
Maximum length is
160
.
curl \
--request POST http://localhost:5622/api/cases \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: string" \
--data '{"tags":["tag-1"],"owner":"cases","title":"Case title 1","settings":{"syncAlerts":true},"connector":{"id":"131d4448-abe0-4789-939d-8ef60680b498","name":"My connector","type":".jira","fields":{"parent":null,"priority":"High","issueType":"10006"}},"description":"A case description.","customFields":[{"key":"d312efda-ec2b-42ec-9e2c-84981795c581","type":"text","value":"My field value"}]}'
{
"tags": [
"tag-1"
],
"owner": "cases",
"title": "Case title 1",
"settings": {
"syncAlerts": true
},
"connector": {
"id": "131d4448-abe0-4789-939d-8ef60680b498",
"name": "My connector",
"type": ".jira",
"fields": {
"parent": null,
"priority": "High",
"issueType": "10006"
}
},
"description": "A case description.",
"customFields": [
{
"key": "d312efda-ec2b-42ec-9e2c-84981795c581",
"type": "text",
"value": "My field value"
}
]
}
{
"id": "66b9aa00-94fa-11ea-9f74-e7e108796192",
"tags": [
"tag 1"
],
"owner": "cases",
"title": "Case title 1",
"status": "open",
"version": "WzUzMiwxXQ==",
"comments": [],
"duration": null,
"settings": {
"syncAlerts": true
},
"severity": "low",
"assignees": [],
"closed_at": null,
"closed_by": null,
"connector": {
"id": "131d4448-abe0-4789-939d-8ef60680b498",
"name": "My connector",
"type": ".jira",
"fields": {
"parent": null,
"priority": "High",
"issueType": "10006"
}
},
"created_at": "2022-10-13T15:33:50.604Z",
"created_by": {
"email": null,
"username": "elastic",
"full_name": null,
"profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"
},
"updated_at": null,
"updated_by": null,
"description": "A case description.",
"totalAlerts": 0,
"customFields": [
{
"key": "d312efda-ec2b-42ec-9e2c-84981795c581",
"type": "text",
"value": "My field value"
},
{
"key": "fcc6840d-eb14-42df-8aaf-232201a705ec",
"type": "toggle",
"value": null
}
],
"totalComment": 0,
"external_service": null
}
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}