Upgrade a package policy

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

Upgrade a package policy to a newer package version. When some package policies are upgraded and the others are only blocked because some active agents don't satisfy the package's agent version condition, the response is a 200 with a result per package policy: check each item's success field. When any other upgrade fails, the response is the first such failure. When none succeeds and every failure is an agent version block, the response is the first block.

Required 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.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

acknowledge_agent_version_incompatibility boolean

When true, create or upgrade the package policy even though some active agents on its agent policies don't satisfy the package's agent version condition. Without it, the request is rejected, because those agents would stop collecting the integration's data. The force flag does not bypass this check.

acknowledge_breaking_changes boolean · default: false

When true, acknowledge the breaking changes listed in the package changelog for the versions being upgraded. Without it, an upgrade whose version range includes breaking changes is rejected. The force flag does not bypass this check.

packagePolicyIds string[] · max items: 1000 required

Responses

Successful response

application/json
<array> object[] · max items: 10000
id string required
name string
statusCode number
success boolean required
Base URL
https://{kibana_url}