---
title: "Replace all Expected Racks"
method: PUT
path: "/v2/org/{org}/nico/expected-rack/all"
tags: ["Expected Rack"]
---

# Replace all Expected Racks

`PUT /v2/org/{org}/nico/expected-rack/all`

## Request

- Base URL: `https://nico-rest-api.nico.svc.cluster.local`
- URL: `https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/expected-rack/all`
- Auth: HTTP bearer

Replace the full set of Expected Racks for a Site with the provided list. All existing Expected Racks for the Site that are not in the request body will be deleted, and any new Expected Racks in the request will be created. Existing Expected Racks with matching `rackId` values will be updated.

Every entry in `expectedRacks` must reference the same `siteId` as the top-level `siteId`. `rackId` values must be unique within the request. The `expectedRacks` array may be empty to clear all Expected Racks for the Site.

Org must have an Infrastructure Provider entity. User must have authorization role with `PROVIDER_ADMIN` suffix.

Alternatively, Tenant Admins with `TargetedInstanceCreation` capability can also replace Expected Racks if they have an account with the Site's Infrastructure Provider.

## Request body

- ExpectedRackList: Replace-all request body for Expected Racks. The `expectedRacks` array contains the full desired set of Expected Racks for the Site identified by `siteId`. All entries must reference the same `siteId` as the top-level field, and `rackId` values must be unique within the request. The array may be empty to clear all Expected Racks for the Site.
  - `siteId` string, uuid, required: ID of the Site whose Expected Racks should be replaced
  - `expectedRacks` ExpectedRackCreateRequest[], required: The full desired set of Expected Racks for the Site. Every entry must reference the same `siteId` as the top-level field, and `rackId` values must be unique within the request. May be empty to clear all Expected Racks for the Site.
    - `siteId` string, uuid, required: ID of the Site the Expected Rack belongs to
    - `rackId` string, required: Operator-supplied identifier for the rack (string, not UUID). Must be non-empty and unique within the Site.
    - `rackProfileId` string: Ignored compatibility field. Core derives the profile from the matching ExpectedRackGroup; omit this field.
    - `name` string, nullable: Human-readable name of the Expected Rack
    - `description` string, nullable: Human-readable description of the Expected Rack
    - `labels` Labels: Label keys must not be empty or whitespace-only. Keys and values may contain at most 255 characters and must not contain the Unicode NUL character (U+0000). Empty values are allowed.

## Response `200`

OK

- ExpectedRack[]
  - `id` string, uuid: Unique identifier (UUID) for the Expected Rack
  - `rackId` string: Operator-supplied identifier for the rack (string, not UUID). Unique within a Site.
  - `siteId` string, uuid: ID of the Site the Expected Rack belongs to
  - `rackProfileId` string: Identifier of the Rack Profile this rack conforms to
  - `rackGroupId` string, nullable: External rack group ID selected and persisted at creation together with rackProfileId. Null for legacy rows without a recorded group; metadata updates preserve it.
  - `name` string: Human-readable name of the Expected Rack
  - `description` string: Human-readable description of the Expected Rack
  - `labels` Labels: Label keys must not be empty or whitespace-only. Keys and values may contain at most 255 characters and must not contain the Unicode NUL character (U+0000). Empty values are allowed.
  - `created` string, date-time: ISO 8601 datetime when the Expected Rack was created
  - `updated` string, date-time: ISO 8601 datetime when the Expected Rack was last updated

## Other responses

- `400`: Error response when request data cannot be validated
- `403`: Error response when user is not authorized to call an endpoint or retrieve/modify objects
- `409`: Error response when the request conflicts with an existing resource or operation

## Changes

- **2026-10-15** `293dc126ab73`: 3 info
  - removed the `nico` enum value from the `source` response property for the response status `400`
  - removed the `nico` enum value from the `source` response property for the response status `403`
  - removed the `nico` enum value from the `source` response property for the response status `409`
- **2026-10-14** `4a2b5e050a2e`: 1 info
  - added the non-success response with the status `409`
- **2026-10-01** `0b2823e8f92b`: 1 info
  - added the optional property `items/rackGroupId` to the response with the `200` status
- **2026-09-29** `78f3b35615a5`: 2 info
  - added the optional property `retryable` to the response with the `400` status
  - added the optional property `retryable` to the response with the `403` status
- **2026-09-29** `009b95f8f8a3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nvidia/apis/nvidia-infra-controller-rest-api/changes/v2/org/:org/nico/expected-rack/all/put.md)

---

[API](https://skmtc.dev/nvidia/apis/nvidia-infra-controller-rest-api.md) - [All operations](https://skmtc.dev/nvidia/apis/nvidia-infra-controller-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nvidia/apis/nvidia-infra-controller-rest-api/revisions/db15b7308121?raw)
