> ## Documentation Index
> Fetch the complete documentation index at: https://ekso.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# DataLink

> Entity-to-entity relationship.

Entity-to-entity relationship. Links connect items to other items (`Subtask`, `Relates`, `Blocks`, `Duplicate`), or items to external resources via the link-type collection. Links are directional — `FromOwner` / `ToOwner` capture which side is which.

## Sample JSON

Copy, edit, paste. Server-set fields (`id`, `created`, `tenantId`, …) are omitted from the example — they're populated by the server on response.

```json theme={null}
{
  "fromOwner": "Item",
  "fromOwnerId": "item_01HITEM_LOGIN_BUG",
  "toOwner": "Item",
  "toOwnerId": "item_01HITEM_TIMEOUT_FIX",
  "linkType": "Blocks"
}
```

## Fields

| Field         | Type                                                  | Required     | Notes                                                                                                                                               |
| ------------- | ----------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `entity`      | string • nullable                                     | Server-set   | Set by the server. Read-only on writes.                                                                                                             |
| `linkType`    | string                                                | **Required** | Relationship label. Common values: `Subtask`, `Relates`, `Blocks`, `Duplicate`. Free-text — Jira link types come through verbatim during migration. |
| `fromOwner`   | [`ContentOwner`](/data-model/constants#content-owner) | Optional     | Type of the entity at the from-side of the link.                                                                                                    |
| `fromOwnerId` | string                                                | **Required** | Id of the from-side entity.                                                                                                                         |
| `toOwner`     | [`ContentOwner`](/data-model/constants#content-owner) | Optional     | Type of the entity at the to-side of the link.                                                                                                      |
| `toOwnerId`   | string                                                | **Required** | Id of the to-side entity.                                                                                                                           |
| `tenantId`    | string                                                | Server-set   | Set by the server. Read-only on writes.                                                                                                             |
| `id`          | string                                                | Server-set   | Set by the server. Read-only on writes.                                                                                                             |
| `created`     | string (date-time)                                    | Server-set   | Set by the server. Read-only on writes.                                                                                                             |
| `createdBy`   | string                                                | Server-set   | Set by the server. Read-only on writes.                                                                                                             |
| `updated`     | string (date-time)                                    | Server-set   | Set by the server. Read-only on writes.                                                                                                             |
| `updatedBy`   | string                                                | Server-set   | Set by the server. Read-only on writes.                                                                                                             |
| `deleted`     | boolean                                               | Server-set   | Set by the server. Read-only on writes.                                                                                                             |

## Used by

### Request body

* `POST /api/link`

### Response body

* `POST /api/link`

### CLI

`ekso link` — see the [command branches](/cli/branches) page for available verbs. Body for create / update verbs typically passed via `--data @file.json` matching the [sample JSON](#sample-json) above.
