Skip to main content

get-cloud-diagram-resource-relationships

dci get-cloud-diagram-resource-relationships id rid [flags]

Walks the diagram graph from the anchor resource and returns related resources. Edge traversal walks the diagram's link set (same-scheme guard, BFS, cycle-safe); group traversal walks the group membership set. The result list is capped at 200 relations; truncated is true when the cap is hit. Read-only: does not mutate diagram state.

Flags

--direction: (string default:"both" enum:"downstream","upstream","both")

--depth: (string default:"direct" enum:"direct","transitive")

--kind: (string default:"edges" enum:"edges","group_members","both")

Responses

200 (application/json)

OK - Related resources returned.

{
"type": "object",
"required": [
"anchor",
"direction",
"depth",
"kind",
"relations",
"truncated"
],
"description": "The response payload for the resource relationships endpoint.",
"properties": {
"anchor": {
"type": "object",
"required": [
"id",
"type",
"name"
],
"description": "The anchor resource the traversal started from.",
"properties": {
"id": {
"type": "string",
"description": "Anchor resource ID (matches the `rid` path parameter)."
},
"type": {
"type": "string",
"enum": [
"node",
"element",
"group"
],
"description": "Component bucket the anchor lives in."
},
"name": {
"type": "string",
"description": "Human-readable resource name."
},
"serviceType": {
"type": "string",
"description": "Cloud service type when available (e.g. `Amazon RDS`, `GCP Cloud SQL`)."
}
}
},
"direction": {
"type": "string",
"enum": [
"downstream",
"upstream",
"both"
]
},
"depth": {
"type": "string",
"enum": [
"direct",
"transitive"
]
},
"kind": {
"type": "string",
"enum": [
"edges",
"group_members",
"both"
]
},
"relations": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"type",
"name",
"relation",
"hops"
],
"description": "One related resource returned by the traversal.",
"properties": {
"id": {
"type": "string",
"description": "Related resource ID."
},
"type": {
"type": "string",
"enum": [
"node",
"element",
"group"
],
"description": "Component bucket the related resource lives in."
},
"name": {
"type": "string",
"description": "Human-readable name of the related resource."
},
"serviceType": {
"type": "string",
"description": "Cloud service type when available."
},
"relation": {
"type": "string",
"enum": [
"downstream",
"upstream",
"group_member",
"group_parent"
],
"description": "How the resource is related to the anchor. `downstream` / `upstream` are edge\nrelations (anchor is the edge origin / destination respectively).\n`group_member` means the related resource is contained in the anchor (anchor is\na group); `group_parent` means the related resource is a group that contains\nthe anchor."
},
"hops": {
"type": "integer",
"minimum": 1,
"description": "Edge hop count from the anchor. Group-member / group-parent entries are reported as 1."
}
}
},
"description": "Resources related to the anchor (capped at 200)."
},
"truncated": {
"type": "boolean",
"description": "True when the relation list was capped at 200 entries."
}
}
}

400 (application/json)

Bad Request - The server cannot process the request, often due to a malformed request.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

401 (application/json)

Unauthorized - Invalid API key.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

403 (application/json)

Forbidden - Either the resource does not exist, or the caller is not authorized to access it. These two cases are deliberately indistinguishable to avoid information disclosure: the access guard runs before any existence check, so callers receive 403 (not 404) for unknown IDs on this endpoint. Used by Cloud Diagrams routes keyed by a path-param resource id (e.g. /clouddiagrams/v1/statussheet/\{id\}/...).

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

404 (application/json)

Not Found - The requested resource does not exist.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

Aliases: get-cloud-diagram-resource-relationships, getclouddiagramresourcerelationships