REST API - get

vcenter vm guest power: get

Returns information about the guest operating system power state. This operation was added in vSphere API 6.7.

Request:

HTTP request

GET https://{server}/rest/vcenter/vm/{vm}/guest/power

Path Parameters

Name Type Description
Required
vm string Identifier of the virtual machine.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "operations_ready"true,
        "state""RUNNING"
    }
}

Response Type:

Name Type Description
bold = required
value info Guest OS powerstate information.
value.state string The power state of the guest operating system. This attribute was added in vSphere API 6.7.

Possible guest power states. This enumeration was added in vSphere API 6.7. Value is one of:
RUNNING: The guest OS is running. This constant was added in vSphere API 6.7.
SHUTTING_DOWN: The guest OS is shutting down. This constant was added in vSphere API 6.7.
RESETTING: The guest OS is resetting. This constant was added in vSphere API 6.7.
STANDBY: The guest OS is in standby. This constant was added in vSphere API 6.7.
NOT_RUNNING: The guest OS is not running. This constant was added in vSphere API 6.7.
UNAVAILABLE: The guest OS power state is unknown. This constant was added in vSphere API 6.7.

value.operations_ready boolean Flag indicating if the virtual machine is ready to process soft power operations. This attribute was added in vSphere API 6.7.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
404 not_found if the virtual machine is not found.