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

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
body object
message string required
id string required
name string
output_id string nullable
package object required
experimental_data_stream_features object[] · max items: 100
data_stream string · max length: 1024 required
features object required
doc_value_only_numeric boolean
doc_value_only_other boolean
synthetic_source boolean
tsdb boolean
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

Bad Request

application/json
attributes object required
error string
errorType string
message string required
statusCode number
Base URL
https://{kibana_url}