---
title: "Get relation instance"
method: GET
path: "/api/v3/directory/relation"
tags: ["directory"]
---

# Get relation instance

`GET /api/v3/directory/relation`

## Request

- The document declares no server URL.
- Auth: API key in header `authorization` and API key in header `aserto-tenant-id`
- TypeScript: <https://skmtc.dev/aserto/apis/openid-authzen-access-service/docs/api/v3/directory/relation/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns single relation instance, optionally with objects.

## Query parameters

- `object_type` string, required
- `object_id` string, required
- `relation` string, required
- `subject_type` string, required
- `subject_id` string, required
- `subject_relation` string
- `with_objects` boolean

## Response `200`

A successful response.

- V3GetRelationResponse
  - `objects` object
  - `result` V3Relation
    - `created_at` string, date-time
    - `etag` string
    - `object_id` string, required
    - `object_type` string, required
    - `relation` string, required
    - `subject_id` string, required
    - `subject_relation` string
    - `subject_type` string, required
    - `updated_at` string, date-time

## Other responses

- `304`: Relation not modified.
- `default`: An unexpected error response.

## Changes

- **2025-02-17** `fddc0bd34946`: 1 info
  - api operation id `directory.v3.relation.get` removed and replaced with `directory.reader.v3.relation.get`
- **2024-02-11** `10bee11be55a`: 1 info
  - added the non-success response with the status `304`
- **2023-10-31** `68bcc990c27a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aserto/apis/openid-authzen-access-service/changes/api/v3/directory/relation/get.md)

---

[API](https://skmtc.dev/aserto/apis/openid-authzen-access-service.md) - [All operations](https://skmtc.dev/aserto/apis/openid-authzen-access-service/llms.txt) - [OpenAPI document](https://skmtc.dev/aserto/apis/openid-authzen-access-service/revisions/5dd53d1e6d2e?raw)
