Automating creating tag-based relationship mapping within API Insights
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.
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.
Vorbereitungen
Role required: sn_cmdb_admin or sn_api_insights_ws.api_mgmt_architect
Warum und wann dieser Vorgang ausgeführt wird
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.
Prozedur
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_rolesetting. - 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.