---
title: "Detach Inventory Nodes"
method: POST
path: "/api/admin/inventory/nodes/detach"
tags: ["admin-inventory"]
---

# Detach Inventory Nodes

`POST /api/admin/inventory/nodes/detach`

Detach nodes from one inventory cluster, leaving the node rows unassigned.

Every node must currently be ACTIVE on ``clusterId``. Their assignments are
ended (kept as history) and the node rows keep their status. This is the
reversible half of node removal — a later import can re-assign the node.
``dryRun`` runs the same validation without writing.

## Query parameters

- `dryRun` boolean

## Request body

- NodeDetachRequest — End the ACTIVE assignments of `node_ids` on `cluster_id`. The node rows stay, with no live assignment; the assignment rows keep their history (status ENDED, endDate set). `cluster_id` is required: it is the detach target and the scope the ACL authorizes against.
  - `clusterId` string, required
  - `nodeIds` string[], required

## Response `200`

Successful Response

- GenericResponseMutationResult
  - `data` MutationResult
    - `operationId` string, required
    - `targetId` string, nullable
    - `targetName` string, nullable
    - `message` string, required
    - `created` integer, nullable
    - `updated` integer, nullable
    - `assigned` integer, nullable
    - `detached` integer, nullable
    - `retired` integer, nullable
  - `status` string, nullable — Response status

## Other responses

- `401` — Authorization failed
- `403` — Insufficient permissions
- `422` — Invalid request data

## Changes

> 8 revisions in range; 1 could not be searched.

- **2026-08-25** `bde6f9b78655` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/primeintellect/apis/pi-api/changes/api/admin/inventory/nodes/detach/post.md)

---

[API](https://skmtc.dev/primeintellect/apis/pi-api.md) · [All operations](https://skmtc.dev/primeintellect/apis/pi-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/primeintellect/pi-api/revisions/08d946cba60c/schema)
