DELETE /api/fleet/agents/files/{fileId}

Spaces method and path for this operation:

delete /s/{space_id}/api/fleet/agents/files/{fileId}

Refer to Spaces for more information.

Delete a file uploaded by an agent.

[Required authorization] Route required privileges: fleet-agents-all.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • fileId string Required

    The ID of the uploaded file

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • deleted boolean Required
    • id string Required
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
DELETE /api/fleet/agents/files/{fileId}
curl \
 --request DELETE 'https://localhost:5601/api/fleet/agents/files/{fileId}' \
 --header "Authorization: $API_KEY" \
 --header "kbn-xsrf: true"
Response examples (200)
Uploaded file successfully deleted
{
  "deleted": true,
  "id": "file-id-1"
}
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}