---
title: "Expand a Relationship into permissions."
method: GET
path: "/relation-tuples/expand"
tags: ["permission"]
---

# Expand a Relationship into permissions.

`GET /relation-tuples/expand`

Use this endpoint to expand a relationship tuple into permissions.

## Query parameters

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

## Response `200`

expandedPermissionTree

- ExpandedPermissionTree
  - `children` ExpandedPermissionTree[] — The children of the node, possibly none.
  - `tuple` Relationship — 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
  - `type` 'union' | 'exclusion' | 'intersection' | 'leaf' | 'tuple_to_subject_set' | 'computed_subject_set' | 'not' | 'unspecified', required — The type of the node. union TreeNodeUnion exclusion TreeNodeExclusion intersection TreeNodeIntersection leaf TreeNodeLeaf tuple_to_subject_set TreeNodeTupleToSubjectSet computed_subject_set TreeNodeComputedSubjectSet not TreeNodeNot unspecified TreeNodeUnspecified

## Other responses

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

## Changes

- **2022-11-25** `acd2fb10eb38` — 4 info
  - api operation id `getExpand` removed and replaced with `expandPermissions`
  - api tag `permission` added
  - api tag `read` removed
  - removed the non-success response with the status `500`
- **2022-03-29** `5927be396871` — 1 info
  - endpoint added
- **2021-09-24** `b323fac0f51a` — 1 breaking
  - api path removed without deprecation

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

---

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