---
title: "Get all case templates"
method: GET
path: "/api/cases/templates"
tags: ["cases"]
---

# Get all case templates

`GET /api/cases/templates`

**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/templates</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Returns a paginated list of case templates. Requires the Cases feature to be enabled in the space.

## Query parameters

- `page` integer
- `perPage` integer
- `sortField` 'templateId' | 'name' | 'templateVersion' | 'owner' | 'deletedAt' | 'author' | 'usageCount' | 'fieldCount' | 'lastUsedAt' | 'isDefault' | 'isLatest'
- `sortOrder` 'asc' | 'desc'
- `search` string
- `owner` union
  - 'cases' | 'observability' | 'securitySolution' — The application that owns the cases: Stack Management, Observability, or Elastic Security.
  - CasesOwner[]
- `tags` union
  - string
  - CasesString[]
- `author` union
  - string
  - CasesString[]
- `isEnabled` boolean

## Response `200`

Indicates a successful call.

- CasesGetCaseTemplatesResponse — Response returned by the get all case templates API.
  - `page` integer, required — The page number of the returned results.
  - `perPage` integer, required — The number of results per page.
  - `templates` object[], required
    - `author` string — The username of the template author.
    - `definition` unknown, required
    - `definitionString` string, required — The raw YAML definition string.
    - `deletedAt` string, date-time, nullable, required — The date the template was soft-deleted, or null if active.
    - `description` string — A human-readable description of the template.
    - `fieldCount` integer — The number of fields defined in the template.
    - `fieldDefinitions` object[] — Metadata about each field defined in the template.
      - `control` string, required
      - `label` string, required
      - `name` string, required
      - `type` string, required
    - `isDefault` boolean — Whether this is the default template for its owner.
    - `isEnabled` boolean — Whether the template is enabled.
    - `isLatest` boolean, required — Whether this is the latest version of the template.
    - `lastUsedAt` string, date-time — The date the template was last used to create a case.
    - `latestVersion` integer, required — The latest version number of this template.
    - `name` string, required — The display name of the template.
    - `owner` string, required — The owning solution (e.g. cases, observability, securitySolution).
    - `tags` string[] — The words and phrases that help categorize templates. It can be an empty array.
    - `templateId` string, required — The unique identifier of the template, shared across all versions.
    - `templateVersion` integer, required — The version number of this template revision.
    - `usageCount` integer — The number of times this template has been used to create a case.
    - `fieldSearchMatches` boolean, required — Whether the search query matched a field name in this template.
  - `total` integer, required — The total number of templates matching the query.

## Other responses

- `401` — Authorization information is missing or invalid.

---

[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)
