> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.8/api-integrations/link-manager-apis/graphs.md).

# Graphs

## Get resource graph

> Retrieves a graph of relations for a given resource, enriched with names and versions.

```json
{"openapi":"3.0.0","info":{"title":"td-lm","version":"Truedat 8.8.0"},"paths":{"/api/relations/{resource_id}/graph":{"get":{"description":"Retrieves a graph of relations for a given resource, enriched with names and versions.","operationId":"TdLmWeb.GraphController.graph","parameters":[{"description":"ID of the root resource","in":"path","name":"resource_id","required":true,"schema":{"type":"integer"}},{"description":"Type of the root resource (business_concept, ingest, data_structure)","in":"query","name":"type","required":true,"schema":{"enum":["business_concept","ingest","data_structure"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get resource graph","tags":["Graphs"]}}},"components":{"schemas":{"GraphResponse":{"additionalProperties":false,"description":"Graph data containing nodes and edges","properties":{"data":{"additionalProperties":false,"properties":{"edges":{"description":"List of edges","items":{"$ref":"#/components/schemas/EdgeObject"},"type":"array"},"nodes":{"description":"List of nodes","items":{"$ref":"#/components/schemas/NodeObject"},"type":"array"}},"required":["nodes","edges"],"type":"object"}},"required":["data"],"title":"GraphResponse","type":"object"},"EdgeObject":{"additionalProperties":false,"description":"An edge representing a relation between two nodes","properties":{"id":{"description":"Relation ID","type":"integer"},"source_id":{"description":"Source node ID (e.g., 'business_concept:123')","type":"string"},"tag":{"allOf":[{"$ref":"#/components/schemas/TagObject"}],"description":"Associated tag (may be null)","nullable":true},"tags":{"description":"List of tags associated with the edge","items":{"$ref":"#/components/schemas/TagObject"},"type":"array"},"target_id":{"description":"Target node ID (e.g., 'business_concept:124')","type":"string"}},"required":["id","source_id","target_id","tags"],"title":"EdgeObject","type":"object"},"TagObject":{"additionalProperties":false,"properties":{"id":{"description":"Tag ID","type":"integer"},"value":{"$ref":"#/components/schemas/TagValue"}},"required":["id","value"],"title":"TagObject","type":"object"},"TagValue":{"additionalProperties":true,"description":"Dynamic value of a tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"title":"TagValue","type":"object"},"NodeObject":{"additionalProperties":false,"description":"A node in the graph representing a resource","properties":{"id":{"description":"Unique identifier","type":"string"},"name":{"description":"Resource name (enriched from cache)","nullable":true,"type":"string"},"resource_id":{"description":"Resource ID","type":"integer"},"resource_type":{"description":"Resource type","type":"string"},"version_id":{"description":"Version ID (for business_concept and ingest)","nullable":true,"type":"integer"}},"required":["id","resource_id","resource_type"],"title":"NodeObject","type":"object"},"TdLmUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnauthorizedResponse","type":"object"},"TdLmForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmForbiddenResponse","type":"object"},"TdLmInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmInternalServerErrorResponse","type":"object"}}}}
```
