---
title: "Query relationships"
method: GET
path: "/relation-tuples"
tags: ["relationship"]
---

# Query relationships

`GET /relation-tuples`

Get all relationships that match the query. Only the namespace field is required.

## Query parameters

- `page_size` integer
- `page_token` string
- `namespace` string
- `object` string
- `relation` string
- `subject_id` string
- `subject_set.namespace` string
- `subject_set.object` string
- `subject_set.relation` string

## Response `200`

relationships

- Relationships — Paginated Relationship List
  - `next_page_token` string — The opaque token to provide in a subsequent request to get the next page. It is the empty string iff this is the last page.
  - `relation_tuples` Relationship[]
    - `namespace` string, required — Namespace of the Relation Tuple
    - `object` string, required — Object of the Relation Tuple
    - `relation` string, required — Relation of the Relation Tuple
    - `subject_id` string — SubjectID of the Relation Tuple Either SubjectSet or SubjectID can be provided.
    - `subject_set` SubjectSet
      - `namespace` string, required — Namespace of the Subject Set
      - `object` string, required — Object of the Subject Set
      - `relation` string, required — Relation of the Subject Set

## Other responses

- `404` — errorGeneric
- `default` — errorGeneric

---

[API](https://skmtc.net/ory/apis/ory-keto.md) · [All operations](https://skmtc.net/ory/apis/ory-keto/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ory/ory-keto/versions/305cb58cb754/schema)
