DELETE /api/fleet/agents/{agentId}

Spaces method and path for this operation:

delete /s/{space_id}/api/fleet/agents/{agentId}

Refer to Spaces for more information.

Delete an agent by ID.

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

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • agentId string Required

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • action string Required

      Value is deleted.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
  • 404 application/json

    Not Found

DELETE /api/fleet/agents/{agentId}
curl \
 --request DELETE 'https://<KIBANA_URL>/api/fleet/agents/{agentId}' \
 --header "Authorization: $API_KEY" \
 --header "kbn-xsrf: true"
Response examples (200)
Agent successfully deleted
{
  "id": "agent-id-1",
  "success": true
}
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
Response examples (404)
No agent was found with the given ID
{
  "error": "Not Found",
  "message": "Agent agent-id-1 not found",
  "statusCode": 404
}