---
title: "getRelationsV3"
method: GET
path: "/v3/entity/{slug}/{id}/relations"
tags: ["Relations"]
---

# getRelationsV3

`GET /v3/entity/{slug}/{id}/relations`

Returns 1st level direct relations for an entity with pagination.

You can control whether to return the full entity or just the relation item with the `?hydrate` query param.

Reverse relations i.e. entities referring to this entity are included with the `?include_reverse` query param.

## Path parameters

- `slug` string, required — URL-friendly identifier for the entity schema
- `id` string, uuid, required

## Query parameters

- `hydrate` boolean
- `anonymize` boolean
- `include_reverse` boolean
- `from` integer
- `size` integer
- `include_schemas` EntitySlug[]
- `exclude_schemas` EntitySlug[]
- `mode` 'direct' | 'reverse' | 'both'
- `fields` string[] — List of entity fields to include or exclude in the response Use ! to exclude fields, e.g. `!_id` to exclude the `_id` field. Globbing and globstart (**) is supported for nested fields.
- `include_deleted` 'true' | 'false' | 'only' — Whether to include deleted entities in the search results - `true`: include deleted entities - `false`: exclude deleted entities - `only`: include only deleted entities By default, no deleted entities are included in the search results.

## Response `200`

Success

- GetRelationsRespWithPagination
  - `hits` number
  - `relations` union[]
    - union
      - RelationItem
        - `entity_id` string, uuid, required
        - `org_id` string — Organization Id the entity belongs to
        - `_schema` string — URL-friendly identifier for the entity schema
        - `attribute` string, required
        - `_tags` string[]
        - `reverse` boolean — Whether this is a reverse relation
      - RelationEntity
        - `_id` string, uuid, required
        - `_org` string, required — Organization Id the entity belongs to
        - `_owners` EntityOwner[]
          - `org_id` string, required
          - `user_id` string
        - `_schema` string, required — URL-friendly identifier for the entity schema
        - `_title` string, nullable, required — Title of entity
        - `_tags` string[], nullable
        - `_created_at` string, date-time, nullable, required
        - `_updated_at` string, date-time, nullable, required
        - `_deleted_at` string, date-time, nullable
        - `_acl` object — Access control list (ACL) for an entity. Defines sharing access to external orgs or users.
          - `view` string[]
          - `edit` string[]
          - `delete` string[]
        - `_purpose` string[], nullable
        - `_purpose_name` string[], nullable — Automatically computed purpose names from _purpose attribute
        - `_manifest` string[], nullable — Manifest ID used to create/update the entity
        - `_changesets` object, nullable — Pending attribute changesets for attributes configured with external or approval edit mode. The value shape is `Changeset` (`proposed_value`, `created_at`, `edit_mode`, ...) and is what `:apply` / `:dismiss` operate on. Read-only via normal entity PATCH/PUT operations — those handlers strip `_changesets` from request bodies. Use the changeset management endpoints to mutate this field.
        - `$relation` RelationItem
          - `entity_id` string, uuid, required
          - `org_id` string — Organization Id the entity belongs to
          - `_schema` string — URL-friendly identifier for the entity schema
          - `attribute` string, required
          - `_tags` string[]
          - `reverse` boolean — Whether this is a reverse relation

## Other responses

- `404` — The requested resource was not found

---

[API](https://skmtc.net/epilot/apis/entity-api.md) · [All operations](https://skmtc.net/epilot/apis/entity-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/epilot/entity-api/versions/8dd3d44e1c4f/schema)
