[{"label":"Latest (V1)","version":"latest"}]
horizon-cloud-nextgen

Get Virtual Machine By ID

Description

Get an individual template virtual machine by its id/name.

Request

Request

URL

URL


get
https://cloud.vmwarehorizon.com/admin/v2/templates/{templateId}/vms/{vmId}
Copy

Path Parameters

Path Parameters

string
templateId Required

ID of template containing the VM


string
vmId Required

ID of the virtual machine


Query Parameters

Query Parameters

string
org_id Optional

Filter by orgId: non-super users can only query for their own orgIds


string
page Optional

Page number to retrieve.


string
size Optional

Size of each page.


array of string
sort Optional

Ascending/Descending. Format is property,{asc|desc} and default is ascending.

Parameter Serialization Style: form Explode:true

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK returns InventoryVM of type */*

Successfully retrieved template VirtualMachines

{
	"agentStatus": "string",
	"agentVersion": "string",
	"cloudId": "string",
	"createdAt": "string",
	"error": "string",
	"haiAgentVersion": "string",
	"id": "string",
	"image": "string",
	"lifecycleStatus": "string",
	"loadIndex": 0,
	"maxSessions": 0,
	"powerState": "string",
	"privateIp": "string",
	"publicKey": "string",
	"sessionPlacementStatus": "string",
	"snapshotId": "string",
	"statusCode": 0,
	"timestamp": 0,
	"updatedAt": "string",
	"updatedLoadIndexAt": "string",
	"viewAgentVersion": "string",
	"vmFreeSessions": 0
}
string
agentStatus Optional

Agent status


string
agentVersion Optional

Agent version


string
cloudId Optional

VM ID from cloud provider


string as date-time
createdAt Optional

string
error Optional

Reason for error status


string
haiAgentVersion Optional

HAI Agent version


string
id Optional

VM ID


string
image Optional

Image used to create the VM


string
lifecycleStatus Optional

VM lifecycle status


number as double
loadIndex Optional

integer as int32
maxSessions Optional

Indicates maximum number of sessions supported by the VM


string
powerState Optional

Power state


string
privateIp Optional

string
publicKey Optional

string
sessionPlacementStatus Optional

Indicates the availability of the vm for session placement


string
snapshotId Optional

VM snapshot ID


integer as int32
statusCode Optional

Agent status code


integer as int64
timestamp Optional

Agent message timestamp. The inventory will only store the the latest record ever seen, and discard stale ones if received later


string as date-time
updatedAt Optional

string as date-time
updatedLoadIndexAt Optional

string
viewAgentVersion Optional

View Agent version


integer as int32
vmFreeSessions Optional

Indicates the number of free sessions on the VM

Errors

Errors

401

Unauthorized


403

Forbidden


404

Not Found


500

Unexpected internal server error

Code Samples

Code Samples

cURL Command

curl https://cloud.vmwarehorizon.com/admin/v2/templates/{templateId}/vms/{vmId}


Feedback

Was this page helpful?