Spaces method and path for this operation:
post /s/{space_id}/api/fleet/package_policies/upgrade
Refer to Spaces for more information.
Upgrade a package policy to a newer package version.
[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.
POST
/api/fleet/package_policies/upgrade
curl \
--request POST 'https://localhost:5601/api/fleet/package_policies/upgrade' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"packagePolicyIds":["package-policy-id-1"]}'
Request example
Upgrade package policies to the latest version
{
"packagePolicyIds": [
"package-policy-id-1"
]
}
Response examples (200)
Results of the upgrade operation
[
{
"id": "package-policy-id-1",
"name": "nginx-1",
"success": true
}
]
Response examples (400)
Example of a generic error response
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}