Spaces method and path for this operation:
Refer to Spaces for more information.
Returns a paginated list of case templates. Requires the Cases feature to be enabled in the space.
Query parameters
-
The page number to return.
Default value is
1. -
The number of items to return. Limited to 100 items.
Maximum value is
100. Default value is20. -
Determines which field is used to sort the results.
Values are
templateId,name,templateVersion,owner,deletedAt,author,usageCount,fieldCount,lastUsedAt,isDefault, orisLatest. Default value isname. -
Determines the sort order.
Values are
ascordesc. Default value isdesc. -
An Elasticsearch simple_query_string query that filters the objects in the response.
-
A filter to limit the response to a specific set of applications. If this parameter is omitted, the response contains information about all the cases that the user has access to read.
Values are
cases,observability, orsecuritySolution. -
Filters the returned templates by their enabled state.
curl \
--request GET 'https://localhost:5601/api/cases/templates' \
--header "Authorization: $API_KEY"
{
"page": 1,
"perPage": 20,
"templates": [
{
"definition": {},
"definitionString": "fields: []",
"deletedAt": null,
"fieldSearchMatches": false,
"isLatest": true,
"latestVersion": 1,
"name": "My Template",
"owner": "cases",
"templateId": "9da1ea2a-09f8-4d0e-bf9d-09bf8c9d0f42",
"templateVersion": 1
}
],
"total": 1
}
{
"error": "Unauthorized",
"message": "Unable to authenticate with the provided credentials.",
"statusCode": 401
}