---
title: "getEntity"
method: GET
path: "/v1/entity/{slug}/{id}"
tags: ["Entities"]
---

# getEntity

`GET /v1/entity/{slug}/{id}`

Gets Entity and relations by id.

## Relations

When `hydrate=true`, relation attributes are replaced in-place with nested entity values.

Example:
```json
{
  "_id": "123",
  "name": "parent",
  "_tags": ["parent"],
  "contacts": {
    "$relation": [
      { "entity_id": "456", "_tags": ["primary"] },
      { "entity_id": "789", "_tags": ["secondary"] },
    ]
  },
  "addresses": {
    "$relation_ref": [
      { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
      { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
    ]
  }
}
```

Becomes:
```json
{
  "_id": "123",
  "name": "parent",
  "_tags": ["parent"],
  "contacts": [
    {
      "$relation": { "entity_id": "456", "_tags": ["primary"] },
      "_id": "456",
      "name": "child 1",
      "_tags": ["child"]
    },
    {
      "$relation": { "entity_id": "789", "_tags": ["secondary"] },
      "_id": "789",
      "name": "child 2",
      "_tags": ["child"]
    }
  ],
  "addresses": [
    {
      "$relation_ref": { "entity_id": "123", "_tags": ["primary"], "path": "address.0" },
      "_id": "123",
      "address": "address 1",
      "_tags": ["child"]
    },
    {
      "$relation_ref": { "entity_id": "234", "_tags": ["secondary"], "path": "address.0" },
      "_id": "234",
      "address": "address 2",
      "_tags": ["child"]
    }
  ]
}
```

## Path parameters

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

## Query parameters

- `hydrate` boolean
- `anonymize` boolean

## Response `200`

Success

- object
  - `entity` EntityItem
    - `_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.
  - `relations` EntityItem[]
    - `_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.

## 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)
