---
title: "Get the fields applicable to a case"
method: GET
path: "/api/cases/fields"
tags: ["cases"]
---

# Get the fields applicable to a case

`GET /api/cases/fields`

**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/cases/fields</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-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

- `owner` string, required
- `templateId` string

## Response `200`

Indicates a successful call.

- CasesApplicableFieldsResponse — The fields a caller may apply to a case's `extended_fields`. When no template is in scope, this is the owner's global (library-wide) fields; when a template is applied, it also includes that template's fields. Migrated legacy custom fields appear here as `global` fields, so existing automations can look up the exact key to write.
  - `fields` object[], required
    - `control` string, required — The UI control for the field, such as `INPUT_TEXT`, `INPUT_NUMBER`, `SELECT_BASIC`, `TOGGLE`, or `MARKDOWN`.
    - `defaultValue` string — The default value, as a string, when the field definition declares one.
    - `displayOnly` boolean, required — When `true` the field is display-only (for example a `MARKDOWN` block): it is returned so the full form shape is visible, but it holds no value and its `key` cannot be written to `extended_fields`.
    - `isGlobal` boolean, required — Whether the field is a global (library-wide) definition.
    - `key` string, required — The storage key to write in the case `extended_fields` map. Follows the `<field_name>_as_<storage_type>` convention (for example `priority_as_keyword`).
    - `label` string, required — The human-readable label. Falls back to `name` when no label is authored.
    - `name` string, required — The field name as authored in the field definition.
    - `options` string[] — The allowed values for `SELECT_BASIC`, `RADIO_GROUP`, and `CHECKBOX_GROUP` fields.
    - `type` string, required — The storage type: `keyword`, `integer`, `long`, `boolean`, or `date`.
    - `required` boolean, required — Whether a value must be supplied at write time.
    - `requiredOnClose` boolean, required — Whether the field must be filled before the case can be closed.
    - `source` 'global' | 'template', required — Where the field comes from: `global` for a library-wide (`isGlobal`) definition writable on any case, or `template` for a field contributed by the applied template.

## Other responses

- `400` — The request is invalid, for example when the `templateId` does not exist for the owner or its definition is invalid.
- `401` — Authorization information is missing or invalid.
- `403` — The user does not have access to the requested owner.

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
