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

Perform Batch Virtual Machine Action

Description

Perform batch template virtual machine action by their IDs.

Request

Request

URL

URL


post
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

string
action Optional

Action to perform: one of ‘powerOff’, ‘powerOn’, ‘restart’, ‘shutdown’


string
org_id Optional

Organization ID: non-super users can only access their own organization


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

Request Body

Request Body

VirtualMachineQueryTO of mimetype application/json Required

virtualMachineQuery

{
	"ids": [
		"string"
	]
}
array of string
ids Optional

list of VM ids to query from

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

201 Created

Created


202 Accepted

Successfully accepted VirtualMachine action

Errors

Errors

ErrorResponse
401

Unauthorized


ErrorResponse
403

Forbidden


ErrorResponse
404

Not Found


ErrorResponse
500

Unexpected internal server error

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"ids":["string"]}' https://cloud.vmwarehorizon.com/admin/v2/templates/{templateId}/vms
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-codegen-request-body-name: virtualMachineQuery


Feedback

Was this page helpful?