Defining relationship types
Last updated
Last updated
Relationship types allow you to define, manage, and visualize relationships between entities within your Cortex workspace, ensuring your organization's structures and dependencies are accurately represented.
A relationship type defines how two entities relate to either other, and constrains the types of entities that can be the source and destination entities within the relationship.
Cortex provides multiple options for defining a relationship:
Entity relationship: As described on this page, you can customize a relationship type (hierarchical or cyclical) between any entity type.
Team hierarchy: You can define a hierarchical relationship between team entities. Learn more in .
Domain hierarchy: You can define a hierarchical relationship between domain entities. You can also configure inheritance; the owner of an entity can be inherited from entities higher in the domain hierarchy. Learn more in .
Dependencies: You can define a cyclical relationship between non-team entities. Learn more in .
To view all relationship types, go to Catalogs > All entities then click the .
To view the details of a specific relationship type, click its name from the list.
In the example entity below, there are three destination entities in an "App Components" relationship:
In the upper right corner, click Create > Create new relationship type.
Configure the details and entity types:
Name: Enter a name for the relationship type.
Identifier: Enter a unique identifier, used to specify this relationship in YAML definitions for this relationship type.
Description: Add a description of the relationship to help others understand its purpose.
Source entity types: Search for and select the entity types which will be the source for this relationship. Selecting no entity type means that all entity types are available as sources.
You can also customize the singular and plural wording of the entity types and the cardinality.
Destination entity types: Search for and select the entity types which will be the destination for this relationship. Selecting no entity type means that all entity types are available as destinations.
You can also customize the singular and plural wording of the entity types and the cardinality.
Configure the relationship constraints:
Architecture: If you are configuring hierarchical data, such as an org chart, we recommend choosing Acyclical. If you are configuring graph-like data, such as dependencies, we recommend choosing Cyclical.
Definition location: Configure where relationships can be defined — from destination entities, from source entities, or from either.
Click Create.
Click the Relationships tab.
At the bottom of the page, click Save changes.
To edit an existing relationship type:
Make any necessary changes, then at the bottom of the page, click Save.
Click the relationship type name.
If an entity is part of a relationship, you can view this information on its . Click Relationships in the left sidebar to see the different relationship types that the entity belongs to.
Navigate to Catalogs > All entities then click the .
After creating the relationship type, you can configure connections between entities in a relationship. You can do this via the or in the UI, as described below:
Navigate to an . In the upper right corner, click Configure entity.
At the top of the Relationship Type section, click the dropdown to select which relationship type you are configuring connections for.
After selecting the relationship type, you can search for and select entities in the Sources dropdown and in the Destinations dropdown.
Relationship types must be or via the API. You can configure relationship connections between entities in the entity YAML.
In a source , you can use the x-cortex-relationships
tag to define its destination entities.
Navigate to Catalogs > All entities then click the .
In the row containing the relationship type, click the pen icon.
Navigate to Catalogs > All entities then click the .
On its details page, in the upper right corner, click Remove.