Migrate environment workflow for agentless CSPM setup to /api/fleet/managed_integrations#7423
Open
seanrathier wants to merge 1 commit into
Open
Conversation
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
enabled auto-merge
July 22, 2026 16:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/fleet/agent_policieswithsupports_agentless: true+POST /api/fleet/package_policies) with a singlePOST /api/fleet/managed_integrationscalltests/fleet_api/managed_integration_api.pywithcreate_managed_integrationanddelete_managed_integrationhelperspurge_integrations.pyto callDELETE /api/fleet/managed_integrations/{id}(which handles full cleanup) when the policy was created via the new APIContext:
/api/fleet/agent_policiesand/api/fleet/package_policiesare 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
install_agentless_integrations.pyagainst a serverless project and verify CSPM AWS/Azure/GCP integrations are created successfully via the new endpointpurge_integrations.pyand verify the managed integrations are deleted cleanly🤖 Generated with Claude Code