Skip to main content
Compute Management/Host Related Interfaces
PUTHost Related InterfacesSince 4.7.0SynchronousAuth Required

Get Host Latest Power Status

Get Host Latest Power Status

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Request Inputs

Path Parameters

  • uuidStringRequired

    Resource UUID, uniquely identifies the resource

Body Fields

  • gethostpowerstatusObjectRequired

    gethostpowerstatus request body object.

    • methodString

      Method to get host power status

  • systemTagsList

    System tag

  • userTagsList

    User tag

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • inventoryStringRequired

    See details inventory

    • uuidStringRequired

      Resource UUID, uniquely identifies the resource

    • ipmiAddressStringRequired

      IPMI address

    • ipmiUsernameStringRequired

      IPMI username

    • ipmiPortintRequired

      IPMI port

    • ipmiPowerStatusStringRequired

      IPMI power status

  • errorErrorCodeRequired

    Error code. If not null, the operation failed. If null, the operation succeeded. See details error

    • codeStringRequired

      Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001

    • descriptionStringRequired

      Brief description of the error

    • detailsStringRequired

      Detailed error information

    • elaborationStringRequired

      Reserved field, default is null

    • opaqueLinkedHashMapRequired

      Reserved field, default is null

    • causeErrorCodeRequired

      Root cause, the error that caused the current error. If there is no original error, this field is null

Endpoint

PUT/zstack/v1/hosts/power/{uuid}/actions

/zstack/v1/hosts/power/{uuid}/actions

Operation ID

GetHostPowerStatus

Permalink

Request Example

curl -X PUT 'http://{host}/zstack/v1/hosts/power/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"gethostpowerstatus":{"method":"<method>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "ipmiAddress": "192.168.0.1", "ipmiUsername": "admin", "ipmiPort": 623, "ipmiPassword": "password", "ipmiPowerStatus": "POWER_ON" } }

Change History

This API has no change history records yet.

View all change history