[{"label":"Latest (V1)","version":"latest"}]
horizon-cloud-nextgen
Batch Patch
DescriptionPatch a batch of templates
Request
URLURL
https://cloud.vmwarehorizon.com/admin/v2/batch/templates
Query Parameters
Query Parameters
boolean
ignore_warnings
Optional
If true, errors classified as warnings will be ignored
string
org_id
Optional
Organization ID: non-super users can only access their own organization
Request Body
Request Body
{
"patch": {
"agentCustomization": {
"demSettingId": "string",
"disconnectSessionTimeoutMins": 0,
"dtemplateName": "string",
"emptySessionLogoffType": "DISCONNECT",
"emptySessionTimeoutMins": 0,
"esUrl": "string",
"proxyInfo": {
"bypass": "10.12.100.10;10.120.100.10;100.12.*.100",
"server": "http://<<ipaddress or cname>>:<<port>>"
},
"runOnceCommand": "string",
"sessionLoadBalancingSettings": {
"LBCHANGETHRESHOLD": 1,
"LBCPUTHRESHOLD": 50,
"LBDISKQUEUELENTHRESHOLD": 50,
"LBDISKREADLATENCYTHRESHOLD": 50,
"LBDISKWRITELATENCYTHRESHOLD": 50,
"LBINCLUDESESSIONCOUNT": true,
"LBMEMTHRESHOLD": 50,
"LBUSECUSTOMSCRIPT": false,
"loadIndexThresholdPercent": 0,
"modelVersion": 0
},
"sessionsPerVm": 1,
"skipDomainJoin": false
},
"applicationProperties": {
"key": "string"
},
"computerAccountOU": "CN=Computers",
"description": "My floating desktop template",
"diskEncryption": {
"enabled": false,
"modelVersion": 0
},
"diskSizeInGB": 0,
"imageReference": {
"markerId": "string",
"modelVersion": 0,
"streamId": "string",
"versionId": "string"
},
"infrastructure": {
"key": {
"data": {},
"id": "string",
"infrastructureLinks": {},
"kind": "string"
}
},
"maxQuiescingServers": 10,
"name": "My floating desktop template",
"networks": [
{
"data": {},
"id": "string",
"infrastructureLinks": {},
"kind": "string"
}
],
"powerPolicy": {
"enabled": false,
"min": 2,
"minUnit": "PERCENTAGE",
"modelVersion": 0,
"occupancyPresetMode": "BALANCED",
"powerOffProtectTimeMins": 30,
"powerSchedules": [
{
"allDay": false,
"endTime": "17:00",
"min": 5,
"modelVersion": 0,
"name": "VmwareWeekdaySchedule",
"occursOn": 31,
"startTime": "08:00",
"timeZone": "Asia/Tokyo"
}
]
},
"protocols": [
"BLAST"
],
"resourceTags": {
"key": "string"
},
"sessionsPerVm": 0,
"sparePolicy": {
"increment": 200,
"limit": 10,
"max": 4,
"min": 2,
"modelVersion": 0
},
"templateConnectivityStatus": "OFFLINE",
"vmLicenseType": "NONE"
},
"query": {
"ids": [
"string"
],
"orgId": "string",
"search": "string"
}
}
Authentication
This operation uses the following authentication methods.
Response
202 Accepted Response Body>
207 Response Body>
Response
200 OK Response Body>Response Body
200 OK
Returns
TemplateBatchResponseTO
of type */*
{
"errors": "templateId, ErrorDetail",
"results": "templateId, TemplateTOV2"
}
202 Accepted Response Body>
Response Body
202 Accepted
Returns
TemplateBatchResponseTO
of type */*
Accepted the request to patch the templates without any issues. Response holds the templates with modified status.
{
"errors": "templateId, ErrorDetail",
"results": "templateId, TemplateTOV2"
}
204 No Content
No Content
Operation doesn't return any data structure.
207 Response Body>
Response Body
207
Returns
TemplateBatchResponseTO
of type */*
Mixed results. Response holds successful templates as well as failed templates.
{
"errors": "templateId, ErrorDetail",
"results": "templateId, TemplateTOV2"
}
Errors
ErrorResponse
400
Bad request
ErrorResponse
401
Unauthorized
ErrorResponse
403
Forbidden
Code Samples
cURL Command
curl -X PATCH -H "Content-Type: application/json" -d '{"patch":{"agentCustomization":{"demSettingId":"string","disconnectSessionTimeoutMins":0,"dtemplateName":"string","emptySessionLogoffType":"DISCONNECT","emptySessionTimeoutMins":0,"esUrl":"string","proxyInfo":{"bypass":"10.12.100.10;10.120.100.10;100.12.*.100","server":"http://<<ipaddress or cname>>:<<port>>"},"runOnceCommand":"string","sessionLoadBalancingSettings":{"LBCHANGETHRESHOLD":1,"LBCPUTHRESHOLD":50,"LBDISKQUEUELENTHRESHOLD":50,"LBDISKREADLATENCYTHRESHOLD":50,"LBDISKWRITELATENCYTHRESHOLD":50,"LBINCLUDESESSIONCOUNT":true,"LBMEMTHRESHOLD":50,"LBUSECUSTOMSCRIPT":false,"loadIndexThresholdPercent":0,"modelVersion":0},"sessionsPerVm":1,"skipDomainJoin":false},"applicationProperties":{"key":"string"},"computerAccountOU":"CN=Computers","description":"My floating desktop template","diskEncryption":{"enabled":false,"modelVersion":0},"diskSizeInGB":0,"imageReference":{"markerId":"string","modelVersion":0,"streamId":"string","versionId":"string"},"infrastructure":{"key":{"data":{},"id":"string","infrastructureLinks":{},"kind":"string"}},"maxQuiescingServers":10,"name":"My floating desktop template","networks":[{"data":{},"id":"string","infrastructureLinks":{},"kind":"string"}],"powerPolicy":{"enabled":false,"min":2,"minUnit":"PERCENTAGE","modelVersion":0,"occupancyPresetMode":"BALANCED","powerOffProtectTimeMins":30,"powerSchedules":[{"allDay":false,"endTime":"17:00","min":5,"modelVersion":0,"name":"VmwareWeekdaySchedule","occursOn":31,"startTime":"08:00","timeZone":"Asia/Tokyo"}]},"protocols":["BLAST"],"resourceTags":{"key":"string"},"sessionsPerVm":0,"sparePolicy":{"increment":200,"limit":10,"max":4,"min":2,"modelVersion":0},"templateConnectivityStatus":"OFFLINE","vmLicenseType":"NONE"},"query":{"ids":["string"],"orgId":"string","search":"string"}}' https://cloud.vmwarehorizon.com/admin/v2/batch/templates
Vendor Extensions
This operation contains the following vendor extensions defined in the spec:
x-codegen-request-body-name: batchPatchV1
[{"label":"Latest (V1)","version":"latest"}]
horizon-cloud-nextgen