Spaces method and path for this operation:
Refer to Spaces for more information.
Deprecated. Use POST /api/fleet/managed_integrations/_upgrade/dryrun instead. Preview upgrading multiple managed integrations without applying any change. Targets the installed package version by default; pass pkgVersion to preview a specific (for example, not-yet-installed) version. Each result returns the current/proposed version and any migration errors, plus — only on a clean dry-run (hasErrors: false) — the migrated proposedPolicy. proposedPolicy is for the edit-and-upgrade flow (edit it, then save via the update (PUT) endpoint); to apply an upgrade as-is, use _upgrade.
Responses
-
Indicates a successful response. Each clean item (
hasErrors: false) previews the migrated policy as a consumable managed integration (proposedPolicy); a missing id, an id that is not a managed integration, or a migration error, is reported as a per-item failure (hasErrors: true, withproposedPolicyomitted) without failing the batch. Inspect every item. -
Bad Request
curl \
--request POST 'https://localhost:5601/api/fleet/agentless_policies/_upgrade/dryrun' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '"{\n \"policyIds\": [\n \"d52a7812-5736-4fdc-aed8-72152afa1ffa\"\n ]\n}"'
{
"policyIds": [
"d52a7812-5736-4fdc-aed8-72152afa1ffa"
]
}
{
"pkgVersion": "1.6.0",
"policyIds": [
"d52a7812-5736-4fdc-aed8-72152afa1ffa"
]
}
[
{
"currentVersion": "1.5.0",
"errors": [
{
"message": "Variable \"organization_id\" is required"
}
],
"hasErrors": true,
"id": "d52a7812-5736-4fdc-aed8-72152afa1ffa",
"name": "ess_billing-1",
"proposedVersion": "1.6.0"
}
]
[
{
"currentVersion": "0.5.0",
"hasErrors": false,
"id": "2e426392-f856-4ab2-bc31-92d4dbb8d134",
"name": "agentless_hello_world-16",
"proposedPolicy": {
"cloud_connector": null,
"created_at": "2026-07-01T15:59:08.299Z",
"created_by": "admin",
"description": "",
"id": "2e426392-f856-4ab2-bc31-92d4dbb8d134",
"inputs": {
"agentless_hello_world-cel": {
"enabled": true,
"streams": {
"agentless_hello_world.generic": {
"enabled": true,
"vars": {
"url": "https://epr.elastic.co"
}
},
"agentless_hello_world.mock_counter": {
"enabled": false,
"vars": {
"events_per_second": 10,
"mode": "constant",
"spike_events": 100,
"spike_every_seconds": 60
}
}
}
},
"agentless_hello_world-httpjson": {
"enabled": false,
"streams": {
"agentless_hello_world.generic": {
"enabled": false,
"vars": {
"url": "https://epr.elastic.co"
}
}
}
}
},
"name": "agentless_hello_world-16",
"namespace": "default",
"package": {
"name": "agentless_hello_world",
"title": "Agentless Hello World",
"version": "0.5.0"
},
"updated_at": "2026-07-01T16:02:14.067Z",
"updated_by": "admin"
},
"proposedVersion": "0.5.0"
},
{
"body": {
"message": "Agentless policy 9300464c-6cfc-4566-850d-e9e7927457fe not found"
},
"hasErrors": true,
"id": "9300464c-6cfc-4566-850d-e9e7927457fe",
"statusCode": 404
},
{
"body": {
"message": "Agentless policy 5b8763e9-791a-4038-be29-b384d578200e not found"
},
"hasErrors": true,
"id": "5b8763e9-791a-4038-be29-b384d578200e",
"statusCode": 404
}
]
[
{
"currentVersion": "1.5.0",
"hasErrors": false,
"id": "d52a7812-5736-4fdc-aed8-72152afa1ffa",
"name": "ess_billing-1",
"proposedPolicy": {
"created_at": "2025-11-06T18:27:43.541Z",
"created_by": "test_user",
"description": "test",
"id": "d52a7812-5736-4fdc-aed8-72152afa1ffa",
"inputs": {
"ESS Billing-cel": {
"enabled": true,
"vars": {
"organization_id": "1234"
}
}
},
"name": "ess_billing-1",
"namespace": "default",
"package": {
"name": "ess_billing",
"title": "Elasticsearch Service Billing",
"version": "1.6.0"
},
"updated_at": "2025-11-06T18:27:43.541Z",
"updated_by": "test_user"
},
"proposedVersion": "1.6.0"
}
]
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}