Get the fields applicable to an existing case
https://{kibana_url}
- GET /api/cases/{caseId}/fields
Returns the fields you can write to the case's extended_fields. The case determines the owner and any applied template. The response includes the owner's global fields (library-wide) and, if the case has a template, that template's fields. Requires the Cases feature to be enabled in the space.
Path Parameters
-
caseIdstringrequired -
The identifier for the case. To retrieve case IDs, use the search cases (
_find)API. All non-ASCII characters must be URL encoded.
Responses
Indicates a successful call.
-
fieldsobjectrequired -
controlstringrequired -
The UI control for the field, such as
INPUT_TEXT,INPUT_NUMBER,SELECT_BASIC,TOGGLE, orMARKDOWN. -
defaultValuestring -
The default value, as a string, when the field definition declares one.
-
displayOnlybooleanrequired -
When
truethe field is display-only (for example aMARKDOWNblock): it is returned so the full form shape is visible, but it holds no value and itskeycannot be written toextended_fields. -
isGlobalbooleanrequired -
Whether the field is a global (library-wide) definition.
-
keystringrequired -
The storage key to write in the case
extended_fieldsmap. Follows the<field_name>_as_<storage_type>convention (for examplepriority_as_keyword). -
labelstringrequired -
The human-readable label. Falls back to
namewhen no label is authored. -
namestringrequired -
The field name as authored in the field definition.
-
optionsstring -
The allowed values for
SELECT_BASIC,RADIO_GROUP, andCHECKBOX_GROUPfields. -
typestringrequired -
The storage type:
keyword,integer,long,boolean, ordate. -
requiredbooleanrequired -
Whether a value must be supplied at write time.
-
requiredOnClosebooleanrequired -
Whether the field must be filled before the case can be closed.
-
sourcerequired -
Where the field comes from:
globalfor a library-wide (isGlobal) definition writable on any case, ortemplatefor a field contributed by the applied template. -
Values:
globaltemplate
Authorization information is missing or invalid.
-
errorstring -
messagestring -
statusCodeinteger
The user does not have access to the case.
-
errorstring -
messagestring -
statusCodeinteger
The case was not found.
-
errorstring -
messagestring -
statusCodeinteger