Tag APIs

Tags are labels you can apply to your APIs in 42Crunch Platform to gather them together to form virtual groupings of APIs across multiple API collections.

Create new tags and categories

Tags themselves are grouped into categories to form meaningful units, and the tag label is always of the form category:tag. You can add new tag categories and tags anytime as needed.

Only organization administrators can manage tags and categories in their organization.

  1. In 42Crunch Platform, click next to your username, and click Tags. You can see tags and categories already in your organization.
  2. To add a new category, click Add above the category list.
  3. Enter a name for the category. You can also add a description to clarify what each category is for.
  4. Choose the settings for tags in this category:
    • Allow users to create tags: All users can add new tags to this category when tagging APIs.
    • Allow only organization administrators to tag APIs: Only organization administrators can tag (or untag) APIs with tags from this category.
    • Allow applying multiple tags from the category: Users can apply more than one tag from this category to a single API.

      The screenshot shows a category that allows users to create tags to it and that has a custom colour.

      If you decide to allow applying multiple tags from a category, you cannot change your mind and switch it off later. Users might already have applied multiple tags from the category to their APIs and it would not be possible to automatically decide how to roll back in these cases. It is best to delete the category and start again, this time not allowing multiple tags. You can always decide to allow multiple tags later but once you do, you cannot change back.

  5. If you want, you can assign the category a color that all tags inherit, so they are easy to tell apart when applied to your APIs. In Category color, enter a color hexadecimal value. You can also click the sample color on the right, select the hue you want, and then click and pick the exact shade.
  6. Click Add. The category is added to your organization and you can start adding tags to it.
  7. To add a tag, click the category you want on the left, then click Add tag, enter a name for the tag and a short description what it is for (how or when to use it, or other useful details) and click Add. The tag is added to the selected category.

    Tags must be unique within the category, but you can have same tags in multiple categories.

    Example screenshot showing tags for indicating development, testing, or production environment.

If you want to update the category settings or the color later, click > Update category. To update a tag name or description, go to the tag you want and click > Update tag.

Apply tags to APIs

To associate APIs with tags, you label them with the tags your want.

You can tag APIs in your own API collections and in any collections that you have been given Read/Write access to. You cannot tag or untag APIs that you only have Read-Only access to. Tags are not available in the free community organization.

  1. In 42Crunch Platform, find the API you want, and go to the API summary tab. The quickest way to find API definitions in 42Crunch Platform is to click Find API in the main menu.
  2. To apply tags to the API, click the dropdown list under API tags. You can see all tag categories and tags in your organization.
  3. Find and select the tags you want to apply to your API. If the list is very long, use the filter to choose which tags and categories are visible. By default, you can only apply one tag per category, unless your organization administrator has specifically allowed applying multiple tags from a category.

    The screenshot shows the tags dropdown list on the API summary tab with one tag matching the entered filter text "foo" visible.

  4. When ready, click outside the dropdown to close it.

The tags you selected have now been applied to the API. To remove a tag, on the API summary tab, click on the tag you want to remove.

Tags are also the mechanism for applying things like security quality gates (SQGs) or customization rules to your APIs. When you define your customizations, you also define the tags that go with those. Then, to apply the SQGs or customization rules to your APIs, you tag each API with the corresponding tag. You can check which rule or SQG each tag appliesThe screenshot shows the tags in the tag category for customization rules. Each tag that applies a rule has a button that takes you to view the rules.

Create new tags when tagging APIs

If your organization administrator has enabled the setting "Allow users to create tags" for a category, you can quickly add new tags to that category directly when applying tags to your API.

  1. In the tag list, start typing the name for your new tag in the filter field. If any of the categories in your organization allows adding new tags in the tag list, a create button appears.

    The screenshot shows the name for a new tag together with a create button under the filter field of the tags dropdown list.

  2. Click the Create button, and select the category where to add your tag. You can also write a short description for the tag.
  3. Click Add. The tag is added to the category you select, and selected to be applied to your API. If you clear the filter field, you can continue applying other tags to your API.
  4. When ready, click outside the dropdown to close it. The tags you selected have been applied to your API.

Because different categories can include same tag names, you will see the create button even if a tag with the same name already exists. In this case, you can either add the tag to another category in your organization, or apply the existing tag to your API.

The screenshot shows both the option to create a new tag and an existing tag with the same name in the tags dropdown list.

Only organization administrators can delete tags.

Delete tags

If you have tags or tag categories that you know for sure you no longer need, you can remove them.

Deleting a tag or category permanently removes it from 42Crunch Platform. This action cannot be undone. Deleting a category also deletes any tags in it, and deleting a tag also deletes any customization rules or SQGs associated with it. If you do want to retain some or all of the associated rules and SQGs, you must change their applying tags before you proceed.

  1. To delete a tag from a category, go to the category you want, and click > Delete tag on the tag you want to delete.
  2. To delete the whole category, click > Delete category.