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

# Linked rows

## `core.cases.link_row`

Link an existing table row to a case.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="case_id" type="string" required>
  Case ID or short ID (e.g. CASE-0042)
</ParamField>

<ParamField path="row_id" type="string" required>
  Row ID
</ParamField>

<ParamField path="table_id" type="string" required>
  Table ID
</ParamField>

### Examples

**Link a table row**

```yaml theme={null}
- ref: link_row
  action: core.cases.link_row
  args:
    case_id: ${{ TRIGGER.case_id }}
    table_id: indicators
    row_id: ${{ TRIGGER.row_id }}
```

## `core.cases.unlink_row`

Remove a linked table row from a case.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="case_id" type="string" required>
  Case ID or short ID (e.g. CASE-0042)
</ParamField>

<ParamField path="row_id" type="string" required>
  Row ID
</ParamField>

<ParamField path="table_id" type="string" required>
  Table ID
</ParamField>

### Examples

**Unlink a table row**

```yaml theme={null}
- ref: unlink_row
  action: core.cases.unlink_row
  args:
    case_id: ${{ TRIGGER.case_id }}
    table_id: indicators
    row_id: ${{ TRIGGER.row_id }}
```

## `core.cases.insert_row`

Insert a row into a table and link it to a case.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

<Info>
  Linked rows use regular tables. Create the destination table with
  the same `columns` schema documented in
  [Tables](/automations/tables).
</Info>

### Inputs

<ParamField path="case_id" type="string" required>
  Case ID or short ID (e.g. CASE-0042)
</ParamField>

<ParamField path="row" type="object" required>
  Row values
</ParamField>

<ParamField path="table_id" type="string" required>
  Table ID
</ParamField>

### Examples

**Insert and link a table row**

```yaml theme={null}
- ref: insert_case_row
  action: core.cases.insert_row
  args:
    case_id: ${{ TRIGGER.case_id }}
    table_id: indicators
    row:
      value: ${{ TRIGGER.indicator }}
      indicator_type: domain
```

## `core.cases.get_linked_case_rows`

Get linked rows for a specific case by ID.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="case_id" type="string" required>
  The ID or short ID (e.g. CASE-0042) of the case to retrieve.
</ParamField>

### Examples

**Get linked table rows**

```yaml theme={null}
- ref: linked_rows
  action: core.cases.get_linked_case_rows
  args:
    case_id: ${{ TRIGGER.case_id }}
```

## `core.cases.list_cases_by_row`

List the cases that link a table row.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="row_id" type="string" required>
  The ID of the linked row.
</ParamField>

<ParamField path="table_id" type="string" required>
  The ID of the table that contains the row.
</ParamField>

<ParamField path="cursor" type="string | null">
  Pagination cursor used to fetch a specific page when paginate=true.

  Default: `null`.
</ParamField>

<ParamField path="exclude_case_id" type="string | null">
  The ID or short ID (e.g. CASE-0042) of a case to leave out, usually the current case.

  Default: `null`.
</ParamField>

<ParamField path="limit" type="integer">
  Maximum number of cases to return.

  Default: `100`.
</ParamField>

<ParamField path="order_by" type="string | null">
  The field to order the cases by.

  Default: `null`.
</ParamField>

<ParamField path="paginate" type="boolean">
  If true, return cursor pagination metadata along with items.

  Default: `false`.
</ParamField>

<ParamField path="sort" type="string | null">
  The direction to order the cases by.

  Default: `null`.
</ParamField>

### Examples

**List other cases that link a row**

```yaml theme={null}
- ref: related_cases
  action: core.cases.list_cases_by_row
  args:
    table_id: ${{ ACTIONS.linked_rows.result[0].table_id }}
    row_id: ${{ ACTIONS.linked_rows.result[0].row_id }}
    exclude_case_id: ${{ TRIGGER.case_id }}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.