---
title: "# Query relation tuples"
method: GET
path: "/relation-tuples"
tags: ["read"]
---

# # Query relation tuples

`GET /relation-tuples`

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

## Query parameters

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

## Response `200`

getRelationTuplesResponse

- GetRelationTuplesResponse
  - `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` RelationTuple[]
    - `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` — genericError
- `500` — genericError

---

[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/f018d2492c97/schema)
