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

# Detach Inventory Nodes

> 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 a node left ACTIVE moves to INVENTORY. This is
the reversible half of node removal — a later import can re-assign the node.
``dryRun`` runs the same validation without writing.



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/admin/inventory/nodes/detach
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/admin/inventory/nodes/detach:
    post:
      tags:
        - admin-inventory
      summary: Detach Inventory Nodes
      description: >-
        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 a node left ACTIVE moves to INVENTORY. This
        is

        the reversible half of node removal — a later import can re-assign the
        node.

        ``dryRun`` runs the same validation without writing.
      operationId: detach_inventory_nodes_api_admin_inventory_nodes_detach_post
      parameters:
        - name: dryRun
          in: query
          required: false
          schema:
            type: boolean
            title: Dryrun
            default: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NodeDetachRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_MutationResult_'
        '401':
          description: Authorization failed
        '403':
          description: Insufficient permissions
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    NodeDetachRequest:
      properties:
        clusterId:
          type: string
          title: Clusterid
        nodeIds:
          items:
            type: string
          type: array
          maxItems: 1000
          title: Nodeids
      type: object
      required:
        - clusterId
        - nodeIds
      title: NodeDetachRequest
      description: >-
        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.
    GenericResponse_MutationResult_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/MutationResult'
            - type: 'null'
          description: Response data
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Response status
      type: object
      title: GenericResponse[MutationResult]
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    MutationResult:
      properties:
        operationId:
          type: string
          title: Operationid
        targetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetid
        targetName:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetname
        message:
          type: string
          title: Message
        created:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created
        updated:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated
        assigned:
          anyOf:
            - type: integer
            - type: 'null'
          title: Assigned
        detached:
          anyOf:
            - type: integer
            - type: 'null'
          title: Detached
        retired:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retired
      type: object
      required:
        - operationId
        - message
      title: MutationResult
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````