post_power

Function post_power 

Source
pub async fn post_power(
    ctx: RequestCtx,
    __arg1: Json<PowerRequest>,
) -> Result<impl IntoResponse, (StatusCode, Json<ErrorResponse>)>
Expand description

POST /api/v1/power — start a PCS power transition (on / off / reset) against nodes or all members of a cluster and return the transition id immediately. Does not block until the transition completes — the CLI is responsible for polling GET /power/transitions/{id} until the snapshot reports transitionStatus = "completed".

Returns a TransitionStartOutput ({ transitionID, operation }) as JSON. Callers can hand the transitionID to get_power_transition.