Azure APIOps CLI 1.0: A Production GitOps Model for API Management

Azure APIOps CLI pipeline promoting reviewed API Management configuration across development test and production

Written by Jan Daris

Jan Daris is a hands-on Integration Architect and Developer who enjoys solving complex integration puzzles with Azure, Boomi, APIs, and event-driven architecture. Through this blog, he shares practical knowledge, lessons learned, and real-world solutions to help other architects, developers, and IT teams build better integration platforms.

September 10, 2026



Azure APIOps CLI 1.0 turns API Management configuration into a first-class delivery asset: extract it, review it in Git, validate the proposed change and publish it through a repeatable pipeline. The important part is not that Microsoft has released another command-line tool. The important part is that APIM teams now have a Microsoft-owned path to make API configuration delivery observable, reviewable and less dependent on portal changes.



For enterprise integration teams, this closes a familiar operational gap. We automate infrastructure creation, application deployments and policy testing, but API Management configuration often remains a mixture of templates, scripts and manual edits. That mixture works until multiple teams, environments and emergency changes meet. APIOps CLI 1.0 gives us a cleaner control plane, provided we treat it as a production capability rather than a convenient export command.





Product
Azure API Management / APIOps CLI

Release
Version 1.0.0, published 27 August 2026

Announcement
Microsoft Azure Integration Services blog, 1 September 2026

Package
@azure-tools/apiops-cli

Runtime
Node.js 22 or later

Key commands
apiops extract, apiops publish, apiops init and apiops apic

Primary impact
Governed, source-controlled promotion of APIM configuration




What Azure APIOps CLI 1.0 changes



The CLI provides a single workflow for extracting configuration from an API Management service and publishing that configuration into another service. It can scaffold Azure DevOps or GitHub Actions pipelines, filter the resources that belong in a repository, apply environment-specific overrides and generate a dry-run plan before publication.



Version 1.0 also includes API Center backup and restore capabilities, exclusions in filters and cleanup of stale artifacts. These are useful improvements, but the production value sits in the delivery model: a change can move from APIM to a pull request, through review and validation, and back into a controlled target environment with an audit trail.



Microsoft is also moving active development away from the earlier Azure/apiops toolkit toward this CLI and its repository. Existing toolkit users should therefore plan a transition, but should not assume a drop-in replacement. Repository layout, pipeline behaviour, overrides and deletion semantics deserve a lab comparison before a production migration.




A production APIOps delivery path with a clear infrastructure boundary



Infrastructure laneBicep or Terraform provisions APIM, networking, identities, monitoring and private connectivity.

Configuration laneAPIOps CLI manages the APIs, policies, products and related configuration inside the service.




Why Azure APIOps CLI matters for enterprise integration



It makes drift visible



Portal changes are fast, but they are difficult to govern. If the repository says one thing and production says another, the team needs an explicit answer about which side is authoritative. A disciplined extraction and comparison process exposes drift instead of letting it become tribal knowledge. This is especially important when an APIM gateway fronts many integration products owned by different teams.



It improves release evidence



An API policy can affect authentication, routing, throttling, caching, transformation and telemetry. That is production code even when it is expressed as XML. Pull requests, automated validation and a dry-run plan create evidence that can be reviewed before the gateway changes. This supports change control without turning delivery into a manual ticket queue.



It separates repeatability from environment differences



Development and production are not identical. Backend URLs, identifiers, certificates and scaling choices differ. The goal is therefore not to make every value equal; it is to make the intentional differences explicit. APIOps overrides can provide that separation, while Key Vault references and managed identities keep secrets out of Git.



The architecture boundary: infrastructure versus configuration



One of the most important design decisions is what APIOps CLI should own. I recommend a strict boundary.



Use Bicep or Terraform for the APIM service itself: SKU, capacity, zones, private endpoints, virtual-network integration, identities, diagnostics and supporting resources. Use APIOps CLI for the configuration inside the service: APIs, operations, policies, products, subscriptions where appropriate, named-value references and related metadata.



