Delete Fleet Agent Policies via Dev Tools?

Hey everyone! We are in the process of deploying a large number of agent policies, but recently decided to change multiple configurations about them. Since we are early on in our deployment, we would like to out right delete them as we already have a script created to generate the new ones. Is this possible via the dev tools or can we online modify then existing ones instead of deleting them?

Hi @RedneckHutch Welcome to the community and thanks for trying Fleet / Agent

There is an API

You can execute via REST API or in Kibana Dev Tools just prefix with kbn:/api/fleet should work

GET kbn:/api/fleet/agent_policies

# Result
{
  "items": [
    {
      "id": "4b8add2c-1f58-4656-8c11-97c8ec225c7a",
      "version": "WzI1Mjg2LDMyXQ==",
      "description": "",
      "monitoring_enabled": [
        "logs",
        "metrics"
      ],
      "inactivity_timeout": 1209600,
      "schema_version": "1.1.1",
      "agents": 0,
      "name": "test-policy",
      "namespace": "default",
      "is_protected": false,
      "status": "active",
.....
}

# DELETE 

POST kbn:/api/fleet/agent_policies/delete
{
  "agentPolicyId" : "4b8add2c-1f58-4656-8c11-97c8ec225c7a"
}

# Result
{
  "id": "4b8add2c-1f58-4656-8c11-97c8ec225c7a",
  "name": "test-policy"
}