Spaces method and path for this operation:
post /s/{space_id}/api/fleet/agent_policies/delete
Refer to Spaces for more information.
Delete an agent policy by ID.
[Required authorization] Route required privileges: fleet-agent-policies-all.
POST
/api/fleet/agent_policies/delete
curl \
--request POST 'https://localhost:5601/api/fleet/agent_policies/delete' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"agentPolicyId":"agent-policy-id-1"}'
Request example
Delete an agent policy by ID
{
"agentPolicyId": "agent-policy-id-1"
}
Response examples (200)
The agent policy was successfully deleted
{
"id": "agent-policy-id-1",
"name": "My agent policy"
}
Response examples (400)
Example of a generic error response
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}