This boundary prevents two deployment systems from competing for the same resource. It also aligns with the resilience concerns described in Azure API Management Standard v2 zone redundancy: APIOps controls what the gateway does, while infrastructure as code controls where and how the gateway runs.



Do not put secrets into extracted artifacts or override files. Extraction redacts inline secrets, and publication aborts when redaction markers remain. Treat that failure as a security control. Replace a redacted value with a Key Vault reference or another approved secret-injection pattern; never bypass the marker just to make the pipeline green.



A production pipeline design



1. Extract a deliberately limited scope



Start with one API product or one bounded domain. Use filters so the repository contains only the resources owned by that team. A full service extraction on day one creates a large review surface and makes ownership ambiguous.



npx @azure-tools/apiops-cli extract \
--subscription-id <subscription-id> \
--resource-group <resource-group> \
--service-name <apim-service>


Store the resulting artifacts in a dedicated repository or a clearly owned folder. Add a CODEOWNERS rule for policies and shared gateway resources. Shared fragments and global policies require an architecture owner because their blast radius crosses API boundaries.



2. Review semantics, not only syntax



A valid policy can still be dangerous. Reviewers should ask whether retry behaviour can amplify load, whether a cache can expose tenant data, whether a backend timeout matches the end-to-end latency budget and whether a new header carries sensitive information. For messaging scenarios such as publishing Service Bus messages through API Management, reviewers must also evaluate duplicate delivery, identity and failure responses.



3. Run dry-run as a mandatory production gate



apiops publish --dry-run should be non-optional for higher environments. Persist its output with the pipeline run and require a human approval when it contains deletions, changes to global policy, product access changes or named-value modifications.



npx @azure-tools/apiops-cli publish \
--service-name <target-apim> \
--dry-run


The --delete-unmatched option needs even stronger controls. It can be valuable when Git is the declared source of truth, but it can also remove target resources outside the intended scope. First prove filters and ownership in an isolated environment. In production, require a protected branch, a visible deletion plan and a specific approval.



4. Promote one artifact



Build once and promote the same reviewed artifact to test and production. Re-extracting or rebuilding between stages weakens traceability. Environment overrides should be supplied as controlled deployment inputs, while the core API and policy content remains identical.



5. Use workload identity



The generated GitHub Actions workflow uses OpenID Connect/workload identity rather than a stored client secret. Apply the same principle in Azure DevOps. Grant the pipeline identity only the permissions required for its target APIM instance, separate non-production and production identities, and protect the production environment with an approval policy.



Operational rule: every production APIM change must be attributable to a commit, a pipeline run and an identity. Emergency portal changes are allowed only through a documented break-glass process and must be reconciled back into Git immediately.


Migration from the previous APIOps toolkit



The new CLI is the strategic direction, but migration should be treated as a delivery-system change. Clone one representative API into a non-production APIM instance and compare:




  • artifact structure and naming;

  • which APIM resources are included or excluded;

  • how named values and secrets are represented;

  • override behaviour between environments;

  • the dry-run plan for the same commit;

  • cleanup and deletion behaviour;

  • pipeline identity and required Azure roles;

  • rollback time and operator instructions.



Run the old and new paths against separate targets until the output is understood. Do not let both publishers own the same target concurrently. Once the new path is accepted, freeze the old pipeline, retain its history for audit and update the runbook and ownership matrix.



Failure modes to design for



Portal drift



If operators can change production directly, drift will return. Restrict write access, alert on configuration changes and schedule a controlled extract or comparison. Dependency telemetry, discussed in Azure API Management dependency telemetry, should complement this by showing whether a configuration release changed backend behaviour.



Partial publication



A pipeline failure after some resources have changed is not a normal application rollback. Keep the previous artifact available and document whether the recovery action is a forward fix or republishing the last known-good configuration. Test this procedure; do not discover it during an outage.



Over-broad deletion



Filters, repository boundaries and --delete-unmatched interact. A missing artifact might mean “delete this resource,” “this team does not own it,” or “the extract filter excluded it.” The pipeline must make that meaning explicit before deletion reaches production.



Unsafe environment overrides



