---
title: "Expand a Relation Tuple"
method: GET
path: "/expand"
tags: ["read"]
---

# Expand a Relation Tuple

`GET /expand`

Use this endpoint to expand a relation tuple.

## Query parameters

- `namespace` string, required
- `object` string, required
- `relation` string, required
- `max-depth` integer

## Response `200`

expandTree

- ExpandTree
  - `children` ExpandTree[] — children
  - `subject_id` string — subject id
  - `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
  - `type` 'union' | 'exclusion' | 'intersection' | 'leaf', required

## Other responses

- `400` — genericError
- `404` — genericError
- `500` — genericError

## Changes

- **2022-02-09** `a88adf308b2b` — 4 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 `400`
  - 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 `max-depth` became optional
- **2021-10-07** `e90046dbd055` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ory/apis/ory-keto-api/changes/expand/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/a88adf308b2b/schema)
