POST /api/fleet/epm/packages/_bulk_upgrade

Spaces method and path for this operation:

post /s/{space_id}/api/fleet/epm/packages/_bulk_upgrade

Refer to Spaces for more information.

Upgrade multiple packages to their latest versions.

[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • force boolean

    Default value is false.

  • packages array[object] Required

    At least 1 but not more than 1000 elements.

    Hide packages attributes Show packages attributes object
    • name string Required
    • version string
  • prerelease boolean
  • upgrade_package_policies boolean

    Default value is false.

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • taskId string 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/epm/packages/_bulk_upgrade
curl \
 --request POST 'https://localhost:5601/api/fleet/epm/packages/_bulk_upgrade' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"packages":[{"name":"system"},{"name":"elastic_agent"}]}'
Request example
Upgrade multiple packages to their latest versions
{
  "packages": [
    {
      "name": "system"
    },
    {
      "name": "elastic_agent"
    }
  ]
}
Response examples (200)
Bulk upgrade task initiated
{
  "taskId": "task-id-1"
}
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}