Skip to navigation

Get Rack power state

View as MarkdownOpen in Claude

Read synthesized rack power summaries, each current inventory member’s power details, tracked Core actions and outstanding Flow power tasks. Accepts an external inventory rack ID, not a rack name or internal hardware UUID. This passive read does not issue power commands.

Org must have an Infrastructure Provider entity. User must have authorization role with PROVIDER_ADMIN suffix in that Org. The Site must belong to that Provider and have the flow capability enabled.

Actual and desired summaries preserve the counts supplied by Flow in coverage. REST does not recompute these categories from member read errors: for example, a newer state that REST represents as Unsupported can count as unavailable in Flow’s coverage. Two disagreeing known states produce Mixed, even when other members are unavailable. Otherwise unknown or unavailable supported evidence produces Unknown. Desired votes come only from enabled On and Off policies: missing policies, disabled policies and inapplicable policies never vote as Off. Unsupported members remain visible in coverage but do not make a summary incomplete. complete does not imply that every physical device supports a power read.

Every current, non-deleted inventory member appears in components, including unlinked and unsupported types. Known member types follow the order Unknown, Compute, NVSwitch, PowerShelf, TORSwitch, UMS, CDU, with deterministic inventory order within each type rather than sorting by external inventory ID. Future service types displayed as Unknown retain their service position. An unlinked component’s position is not a stable identity across reads. Each component includes its Core actions and their read error under operations. An empty action list with a null error means no tracked maintenance actions.

Root operations.tasks contains each outstanding power task once, ordered by creation time then task UUID. Each component’s compact task references follow that root ordering and supply its relevance. Root task relevance is Unknown. Full recorded target selections remain on root tasks, including moved or removed members and empty selections. Unavailable target identities set that task’s rackId and targets to null with targetsError, preserving its other metadata. Internal hardware UUIDs are never substituted for external inventory IDs.

All response fields are present. Null indicates unavailable or inapplicable data as documented on each field; successful empty lists are arrays with a null corresponding read error. Missing service sections report Unsupported. Hardware, stored policies, Core actions and Flow tasks are collected separately and can reflect different instants. A Running task does not establish hardware dispatch or correlate to an Active Core action.

More than 256 outstanding power tasks across the rack reports operations.tasksError: LimitExceeded. The separate waiting-context limit is 256 nonterminal tasks of all types; exceeding it reports waitingContext.error: LimitExceeded while retaining power tasks. Flow also limits the encoded proxy response to 1,991,680 bytes, independently of the HTTP response size. It first replaces nonempty successful waiting-context lists with LimitExceeded. Empty contexts and existing context errors remain unchanged. If the result still exceeds this allowance, the request fails with HTTP 429; members, tasks, actions and recorded selections are never truncated to fit.

Authentication

AuthorizationBearer
export JWT_BEARER_TOKEN="<jwt-bearer-token>"

# Example org name: "acme-inc
export ORG_NAME=<org-name>

# Use the JWT bearer token in your API request auth header:
curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current

Path parameters

orgstringRequired
Name of the Org
idstringRequired
External inventory Rack ID

Query parameters

siteIdstringRequiredformat: "uuid"
ID of the Site that owns the rack.

Response

Rack summaries and independently available member and operation details.
idstring or null

External inventory rack ID, or null when the service omits it; never an internal UUID fallback.

actualobject

A state derived from member evidence, not a rack hardware observation or a stored rack policy. Known disagreement takes precedence over incomplete evidence. Without disagreement, unknown or unavailable supported evidence makes the state Unknown. No applicable votes also gives Unknown. An unrecognized service state maps to Unknown while preserving the supplied coverage and complete flag. An omitted service summary is Unknown with zero counts and complete false.

desiredobject

A state derived from member evidence, not a rack hardware observation or a stored rack policy. Known disagreement takes precedence over incomplete evidence. Without disagreement, unknown or unavailable supported evidence makes the state Unknown. No applicable votes also gives Unknown. An unrecognized service state maps to Unknown while preserving the supplied coverage and complete flag. An omitted service summary is Unknown with zero counts and complete false.

operationsobject

Each outstanding Flow power task once. Components include their own Core actions and references to these full task records. Core and Flow are separate observations; an action does not establish a task link.

componentslist of objects

Every current non-deleted inventory member, including unsupported and unlinked members. Known types follow Unknown, Compute, NVSwitch, PowerShelf, TORSwitch, UMS, CDU, with deterministic inventory order within each type rather than sorting by external inventory ID. Future service types displayed as Unknown retain their service position. Internal hardware UUIDs are not exposed.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
412
Precondition Failed Error
429
Too Many Requests Error
500
Internal Server Error
501
Not Implemented Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error