Get CMDB Relationships
get_cmdb_relationshipsRetrieve direct relationships of a CMDB Configuration Item for impact analysis and dependency mapping. Specify CI sys_id and optional direction or relationship type.
Instructions
Get direct relationships of a CMDB Configuration Item (CI). Returns upstream, downstream, or both relationship directions. Use this for impact analysis, dependency mapping, and understanding CI topology.
Provide the CI sys_id (from cmdb_ci or any CI class table). Optionally filter by relationship type (e.g., 'Depends on::Used by', 'Contains::Contained by').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| ci_sys_id | Yes | The sys_id of the Configuration Item to get relationships for. | |
| direction | No | Relationship direction: "upstream" (parents/dependencies), "downstream" (children/dependents), or "both". Default is "both". | both |
| relation_type | No | Filter by relationship type name (e.g., "Depends on::Used by", "Contains::Contained by"). If omitted, returns all relationship types. | |
| limit | No | Maximum number of relationships to return. Default is 100. |