APIOps is a methodology that applies the concepts of GitOps and DevOps to API deployment. It enables teams to manage their APIs through version control and automated pipelines. This approach brings consistency and automation to API deployment while maintaining a clear audit trail of all changes. You can read more about APIOps here: Automate API deployments with APIOps or in the APIOps GitHub: APIOps Documentation.
This methodology is implemented through configuration files that define precisely which API elements should be extracted and managed. The configuration file serves as a bridge between your API Management instance and your version control system, allowing precise control over which APIs, products, and other elements are included in your source-controlled repository.
The APIOps configuration file is a YAML-based filter that controls which Azure APIM artifacts are extracted into your Git repository. It allows the selective extraction of specific APIs, products, backends, and other APIM elements, enabling teams to manage different parts of their API landscape independently. The example file that is given in the repository is a bit outdated and doesn’t include all of the properties that can be extracted though.
Right now, these are the only options that are shown in the official GitHub.

But let’s say that a single API inside our API Management uses versioning, no matter if that is the API that we define to be extracted on the apiNames block or not. Once we run the extract pipeline, we will notice that we will have a version sets folder inside our repo that will be deployed to other environments later on.

According to the documentation, version sets are not a defined variable in the configuration file. Thankfully, the example yml file shown is outdated, and all we need to do is add this variable to the configuration file. If, for example, we don’t want to extract any version set, then we add the following code.

After extracting, we get our final result and get rid of any version set.

Obviously, the same logic that we use on the other variables can be used here, and we can extract any version set that we want by just adding its name.
Hope you find this helpful! If you enjoyed the content or found it useful and wish to support our efforts to create more, you can contribute towards purchasing a Star Wars Lego for Sandro’s son!