Type to search.

Bulk delete package policies

Base URL
https://{kibana_url}
  • POST /api/fleet/package_policies/delete
  • POST /s/{space_id}/api/fleet/package_policies/delete
Auth

Delete multiple package policies by ID.

Required privileges

Privileges fleet-agent-policies-all and integrations-all

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

Query parameters

onboarding_deployment_id string · max length: 256 The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

ID of the cloud onboarding instance that manages the package policies. Required to change package policies managed by a cloud onboarding instance; only the onboarding flow is expected to set it. Requests that change a managed package policy without a matching ID are rejected with a 400 error, and force does not bypass this check. A bulk delete that includes such a package policy is rejected as a whole.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

force boolean
packagePolicyIds string[] · max items: 1000 required

Responses

Successful response

application/json
<array> object[] · max items: 10000
id string required
name string
output_id string nullable
package object required
fips_compatible boolean
name string · max length: 255 required

Package name

requires_root boolean
title string · max length: 255
version string · max length: 50 required

Package version

policy_id string nullable deprecated

Use policy_ids instead

policy_ids string[] · max items: 10000 required
statusCode number
success boolean required