Spaces method and path for this operation:
delete /s/{space_id}/api/cases/field_definitions/{field_definition_id}
Refer to Spaces for more information.
Deletes a field definition. You must have the "Manage templates" sub-privilege for the Cases feature of the owning solution. A field definition cannot be deleted while it is referenced by an active template or linked to an active custom field in the Cases configuration. Requires the Cases feature to be enabled in the space.
Responses
-
The field definition was deleted.
-
Authorization information is missing or invalid.
-
The user does not have the manage templates privilege for the owner.
-
The field definition was not found.
-
The field definition is referenced by one or more active templates, or is linked to an active custom field in the Cases configuration.
DELETE
/api/cases/field_definitions/{field_definition_id}
curl \
--request DELETE 'https://localhost:5601/api/cases/field_definitions/{field_definition_id}' \
--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
}
Response examples (409)
{
"error": "Conflict",
"message": "Template name \"Security incident\" already exists for owner \"cases\"",
"statusCode": 409
}