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

# Retire Inventory Nodes

> Retire unassigned nodes: move them to the terminal DECOMMISSIONING state.

Nothing is deleted — the node row and its assignment history stay. The state
is reachable from INVENTORY only, so a node still on a cluster is refused:
detach it first. A retired node carries no cluster, so there is nothing to
scope against and this needs a broad ``inventory:update`` grant. ``dryRun``
validates without writing.



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/admin/inventory/nodes/retire
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/admin/inventory/nodes/retire:
    post:
      tags:
        - admin-inventory
      summary: Retire Inventory Nodes
      description: >-
        Retire unassigned nodes: move them to the terminal DECOMMISSIONING
        state.


        Nothing is deleted — the node row and its assignment history stay. The
        state

        is reachable from INVENTORY only, so a node still on a cluster is
        refused:

        detach it first. A retired node carries no cluster, so there is nothing
        to

        scope against and this needs a broad ``inventory:update`` grant.
        ``dryRun``

        validates without writing.
      operationId: retire_inventory_nodes_api_admin_inventory_nodes_retire_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/NodeRetireRequest'
      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:
    NodeRetireRequest:
      properties:
        nodeIds:
          items:
            type: string
          type: array
          maxItems: 1000
          title: Nodeids
      type: object
      required:
        - nodeIds
      title: NodeRetireRequest
      description: |-
        Move the `node_ids` rows into the terminal DECOMMISSIONING state.

        Nothing is deleted. Reachable from INVENTORY only, so detach first.
    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

````