Delete all case attachments Technical preview; added in 9.6.0

DELETE /api/cases/{caseId}/attachments

Spaces method and path for this operation:

delete /s/{space_id}/api/cases/{caseId}/attachments

Refer to Spaces for more information.

Deletes all attachments from a case. Attached files are also deleted. You must have all privileges for the Cases feature in the Management, Observability, or Security section of the Kibana feature privileges, depending on the owner of the case.

Headers

  • kbn-xsrf string Required

    Cross-site request forgery protection

Path parameters

  • caseId string Required

    The identifier for the case. To retrieve case IDs, use the search cases (_find) API. All non-ASCII characters must be URL encoded.

Responses

  • 204

    Indicates a successful call.

  • 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

    You don't have the required privileges for this case.

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

    The case doesn't exist or has no attachments.

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
DELETE /api/cases/{caseId}/attachments
curl \
 --request DELETE 'https://localhost:5601/api/cases/9c235210-6834-11ea-a78c-6ffb38a34414/attachments' \
 --header "Authorization: $API_KEY" \
 --header "kbn-xsrf: string"
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": "No attachments found for case 293f1bc0-74f6-11ea-b83a-553aecdb28b6.",
  "statusCode": 404
}