Get the fields applicable to a case
https://{kibana_url}
- GET /api/cases/fields
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
-
ownerstring · max: 30required The application that owns the cases (for example
cases,observability, orsecuritySolution).-
templateIdstring · max: 36 The identifier of a template to include the template's fields in the response.
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
The request is invalid, for example when the templateId does not exist for the owner or its definition is invalid.
-
errorstring -
messagestring -
statusCodeinteger
Authorization information is missing or invalid.
-
errorstring -
messagestring -
statusCodeinteger
The user does not have access to the requested owner.
-
errorstring -
messagestring -
statusCodeinteger