---
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

## Changes

- **2025-08-20** `fb6ac8396666` — 1 breaking, 2 warning
  - for the `query` request parameter `page_size`, default value `250` was added
  - for the `query` request parameter `page_size`, the max was set to `1000.00`
  - for the `query` request parameter `page_size`, the min was set to `1.00`
- **2022-11-25** `5f207fe3fcc0` — 6 warning, 5 info
  - removed the optional property `code` from the response with the `404` status
  - removed the optional property `details` from the response with the `404` status
  - removed the optional property `message` from the response with the `404` status
  - removed the optional property `reason` from the response with the `404` status
  - …7 more
- **2022-02-09** `a88adf308b2b` — 3 info
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `404`
  - added the media type `application/json` for the response with the status `500`
- **2021-12-13** `2f265b90b524` — 1 info
  - the `query` request parameter `namespace` became optional
- **2021-10-08** `1c94c69d40e2` — 2 info
  - the `query` request parameter `object` became optional
  - the `query` request parameter `relation` became optional

[Full history](https://skmtc.dev/ory/apis/ory-keto-api/changes/relation-tuples/get.md)

---

[API](https://skmtc.dev/ory/apis/ory-keto-api.md) · [All operations](https://skmtc.dev/ory/apis/ory-keto-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/ory-keto-api/revisions/4e980fe4b29b/schema)
