Skip to content

Migrate environment workflow for agentless CSPM setup to /api/fleet/managed_integrations#7423

Open
seanrathier wants to merge 1 commit into
mainfrom
seanrathier/migrate-agentless-to-managed-integrations-api
Open

Migrate environment workflow for agentless CSPM setup to /api/fleet/managed_integrations#7423
seanrathier wants to merge 1 commit into
mainfrom
seanrathier/migrate-agentless-to-managed-integrations-api

Conversation

@seanrathier

@seanrathier seanrathier commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the deprecated two-step flow (POST /api/fleet/agent_policies with supports_agentless: true + POST /api/fleet/package_policies) with a single POST /api/fleet/managed_integrations call
  • Adds tests/fleet_api/managed_integration_api.py with create_managed_integration and delete_managed_integration helpers
  • Updates purge_integrations.py to call DELETE /api/fleet/managed_integrations/{id} (which handles full cleanup) when the policy was created via the new API

Context: /api/fleet/agent_policies and /api/fleet/package_policies are being deprecated for agentless integrations in 9.5 GA in favor of /api/fleet/managed_integrations. A feature flag to disallow the old path is being monitored and will be enabled in a future release. See Slack thread for context.

Test plan

  • Run install_agentless_integrations.py against a serverless project and verify CSPM AWS/Azure/GCP integrations are created successfully via the new endpoint
  • Run purge_integrations.py and verify the managed integrations are deleted cleanly

🤖 Generated with Claude Code

Replace the deprecated two-step flow (POST agent_policies + POST package_policies
with supports_agentless) with a single POST to /api/fleet/managed_integrations.
Add delete_managed_integration for cleanup, detected in purge_integrations by
agnt_policy_id == pkg_policy_id.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@seanrathier
seanrathier requested a review from a team as a code owner July 22, 2026 14:36
@seanrathier seanrathier changed the title Migrate agentless CSPM setup to /api/fleet/managed_integrations Migrate environment workflow for agentless CSPM setup to /api/fleet/managed_integrations Jul 22, 2026
@seanrathier
seanrathier enabled auto-merge July 22, 2026 16:42
@elastic elastic deleted a comment from mergify Bot Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant