Delete a case template Technical preview

DELETE /api/cases/templates/{template_id}

Spaces method and path for this operation:

delete /s/{space_id}/api/cases/templates/{template_id}

Refer to Spaces for more information.

Soft-deletes a case template (all versions). Existing cases keep their pinned template reference; the template stops appearing in the case creation flow and in find responses. You must have the "Manage templates" sub-privilege for the Cases feature of the owning solution. Requires the Cases feature to be enabled in the space.

Path parameters

  • template_id string Required

    The identifier for the template.

    Maximum length is 36.

Responses

  • 204

    The template was deleted.

  • 401 application/json

    Authorization information is missing or invalid.

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
  • 403 application/json

    The user does not have the manage templates privilege for the owner.

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
  • 404 application/json

    The template was not found.

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
DELETE /api/cases/templates/{template_id}
curl \
 --request DELETE 'https://localhost:5601/api/cases/templates/9da1ea2a-09f8-4d0e-bf9d-09bf8c9d0f42' \
 --header "Authorization: $API_KEY"
Response examples (401)
{
  "error": "Unauthorized",
  "message": "Unable to authenticate with the provided credentials.",
  "statusCode": 401
}
Response examples (403)
{
  "error": "Forbidden",
  "message": "Unauthorized to access cases",
  "statusCode": 403
}
Response examples (404)
{
  "error": "Not Found",
  "message": "Saved object [cases-template/9da1ea2a-09f8-4d0e-bf9d-09bf8c9d0f42] not found",
  "statusCode": 404
}