Spaces method and path for this operation:
get /s/{space_id}/api/cases/fields
Refer to Spaces for more information.
Returns the fields you can write to a case's extended_fields when creating a case for the given owner. Includes the owner's global (library-wide) fields and, when templateId is supplied, that template's fields. Migrated legacy custom fields appear as global fields. Requires the Cases feature to be enabled in the space.
Query parameters
-
The application that owns the cases (for example
cases,observability, orsecuritySolution).Maximum length is
30. -
The identifier of a template to include the template's fields in the response.
Maximum length is
36.
GET
/api/cases/fields
curl \
--request GET 'https://localhost:5601/api/cases/fields?owner=cases' \
--header "Authorization: $API_KEY"
Response examples (200)
{
"fields": [
{
"control": "SELECT_BASIC",
"defaultValue": "medium",
"displayOnly": false,
"isGlobal": true,
"key": "priority_as_keyword",
"label": "Priority",
"name": "priority",
"options": [
"low",
"medium",
"high"
],
"type": "keyword",
"required": true,
"requiredOnClose": false,
"source": "global"
},
{
"control": "TEXTAREA",
"displayOnly": false,
"isGlobal": false,
"key": "rollout_notes_as_keyword",
"label": "Rollout notes",
"name": "rollout_notes",
"type": "keyword",
"required": false,
"requiredOnClose": true,
"source": "template"
},
{
"control": "MARKDOWN",
"displayOnly": true,
"isGlobal": false,
"key": "instructions_as_keyword",
"label": "Instructions",
"name": "instructions",
"type": "keyword",
"required": false,
"requiredOnClose": false,
"source": "template"
}
]
}
Response examples (400)
{
"error": "Bad Request",
"message": "Template [invalid-template-id] not found for owner [cases]",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "Unable to authenticate with the provided credentials.",
"statusCode": 401
}
Response examples (403)
{
"error": "Forbidden",
"message": "Unauthorized to access cases",
"statusCode": 403
}