Azure API Management: How to configure your APIOps process to filter the extract of Groups

Yesterday, we published a blog post describing how to control the version sets to be extracted by our extrator pipeline, basically by configuring the version set filter inside the extrator yaml file. However, there is another resource that, by default, the extrator pipeline extrates all the values that are also not documented in official documentation, and that is the Groups. You can find those values (settings) inside your APIM instance under Developer portal > Groups.

Once again, 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: https://github.com/Azure/apiops.

Once we run the extract pipeline, we will notice that all Groups settings are inside a folder called groups in our repo, which will be deployed to other environments later. I do not want to extract the groups in all my projects or API. I probably may want to isolate that setting.

Once again, according to the documentation, version sets are not a defined variable in the configuration file. Thankfully, the example yaml file shown in GitHub is outdated, and all we need to do is add this variable to the configuration file.

 groupNames:
  - ignore

Note:

  • You cannot leave it empty. Otherwise, it is the same as not having the groupNames section, and that basically says to the extractor to get all the data of the groups.
  • To discard the fetch of the groups, you need to put a dummy string inside the groupNames section.
    • I like to use the ignore string.
  • If you want a specific group, you add the group name in the groupNames section.

If, for example, we don’t want to extract any group, then we add the following code:

After extracting, we get our final result and eliminate any group info in the repo (the groups will still be present in the API Management):

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 my son!

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

turbo360

Back to Top