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

Get Virtual Machines

Description

Get all the virtual machines in a given template.

Request

Request

URL

URL


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

Path Parameters

Path Parameters

string
templateId Required

ID of template containing the VM


Query Parameters

Query Parameters

boolean
include_sessions Optional

Include session information with VM information


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 PageInventoryVM of type */*

Successfully retrieved template VirtualMachines

{
	"content": [
		{
			"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
		}
	],
	"empty": false,
	"first": false,
	"last": false,
	"number": 0,
	"numberOfElements": 0,
	"pageable": {
		"offset": 0,
		"pageNumber": 0,
		"pageSize": 0,
		"paged": false,
		"sort": {
			"empty": false,
			"sorted": false,
			"unsorted": false
		},
		"unpaged": false
	},
	"size": 0,
	"sort": {
		"empty": false,
		"sorted": false,
		"unsorted": false
	},
	"totalElements": 0,
	"totalPages": 0
}
array of InventoryVM
content Optional

Inventory VM information


boolean
empty Optional

boolean
first Optional

boolean
last Optional

integer as int32
number Optional

integer as int32
numberOfElements Optional

pageable Optional

integer as int32
size Optional

sort Optional

integer as int64
totalElements Optional

integer as int32
totalPages Optional
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


Feedback

Was this page helpful?