Overrides can quietly bypass review if they contain large policy fragments. Keep them small and value-oriented. If behaviour differs by environment, ask whether the difference is temporary or whether the architecture itself is inconsistent.



Example: promoting a partner order API



Consider a partner order API that validates an Entra token, transforms the request and publishes an order command to Azure Service Bus. Development uses a test namespace and lower rate limits; production uses private connectivity, production Key Vault references and stricter quotas.



The API specification, operation policies, product membership and policy fragments live in Git. Bicep provisions each APIM instance, its managed identity, private network integration and diagnostics. APIOps CLI publishes the inner configuration. A pull request runs linting and policy tests. A dry-run shows the expected API and policy changes. The reviewed artifact moves to test, executes contract and failure-path tests, and then waits for production approval.



After publication, synthetic requests verify authentication, backend reachability, correlation headers, throttling and the expected Service Bus outcome. Application Insights and gateway metrics are checked against the release marker. If the change fails, the operator republishes the last known-good artifact or applies a reviewed forward fix.



The Enterprise Integration Patterns perspective



APIOps CLI does not change the runtime message flow; it changes the control plane around that flow. In Enterprise Integration Patterns terms, APIM still hosts Message Endpoints and applies routing, transformation and policy decisions. The Git repository and pipeline behave like a governed Control Bus for configuration: they define and distribute the rules that shape those endpoints.



This distinction matters. Runtime resilience still requires idempotency, retry limits, dead-letter handling, correlation and observability. APIOps makes those gateway policies repeatable, but it does not prove that the integration behaves correctly. Contract tests and end-to-end operational tests remain mandatory.



Azure APIOps CLI production checklist




  • Define whether Git or the portal is authoritative.

  • Separate APIM infrastructure IaC from APIM configuration delivery.

  • Assign ownership for APIs, products, global policies and shared fragments.

  • Use filters to constrain repository and deployment scope.

  • Keep secrets out of artifacts and replace redactions with approved references.

  • Use workload identity and separate production from non-production identities.

  • Require pull-request review for policy and access changes.

  • Run publish --dry-run before every higher-environment release.

  • Gate --delete-unmatched with explicit deletion review.

  • Promote one versioned artifact through all environments.

  • Retain dry-run output, commit ID, pipeline run and deployment identity.

  • Test partial-failure recovery and last-known-good republishing.

  • Monitor portal drift and reconcile emergency changes back into Git.

  • Validate the public API, backend dependency and telemetry after release.



Frequently asked questions




Is Azure APIOps CLI a replacement for Bicep or Terraform?

No. Use infrastructure as code to provision the APIM service and its platform dependencies. Use APIOps CLI to extract and publish the configuration inside the service.


Can we publish directly from a developer laptop?

Technically yes, but production publication should run through a protected pipeline with a workload identity, review evidence and a retained dry-run plan.


Should we enable delete-unmatched immediately?

No. First prove resource ownership, filter behaviour and repository completeness in an isolated environment. Treat production deletions as a separate approval class.


Does extraction put secrets in Git?

Inline secrets are redacted during extraction, and publication stops when redaction markers remain. Replace them with Key Vault references or another controlled secret pattern.


How should existing Azure/apiops toolkit users migrate?

Use a parallel non-production target, compare artifacts and behaviour, validate overrides and deletions, and switch ownership only after the new workflow and rollback procedure are proven.


Does APIOps CLI test API behaviour?

No. It governs configuration delivery. You still need policy tests, contract tests, negative-path tests and post-deployment validation of the complete integration flow.




My recommendation



Adopt Azure APIOps CLI 1.0 first where the pain is visible: shared APIM instances, multiple delivery teams, frequent policy changes or audit requirements. Start with a bounded API domain, establish the infrastructure/configuration boundary, make dry-run mandatory and prove rollback before expanding the scope.



The CLI is not the governance model by itself. The value comes from the operating discipline around it: clear ownership, least-privilege identity, reviewed artifacts, explicit deletion controls and production verification. With those controls in place, APIM configuration becomes a manageable release product instead of a collection of portal decisions.



Official sources



You May Also Like…

0 Comments