Delete an agentless policy Technical Preview

View as Markdown
DELETE /api/fleet/agentless_policies/{policyId}

Spaces method and path for this operation:

delete /s/{space_id}/api/fleet/agentless_policies/{policyId}

Refer to Spaces for more information.

Delete an agentless policy

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • policyId string Required

    The ID of the policy to delete.

Query parameters

  • force boolean

    Force delete the policy even if the policy is managed.

Responses

  • 200 application/json

    Indicates a successful response

    Hide response attribute Show response attribute object
    • id string Required

      The ID of the deleted agentless package policy.

  • 400 application/json

    Bad Request

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

    Conflict

    Hide response attributes Show response attributes object
    • error string
    • errorType string
    • message string Required
    • statusCode number
DELETE /api/fleet/agentless_policies/{policyId}
curl \
 --request DELETE 'https://<KIBANA_URL>/api/fleet/agentless_policies/{policyId}' \
 --header "Authorization: $API_KEY" \
 --header "kbn-xsrf: true"
Response examples (200)
Example response showing the successful result of communication initialisation over MCP protocol
{
  "item": {
    "id": "d52a7812-5736-4fdc-aed8-72152afa1ffa"
  }
}
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
Response examples (409)
Example of a conflict error response
{
  "error": "Conflict",
  "message": "An error message describing what went wrong",
  "statusCode": 409
}