# Relationships

`RelationshipController` exposes three endpoints. The same payloads are surfaced on the source and target dataset's detail pages — when a dataset participates in any relationships, those are listed under the dataset's relationships cluster. For the cardinality model (`ONE_TO_EXACTLY_ONE` / `ONE_TO_ZERO_OR_ONE` / `ONE_TO_ONE_OR_MORE` / `ONE_TO_ZERO_ONE_OR_MORE`), the per-adapter ingestion coverage, and the ERD vs graph relationship distinction, see the [Relationships](/features/data-modelling/relationships.md) page.

| Method + Path                                                         | Operation                  | What                                                                                                |
| --------------------------------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------- |
| `GET /api/relationships?page=N&size=M&type=ERD\|GRAPH\|ALL&query=...` | `getRelationships`         | Paginated list with optional type filter and free-text query. Returns `DataEntityRelationshipList`. |
| `GET /api/relationships/erd/{relationship_id}`                        | `getERDRelationshipById`   | Full ERD relationship details (source / target / cardinality / owner).                              |
| `GET /api/relationships/graph/{relationship_id}`                      | `getGraphRelationshipById` | Full graph relationship details (source / target node, edge metadata).                              |

## See also

* [API Reference hub](/developer-guides/api-reference.md) — the full per-feature index.
* [Relationships](/features/data-modelling/relationships.md) — feature description, cardinality model, per-adapter ingestion coverage, ERD vs graph distinction.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opendatadiscovery.org/developer-guides/api-reference/relationships.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
