POST /api/fleet/package_policies/upgrade

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.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • packagePolicyIds array[string] Required

    Not more than 1000 elements.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • body object

      Additional properties are NOT allowed.

      Hide body attribute Show body attribute object
      • message string Required
    • id string Required
    • name string
    • statusCode number
    • success boolean Required
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
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
}