Delete a field definition Technical preview

DELETE /api/cases/field_definitions/{field_definition_id}

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.

Path parameters

  • field_definition_id string Required

    The identifier for the field definition.

    Maximum length is 36.

Responses

  • 204

    The field definition 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 field definition was not found.

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

    The field definition is referenced by one or more active templates, or is linked to an active custom field in the Cases configuration.

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
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
}