Automating creating tag-based relationship mapping within API Insights

  • Release version: Australia
  • Updated March 12, 2026
  • 3 minutes to read
  • You can configure and automate creating CMDB relationships between APIs and application services or business applications based on API tags.

    Tag-based relationship mapping enables CMDB administrators and enterprise architects to define rules that automatically create CMDB relationships between APIs and application services or business applications based on API tags. Each rule specifies how a tag on a source CI is matched to a field on a target CI, and which relationship type and direction to create. Rules are stored in the Tag Based Relationship Mapping [sn_api_insights_ws_tag_relationship_mapping] table, enabling automatic mapping of multiple APIs to application services or business contexts.

    You can use tag-based relationship mapping for:

    • Relating APIs to application services using a tag, such as a service name.
    • Linking APIs or components to business applications by matching a tag to an external ID field.
    • Standardizing relationship creation across different environments.
    To create CMDB relationships between APIs and application services or business applications based on API tags, follow these steps:
    1. Define tag-based mapping rules.
    2. Schedule the tag-based mapping rule.

    Define tag-based mapping rules

    Establish relationships between APIs and application services by defining tag-based mapping rules for APIs available within the API Insights application.

    Before you begin

    Role required: sn_cmdb_admin or sn_api_insights_ws.api_mgmt_architect

    About this task

    Tag-based mapping rules enable you to automatically create relationships between APIs and application services or business applications based on tags. To define a tag-based mapping rule, you need to create a tag relationship mapping record that specifies the source and target CI classes and the relationship details.

    Procedure

    1. In the navigation filter of the application navigator, enter sn_api_insights_ws_tag_relationship_mapping.list and press the Enter key.
    2. On the Tag Relationship Mappings page, select New.
    3. On the form, fill in the fields.
      Table 1. New record form for the tag-based relationship mapping
      Field Description
      Name Name for the relationship.
      Source Class CI class including API, API Component, API Frontend, API Backend, or Managed API that contains the tag as the source of the relationship.
      Target Class CI class including Application Service or Business Application that the source CI is related to as the target of the relationship.
      Relationship Type Type of relationship established between the source CI and the target CI.
      Tag Key Key from the Key Value [cmdb_key_value] table that corresponds to the target CI field.
      Target Match Field Field on the target CI that matches the tag value.
      Parent Class Role CI that acts as the parent in the relationship, either source or target.
      Active Option to enable the relationship.
    4. Select Submit.

    Scheduling the tag-based mapping rules

    You can use a scheduled job to automatically create CMDB relationships between APIs and application services or business applications based on API tags.

    Scheduled jobs automate tasks that run at a specific time or on a recurring schedule. You need the admin role to configure and run a scheduled job. For more information on configuring a scheduled job, see Scheduled jobs.

    The Tag based relationship mapping scheduled job is available to schedule applying tag-based mapping rules between APIs and application services or business applications. By default, this job is inactive. As a user with the admin role, you can configure and activate it to run at regular intervals.

    For each active tag-based relationship rule, the Tag based relationship mapping scheduled job processes active rules with the following workflow:

    • Uses the specified tag key to retrieve relevant source CI tags.
    • Identifies target CIs where the target CI's matching field matches the tag value.
    • Creates the specified relationship type between the source and target CIs in the direction indicated by the parent_class_role setting.
    • Avoids duplicating existing relationships.

    By automating the process of creating relationships based on tags, the Tag-based relationship mapping scheduled job enables maintaining up-to-date and accurate mappings between APIs and related application services or business applications.