---
title: "Get resource relationships"
method: GET
path: "/clouddiagrams/v1/statussheet/{id}/resources/{rid}/relationships"
tags: ["Cloud Diagrams"]
---

# Get resource relationships

`GET /clouddiagrams/v1/statussheet/{id}/resources/{rid}/relationships`

## Request

- Base URL: `https://api.doit.com`
- URL: `https://api.doit.com/clouddiagrams/v1/statussheet/{id}/resources/{rid}/relationships`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `X-Tenant-Id` and API key in header `Authorization`

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.

## Path parameters

- `id` string, required
- `rid` string, required

## Query parameters

- `direction` 'downstream' | 'upstream' | 'both'
- `depth` 'direct' | 'transitive'
- `kind` 'edges' | 'group_members' | 'both'

## Response `200`

OK - Related resources returned.

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

## Other responses

- `400`: Bad Request - The server cannot process the request, often due to a malformed request.
- `401`: Unauthorized - Invalid API key.
- `403`: 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}/...`).
- `404`: Not Found - The requested resource does not exist.

---

[API](https://skmtc.dev/doit/apis/doit-cloud-intelligence.md) - [All operations](https://skmtc.dev/doit/apis/doit-cloud-intelligence/llms.txt) - [OpenAPI document](https://skmtc.dev/doit/apis/doit-cloud-intelligence/revisions/9416402fc119?raw)
