]> git.proxmox.com Git - pve-docs.git/blame - api-viewer/apidata.js
bump version to 4.2-8
[pve-docs.git] / api-viewer / apidata.js
CommitLineData
56122987
DM
1var pveapi = [
2 {
56122987
DM
3 "children" : [
4 {
56122987
DM
5 "children" : [
6 {
56122987
DM
7 "children" : [
8 {
44660702
DM
9 "children" : [
10 {
11 "info" : {
12 "DELETE" : {
13 "description" : "Delete rule.",
14 "method" : "DELETE",
15 "name" : "delete_rule",
16 "parameters" : {
17 "additionalProperties" : 0,
18 "properties" : {
19 "digest" : {
20 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
21 "maxLength" : 40,
22 "optional" : 1,
23 "type" : "string"
24 },
25 "group" : {
26 "description" : "Security Group name.",
27 "maxLength" : 20,
28 "minLength" : 2,
29 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
30 "type" : "string"
31 },
32 "pos" : {
33 "description" : "Update rule at position <pos>.",
34 "minimum" : 0,
35 "optional" : 1,
36 "type" : "integer"
37 }
38 }
39 },
40 "permissions" : {
41 "check" : [
42 "perm",
43 "/",
44 [
45 "Sys.Modify"
46 ]
47 ]
48 },
49 "protected" : 1,
50 "proxyto" : null,
51 "returns" : {
52 "type" : "null"
7aacca6f
DM
53 }
54 },
44660702
DM
55 "GET" : {
56 "description" : "Get single rule data.",
57 "method" : "GET",
58 "name" : "get_rule",
59 "parameters" : {
60 "additionalProperties" : 0,
61 "properties" : {
62 "group" : {
63 "description" : "Security Group name.",
64 "maxLength" : 20,
65 "minLength" : 2,
66 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
67 "type" : "string"
68 },
69 "pos" : {
70 "description" : "Update rule at position <pos>.",
71 "minimum" : 0,
72 "optional" : 1,
73 "type" : "integer"
74 }
7aacca6f 75 }
56122987 76 },
44660702
DM
77 "permissions" : {
78 "check" : [
79 "perm",
80 "/",
81 [
82 "Sys.Audit"
83 ]
84 ]
85 },
86 "proxyto" : null,
87 "returns" : {
88 "properties" : {
89 "pos" : {
90 "type" : "integer"
91 }
92 },
93 "type" : "object"
56122987 94 }
44660702 95 },
7aacca6f 96 "PUT" : {
44660702
DM
97 "description" : "Modify rule data.",
98 "method" : "PUT",
99 "name" : "update_rule",
7aacca6f
DM
100 "parameters" : {
101 "additionalProperties" : 0,
102 "properties" : {
44660702
DM
103 "action" : {
104 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 105 "maxLength" : 20,
44660702 106 "minLength" : 2,
7aacca6f 107 "optional" : 1,
44660702 108 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
109 "type" : "string"
110 },
44660702 111 "comment" : {
7aacca6f 112 "optional" : 1,
44660702 113 "type" : "string"
7aacca6f 114 },
44660702
DM
115 "delete" : {
116 "description" : "A list of settings you want to delete.",
117 "format" : "pve-configid-list",
7aacca6f 118 "optional" : 1,
44660702 119 "type" : "string"
7aacca6f 120 },
44660702
DM
121 "dest" : {
122 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
123 "format" : "pve-fw-addr-spec",
7aacca6f 124 "optional" : 1,
44660702 125 "type" : "string"
7aacca6f
DM
126 },
127 "digest" : {
128 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 129 "maxLength" : 40,
7aacca6f 130 "optional" : 1,
44660702 131 "type" : "string"
7aacca6f 132 },
44660702
DM
133 "dport" : {
134 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
135 "format" : "pve-fw-dport-spec",
7aacca6f 136 "optional" : 1,
44660702 137 "type" : "string"
7aacca6f 138 },
44660702
DM
139 "enable" : {
140 "minimum" : 0,
7aacca6f 141 "optional" : 1,
44660702 142 "type" : "integer"
7aacca6f 143 },
44660702
DM
144 "group" : {
145 "description" : "Security Group name.",
146 "maxLength" : 20,
147 "minLength" : 2,
148 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
149 "type" : "string"
150 },
151 "iface" : {
152 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
153 "format" : "pve-iface",
154 "maxLength" : 20,
155 "minLength" : 2,
7aacca6f 156 "optional" : 1,
44660702 157 "type" : "string"
7aacca6f 158 },
44660702
DM
159 "macro" : {
160 "maxLength" : 128,
161 "optional" : 1,
162 "type" : "string"
7aacca6f
DM
163 },
164 "moveto" : {
165 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
44660702 166 "minimum" : 0,
7aacca6f 167 "optional" : 1,
44660702 168 "type" : "integer"
7aacca6f 169 },
44660702
DM
170 "pos" : {
171 "description" : "Update rule at position <pos>.",
172 "minimum" : 0,
173 "optional" : 1,
174 "type" : "integer"
7aacca6f 175 },
44660702
DM
176 "proto" : {
177 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
178 "format" : "pve-fw-protocol-spec",
7aacca6f 179 "optional" : 1,
44660702
DM
180 "type" : "string"
181 },
182 "source" : {
183 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
184 "format" : "pve-fw-addr-spec",
185 "optional" : 1,
186 "type" : "string"
187 },
188 "sport" : {
189 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
190 "format" : "pve-fw-sport-spec",
191 "optional" : 1,
192 "type" : "string"
7aacca6f
DM
193 },
194 "type" : {
195 "enum" : [
196 "in",
197 "out",
198 "group"
199 ],
200 "optional" : 1,
201 "type" : "string"
202 }
203 }
204 },
7aacca6f
DM
205 "permissions" : {
206 "check" : [
207 "perm",
208 "/",
209 [
210 "Sys.Modify"
211 ]
212 ]
213 },
44660702 214 "protected" : 1,
7aacca6f
DM
215 "proxyto" : null,
216 "returns" : {
217 "type" : "null"
218 }
7aacca6f
DM
219 }
220 },
44660702 221 "leaf" : 1,
7aacca6f 222 "path" : "/cluster/firewall/groups/{group}/{pos}",
44660702 223 "text" : "{pos}"
7aacca6f
DM
224 }
225 ],
44660702
DM
226 "info" : {
227 "DELETE" : {
228 "description" : "Delete security group.",
229 "method" : "DELETE",
230 "name" : "delete_security_group",
231 "parameters" : {
232 "additionalProperties" : 0,
233 "properties" : {
234 "group" : {
235 "description" : "Security Group name.",
236 "maxLength" : 20,
237 "minLength" : 2,
238 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
239 "type" : "string"
240 }
56122987 241 }
7aacca6f 242 },
44660702
DM
243 "permissions" : {
244 "check" : [
245 "perm",
246 "/",
247 [
248 "Sys.Modify"
249 ]
7aacca6f 250 ]
56122987 251 },
44660702
DM
252 "protected" : 1,
253 "returns" : {
254 "type" : "null"
56122987 255 }
7aacca6f 256 },
7aacca6f 257 "GET" : {
44660702 258 "description" : "List rules.",
7aacca6f 259 "method" : "GET",
44660702
DM
260 "name" : "get_rules",
261 "parameters" : {
262 "additionalProperties" : 0,
7aacca6f 263 "properties" : {
44660702
DM
264 "group" : {
265 "description" : "Security Group name.",
266 "maxLength" : 20,
267 "minLength" : 2,
268 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
269 "type" : "string"
7aacca6f 270 }
44660702 271 }
7aacca6f
DM
272 },
273 "permissions" : {
274 "check" : [
275 "perm",
276 "/",
277 [
278 "Sys.Audit"
279 ]
280 ]
281 },
44660702
DM
282 "proxyto" : null,
283 "returns" : {
284 "items" : {
285 "properties" : {
286 "pos" : {
287 "type" : "integer"
288 }
289 },
290 "type" : "object"
291 },
292 "links" : [
293 {
294 "href" : "{pos}",
295 "rel" : "child"
296 }
297 ],
298 "type" : "array"
299 }
300 },
301 "POST" : {
302 "description" : "Create new rule.",
303 "method" : "POST",
304 "name" : "create_rule",
7aacca6f
DM
305 "parameters" : {
306 "additionalProperties" : 0,
307 "properties" : {
44660702
DM
308 "action" : {
309 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
310 "maxLength" : 20,
56122987 311 "minLength" : 2,
44660702
DM
312 "optional" : 0,
313 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 314 "type" : "string"
56122987 315 },
44660702 316 "comment" : {
56122987 317 "optional" : 1,
7aacca6f 318 "type" : "string"
56122987 319 },
44660702
DM
320 "dest" : {
321 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
56122987
DM
322 "format" : "pve-fw-addr-spec",
323 "optional" : 1,
44660702 324 "type" : "string"
56122987 325 },
44660702
DM
326 "digest" : {
327 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
328 "maxLength" : 40,
7aacca6f 329 "optional" : 1,
44660702 330 "type" : "string"
56122987 331 },
44660702
DM
332 "dport" : {
333 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
334 "format" : "pve-fw-dport-spec",
56122987 335 "optional" : 1,
44660702 336 "type" : "string"
56122987 337 },
7aacca6f 338 "enable" : {
44660702 339 "minimum" : 0,
7aacca6f 340 "optional" : 1,
44660702 341 "type" : "integer"
56122987 342 },
44660702
DM
343 "group" : {
344 "description" : "Security Group name.",
345 "maxLength" : 20,
346 "minLength" : 2,
7aacca6f 347 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702
DM
348 "type" : "string"
349 },
350 "iface" : {
351 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
352 "format" : "pve-iface",
353 "maxLength" : 20,
7aacca6f 354 "minLength" : 2,
44660702
DM
355 "optional" : 1,
356 "type" : "string"
56122987 357 },
7aacca6f 358 "macro" : {
44660702 359 "maxLength" : 128,
7aacca6f 360 "optional" : 1,
44660702 361 "type" : "string"
7aacca6f
DM
362 },
363 "pos" : {
364 "description" : "Update rule at position <pos>.",
44660702 365 "minimum" : 0,
56122987 366 "optional" : 1,
44660702 367 "type" : "integer"
7aacca6f
DM
368 },
369 "proto" : {
370 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
44660702 371 "format" : "pve-fw-protocol-spec",
7aacca6f 372 "optional" : 1,
44660702
DM
373 "type" : "string"
374 },
375 "source" : {
376 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
377 "format" : "pve-fw-addr-spec",
378 "optional" : 1,
379 "type" : "string"
380 },
381 "sport" : {
382 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
383 "format" : "pve-fw-sport-spec",
384 "optional" : 1,
385 "type" : "string"
386 },
387 "type" : {
388 "enum" : [
389 "in",
390 "out",
391 "group"
392 ],
393 "optional" : 0,
394 "type" : "string"
56122987 395 }
44660702 396 }
56122987 397 },
56122987
DM
398 "permissions" : {
399 "check" : [
400 "perm",
401 "/",
402 [
403 "Sys.Modify"
404 ]
405 ]
406 },
44660702
DM
407 "protected" : 1,
408 "proxyto" : null,
56122987
DM
409 "returns" : {
410 "type" : "null"
7aacca6f 411 }
44660702
DM
412 }
413 },
414 "leaf" : 0,
415 "path" : "/cluster/firewall/groups/{group}",
416 "text" : "{group}"
417 }
418 ],
419 "info" : {
420 "GET" : {
421 "description" : "List security groups.",
422 "method" : "GET",
423 "name" : "list_security_groups",
424 "parameters" : {
425 "additionalProperties" : 0
426 },
427 "permissions" : {
428 "user" : "all"
429 },
430 "returns" : {
431 "items" : {
432 "properties" : {
433 "comment" : {
434 "optional" : 1,
435 "type" : "string"
436 },
437 "digest" : {
438 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
439 "maxLength" : 40,
440 "optional" : 0,
441 "type" : "string"
442 },
443 "group" : {
444 "description" : "Security Group name.",
445 "maxLength" : 20,
446 "minLength" : 2,
447 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
448 "type" : "string"
449 }
450 },
451 "type" : "object"
56122987 452 },
44660702
DM
453 "links" : [
454 {
455 "href" : "{group}",
456 "rel" : "child"
457 }
458 ],
459 "type" : "array"
460 }
461 },
462 "POST" : {
463 "description" : "Create new security group.",
464 "method" : "POST",
465 "name" : "create_security_group",
466 "parameters" : {
467 "additionalProperties" : 0,
468 "properties" : {
469 "comment" : {
470 "optional" : 1,
471 "type" : "string"
472 },
473 "digest" : {
474 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
475 "maxLength" : 40,
476 "optional" : 1,
477 "type" : "string"
478 },
479 "group" : {
480 "description" : "Security Group name.",
481 "maxLength" : 20,
482 "minLength" : 2,
483 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
484 "type" : "string"
485 },
486 "rename" : {
487 "description" : "Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.",
488 "maxLength" : 20,
489 "minLength" : 2,
490 "optional" : 1,
491 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
492 "type" : "string"
493 }
494 }
495 },
496 "permissions" : {
497 "check" : [
498 "perm",
499 "/",
500 [
501 "Sys.Modify"
502 ]
503 ]
504 },
505 "protected" : 1,
506 "returns" : {
507 "type" : "null"
508 }
509 }
510 },
511 "leaf" : 0,
512 "path" : "/cluster/firewall/groups",
513 "text" : "groups"
514 },
515 {
516 "children" : [
517 {
518 "info" : {
7aacca6f 519 "DELETE" : {
44660702
DM
520 "description" : "Delete rule.",
521 "method" : "DELETE",
522 "name" : "delete_rule",
523 "parameters" : {
524 "additionalProperties" : 0,
525 "properties" : {
526 "digest" : {
527 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
528 "maxLength" : 40,
529 "optional" : 1,
530 "type" : "string"
531 },
532 "pos" : {
533 "description" : "Update rule at position <pos>.",
534 "minimum" : 0,
535 "optional" : 1,
536 "type" : "integer"
537 }
538 }
539 },
56122987
DM
540 "permissions" : {
541 "check" : [
542 "perm",
543 "/",
544 [
7aacca6f 545 "Sys.Modify"
56122987
DM
546 ]
547 ]
548 },
44660702 549 "protected" : 1,
56122987
DM
550 "proxyto" : null,
551 "returns" : {
7aacca6f 552 "type" : "null"
44660702
DM
553 }
554 },
555 "GET" : {
556 "description" : "Get single rule data.",
557 "method" : "GET",
558 "name" : "get_rule",
56122987
DM
559 "parameters" : {
560 "additionalProperties" : 0,
561 "properties" : {
562 "pos" : {
7aacca6f 563 "description" : "Update rule at position <pos>.",
44660702 564 "minimum" : 0,
56122987 565 "optional" : 1,
44660702 566 "type" : "integer"
7aacca6f
DM
567 }
568 }
569 },
7aacca6f
DM
570 "permissions" : {
571 "check" : [
572 "perm",
573 "/",
574 [
575 "Sys.Audit"
576 ]
577 ]
56122987 578 },
44660702
DM
579 "proxyto" : null,
580 "returns" : {
7aacca6f 581 "properties" : {
44660702
DM
582 "pos" : {
583 "type" : "integer"
7aacca6f 584 }
44660702
DM
585 },
586 "type" : "object"
587 }
56122987 588 },
44660702
DM
589 "PUT" : {
590 "description" : "Modify rule data.",
591 "method" : "PUT",
592 "name" : "update_rule",
7aacca6f
DM
593 "parameters" : {
594 "additionalProperties" : 0,
595 "properties" : {
44660702
DM
596 "action" : {
597 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
598 "maxLength" : 20,
599 "minLength" : 2,
600 "optional" : 1,
601 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
602 "type" : "string"
7aacca6f 603 },
44660702
DM
604 "comment" : {
605 "optional" : 1,
606 "type" : "string"
7aacca6f 607 },
44660702
DM
608 "delete" : {
609 "description" : "A list of settings you want to delete.",
610 "format" : "pve-configid-list",
611 "optional" : 1,
612 "type" : "string"
613 },
614 "dest" : {
615 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
616 "format" : "pve-fw-addr-spec",
617 "optional" : 1,
618 "type" : "string"
619 },
620 "digest" : {
621 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
622 "maxLength" : 40,
623 "optional" : 1,
624 "type" : "string"
625 },
626 "dport" : {
627 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
628 "format" : "pve-fw-dport-spec",
629 "optional" : 1,
630 "type" : "string"
631 },
632 "enable" : {
633 "minimum" : 0,
634 "optional" : 1,
635 "type" : "integer"
636 },
637 "iface" : {
638 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
639 "format" : "pve-iface",
640 "maxLength" : 20,
7aacca6f 641 "minLength" : 2,
44660702
DM
642 "optional" : 1,
643 "type" : "string"
7aacca6f 644 },
44660702
DM
645 "macro" : {
646 "maxLength" : 128,
647 "optional" : 1,
648 "type" : "string"
649 },
650 "moveto" : {
651 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
652 "minimum" : 0,
653 "optional" : 1,
654 "type" : "integer"
655 },
656 "pos" : {
657 "description" : "Update rule at position <pos>.",
658 "minimum" : 0,
659 "optional" : 1,
660 "type" : "integer"
661 },
662 "proto" : {
663 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
664 "format" : "pve-fw-protocol-spec",
665 "optional" : 1,
666 "type" : "string"
667 },
668 "source" : {
669 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
670 "format" : "pve-fw-addr-spec",
671 "optional" : 1,
672 "type" : "string"
673 },
674 "sport" : {
675 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
676 "format" : "pve-fw-sport-spec",
677 "optional" : 1,
678 "type" : "string"
679 },
680 "type" : {
681 "enum" : [
682 "in",
683 "out",
684 "group"
685 ],
686 "optional" : 1,
687 "type" : "string"
7aacca6f 688 }
56122987
DM
689 }
690 },
7aacca6f
DM
691 "permissions" : {
692 "check" : [
693 "perm",
694 "/",
695 [
696 "Sys.Modify"
697 ]
698 ]
699 },
44660702
DM
700 "protected" : 1,
701 "proxyto" : null,
702 "returns" : {
703 "type" : "null"
704 }
7aacca6f 705 }
56122987 706 },
44660702
DM
707 "leaf" : 1,
708 "path" : "/cluster/firewall/rules/{pos}",
709 "text" : "{pos}"
7aacca6f
DM
710 }
711 ],
7aacca6f 712 "info" : {
44660702
DM
713 "GET" : {
714 "description" : "List rules.",
715 "method" : "GET",
716 "name" : "get_rules",
7aacca6f 717 "parameters" : {
44660702 718 "additionalProperties" : 0
7aacca6f
DM
719 },
720 "permissions" : {
721 "check" : [
722 "perm",
723 "/",
724 [
44660702 725 "Sys.Audit"
7aacca6f
DM
726 ]
727 ]
728 },
44660702 729 "proxyto" : null,
7aacca6f 730 "returns" : {
7aacca6f
DM
731 "items" : {
732 "properties" : {
44660702
DM
733 "pos" : {
734 "type" : "integer"
7aacca6f
DM
735 }
736 },
737 "type" : "object"
56122987 738 },
7aacca6f
DM
739 "links" : [
740 {
44660702 741 "href" : "{pos}",
7aacca6f
DM
742 "rel" : "child"
743 }
44660702
DM
744 ],
745 "type" : "array"
7aacca6f 746 }
44660702 747 },
7aacca6f 748 "POST" : {
44660702 749 "description" : "Create new rule.",
7aacca6f 750 "method" : "POST",
44660702 751 "name" : "create_rule",
7aacca6f
DM
752 "parameters" : {
753 "additionalProperties" : 0,
754 "properties" : {
44660702
DM
755 "action" : {
756 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
757 "maxLength" : 20,
7aacca6f 758 "minLength" : 2,
44660702
DM
759 "optional" : 0,
760 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
761 "type" : "string"
7aacca6f
DM
762 },
763 "comment" : {
764 "optional" : 1,
765 "type" : "string"
44660702
DM
766 },
767 "dest" : {
768 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
769 "format" : "pve-fw-addr-spec",
770 "optional" : 1,
771 "type" : "string"
772 },
773 "digest" : {
774 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
775 "maxLength" : 40,
776 "optional" : 1,
777 "type" : "string"
778 },
779 "dport" : {
780 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
781 "format" : "pve-fw-dport-spec",
782 "optional" : 1,
783 "type" : "string"
784 },
785 "enable" : {
786 "minimum" : 0,
787 "optional" : 1,
788 "type" : "integer"
789 },
790 "iface" : {
791 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
792 "format" : "pve-iface",
793 "maxLength" : 20,
794 "minLength" : 2,
795 "optional" : 1,
796 "type" : "string"
797 },
798 "macro" : {
799 "maxLength" : 128,
800 "optional" : 1,
801 "type" : "string"
802 },
803 "pos" : {
804 "description" : "Update rule at position <pos>.",
805 "minimum" : 0,
806 "optional" : 1,
807 "type" : "integer"
808 },
809 "proto" : {
810 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
811 "format" : "pve-fw-protocol-spec",
812 "optional" : 1,
813 "type" : "string"
814 },
815 "source" : {
816 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
817 "format" : "pve-fw-addr-spec",
818 "optional" : 1,
819 "type" : "string"
820 },
821 "sport" : {
822 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
823 "format" : "pve-fw-sport-spec",
824 "optional" : 1,
825 "type" : "string"
826 },
827 "type" : {
828 "enum" : [
829 "in",
830 "out",
831 "group"
832 ],
833 "optional" : 0,
834 "type" : "string"
7aacca6f
DM
835 }
836 }
837 },
838 "permissions" : {
839 "check" : [
840 "perm",
841 "/",
842 [
843 "Sys.Modify"
844 ]
845 ]
846 },
44660702
DM
847 "protected" : 1,
848 "proxyto" : null,
7aacca6f 849 "returns" : {
44660702
DM
850 "type" : "null"
851 }
852 }
853 },
854 "leaf" : 0,
855 "path" : "/cluster/firewall/rules",
856 "text" : "rules"
857 },
858 {
859 "children" : [
860 {
861 "children" : [
862 {
863 "info" : {
864 "DELETE" : {
865 "description" : "Remove IP or Network from IPSet.",
866 "method" : "DELETE",
867 "name" : "remove_ip",
868 "parameters" : {
869 "additionalProperties" : 0,
870 "properties" : {
871 "cidr" : {
872 "description" : "Network/IP specification in CIDR format.",
873 "format" : "IPorCIDRorAlias",
874 "type" : "string"
875 },
876 "digest" : {
877 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
878 "maxLength" : 40,
879 "optional" : 1,
880 "type" : "string"
881 },
882 "name" : {
883 "description" : "IP set name.",
884 "maxLength" : 64,
885 "minLength" : 2,
886 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
887 "type" : "string"
888 }
889 }
890 },
891 "permissions" : {
892 "check" : [
893 "perm",
894 "/",
895 [
896 "Sys.Modify"
897 ]
898 ]
899 },
900 "protected" : 1,
901 "returns" : {
902 "type" : "null"
903 }
7aacca6f 904 },
44660702
DM
905 "GET" : {
906 "description" : "Read IP or Network settings from IPSet.",
907 "method" : "GET",
908 "name" : "read_ip",
909 "parameters" : {
910 "additionalProperties" : 0,
911 "properties" : {
912 "cidr" : {
913 "description" : "Network/IP specification in CIDR format.",
914 "format" : "IPorCIDRorAlias",
915 "type" : "string"
916 },
917 "name" : {
918 "description" : "IP set name.",
919 "maxLength" : 64,
920 "minLength" : 2,
921 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
922 "type" : "string"
923 }
924 }
925 },
926 "permissions" : {
927 "check" : [
928 "perm",
929 "/",
930 [
931 "Sys.Audit"
932 ]
933 ]
934 },
935 "protected" : 1,
936 "returns" : {
937 "type" : "object"
938 }
7aacca6f 939 },
44660702
DM
940 "PUT" : {
941 "description" : "Update IP or Network settings",
942 "method" : "PUT",
943 "name" : "update_ip",
944 "parameters" : {
945 "additionalProperties" : 0,
946 "properties" : {
947 "cidr" : {
948 "description" : "Network/IP specification in CIDR format.",
949 "format" : "IPorCIDRorAlias",
950 "type" : "string"
951 },
952 "comment" : {
953 "optional" : 1,
954 "type" : "string"
955 },
956 "digest" : {
957 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
958 "maxLength" : 40,
959 "optional" : 1,
960 "type" : "string"
961 },
962 "name" : {
963 "description" : "IP set name.",
964 "maxLength" : 64,
965 "minLength" : 2,
966 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
967 "type" : "string"
968 },
969 "nomatch" : {
970 "optional" : 1,
971 "type" : "boolean"
972 }
973 }
974 },
975 "permissions" : {
976 "check" : [
977 "perm",
978 "/",
979 [
980 "Sys.Modify"
981 ]
982 ]
983 },
984 "protected" : 1,
985 "returns" : {
986 "type" : "null"
987 }
7aacca6f
DM
988 }
989 },
44660702
DM
990 "leaf" : 1,
991 "path" : "/cluster/firewall/ipset/{name}/{cidr}",
992 "text" : "{cidr}"
7aacca6f 993 }
44660702 994 ],
7aacca6f
DM
995 "info" : {
996 "DELETE" : {
44660702
DM
997 "description" : "Delete IPSet",
998 "method" : "DELETE",
999 "name" : "delete_ipset",
56122987 1000 "parameters" : {
44660702 1001 "additionalProperties" : 0,
56122987
DM
1002 "properties" : {
1003 "name" : {
44660702 1004 "description" : "IP set name.",
56122987 1005 "maxLength" : 64,
44660702 1006 "minLength" : 2,
56122987 1007 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 1008 "type" : "string"
56122987 1009 }
44660702 1010 }
7aacca6f 1011 },
56122987
DM
1012 "permissions" : {
1013 "check" : [
1014 "perm",
1015 "/",
1016 [
1017 "Sys.Modify"
1018 ]
1019 ]
1020 },
7aacca6f
DM
1021 "protected" : 1,
1022 "returns" : {
1023 "type" : "null"
44660702 1024 }
7aacca6f 1025 },
44660702
DM
1026 "GET" : {
1027 "description" : "List IPSet content",
1028 "method" : "GET",
1029 "name" : "get_ipset",
56122987
DM
1030 "parameters" : {
1031 "additionalProperties" : 0,
1032 "properties" : {
7aacca6f 1033 "name" : {
44660702 1034 "description" : "IP set name.",
7aacca6f 1035 "maxLength" : 64,
7aacca6f 1036 "minLength" : 2,
44660702 1037 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 1038 "type" : "string"
56122987 1039 }
7aacca6f 1040 }
56122987 1041 },
56122987
DM
1042 "permissions" : {
1043 "check" : [
1044 "perm",
1045 "/",
1046 [
44660702 1047 "Sys.Audit"
56122987
DM
1048 ]
1049 ]
44660702
DM
1050 },
1051 "returns" : {
1052 "items" : {
1053 "properties" : {
1054 "cidr" : {
1055 "type" : "string"
1056 },
1057 "comment" : {
1058 "optional" : 1,
1059 "type" : "string"
1060 },
1061 "digest" : {
1062 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1063 "maxLength" : 40,
1064 "optional" : 0,
1065 "type" : "string"
1066 },
1067 "nomatch" : {
1068 "optional" : 1,
1069 "type" : "boolean"
1070 }
1071 },
1072 "type" : "object"
1073 },
1074 "links" : [
1075 {
1076 "href" : "{cidr}",
1077 "rel" : "child"
1078 }
1079 ],
1080 "type" : "array"
7aacca6f
DM
1081 }
1082 },
44660702
DM
1083 "POST" : {
1084 "description" : "Add IP or Network to IPSet.",
1085 "method" : "POST",
1086 "name" : "create_ip",
56122987
DM
1087 "parameters" : {
1088 "additionalProperties" : 0,
1089 "properties" : {
44660702
DM
1090 "cidr" : {
1091 "description" : "Network/IP specification in CIDR format.",
1092 "format" : "IPorCIDRorAlias",
1093 "type" : "string"
1094 },
1095 "comment" : {
1096 "optional" : 1,
1097 "type" : "string"
1098 },
1099 "name" : {
1100 "description" : "IP set name.",
1101 "maxLength" : 64,
1102 "minLength" : 2,
1103 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1104 "type" : "string"
1105 },
1106 "nomatch" : {
1107 "optional" : 1,
1108 "type" : "boolean"
56122987
DM
1109 }
1110 }
1111 },
56122987
DM
1112 "permissions" : {
1113 "check" : [
1114 "perm",
1115 "/",
1116 [
44660702 1117 "Sys.Modify"
56122987
DM
1118 ]
1119 ]
1120 },
44660702 1121 "protected" : 1,
56122987 1122 "returns" : {
44660702
DM
1123 "type" : "null"
1124 }
56122987
DM
1125 }
1126 },
44660702
DM
1127 "leaf" : 0,
1128 "path" : "/cluster/firewall/ipset/{name}",
1129 "text" : "{name}"
56122987
DM
1130 }
1131 ],
56122987 1132 "info" : {
44660702
DM
1133 "GET" : {
1134 "description" : "List IPSets",
1135 "method" : "GET",
1136 "name" : "ipset_index",
56122987 1137 "parameters" : {
7aacca6f 1138 "additionalProperties" : 0
56122987 1139 },
56122987
DM
1140 "permissions" : {
1141 "check" : [
1142 "perm",
1143 "/",
1144 [
7aacca6f 1145 "Sys.Audit"
56122987
DM
1146 ]
1147 ]
1148 },
56122987
DM
1149 "returns" : {
1150 "items" : {
1151 "properties" : {
44660702
DM
1152 "comment" : {
1153 "optional" : 1,
1154 "type" : "string"
56122987 1155 },
44660702
DM
1156 "digest" : {
1157 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1158 "maxLength" : 40,
1159 "optional" : 0,
1160 "type" : "string"
1161 },
1162 "name" : {
1163 "description" : "IP set name.",
1164 "maxLength" : 64,
1165 "minLength" : 2,
1166 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 1167 "type" : "string"
56122987
DM
1168 }
1169 },
1170 "type" : "object"
44660702
DM
1171 },
1172 "links" : [
1173 {
1174 "href" : "{name}",
1175 "rel" : "child"
1176 }
1177 ],
1178 "type" : "array"
56122987 1179 }
44660702
DM
1180 },
1181 "POST" : {
1182 "description" : "Create new IPSet",
1183 "method" : "POST",
1184 "name" : "create_ipset",
7aacca6f
DM
1185 "parameters" : {
1186 "additionalProperties" : 0,
1187 "properties" : {
44660702
DM
1188 "comment" : {
1189 "optional" : 1,
1190 "type" : "string"
1191 },
1192 "digest" : {
1193 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1194 "maxLength" : 40,
1195 "optional" : 1,
1196 "type" : "string"
1197 },
1198 "name" : {
1199 "description" : "IP set name.",
1200 "maxLength" : 64,
1201 "minLength" : 2,
1202 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1203 "type" : "string"
1204 },
1205 "rename" : {
1206 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
1207 "maxLength" : 64,
1208 "minLength" : 2,
1209 "optional" : 1,
1210 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1211 "type" : "string"
7aacca6f
DM
1212 }
1213 }
1214 },
56122987
DM
1215 "permissions" : {
1216 "check" : [
1217 "perm",
1218 "/",
1219 [
44660702 1220 "Sys.Modify"
56122987
DM
1221 ]
1222 ]
1223 },
44660702 1224 "protected" : 1,
56122987 1225 "returns" : {
44660702
DM
1226 "type" : "null"
1227 }
56122987 1228 }
7aacca6f 1229 },
44660702
DM
1230 "leaf" : 0,
1231 "path" : "/cluster/firewall/ipset",
1232 "text" : "ipset"
1233 },
56122987 1234 {
44660702
DM
1235 "children" : [
1236 {
1237 "info" : {
1238 "DELETE" : {
1239 "description" : "Remove IP or Network alias.",
1240 "method" : "DELETE",
1241 "name" : "remove_alias",
1242 "parameters" : {
1243 "additionalProperties" : 0,
1244 "properties" : {
1245 "digest" : {
1246 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1247 "maxLength" : 40,
1248 "optional" : 1,
1249 "type" : "string"
1250 },
1251 "name" : {
1252 "description" : "Alias name.",
1253 "maxLength" : 64,
1254 "minLength" : 2,
1255 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1256 "type" : "string"
1257 }
1258 }
1259 },
1260 "permissions" : {
1261 "check" : [
1262 "perm",
1263 "/",
1264 [
1265 "Sys.Modify"
1266 ]
1267 ]
1268 },
1269 "protected" : 1,
1270 "returns" : {
1271 "type" : "null"
1272 }
1273 },
1274 "GET" : {
1275 "description" : "Read alias.",
1276 "method" : "GET",
1277 "name" : "read_alias",
1278 "parameters" : {
1279 "additionalProperties" : 0,
1280 "properties" : {
1281 "name" : {
1282 "description" : "Alias name.",
1283 "maxLength" : 64,
1284 "minLength" : 2,
1285 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1286 "type" : "string"
1287 }
1288 }
1289 },
1290 "permissions" : {
1291 "check" : [
1292 "perm",
1293 "/",
1294 [
1295 "Sys.Audit"
1296 ]
1297 ]
1298 },
1299 "returns" : {
1300 "type" : "object"
1301 }
1302 },
1303 "PUT" : {
1304 "description" : "Update IP or Network alias.",
1305 "method" : "PUT",
1306 "name" : "update_alias",
1307 "parameters" : {
1308 "additionalProperties" : 0,
1309 "properties" : {
1310 "cidr" : {
1311 "description" : "Network/IP specification in CIDR format.",
1312 "format" : "IPorCIDR",
1313 "type" : "string"
1314 },
1315 "comment" : {
1316 "optional" : 1,
1317 "type" : "string"
1318 },
1319 "digest" : {
1320 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1321 "maxLength" : 40,
1322 "optional" : 1,
1323 "type" : "string"
1324 },
1325 "name" : {
1326 "description" : "Alias name.",
1327 "maxLength" : 64,
1328 "minLength" : 2,
1329 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1330 "type" : "string"
1331 },
1332 "rename" : {
1333 "description" : "Rename an existing alias.",
1334 "maxLength" : 64,
1335 "minLength" : 2,
1336 "optional" : 1,
1337 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1338 "type" : "string"
1339 }
1340 }
1341 },
1342 "permissions" : {
1343 "check" : [
1344 "perm",
1345 "/",
1346 [
1347 "Sys.Modify"
1348 ]
1349 ]
1350 },
1351 "protected" : 1,
1352 "returns" : {
1353 "type" : "null"
1354 }
1355 }
1356 },
1357 "leaf" : 1,
1358 "path" : "/cluster/firewall/aliases/{name}",
1359 "text" : "{name}"
1360 }
1361 ],
1362 "info" : {
1363 "GET" : {
1364 "description" : "List aliases",
1365 "method" : "GET",
1366 "name" : "get_aliases",
1367 "parameters" : {
1368 "additionalProperties" : 0
1369 },
1370 "permissions" : {
1371 "check" : [
1372 "perm",
1373 "/",
1374 [
1375 "Sys.Audit"
1376 ]
1377 ]
1378 },
1379 "returns" : {
1380 "items" : {
1381 "properties" : {
1382 "cidr" : {
1383 "type" : "string"
1384 },
1385 "comment" : {
1386 "optional" : 1,
1387 "type" : "string"
1388 },
1389 "digest" : {
1390 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1391 "maxLength" : 40,
1392 "optional" : 0,
1393 "type" : "string"
1394 },
1395 "name" : {
1396 "type" : "string"
1397 }
1398 },
1399 "type" : "object"
1400 },
1401 "links" : [
1402 {
1403 "href" : "{name}",
1404 "rel" : "child"
1405 }
1406 ],
1407 "type" : "array"
1408 }
1409 },
1410 "POST" : {
1411 "description" : "Create IP or Network Alias.",
1412 "method" : "POST",
1413 "name" : "create_alias",
56122987
DM
1414 "parameters" : {
1415 "additionalProperties" : 0,
1416 "properties" : {
44660702
DM
1417 "cidr" : {
1418 "description" : "Network/IP specification in CIDR format.",
1419 "format" : "IPorCIDR",
1420 "type" : "string"
1421 },
1422 "comment" : {
1423 "optional" : 1,
1424 "type" : "string"
1425 },
1426 "name" : {
1427 "description" : "Alias name.",
1428 "maxLength" : 64,
1429 "minLength" : 2,
1430 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1431 "type" : "string"
56122987
DM
1432 }
1433 }
1434 },
56122987
DM
1435 "permissions" : {
1436 "check" : [
1437 "perm",
1438 "/",
1439 [
1440 "Sys.Modify"
1441 ]
1442 ]
1443 },
44660702 1444 "protected" : 1,
56122987
DM
1445 "returns" : {
1446 "type" : "null"
1447 }
44660702
DM
1448 }
1449 },
1450 "leaf" : 0,
1451 "path" : "/cluster/firewall/aliases",
1452 "text" : "aliases"
1453 },
1454 {
1455 "info" : {
1456 "GET" : {
1457 "description" : "Get Firewall options.",
1458 "method" : "GET",
1459 "name" : "get_options",
1460 "parameters" : {
1461 "additionalProperties" : 0
7aacca6f 1462 },
56122987
DM
1463 "permissions" : {
1464 "check" : [
1465 "perm",
1466 "/",
1467 [
44660702 1468 "Sys.Audit"
56122987
DM
1469 ]
1470 ]
1471 },
44660702 1472 "returns" : {
56122987 1473 "properties" : {
44660702
DM
1474 "enable" : {
1475 "description" : "Enable or disable the firewall cluster wide.",
1476 "minimum" : 0,
56122987 1477 "optional" : 1,
7aacca6f 1478 "type" : "integer"
56122987 1479 },
44660702
DM
1480 "policy_in" : {
1481 "description" : "Input policy.",
1482 "enum" : [
1483 "ACCEPT",
1484 "REJECT",
1485 "DROP"
1486 ],
56122987 1487 "optional" : 1,
44660702 1488 "type" : "string"
7aacca6f 1489 },
44660702
DM
1490 "policy_out" : {
1491 "description" : "Output policy.",
1492 "enum" : [
1493 "ACCEPT",
1494 "REJECT",
1495 "DROP"
1496 ],
7aacca6f 1497 "optional" : 1,
44660702
DM
1498 "type" : "string"
1499 }
1500 },
1501 "type" : "object"
1502 }
1503 },
1504 "PUT" : {
1505 "description" : "Set Firewall options.",
1506 "method" : "PUT",
1507 "name" : "set_options",
1508 "parameters" : {
1509 "additionalProperties" : 0,
1510 "properties" : {
1511 "delete" : {
1512 "description" : "A list of settings you want to delete.",
1513 "format" : "pve-configid-list",
56122987 1514 "optional" : 1,
44660702 1515 "type" : "string"
56122987 1516 },
44660702
DM
1517 "digest" : {
1518 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1519 "maxLength" : 40,
56122987 1520 "optional" : 1,
44660702 1521 "type" : "string"
56122987 1522 },
44660702
DM
1523 "enable" : {
1524 "description" : "Enable or disable the firewall cluster wide.",
7aacca6f 1525 "minimum" : 0,
56122987 1526 "optional" : 1,
44660702 1527 "type" : "integer"
56122987 1528 },
44660702
DM
1529 "policy_in" : {
1530 "description" : "Input policy.",
56122987 1531 "enum" : [
44660702
DM
1532 "ACCEPT",
1533 "REJECT",
1534 "DROP"
56122987 1535 ],
56122987 1536 "optional" : 1,
44660702 1537 "type" : "string"
56122987 1538 },
44660702
DM
1539 "policy_out" : {
1540 "description" : "Output policy.",
56122987 1541 "enum" : [
44660702
DM
1542 "ACCEPT",
1543 "REJECT",
1544 "DROP"
56122987 1545 ],
7aacca6f 1546 "optional" : 1,
44660702 1547 "type" : "string"
56122987 1548 }
44660702
DM
1549 }
1550 },
1551 "permissions" : {
1552 "check" : [
1553 "perm",
1554 "/",
1555 [
1556 "Sys.Modify"
1557 ]
1558 ]
7aacca6f
DM
1559 },
1560 "protected" : 1,
44660702
DM
1561 "returns" : {
1562 "type" : "null"
1563 }
1564 }
1565 },
1566 "leaf" : 1,
1567 "path" : "/cluster/firewall/options",
1568 "text" : "options"
1569 },
1570 {
1571 "info" : {
7aacca6f 1572 "GET" : {
44660702 1573 "description" : "List available macros",
7aacca6f 1574 "method" : "GET",
44660702
DM
1575 "name" : "get_macros",
1576 "parameters" : {
1577 "additionalProperties" : 0
7aacca6f 1578 },
44660702
DM
1579 "permissions" : {
1580 "user" : "all"
1581 },
1582 "returns" : {
1583 "items" : {
1584 "properties" : {
1585 "descr" : {
1586 "description" : "More verbose description (if available).",
1587 "type" : "string"
1588 },
1589 "macro" : {
1590 "description" : "Macro name.",
1591 "type" : "string"
1592 }
1593 },
1594 "type" : "object"
1595 },
1596 "type" : "array"
1597 }
1598 }
1599 },
1600 "leaf" : 1,
1601 "path" : "/cluster/firewall/macros",
1602 "text" : "macros"
1603 },
1604 {
1605 "info" : {
1606 "GET" : {
1607 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
1608 "method" : "GET",
1609 "name" : "refs",
7aacca6f 1610 "parameters" : {
44660702 1611 "additionalProperties" : 0,
7aacca6f 1612 "properties" : {
44660702
DM
1613 "type" : {
1614 "description" : "Only list references of specified type.",
1615 "enum" : [
1616 "alias",
1617 "ipset"
1618 ],
1619 "optional" : 1,
1620 "type" : "string"
7aacca6f 1621 }
44660702 1622 }
7aacca6f
DM
1623 },
1624 "permissions" : {
1625 "check" : [
1626 "perm",
1627 "/",
1628 [
1629 "Sys.Audit"
1630 ]
1631 ]
1632 },
44660702
DM
1633 "returns" : {
1634 "items" : {
1635 "properties" : {
1636 "comment" : {
1637 "optional" : 1,
1638 "type" : "string"
1639 },
1640 "name" : {
1641 "type" : "string"
1642 },
1643 "ref" : {
1644 "type" : "string"
1645 },
1646 "type" : {
1647 "enum" : [
1648 "alias",
1649 "ipset"
1650 ],
1651 "type" : "string"
1652 }
1653 },
1654 "type" : "object"
1655 },
1656 "type" : "array"
1657 }
56122987
DM
1658 }
1659 },
7aacca6f 1660 "leaf" : 1,
44660702
DM
1661 "path" : "/cluster/firewall/refs",
1662 "text" : "refs"
56122987
DM
1663 }
1664 ],
56122987 1665 "info" : {
44660702
DM
1666 "GET" : {
1667 "description" : "Directory index.",
1668 "method" : "GET",
1669 "name" : "index",
56122987 1670 "parameters" : {
56122987
DM
1671 "additionalProperties" : 0
1672 },
44660702
DM
1673 "permissions" : {
1674 "user" : "all"
1675 },
56122987 1676 "returns" : {
44660702
DM
1677 "items" : {
1678 "properties" : {},
1679 "type" : "object"
1680 },
7aacca6f
DM
1681 "links" : [
1682 {
44660702
DM
1683 "href" : "{name}",
1684 "rel" : "child"
7aacca6f
DM
1685 }
1686 ],
7aacca6f 1687 "type" : "array"
7aacca6f 1688 }
56122987
DM
1689 }
1690 },
44660702
DM
1691 "leaf" : 0,
1692 "path" : "/cluster/firewall",
1693 "text" : "firewall"
7aacca6f
DM
1694 },
1695 {
56122987
DM
1696 "children" : [
1697 {
56122987 1698 "info" : {
44660702
DM
1699 "DELETE" : {
1700 "description" : "Delete vzdump backup job definition.",
1701 "method" : "DELETE",
1702 "name" : "delete_job",
1703 "parameters" : {
1704 "additionalProperties" : 0,
1705 "properties" : {
1706 "id" : {
1707 "description" : "The job ID.",
1708 "maxLength" : 50,
1709 "type" : "string"
1710 }
1711 }
1712 },
1713 "permissions" : {
1714 "check" : [
1715 "perm",
1716 "/",
1717 [
1718 "Sys.Modify"
1719 ]
1720 ]
1721 },
1722 "protected" : 1,
56122987
DM
1723 "returns" : {
1724 "type" : "null"
44660702
DM
1725 }
1726 },
1727 "GET" : {
1728 "description" : "Read vzdump backup job definition.",
1729 "method" : "GET",
1730 "name" : "read_job",
1731 "parameters" : {
1732 "additionalProperties" : 0,
1733 "properties" : {
1734 "id" : {
1735 "description" : "The job ID.",
1736 "maxLength" : 50,
1737 "type" : "string"
1738 }
1739 }
56122987 1740 },
7aacca6f
DM
1741 "permissions" : {
1742 "check" : [
1743 "perm",
1744 "/",
1745 [
44660702 1746 "Sys.Audit"
7aacca6f
DM
1747 ]
1748 ]
1749 },
44660702
DM
1750 "returns" : {
1751 "type" : "object"
1752 }
1753 },
1754 "PUT" : {
1755 "description" : "Update vzdump backup job definition.",
1756 "method" : "PUT",
1757 "name" : "update_job",
56122987 1758 "parameters" : {
44660702 1759 "additionalProperties" : 0,
56122987 1760 "properties" : {
44660702
DM
1761 "all" : {
1762 "default" : 0,
1763 "description" : "Backup all known guest systems on this host.",
7aacca6f 1764 "optional" : 1,
44660702 1765 "type" : "boolean"
7aacca6f 1766 },
44660702
DM
1767 "bwlimit" : {
1768 "default" : 0,
1769 "description" : "Limit I/O bandwidth (KBytes per second).",
1770 "minimum" : 0,
1771 "optional" : 1,
1772 "type" : "integer"
1773 },
1774 "compress" : {
1775 "default" : "0",
1776 "description" : "Compress dump file.",
7aacca6f 1777 "enum" : [
44660702
DM
1778 "0",
1779 "1",
1780 "gzip",
1781 "lzo"
7aacca6f 1782 ],
44660702
DM
1783 "optional" : 1,
1784 "type" : "string"
7aacca6f 1785 },
44660702
DM
1786 "delete" : {
1787 "description" : "A list of settings you want to delete.",
1788 "format" : "pve-configid-list",
7aacca6f 1789 "optional" : 1,
44660702 1790 "type" : "string"
56122987 1791 },
44660702
DM
1792 "dow" : {
1793 "description" : "Day of week selection.",
1794 "format" : "pve-day-of-week-list",
7aacca6f 1795 "optional" : 1,
44660702 1796 "type" : "string"
56122987 1797 },
44660702
DM
1798 "dumpdir" : {
1799 "description" : "Store resulting files to specified directory.",
56122987 1800 "optional" : 1,
44660702 1801 "type" : "string"
56122987 1802 },
44660702
DM
1803 "enabled" : {
1804 "default" : "1",
1805 "description" : "Enable or disable the job.",
1806 "optional" : 1,
1807 "type" : "boolean"
1808 },
1809 "exclude" : {
1810 "description" : "Exclude specified guest systems (assumes --all)",
1811 "format" : "pve-vmid-list",
1812 "optional" : 1,
1813 "type" : "string"
1814 },
1815 "exclude-path" : {
1816 "description" : "Exclude certain files/directories (shell globs).",
1817 "format" : "string-alist",
1818 "optional" : 1,
1819 "type" : "string"
1820 },
1821 "id" : {
1822 "description" : "The job ID.",
1823 "maxLength" : 50,
1824 "type" : "string"
1825 },
1826 "ionice" : {
1827 "default" : 7,
1828 "description" : "Set CFQ ionice priority.",
1829 "maximum" : 8,
1830 "minimum" : 0,
1831 "optional" : 1,
1832 "type" : "integer"
1833 },
1834 "lockwait" : {
1835 "default" : 180,
1836 "description" : "Maximal time to wait for the global lock (minutes).",
1837 "minimum" : 0,
1838 "optional" : 1,
1839 "type" : "integer"
1840 },
1841 "mailnotification" : {
1842 "default" : "always",
1843 "description" : "Specify when to send an email",
56122987 1844 "enum" : [
44660702
DM
1845 "always",
1846 "failure"
56122987 1847 ],
44660702
DM
1848 "optional" : 1,
1849 "type" : "string"
1850 },
1851 "mailto" : {
1852 "description" : "Comma-separated list of email addresses that should receive email notifications.",
1853 "format" : "string-list",
1854 "optional" : 1,
1855 "type" : "string"
1856 },
1857 "maxfiles" : {
1858 "default" : 1,
1859 "description" : "Maximal number of backup files per guest system.",
1860 "minimum" : 1,
1861 "optional" : 1,
1862 "type" : "integer"
1863 },
1864 "mode" : {
1865 "default" : "snapshot",
1866 "description" : "Backup mode.",
1867 "enum" : [
1868 "snapshot",
1869 "suspend",
1870 "stop"
1871 ],
1872 "optional" : 1,
1873 "type" : "string"
1874 },
1875 "node" : {
1876 "description" : "Only run if executed on this node.",
1877 "format" : "pve-node",
1878 "optional" : 1,
1879 "type" : "string"
1880 },
1881 "pigz" : {
1882 "default" : 0,
1883 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
1884 "optional" : 1,
1885 "type" : "integer"
1886 },
1887 "quiet" : {
1888 "default" : 0,
1889 "description" : "Be quiet.",
1890 "optional" : 1,
1891 "type" : "boolean"
1892 },
1893 "remove" : {
1894 "default" : 1,
1895 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
1896 "optional" : 1,
1897 "type" : "boolean"
1898 },
1899 "script" : {
1900 "description" : "Use specified hook script.",
1901 "optional" : 1,
1902 "type" : "string"
1903 },
1904 "size" : {
1905 "default" : 1024,
1906 "description" : "Unused, will be removed in a future release.",
1907 "minimum" : 500,
1908 "optional" : 1,
1909 "type" : "integer"
1910 },
1911 "starttime" : {
1912 "description" : "Job Start time.",
1913 "pattern" : "\\d{1,2}:\\d{1,2}",
56122987 1914 "type" : "string",
44660702 1915 "typetext" : "HH:MM"
7aacca6f 1916 },
44660702
DM
1917 "stdexcludes" : {
1918 "default" : 1,
1919 "description" : "Exclude temporary files and logs.",
1920 "optional" : 1,
1921 "type" : "boolean"
1922 },
1923 "stop" : {
1924 "default" : 0,
1925 "description" : "Stop runnig backup jobs on this host.",
1926 "optional" : 1,
1927 "type" : "boolean"
1928 },
1929 "stopwait" : {
1930 "default" : 10,
1931 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
1932 "minimum" : 0,
1933 "optional" : 1,
1934 "type" : "integer"
1935 },
1936 "storage" : {
1937 "description" : "Store resulting file to this storage.",
1938 "format" : "pve-storage-id",
1939 "optional" : 1,
7aacca6f 1940 "type" : "string"
56122987 1941 },
44660702
DM
1942 "tmpdir" : {
1943 "description" : "Store temporary files to specified directory.",
1944 "optional" : 1,
1945 "type" : "string"
1946 },
1947 "vmid" : {
1948 "description" : "The ID of the guest system you want to backup.",
1949 "format" : "pve-vmid-list",
1950 "optional" : 1,
1951 "type" : "string"
56122987 1952 }
44660702 1953 }
56122987
DM
1954 },
1955 "permissions" : {
1956 "check" : [
1957 "perm",
1958 "/",
1959 [
44660702 1960 "Sys.Modify"
56122987
DM
1961 ]
1962 ]
1963 },
44660702
DM
1964 "protected" : 1,
1965 "returns" : {
1966 "type" : "null"
7aacca6f 1967 }
56122987
DM
1968 }
1969 },
44660702
DM
1970 "leaf" : 1,
1971 "path" : "/cluster/backup/{id}",
1972 "text" : "{id}"
1973 }
1974 ],
1975 "info" : {
1976 "GET" : {
1977 "description" : "List vzdump backup schedule.",
1978 "method" : "GET",
1979 "name" : "index",
1980 "parameters" : {
1981 "additionalProperties" : 0
1982 },
1983 "permissions" : {
1984 "check" : [
1985 "perm",
1986 "/",
1987 [
1988 "Sys.Audit"
1989 ]
1990 ]
1991 },
1992 "returns" : {
1993 "items" : {
1994 "properties" : {
1995 "id" : {
1996 "type" : "string"
1997 }
1998 },
1999 "type" : "object"
2000 },
2001 "links" : [
2002 {
2003 "href" : "{id}",
2004 "rel" : "child"
2005 }
2006 ],
2007 "type" : "array"
2008 }
2009 },
2010 "POST" : {
2011 "description" : "Create new vzdump backup job.",
2012 "method" : "POST",
2013 "name" : "create_job",
2014 "parameters" : {
2015 "additionalProperties" : 0,
2016 "properties" : {
2017 "all" : {
2018 "default" : 0,
2019 "description" : "Backup all known guest systems on this host.",
2020 "optional" : 1,
2021 "type" : "boolean"
2022 },
2023 "bwlimit" : {
2024 "default" : 0,
2025 "description" : "Limit I/O bandwidth (KBytes per second).",
2026 "minimum" : 0,
2027 "optional" : 1,
2028 "type" : "integer"
2029 },
2030 "compress" : {
2031 "default" : "0",
2032 "description" : "Compress dump file.",
2033 "enum" : [
2034 "0",
2035 "1",
2036 "gzip",
2037 "lzo"
2038 ],
2039 "optional" : 1,
2040 "type" : "string"
2041 },
2042 "dow" : {
2043 "default" : "mon,tue,wed,thu,fri,sat,sun",
2044 "description" : "Day of week selection.",
2045 "format" : "pve-day-of-week-list",
2046 "optional" : 1,
2047 "type" : "string"
2048 },
2049 "dumpdir" : {
2050 "description" : "Store resulting files to specified directory.",
2051 "optional" : 1,
2052 "type" : "string"
2053 },
2054 "enabled" : {
2055 "default" : "1",
2056 "description" : "Enable or disable the job.",
2057 "optional" : 1,
2058 "type" : "boolean"
2059 },
2060 "exclude" : {
2061 "description" : "Exclude specified guest systems (assumes --all)",
2062 "format" : "pve-vmid-list",
2063 "optional" : 1,
2064 "type" : "string"
2065 },
2066 "exclude-path" : {
2067 "description" : "Exclude certain files/directories (shell globs).",
2068 "format" : "string-alist",
2069 "optional" : 1,
2070 "type" : "string"
2071 },
2072 "ionice" : {
2073 "default" : 7,
2074 "description" : "Set CFQ ionice priority.",
2075 "maximum" : 8,
2076 "minimum" : 0,
2077 "optional" : 1,
2078 "type" : "integer"
2079 },
2080 "lockwait" : {
2081 "default" : 180,
2082 "description" : "Maximal time to wait for the global lock (minutes).",
2083 "minimum" : 0,
2084 "optional" : 1,
2085 "type" : "integer"
2086 },
2087 "mailnotification" : {
2088 "default" : "always",
2089 "description" : "Specify when to send an email",
2090 "enum" : [
2091 "always",
2092 "failure"
2093 ],
2094 "optional" : 1,
2095 "type" : "string"
2096 },
2097 "mailto" : {
2098 "description" : "Comma-separated list of email addresses that should receive email notifications.",
2099 "format" : "string-list",
2100 "optional" : 1,
2101 "type" : "string"
2102 },
2103 "maxfiles" : {
2104 "default" : 1,
2105 "description" : "Maximal number of backup files per guest system.",
2106 "minimum" : 1,
2107 "optional" : 1,
2108 "type" : "integer"
2109 },
2110 "mode" : {
2111 "default" : "snapshot",
2112 "description" : "Backup mode.",
2113 "enum" : [
2114 "snapshot",
2115 "suspend",
2116 "stop"
2117 ],
2118 "optional" : 1,
2119 "type" : "string"
2120 },
2121 "node" : {
2122 "description" : "Only run if executed on this node.",
2123 "format" : "pve-node",
2124 "optional" : 1,
2125 "type" : "string"
2126 },
2127 "pigz" : {
2128 "default" : 0,
2129 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
2130 "optional" : 1,
2131 "type" : "integer"
2132 },
2133 "quiet" : {
2134 "default" : 0,
2135 "description" : "Be quiet.",
2136 "optional" : 1,
2137 "type" : "boolean"
2138 },
2139 "remove" : {
2140 "default" : 1,
2141 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
2142 "optional" : 1,
2143 "type" : "boolean"
2144 },
2145 "script" : {
2146 "description" : "Use specified hook script.",
2147 "optional" : 1,
2148 "type" : "string"
2149 },
2150 "size" : {
2151 "default" : 1024,
2152 "description" : "Unused, will be removed in a future release.",
2153 "minimum" : 500,
2154 "optional" : 1,
2155 "type" : "integer"
2156 },
2157 "starttime" : {
2158 "description" : "Job Start time.",
2159 "pattern" : "\\d{1,2}:\\d{1,2}",
2160 "type" : "string",
2161 "typetext" : "HH:MM"
2162 },
2163 "stdexcludes" : {
2164 "default" : 1,
2165 "description" : "Exclude temporary files and logs.",
2166 "optional" : 1,
2167 "type" : "boolean"
2168 },
2169 "stop" : {
2170 "default" : 0,
2171 "description" : "Stop runnig backup jobs on this host.",
2172 "optional" : 1,
2173 "type" : "boolean"
2174 },
2175 "stopwait" : {
2176 "default" : 10,
2177 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
2178 "minimum" : 0,
2179 "optional" : 1,
2180 "type" : "integer"
2181 },
2182 "storage" : {
2183 "description" : "Store resulting file to this storage.",
2184 "format" : "pve-storage-id",
2185 "optional" : 1,
2186 "type" : "string"
2187 },
2188 "tmpdir" : {
2189 "description" : "Store temporary files to specified directory.",
2190 "optional" : 1,
2191 "type" : "string"
2192 },
2193 "vmid" : {
2194 "description" : "The ID of the guest system you want to backup.",
2195 "format" : "pve-vmid-list",
2196 "optional" : 1,
2197 "type" : "string"
2198 }
2199 }
2200 },
2201 "permissions" : {
2202 "check" : [
2203 "perm",
2204 "/",
2205 [
2206 "Sys.Modify"
2207 ]
2208 ]
2209 },
2210 "protected" : 1,
2211 "returns" : {
2212 "type" : "null"
2213 }
2214 }
2215 },
2216 "leaf" : 0,
2217 "path" : "/cluster/backup",
2218 "text" : "backup"
2219 },
2220 {
2221 "children" : [
2222 {
2223 "children" : [
2224 {
2225 "children" : [
56122987 2226 {
56122987
DM
2227 "info" : {
2228 "POST" : {
44660702
DM
2229 "description" : "Request resource migration (online) to another node.",
2230 "method" : "POST",
2231 "name" : "migrate",
56122987 2232 "parameters" : {
7aacca6f 2233 "additionalProperties" : 0,
56122987
DM
2234 "properties" : {
2235 "node" : {
7aacca6f 2236 "description" : "The cluster node name.",
44660702 2237 "format" : "pve-node",
7aacca6f 2238 "type" : "string"
56122987
DM
2239 },
2240 "sid" : {
44660702 2241 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
56122987 2242 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2243 "type" : "string",
44660702 2244 "typetext" : "<type>:<name>"
56122987 2245 }
7aacca6f 2246 }
56122987 2247 },
56122987
DM
2248 "permissions" : {
2249 "check" : [
2250 "perm",
2251 "/",
2252 [
2253 "Sys.Console"
2254 ]
2255 ]
2256 },
7aacca6f 2257 "protected" : 1,
7aacca6f
DM
2258 "returns" : {
2259 "type" : "null"
44660702 2260 }
56122987 2261 }
44660702
DM
2262 },
2263 "leaf" : 1,
2264 "path" : "/cluster/ha/resources/{sid}/migrate",
2265 "text" : "migrate"
2266 },
2267 {
2268 "info" : {
2269 "POST" : {
2270 "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.",
2271 "method" : "POST",
2272 "name" : "relocate",
2273 "parameters" : {
2274 "additionalProperties" : 0,
2275 "properties" : {
2276 "node" : {
2277 "description" : "The cluster node name.",
2278 "format" : "pve-node",
2279 "type" : "string"
2280 },
2281 "sid" : {
2282 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2283 "format" : "pve-ha-resource-or-vm-id",
2284 "type" : "string",
2285 "typetext" : "<type>:<name>"
2286 }
2287 }
2288 },
2289 "permissions" : {
2290 "check" : [
2291 "perm",
2292 "/",
2293 [
2294 "Sys.Console"
2295 ]
2296 ]
2297 },
2298 "protected" : 1,
2299 "returns" : {
2300 "type" : "null"
2301 }
2302 }
2303 },
2304 "leaf" : 1,
2305 "path" : "/cluster/ha/resources/{sid}/relocate",
2306 "text" : "relocate"
2307 }
2308 ],
2309 "info" : {
2310 "DELETE" : {
2311 "description" : "Delete resource configuration.",
2312 "method" : "DELETE",
2313 "name" : "delete",
7aacca6f 2314 "parameters" : {
44660702 2315 "additionalProperties" : 0,
7aacca6f
DM
2316 "properties" : {
2317 "sid" : {
2318 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
44660702 2319 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2320 "type" : "string",
44660702
DM
2321 "typetext" : "<type>:<name>"
2322 }
2323 }
2324 },
2325 "permissions" : {
2326 "check" : [
2327 "perm",
2328 "/",
2329 [
2330 "Sys.Console"
2331 ]
2332 ]
2333 },
2334 "protected" : 1,
2335 "returns" : {
2336 "type" : "null"
2337 }
2338 },
2339 "GET" : {
2340 "description" : "Read resource configuration.",
2341 "method" : "GET",
2342 "name" : "read",
2343 "parameters" : {
2344 "additionalProperties" : 0,
2345 "properties" : {
2346 "sid" : {
2347 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
7aacca6f 2348 "format" : "pve-ha-resource-or-vm-id",
44660702 2349 "type" : "string",
7aacca6f
DM
2350 "typetext" : "<type>:<name>"
2351 }
44660702 2352 }
7aacca6f
DM
2353 },
2354 "permissions" : {
2355 "check" : [
2356 "perm",
2357 "/",
2358 [
2359 "Sys.Audit"
2360 ]
2361 ]
2362 },
44660702 2363 "returns" : {}
7aacca6f 2364 },
56122987 2365 "PUT" : {
44660702 2366 "description" : "Update resource configuration.",
7aacca6f 2367 "method" : "PUT",
44660702 2368 "name" : "update",
56122987
DM
2369 "parameters" : {
2370 "additionalProperties" : 0,
2371 "properties" : {
44660702
DM
2372 "comment" : {
2373 "description" : "Description.",
2374 "maxLength" : 4096,
56122987 2375 "optional" : 1,
44660702 2376 "type" : "string"
56122987 2377 },
7aacca6f
DM
2378 "delete" : {
2379 "description" : "A list of settings you want to delete.",
7aacca6f 2380 "format" : "pve-configid-list",
44660702
DM
2381 "maxLength" : 4096,
2382 "optional" : 1,
2383 "type" : "string"
56122987 2384 },
44660702
DM
2385 "digest" : {
2386 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2387 "maxLength" : 40,
2388 "optional" : 1,
2389 "type" : "string"
56122987 2390 },
44660702
DM
2391 "group" : {
2392 "description" : "The HA group identifier.",
2393 "format" : "pve-configid",
7aacca6f 2394 "optional" : 1,
44660702 2395 "type" : "string"
56122987
DM
2396 },
2397 "max_relocate" : {
7aacca6f 2398 "default" : 1,
56122987 2399 "description" : "Maximal number of service relocate tries when a service failes to start.",
44660702
DM
2400 "minimum" : 0,
2401 "optional" : 1,
2402 "type" : "integer"
7aacca6f 2403 },
44660702
DM
2404 "max_restart" : {
2405 "default" : 1,
2406 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2407 "minimum" : 0,
7aacca6f 2408 "optional" : 1,
44660702
DM
2409 "type" : "integer"
2410 },
2411 "sid" : {
2412 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2413 "format" : "pve-ha-resource-or-vm-id",
2414 "type" : "string",
2415 "typetext" : "<type>:<name>"
7aacca6f
DM
2416 },
2417 "state" : {
44660702
DM
2418 "default" : "enabled",
2419 "description" : "Resource state.",
7aacca6f
DM
2420 "enum" : [
2421 "enabled",
2422 "disabled"
2423 ],
7aacca6f 2424 "optional" : 1,
44660702 2425 "type" : "string"
56122987 2426 }
44660702
DM
2427 },
2428 "type" : "object"
56122987 2429 },
56122987
DM
2430 "permissions" : {
2431 "check" : [
2432 "perm",
2433 "/",
2434 [
2435 "Sys.Console"
2436 ]
2437 ]
2438 },
7aacca6f 2439 "protected" : 1,
56122987
DM
2440 "returns" : {
2441 "type" : "null"
2442 }
2443 }
2444 },
44660702 2445 "leaf" : 0,
7aacca6f 2446 "path" : "/cluster/ha/resources/{sid}",
44660702 2447 "text" : "{sid}"
56122987
DM
2448 }
2449 ],
7aacca6f
DM
2450 "info" : {
2451 "GET" : {
44660702
DM
2452 "description" : "List HA resources.",
2453 "method" : "GET",
2454 "name" : "index",
7aacca6f 2455 "parameters" : {
44660702
DM
2456 "additionalProperties" : 0,
2457 "properties" : {
2458 "type" : {
2459 "description" : "Only list resources of specific type",
2460 "enum" : [
2461 "ct",
2462 "vm"
2463 ],
2464 "optional" : 1,
2465 "type" : "string"
2466 }
2467 }
7aacca6f 2468 },
7aacca6f
DM
2469 "permissions" : {
2470 "check" : [
2471 "perm",
2472 "/",
2473 [
2474 "Sys.Audit"
2475 ]
2476 ]
2477 },
7aacca6f 2478 "returns" : {
7aacca6f 2479 "items" : {
7aacca6f 2480 "properties" : {
44660702 2481 "sid" : {
7aacca6f
DM
2482 "type" : "string"
2483 }
44660702
DM
2484 },
2485 "type" : "object"
7aacca6f
DM
2486 },
2487 "links" : [
2488 {
44660702 2489 "href" : "{sid}",
7aacca6f
DM
2490 "rel" : "child"
2491 }
44660702
DM
2492 ],
2493 "type" : "array"
7aacca6f
DM
2494 }
2495 },
2496 "POST" : {
44660702 2497 "description" : "Create a new HA resource.",
7aacca6f 2498 "method" : "POST",
44660702 2499 "name" : "create",
7aacca6f 2500 "parameters" : {
44660702 2501 "additionalProperties" : 0,
7aacca6f
DM
2502 "properties" : {
2503 "comment" : {
7aacca6f 2504 "description" : "Description.",
44660702 2505 "maxLength" : 4096,
7aacca6f
DM
2506 "optional" : 1,
2507 "type" : "string"
2508 },
44660702
DM
2509 "group" : {
2510 "description" : "The HA group identifier.",
2511 "format" : "pve-configid",
7aacca6f 2512 "optional" : 1,
44660702 2513 "type" : "string"
7aacca6f 2514 },
44660702
DM
2515 "max_relocate" : {
2516 "default" : 1,
2517 "description" : "Maximal number of service relocate tries when a service failes to start.",
2518 "minimum" : 0,
7aacca6f 2519 "optional" : 1,
44660702 2520 "type" : "integer"
7aacca6f 2521 },
44660702
DM
2522 "max_restart" : {
2523 "default" : 1,
2524 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2525 "minimum" : 0,
2526 "optional" : 1,
2527 "type" : "integer"
2528 },
2529 "sid" : {
2530 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2531 "format" : "pve-ha-resource-or-vm-id",
2532 "type" : "string",
2533 "typetext" : "<type>:<name>"
2534 },
2535 "state" : {
2536 "default" : "enabled",
2537 "description" : "Resource state.",
7aacca6f 2538 "enum" : [
44660702
DM
2539 "enabled",
2540 "disabled"
7aacca6f 2541 ],
7aacca6f
DM
2542 "optional" : 1,
2543 "type" : "string"
2544 },
44660702
DM
2545 "type" : {
2546 "description" : "Resource type.",
2547 "enum" : [
2548 "ct",
2549 "vm"
2550 ],
2551 "optional" : 1,
2552 "type" : "string"
2553 }
7aacca6f 2554 },
44660702 2555 "type" : "object"
7aacca6f
DM
2556 },
2557 "permissions" : {
2558 "check" : [
2559 "perm",
2560 "/",
2561 [
2562 "Sys.Console"
2563 ]
2564 ]
2565 },
44660702
DM
2566 "protected" : 1,
2567 "returns" : {
2568 "type" : "null"
2569 }
7aacca6f
DM
2570 }
2571 },
44660702
DM
2572 "leaf" : 0,
2573 "path" : "/cluster/ha/resources",
2574 "text" : "resources"
2575 },
2576 {
56122987
DM
2577 "children" : [
2578 {
56122987 2579 "info" : {
44660702
DM
2580 "DELETE" : {
2581 "description" : "Delete ha group configuration.",
2582 "method" : "DELETE",
2583 "name" : "delete",
56122987 2584 "parameters" : {
7aacca6f 2585 "additionalProperties" : 0,
56122987 2586 "properties" : {
7aacca6f
DM
2587 "group" : {
2588 "description" : "The HA group identifier.",
44660702
DM
2589 "format" : "pve-configid",
2590 "type" : "string"
56122987 2591 }
7aacca6f 2592 }
56122987 2593 },
56122987
DM
2594 "permissions" : {
2595 "check" : [
2596 "perm",
2597 "/",
2598 [
7aacca6f 2599 "Sys.Console"
56122987
DM
2600 ]
2601 ]
2602 },
44660702 2603 "protected" : 1,
7aacca6f
DM
2604 "returns" : {
2605 "type" : "null"
56122987
DM
2606 }
2607 },
44660702
DM
2608 "GET" : {
2609 "description" : "Read ha group configuration.",
2610 "method" : "GET",
2611 "name" : "read",
56122987 2612 "parameters" : {
44660702 2613 "additionalProperties" : 0,
56122987
DM
2614 "properties" : {
2615 "group" : {
2616 "description" : "The HA group identifier.",
44660702
DM
2617 "format" : "pve-configid",
2618 "type" : "string"
56122987 2619 }
44660702 2620 }
56122987 2621 },
56122987
DM
2622 "permissions" : {
2623 "check" : [
2624 "perm",
2625 "/",
2626 [
44660702 2627 "Sys.Audit"
56122987
DM
2628 ]
2629 ]
2630 },
44660702 2631 "returns" : {}
7aacca6f 2632 },
44660702
DM
2633 "PUT" : {
2634 "description" : "Update ha group configuration.",
2635 "method" : "PUT",
2636 "name" : "update",
7aacca6f 2637 "parameters" : {
44660702 2638 "additionalProperties" : 0,
7aacca6f 2639 "properties" : {
44660702
DM
2640 "comment" : {
2641 "description" : "Description.",
2642 "maxLength" : 4096,
2643 "optional" : 1,
2644 "type" : "string"
2645 },
2646 "delete" : {
2647 "description" : "A list of settings you want to delete.",
2648 "format" : "pve-configid-list",
2649 "maxLength" : 4096,
2650 "optional" : 1,
2651 "type" : "string"
2652 },
2653 "digest" : {
2654 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2655 "maxLength" : 40,
2656 "optional" : 1,
2657 "type" : "string"
2658 },
7aacca6f
DM
2659 "group" : {
2660 "description" : "The HA group identifier.",
44660702
DM
2661 "format" : "pve-configid",
2662 "type" : "string"
2663 },
2664 "nodes" : {
2665 "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').",
2666 "format" : "pve-ha-group-node-list",
2667 "optional" : 1,
7aacca6f 2668 "type" : "string",
44660702
DM
2669 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2670 },
2671 "nofailback" : {
2672 "default" : 0,
2673 "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.",
2674 "optional" : 1,
2675 "type" : "boolean"
2676 },
2677 "restricted" : {
2678 "default" : 0,
2679 "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.",
2680 "optional" : 1,
2681 "type" : "boolean"
7aacca6f
DM
2682 }
2683 },
44660702 2684 "type" : "object"
7aacca6f 2685 },
7aacca6f
DM
2686 "permissions" : {
2687 "check" : [
2688 "perm",
2689 "/",
2690 [
44660702 2691 "Sys.Console"
7aacca6f
DM
2692 ]
2693 ]
2694 },
44660702
DM
2695 "protected" : 1,
2696 "returns" : {
2697 "type" : "null"
2698 }
56122987
DM
2699 }
2700 },
2701 "leaf" : 1,
44660702
DM
2702 "path" : "/cluster/ha/groups/{group}",
2703 "text" : "{group}"
56122987 2704 }
44660702
DM
2705 ],
2706 "info" : {
2707 "GET" : {
2708 "description" : "Get HA groups.",
2709 "method" : "GET",
2710 "name" : "index",
2711 "parameters" : {
2712 "additionalProperties" : 0
2713 },
2714 "permissions" : {
2715 "check" : [
2716 "perm",
2717 "/",
2718 [
2719 "Sys.Audit"
2720 ]
2721 ]
2722 },
2723 "returns" : {
2724 "items" : {
2725 "properties" : {
2726 "group" : {
2727 "type" : "string"
2728 }
2729 },
2730 "type" : "object"
2731 },
2732 "links" : [
2733 {
2734 "href" : "{group}",
2735 "rel" : "child"
2736 }
2737 ],
2738 "type" : "array"
2739 }
2740 },
2741 "POST" : {
2742 "description" : "Create a new HA group.",
2743 "method" : "POST",
2744 "name" : "create",
2745 "parameters" : {
2746 "additionalProperties" : 0,
2747 "properties" : {
2748 "comment" : {
2749 "description" : "Description.",
2750 "maxLength" : 4096,
2751 "optional" : 1,
2752 "type" : "string"
2753 },
2754 "group" : {
2755 "description" : "The HA group identifier.",
2756 "format" : "pve-configid",
2757 "type" : "string"
2758 },
2759 "nodes" : {
2760 "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').",
2761 "format" : "pve-ha-group-node-list",
2762 "optional" : 0,
2763 "type" : "string",
2764 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2765 },
2766 "nofailback" : {
2767 "default" : 0,
2768 "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.",
2769 "optional" : 1,
2770 "type" : "boolean"
2771 },
2772 "restricted" : {
2773 "default" : 0,
2774 "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.",
2775 "optional" : 1,
2776 "type" : "boolean"
2777 },
2778 "type" : {
2779 "description" : "Group type.",
2780 "enum" : [
2781 "group"
2782 ],
2783 "optional" : 1,
2784 "type" : "string"
2785 }
2786 },
2787 "type" : "object"
2788 },
2789 "permissions" : {
2790 "check" : [
2791 "perm",
2792 "/",
2793 [
2794 "Sys.Console"
2795 ]
2796 ]
2797 },
2798 "protected" : 1,
2799 "returns" : {
2800 "type" : "null"
2801 }
2802 }
2803 },
2804 "leaf" : 0,
2805 "path" : "/cluster/ha/groups",
2806 "text" : "groups"
7aacca6f
DM
2807 },
2808 {
7aacca6f
DM
2809 "children" : [
2810 {
2811 "info" : {
2812 "GET" : {
56122987 2813 "description" : "Get HA manger status.",
44660702 2814 "method" : "GET",
7aacca6f 2815 "name" : "status",
44660702
DM
2816 "parameters" : {
2817 "additionalProperties" : 0
2818 },
56122987
DM
2819 "permissions" : {
2820 "check" : [
2821 "perm",
2822 "/",
2823 [
2824 "Sys.Audit"
2825 ]
2826 ]
7aacca6f 2827 },
44660702
DM
2828 "returns" : {
2829 "type" : "array"
56122987
DM
2830 }
2831 }
7aacca6f 2832 },
7aacca6f 2833 "leaf" : 1,
44660702
DM
2834 "path" : "/cluster/ha/status/current",
2835 "text" : "current"
56122987
DM
2836 },
2837 {
2838 "info" : {
2839 "GET" : {
7aacca6f 2840 "description" : "Get full HA manger status, including LRM status.",
44660702
DM
2841 "method" : "GET",
2842 "name" : "manager_status",
7aacca6f
DM
2843 "parameters" : {
2844 "additionalProperties" : 0
2845 },
56122987
DM
2846 "permissions" : {
2847 "check" : [
2848 "perm",
2849 "/",
2850 [
2851 "Sys.Audit"
2852 ]
2853 ]
44660702
DM
2854 },
2855 "returns" : {
2856 "type" : "object"
7aacca6f 2857 }
56122987
DM
2858 }
2859 },
56122987 2860 "leaf" : 1,
44660702
DM
2861 "path" : "/cluster/ha/status/manager_status",
2862 "text" : "manager_status"
56122987
DM
2863 }
2864 ],
56122987
DM
2865 "info" : {
2866 "GET" : {
44660702 2867 "description" : "Directory index.",
7aacca6f 2868 "method" : "GET",
44660702
DM
2869 "name" : "index",
2870 "parameters" : {
2871 "additionalProperties" : 0
2872 },
2873 "permissions" : {
2874 "user" : "all"
2875 },
56122987 2876 "returns" : {
56122987
DM
2877 "items" : {
2878 "properties" : {},
2879 "type" : "object"
2880 },
2881 "links" : [
2882 {
44660702
DM
2883 "href" : "{name}",
2884 "rel" : "child"
56122987 2885 }
7aacca6f
DM
2886 ],
2887 "type" : "array"
44660702 2888 }
56122987 2889 }
7aacca6f 2890 },
44660702 2891 "leaf" : 0,
7aacca6f 2892 "path" : "/cluster/ha/status",
44660702 2893 "text" : "status"
56122987
DM
2894 }
2895 ],
56122987
DM
2896 "info" : {
2897 "GET" : {
7aacca6f 2898 "description" : "Directory index.",
44660702
DM
2899 "method" : "GET",
2900 "name" : "index",
2901 "parameters" : {
2902 "additionalProperties" : 0
2903 },
7aacca6f
DM
2904 "permissions" : {
2905 "check" : [
2906 "perm",
2907 "/",
2908 [
2909 "Sys.Audit"
2910 ]
2911 ]
2912 },
56122987 2913 "returns" : {
56122987 2914 "items" : {
7aacca6f
DM
2915 "properties" : {
2916 "id" : {
2917 "type" : "string"
2918 }
44660702
DM
2919 },
2920 "type" : "object"
7aacca6f
DM
2921 },
2922 "links" : [
2923 {
2924 "href" : "{id}",
2925 "rel" : "child"
2926 }
44660702
DM
2927 ],
2928 "type" : "array"
7aacca6f
DM
2929 }
2930 }
44660702
DM
2931 },
2932 "leaf" : 0,
2933 "path" : "/cluster/ha",
2934 "text" : "ha"
7aacca6f
DM
2935 },
2936 {
7aacca6f
DM
2937 "info" : {
2938 "GET" : {
2939 "description" : "Read cluster log",
44660702
DM
2940 "method" : "GET",
2941 "name" : "log",
56122987 2942 "parameters" : {
7aacca6f 2943 "additionalProperties" : 0,
56122987
DM
2944 "properties" : {
2945 "max" : {
7aacca6f 2946 "description" : "Maximum number of entries.",
44660702
DM
2947 "minimum" : 1,
2948 "optional" : 1,
2949 "type" : "integer"
56122987 2950 }
7aacca6f 2951 }
56122987 2952 },
44660702
DM
2953 "permissions" : {
2954 "user" : "all"
2955 },
7aacca6f 2956 "returns" : {
7aacca6f 2957 "items" : {
44660702
DM
2958 "properties" : {},
2959 "type" : "object"
2960 },
2961 "type" : "array"
7aacca6f 2962 }
56122987 2963 }
44660702
DM
2964 },
2965 "leaf" : 1,
2966 "path" : "/cluster/log",
2967 "text" : "log"
56122987
DM
2968 },
2969 {
56122987
DM
2970 "info" : {
2971 "GET" : {
44660702 2972 "description" : "Resources index (cluster wide).",
7aacca6f 2973 "method" : "GET",
7aacca6f 2974 "name" : "resources",
56122987
DM
2975 "parameters" : {
2976 "additionalProperties" : 0,
2977 "properties" : {
2978 "type" : {
2979 "enum" : [
2980 "vm",
2981 "storage",
2982 "node"
44660702
DM
2983 ],
2984 "optional" : 1,
2985 "type" : "string"
56122987
DM
2986 }
2987 }
2988 },
44660702
DM
2989 "permissions" : {
2990 "user" : "all"
2991 },
2992 "returns" : {
2993 "items" : {
2994 "properties" : {},
2995 "type" : "object"
2996 },
2997 "type" : "array"
2998 }
56122987
DM
2999 }
3000 },
7aacca6f 3001 "leaf" : 1,
44660702
DM
3002 "path" : "/cluster/resources",
3003 "text" : "resources"
56122987
DM
3004 },
3005 {
56122987
DM
3006 "info" : {
3007 "GET" : {
7aacca6f 3008 "description" : "List recent tasks (cluster wide).",
44660702 3009 "method" : "GET",
7aacca6f 3010 "name" : "tasks",
56122987
DM
3011 "parameters" : {
3012 "additionalProperties" : 0
3013 },
44660702
DM
3014 "permissions" : {
3015 "user" : "all"
3016 },
56122987
DM
3017 "returns" : {
3018 "items" : {
3019 "properties" : {
3020 "upid" : {
3021 "type" : "string"
3022 }
44660702
DM
3023 },
3024 "type" : "object"
3025 },
3026 "type" : "array"
7aacca6f 3027 }
56122987
DM
3028 }
3029 },
7aacca6f 3030 "leaf" : 1,
44660702
DM
3031 "path" : "/cluster/tasks",
3032 "text" : "tasks"
56122987
DM
3033 },
3034 {
56122987 3035 "info" : {
7aacca6f 3036 "GET" : {
44660702
DM
3037 "description" : "Get datacenter options.",
3038 "method" : "GET",
3039 "name" : "get_options",
56122987 3040 "parameters" : {
7aacca6f
DM
3041 "additionalProperties" : 0
3042 },
3043 "permissions" : {
3044 "check" : [
3045 "perm",
3046 "/",
3047 [
3048 "Sys.Audit"
3049 ]
3050 ]
3051 },
7aacca6f 3052 "returns" : {
44660702
DM
3053 "properties" : {},
3054 "type" : "object"
7aacca6f
DM
3055 }
3056 },
3057 "PUT" : {
44660702
DM
3058 "description" : "Set datacenter options.",
3059 "method" : "PUT",
7aacca6f
DM
3060 "name" : "set_options",
3061 "parameters" : {
3062 "additionalProperties" : 0,
3063 "properties" : {
56122987 3064 "console" : {
56122987 3065 "description" : "Select the default Console viewer. You can either use the builtin java applet (VNC), an external virt-viewer comtatible application (SPICE), or an HTML5 based viewer (noVNC).",
56122987
DM
3066 "enum" : [
3067 "applet",
3068 "vv",
3069 "html5"
44660702
DM
3070 ],
3071 "optional" : 1,
3072 "type" : "string"
56122987 3073 },
7aacca6f 3074 "delete" : {
7aacca6f 3075 "description" : "A list of settings you want to delete.",
44660702 3076 "format" : "pve-configid-list",
7aacca6f
DM
3077 "optional" : 1,
3078 "type" : "string"
3079 },
44660702
DM
3080 "email_from" : {
3081 "description" : "Specify email address to send notification from (default is root@$hostname)",
3082 "format" : "email-opt",
7aacca6f 3083 "optional" : 1,
44660702
DM
3084 "type" : "string"
3085 },
3086 "fencing" : {
3087 "default" : "watchdog",
3088 "description" : "Set the fencing mode of the HA cluster. Hardware mode needs a valid configuration of fence devices in /etc/pve/ha/fence.cfg. With both all two modes are used.\n\nWARNING: 'hardware' and 'both' are EXPERIMENTAL & WIP",
7aacca6f 3089 "enum" : [
44660702
DM
3090 "watchdog",
3091 "hardware",
3092 "both"
7aacca6f 3093 ],
44660702
DM
3094 "optional" : 1,
3095 "type" : "string"
3096 },
3097 "http_proxy" : {
3098 "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')",
3099 "optional" : 1,
3100 "pattern" : "http://.*",
3101 "type" : "string"
7aacca6f 3102 },
56122987 3103 "keyboard" : {
44660702 3104 "description" : "Default keybord layout for vnc server.",
56122987 3105 "enum" : [
44660702
DM
3106 "de",
3107 "de-ch",
7aacca6f 3108 "da",
56122987 3109 "en-gb",
44660702
DM
3110 "en-us",
3111 "es",
3112 "fi",
3113 "fr",
3114 "fr-be",
3115 "fr-ca",
3116 "fr-ch",
3117 "hu",
7aacca6f 3118 "is",
44660702
DM
3119 "it",
3120 "ja",
3121 "lt",
56122987 3122 "mk",
7aacca6f 3123 "nl",
56122987 3124 "no",
44660702 3125 "pl",
7aacca6f 3126 "pt",
44660702
DM
3127 "pt-br",
3128 "sv",
3129 "sl",
3130 "tr"
56122987 3131 ],
56122987
DM
3132 "optional" : 1,
3133 "type" : "string"
3134 },
44660702
DM
3135 "language" : {
3136 "description" : "Default GUI language.",
3137 "enum" : [
3138 "en",
3139 "de"
3140 ],
56122987 3141 "optional" : 1,
44660702 3142 "type" : "string"
56122987 3143 },
44660702
DM
3144 "max_workers" : {
3145 "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.",
3146 "minimum" : 1,
56122987 3147 "optional" : 1,
44660702 3148 "type" : "integer"
56122987 3149 },
7aacca6f 3150 "migration_unsecure" : {
44660702 3151 "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration.",
56122987 3152 "optional" : 1,
44660702 3153 "type" : "boolean"
56122987
DM
3154 }
3155 }
3156 },
44660702
DM
3157 "permissions" : {
3158 "check" : [
3159 "perm",
3160 "/",
3161 [
3162 "Sys.Modify"
3163 ]
3164 ]
3165 },
56122987 3166 "protected" : 1,
7aacca6f
DM
3167 "returns" : {
3168 "type" : "null"
44660702 3169 }
7aacca6f
DM
3170 }
3171 },
44660702
DM
3172 "leaf" : 1,
3173 "path" : "/cluster/options",
7aacca6f
DM
3174 "text" : "options"
3175 },
3176 {
7aacca6f 3177 "info" : {
56122987 3178 "GET" : {
44660702
DM
3179 "description" : "Get cluster status informations.",
3180 "method" : "GET",
3181 "name" : "get_status",
56122987
DM
3182 "parameters" : {
3183 "additionalProperties" : 0
3184 },
56122987
DM
3185 "permissions" : {
3186 "check" : [
3187 "perm",
3188 "/",
3189 [
3190 "Sys.Audit"
3191 ]
3192 ]
3193 },
7aacca6f 3194 "protected" : 1,
56122987 3195 "returns" : {
56122987 3196 "items" : {
56122987
DM
3197 "properties" : {
3198 "type" : {
3199 "type" : "string"
3200 }
44660702
DM
3201 },
3202 "type" : "object"
7aacca6f
DM
3203 },
3204 "type" : "array"
56122987
DM
3205 }
3206 }
3207 },
44660702 3208 "leaf" : 1,
7aacca6f 3209 "path" : "/cluster/status",
44660702 3210 "text" : "status"
56122987
DM
3211 },
3212 {
56122987
DM
3213 "info" : {
3214 "GET" : {
56122987 3215 "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.",
44660702
DM
3216 "method" : "GET",
3217 "name" : "nextid",
56122987 3218 "parameters" : {
44660702 3219 "additionalProperties" : 0,
56122987
DM
3220 "properties" : {
3221 "vmid" : {
44660702 3222 "description" : "The (unique) ID of the VM.",
56122987 3223 "format" : "pve-vmid",
7aacca6f 3224 "minimum" : 1,
7aacca6f
DM
3225 "optional" : 1,
3226 "type" : "integer"
56122987 3227 }
44660702 3228 }
56122987 3229 },
7aacca6f
DM
3230 "permissions" : {
3231 "user" : "all"
44660702
DM
3232 },
3233 "returns" : {
3234 "description" : "The next free VMID.",
3235 "type" : "integer"
7aacca6f 3236 }
56122987
DM
3237 }
3238 },
7aacca6f 3239 "leaf" : 1,
44660702
DM
3240 "path" : "/cluster/nextid",
3241 "text" : "nextid"
56122987
DM
3242 }
3243 ],
44660702
DM
3244 "info" : {
3245 "GET" : {
3246 "description" : "Cluster index.",
3247 "method" : "GET",
3248 "name" : "index",
3249 "parameters" : {
3250 "additionalProperties" : 0
3251 },
3252 "permissions" : {
3253 "user" : "all"
3254 },
3255 "returns" : {
3256 "items" : {
3257 "properties" : {},
3258 "type" : "object"
3259 },
3260 "links" : [
3261 {
3262 "href" : "{name}",
3263 "rel" : "child"
3264 }
3265 ],
3266 "type" : "array"
3267 }
3268 }
3269 },
3270 "leaf" : 0,
3271 "path" : "/cluster",
7aacca6f 3272 "text" : "cluster"
56122987
DM
3273 },
3274 {
56122987
DM
3275 "children" : [
3276 {
7aacca6f
DM
3277 "children" : [
3278 {
3279 "children" : [
3280 {
56122987
DM
3281 "children" : [
3282 {
56122987
DM
3283 "children" : [
3284 {
3285 "children" : [
3286 {
56122987
DM
3287 "info" : {
3288 "DELETE" : {
44660702 3289 "description" : "Delete rule.",
7aacca6f 3290 "method" : "DELETE",
44660702 3291 "name" : "delete_rule",
56122987 3292 "parameters" : {
44660702 3293 "additionalProperties" : 0,
56122987 3294 "properties" : {
44660702
DM
3295 "digest" : {
3296 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3297 "maxLength" : 40,
3298 "optional" : 1,
3299 "type" : "string"
3300 },
56122987 3301 "node" : {
7aacca6f 3302 "description" : "The cluster node name.",
44660702
DM
3303 "format" : "pve-node",
3304 "type" : "string"
7aacca6f 3305 },
56122987 3306 "pos" : {
7aacca6f 3307 "description" : "Update rule at position <pos>.",
44660702 3308 "minimum" : 0,
56122987 3309 "optional" : 1,
44660702
DM
3310 "type" : "integer"
3311 },
3312 "vmid" : {
3313 "description" : "The (unique) ID of the VM.",
3314 "format" : "pve-vmid",
3315 "minimum" : 1,
3316 "type" : "integer"
56122987 3317 }
44660702 3318 }
7aacca6f 3319 },
56122987
DM
3320 "permissions" : {
3321 "check" : [
3322 "perm",
3323 "/vms/{vmid}",
3324 [
3325 "VM.Config.Network"
3326 ]
3327 ]
3328 },
44660702
DM
3329 "protected" : 1,
3330 "proxyto" : null,
56122987
DM
3331 "returns" : {
3332 "type" : "null"
44660702
DM
3333 }
3334 },
3335 "GET" : {
3336 "description" : "Get single rule data.",
3337 "method" : "GET",
3338 "name" : "get_rule",
3339 "parameters" : {
3340 "additionalProperties" : 0,
3341 "properties" : {
3342 "node" : {
3343 "description" : "The cluster node name.",
3344 "format" : "pve-node",
3345 "type" : "string"
3346 },
3347 "pos" : {
3348 "description" : "Update rule at position <pos>.",
3349 "minimum" : 0,
3350 "optional" : 1,
3351 "type" : "integer"
3352 },
3353 "vmid" : {
3354 "description" : "The (unique) ID of the VM.",
3355 "format" : "pve-vmid",
3356 "minimum" : 1,
3357 "type" : "integer"
3358 }
3359 }
56122987 3360 },
56122987
DM
3361 "permissions" : {
3362 "check" : [
3363 "perm",
3364 "/vms/{vmid}",
3365 [
44660702 3366 "VM.Audit"
56122987
DM
3367 ]
3368 ]
3369 },
56122987 3370 "proxyto" : null,
44660702
DM
3371 "returns" : {
3372 "properties" : {
3373 "pos" : {
3374 "type" : "integer"
3375 }
3376 },
3377 "type" : "object"
3378 }
3379 },
3380 "PUT" : {
7aacca6f
DM
3381 "description" : "Modify rule data.",
3382 "method" : "PUT",
44660702 3383 "name" : "update_rule",
56122987 3384 "parameters" : {
44660702 3385 "additionalProperties" : 0,
56122987 3386 "properties" : {
44660702
DM
3387 "action" : {
3388 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3389 "maxLength" : 20,
3390 "minLength" : 2,
56122987 3391 "optional" : 1,
44660702 3392 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
3393 "type" : "string"
3394 },
7aacca6f
DM
3395 "comment" : {
3396 "optional" : 1,
3397 "type" : "string"
3398 },
3399 "delete" : {
7aacca6f 3400 "description" : "A list of settings you want to delete.",
44660702
DM
3401 "format" : "pve-configid-list",
3402 "optional" : 1,
3403 "type" : "string"
7aacca6f
DM
3404 },
3405 "dest" : {
44660702 3406 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
7aacca6f 3407 "format" : "pve-fw-addr-spec",
56122987 3408 "optional" : 1,
44660702 3409 "type" : "string"
56122987 3410 },
7aacca6f 3411 "digest" : {
44660702 3412 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 3413 "maxLength" : 40,
56122987 3414 "optional" : 1,
44660702
DM
3415 "type" : "string"
3416 },
3417 "dport" : {
3418 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
3419 "format" : "pve-fw-dport-spec",
3420 "optional" : 1,
3421 "type" : "string"
56122987 3422 },
7aacca6f 3423 "enable" : {
44660702 3424 "minimum" : 0,
56122987 3425 "optional" : 1,
44660702 3426 "type" : "integer"
7aacca6f 3427 },
44660702
DM
3428 "iface" : {
3429 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
3430 "format" : "pve-iface",
3431 "maxLength" : 20,
7aacca6f 3432 "minLength" : 2,
56122987 3433 "optional" : 1,
44660702 3434 "type" : "string"
56122987 3435 },
44660702
DM
3436 "macro" : {
3437 "maxLength" : 128,
56122987 3438 "optional" : 1,
44660702 3439 "type" : "string"
56122987 3440 },
44660702
DM
3441 "moveto" : {
3442 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
3443 "minimum" : 0,
56122987 3444 "optional" : 1,
44660702 3445 "type" : "integer"
56122987 3446 },
44660702
DM
3447 "node" : {
3448 "description" : "The cluster node name.",
3449 "format" : "pve-node",
3450 "type" : "string"
3451 },
3452 "pos" : {
3453 "description" : "Update rule at position <pos>.",
3454 "minimum" : 0,
3455 "optional" : 1,
7aacca6f 3456 "type" : "integer"
56122987 3457 },
44660702
DM
3458 "proto" : {
3459 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3460 "format" : "pve-fw-protocol-spec",
3461 "optional" : 1,
3462 "type" : "string"
7aacca6f 3463 },
44660702
DM
3464 "source" : {
3465 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
3466 "format" : "pve-fw-addr-spec",
56122987 3467 "optional" : 1,
7aacca6f 3468 "type" : "string"
56122987
DM
3469 },
3470 "sport" : {
3471 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
44660702
DM
3472 "format" : "pve-fw-sport-spec",
3473 "optional" : 1,
3474 "type" : "string"
3475 },
3476 "type" : {
3477 "enum" : [
3478 "in",
3479 "out",
3480 "group"
3481 ],
56122987 3482 "optional" : 1,
56122987 3483 "type" : "string"
44660702
DM
3484 },
3485 "vmid" : {
3486 "description" : "The (unique) ID of the VM.",
3487 "format" : "pve-vmid",
3488 "minimum" : 1,
3489 "type" : "integer"
56122987 3490 }
44660702 3491 }
56122987 3492 },
56122987
DM
3493 "permissions" : {
3494 "check" : [
3495 "perm",
3496 "/vms/{vmid}",
3497 [
44660702 3498 "VM.Config.Network"
56122987
DM
3499 ]
3500 ]
7aacca6f 3501 },
44660702 3502 "protected" : 1,
7aacca6f 3503 "proxyto" : null,
7aacca6f 3504 "returns" : {
44660702
DM
3505 "type" : "null"
3506 }
56122987 3507 }
7aacca6f 3508 },
44660702 3509 "leaf" : 1,
7aacca6f 3510 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}",
44660702 3511 "text" : "{pos}"
56122987
DM
3512 }
3513 ],
56122987 3514 "info" : {
44660702
DM
3515 "GET" : {
3516 "description" : "List rules.",
3517 "method" : "GET",
3518 "name" : "get_rules",
3519 "parameters" : {
3520 "additionalProperties" : 0,
3521 "properties" : {
3522 "node" : {
3523 "description" : "The cluster node name.",
3524 "format" : "pve-node",
3525 "type" : "string"
3526 },
3527 "vmid" : {
3528 "description" : "The (unique) ID of the VM.",
3529 "format" : "pve-vmid",
3530 "minimum" : 1,
3531 "type" : "integer"
3532 }
3533 }
56122987 3534 },
56122987
DM
3535 "permissions" : {
3536 "check" : [
3537 "perm",
3538 "/vms/{vmid}",
3539 [
44660702 3540 "VM.Audit"
56122987
DM
3541 ]
3542 ]
7aacca6f 3543 },
44660702
DM
3544 "proxyto" : null,
3545 "returns" : {
3546 "items" : {
3547 "properties" : {
3548 "pos" : {
3549 "type" : "integer"
3550 }
3551 },
3552 "type" : "object"
3553 },
3554 "links" : [
3555 {
3556 "href" : "{pos}",
3557 "rel" : "child"
3558 }
3559 ],
3560 "type" : "array"
3561 }
3562 },
3563 "POST" : {
3564 "description" : "Create new rule.",
7aacca6f 3565 "method" : "POST",
44660702 3566 "name" : "create_rule",
56122987 3567 "parameters" : {
44660702 3568 "additionalProperties" : 0,
56122987 3569 "properties" : {
44660702
DM
3570 "action" : {
3571 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3572 "maxLength" : 20,
3573 "minLength" : 2,
3574 "optional" : 0,
3575 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3576 "type" : "string"
56122987 3577 },
44660702 3578 "comment" : {
56122987 3579 "optional" : 1,
56122987
DM
3580 "type" : "string"
3581 },
44660702
DM
3582 "dest" : {
3583 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
3584 "format" : "pve-fw-addr-spec",
3585 "optional" : 1,
3586 "type" : "string"
56122987 3587 },
44660702
DM
3588 "digest" : {
3589 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3590 "maxLength" : 40,
56122987 3591 "optional" : 1,
44660702 3592 "type" : "string"
56122987 3593 },
7aacca6f
DM
3594 "dport" : {
3595 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
44660702 3596 "format" : "pve-fw-dport-spec",
7aacca6f 3597 "optional" : 1,
44660702 3598 "type" : "string"
56122987
DM
3599 },
3600 "enable" : {
3601 "minimum" : 0,
44660702
DM
3602 "optional" : 1,
3603 "type" : "integer"
56122987 3604 },
44660702
DM
3605 "iface" : {
3606 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
3607 "format" : "pve-iface",
3608 "maxLength" : 20,
7aacca6f 3609 "minLength" : 2,
44660702
DM
3610 "optional" : 1,
3611 "type" : "string"
56122987 3612 },
44660702
DM
3613 "macro" : {
3614 "maxLength" : 128,
56122987 3615 "optional" : 1,
44660702 3616 "type" : "string"
7aacca6f 3617 },
44660702
DM
3618 "node" : {
3619 "description" : "The cluster node name.",
3620 "format" : "pve-node",
3621 "type" : "string"
3622 },
3623 "pos" : {
3624 "description" : "Update rule at position <pos>.",
3625 "minimum" : 0,
3626 "optional" : 1,
3627 "type" : "integer"
3628 },
3629 "proto" : {
3630 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3631 "format" : "pve-fw-protocol-spec",
7aacca6f 3632 "optional" : 1,
56122987 3633 "type" : "string"
7aacca6f
DM
3634 },
3635 "source" : {
3636 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
44660702 3637 "format" : "pve-fw-addr-spec",
7aacca6f 3638 "optional" : 1,
44660702 3639 "type" : "string"
7aacca6f 3640 },
44660702
DM
3641 "sport" : {
3642 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
3643 "format" : "pve-fw-sport-spec",
7aacca6f 3644 "optional" : 1,
44660702 3645 "type" : "string"
7aacca6f 3646 },
44660702
DM
3647 "type" : {
3648 "enum" : [
3649 "in",
3650 "out",
3651 "group"
3652 ],
3653 "optional" : 0,
3654 "type" : "string"
7aacca6f 3655 },
7aacca6f 3656 "vmid" : {
44660702 3657 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
3658 "format" : "pve-vmid",
3659 "minimum" : 1,
7aacca6f 3660 "type" : "integer"
7aacca6f
DM
3661 }
3662 }
3663 },
56122987
DM
3664 "permissions" : {
3665 "check" : [
3666 "perm",
3667 "/vms/{vmid}",
3668 [
44660702 3669 "VM.Config.Network"
56122987
DM
3670 ]
3671 ]
3672 },
44660702
DM
3673 "protected" : 1,
3674 "proxyto" : null,
56122987 3675 "returns" : {
44660702
DM
3676 "type" : "null"
3677 }
56122987
DM
3678 }
3679 },
44660702 3680 "leaf" : 0,
7aacca6f 3681 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules",
44660702 3682 "text" : "rules"
56122987
DM
3683 },
3684 {
3685 "children" : [
3686 {
56122987 3687 "info" : {
44660702
DM
3688 "DELETE" : {
3689 "description" : "Remove IP or Network alias.",
3690 "method" : "DELETE",
3691 "name" : "remove_alias",
56122987 3692 "parameters" : {
44660702 3693 "additionalProperties" : 0,
56122987 3694 "properties" : {
44660702
DM
3695 "digest" : {
3696 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3697 "maxLength" : 40,
3698 "optional" : 1,
3699 "type" : "string"
56122987
DM
3700 },
3701 "name" : {
56122987 3702 "description" : "Alias name.",
44660702 3703 "maxLength" : 64,
7aacca6f 3704 "minLength" : 2,
44660702 3705 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
3706 "type" : "string"
3707 },
7aacca6f 3708 "node" : {
44660702 3709 "description" : "The cluster node name.",
7aacca6f 3710 "format" : "pve-node",
44660702
DM
3711 "type" : "string"
3712 },
3713 "vmid" : {
3714 "description" : "The (unique) ID of the VM.",
3715 "format" : "pve-vmid",
3716 "minimum" : 1,
3717 "type" : "integer"
56122987 3718 }
44660702 3719 }
56122987 3720 },
7aacca6f
DM
3721 "permissions" : {
3722 "check" : [
3723 "perm",
3724 "/vms/{vmid}",
3725 [
3726 "VM.Config.Network"
3727 ]
3728 ]
56122987 3729 },
44660702
DM
3730 "protected" : 1,
3731 "returns" : {
3732 "type" : "null"
3733 }
3734 },
3735 "GET" : {
3736 "description" : "Read alias.",
3737 "method" : "GET",
3738 "name" : "read_alias",
56122987 3739 "parameters" : {
44660702 3740 "additionalProperties" : 0,
56122987 3741 "properties" : {
56122987 3742 "name" : {
7aacca6f 3743 "description" : "Alias name.",
44660702 3744 "maxLength" : 64,
56122987 3745 "minLength" : 2,
44660702 3746 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 3747 "type" : "string"
7aacca6f
DM
3748 },
3749 "node" : {
3750 "description" : "The cluster node name.",
44660702
DM
3751 "format" : "pve-node",
3752 "type" : "string"
3753 },
3754 "vmid" : {
3755 "description" : "The (unique) ID of the VM.",
3756 "format" : "pve-vmid",
3757 "minimum" : 1,
3758 "type" : "integer"
56122987 3759 }
44660702 3760 }
56122987 3761 },
44660702
DM
3762 "permissions" : {
3763 "check" : [
3764 "perm",
3765 "/vms/{vmid}",
3766 [
3767 "VM.Audit"
3768 ]
3769 ]
56122987 3770 },
44660702
DM
3771 "returns" : {
3772 "type" : "object"
3773 }
7aacca6f 3774 },
44660702
DM
3775 "PUT" : {
3776 "description" : "Update IP or Network alias.",
3777 "method" : "PUT",
3778 "name" : "update_alias",
56122987
DM
3779 "parameters" : {
3780 "additionalProperties" : 0,
3781 "properties" : {
44660702
DM
3782 "cidr" : {
3783 "description" : "Network/IP specification in CIDR format.",
3784 "format" : "IPorCIDR",
3785 "type" : "string"
3786 },
3787 "comment" : {
3788 "optional" : 1,
3789 "type" : "string"
56122987
DM
3790 },
3791 "digest" : {
44660702 3792 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987
DM
3793 "maxLength" : 40,
3794 "optional" : 1,
44660702 3795 "type" : "string"
56122987 3796 },
7aacca6f 3797 "name" : {
44660702 3798 "description" : "Alias name.",
56122987
DM
3799 "maxLength" : 64,
3800 "minLength" : 2,
3801 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 3802 "type" : "string"
7aacca6f
DM
3803 },
3804 "node" : {
7aacca6f 3805 "description" : "The cluster node name.",
44660702
DM
3806 "format" : "pve-node",
3807 "type" : "string"
3808 },
3809 "rename" : {
3810 "description" : "Rename an existing alias.",
3811 "maxLength" : 64,
3812 "minLength" : 2,
3813 "optional" : 1,
3814 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3815 "type" : "string"
3816 },
3817 "vmid" : {
3818 "description" : "The (unique) ID of the VM.",
3819 "format" : "pve-vmid",
3820 "minimum" : 1,
3821 "type" : "integer"
56122987
DM
3822 }
3823 }
3824 },
7aacca6f
DM
3825 "permissions" : {
3826 "check" : [
3827 "perm",
3828 "/vms/{vmid}",
3829 [
3830 "VM.Config.Network"
3831 ]
3832 ]
3833 },
3834 "protected" : 1,
7aacca6f
DM
3835 "returns" : {
3836 "type" : "null"
44660702 3837 }
56122987
DM
3838 }
3839 },
44660702 3840 "leaf" : 1,
7aacca6f 3841 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}",
44660702 3842 "text" : "{name}"
56122987
DM
3843 }
3844 ],
3845 "info" : {
44660702
DM
3846 "GET" : {
3847 "description" : "List aliases",
3848 "method" : "GET",
3849 "name" : "get_aliases",
56122987 3850 "parameters" : {
44660702 3851 "additionalProperties" : 0,
56122987 3852 "properties" : {
7aacca6f 3853 "node" : {
7aacca6f 3854 "description" : "The cluster node name.",
44660702 3855 "format" : "pve-node",
7aacca6f 3856 "type" : "string"
56122987 3857 },
44660702
DM
3858 "vmid" : {
3859 "description" : "The (unique) ID of the VM.",
3860 "format" : "pve-vmid",
3861 "minimum" : 1,
3862 "type" : "integer"
56122987 3863 }
44660702 3864 }
56122987 3865 },
56122987
DM
3866 "permissions" : {
3867 "check" : [
3868 "perm",
3869 "/vms/{vmid}",
3870 [
44660702 3871 "VM.Audit"
56122987
DM
3872 ]
3873 ]
3874 },
56122987
DM
3875 "returns" : {
3876 "items" : {
3877 "properties" : {
44660702 3878 "cidr" : {
56122987
DM
3879 "type" : "string"
3880 },
44660702
DM
3881 "comment" : {
3882 "optional" : 1,
7aacca6f 3883 "type" : "string"
56122987
DM
3884 },
3885 "digest" : {
56122987 3886 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 3887 "maxLength" : 40,
56122987
DM
3888 "optional" : 0,
3889 "type" : "string"
3890 },
44660702 3891 "name" : {
56122987
DM
3892 "type" : "string"
3893 }
44660702
DM
3894 },
3895 "type" : "object"
56122987 3896 },
56122987
DM
3897 "links" : [
3898 {
3899 "href" : "{name}",
3900 "rel" : "child"
3901 }
44660702
DM
3902 ],
3903 "type" : "array"
3904 }
3905 },
3906 "POST" : {
3907 "description" : "Create IP or Network Alias.",
3908 "method" : "POST",
3909 "name" : "create_alias",
56122987 3910 "parameters" : {
7aacca6f 3911 "additionalProperties" : 0,
56122987 3912 "properties" : {
44660702
DM
3913 "cidr" : {
3914 "description" : "Network/IP specification in CIDR format.",
3915 "format" : "IPorCIDR",
3916 "type" : "string"
3917 },
3918 "comment" : {
3919 "optional" : 1,
3920 "type" : "string"
3921 },
3922 "name" : {
3923 "description" : "Alias name.",
3924 "maxLength" : 64,
3925 "minLength" : 2,
3926 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3927 "type" : "string"
56122987
DM
3928 },
3929 "node" : {
7aacca6f 3930 "description" : "The cluster node name.",
44660702 3931 "format" : "pve-node",
56122987 3932 "type" : "string"
44660702
DM
3933 },
3934 "vmid" : {
3935 "description" : "The (unique) ID of the VM.",
3936 "format" : "pve-vmid",
3937 "minimum" : 1,
3938 "type" : "integer"
56122987 3939 }
7aacca6f 3940 }
56122987 3941 },
44660702
DM
3942 "permissions" : {
3943 "check" : [
3944 "perm",
3945 "/vms/{vmid}",
3946 [
3947 "VM.Config.Network"
3948 ]
3949 ]
3950 },
3951 "protected" : 1,
3952 "returns" : {
3953 "type" : "null"
3954 }
56122987 3955 }
44660702
DM
3956 },
3957 "leaf" : 0,
3958 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases",
3959 "text" : "aliases"
56122987
DM
3960 },
3961 {
56122987
DM
3962 "children" : [
3963 {
7aacca6f
DM
3964 "children" : [
3965 {
3966 "info" : {
3967 "DELETE" : {
44660702 3968 "description" : "Remove IP or Network from IPSet.",
7aacca6f 3969 "method" : "DELETE",
44660702 3970 "name" : "remove_ip",
7aacca6f 3971 "parameters" : {
44660702 3972 "additionalProperties" : 0,
7aacca6f 3973 "properties" : {
44660702
DM
3974 "cidr" : {
3975 "description" : "Network/IP specification in CIDR format.",
3976 "format" : "IPorCIDRorAlias",
3977 "type" : "string"
3978 },
3979 "digest" : {
3980 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3981 "maxLength" : 40,
3982 "optional" : 1,
3983 "type" : "string"
3984 },
7aacca6f 3985 "name" : {
7aacca6f 3986 "description" : "IP set name.",
44660702
DM
3987 "maxLength" : 64,
3988 "minLength" : 2,
7aacca6f 3989 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 3990 "type" : "string"
7aacca6f
DM
3991 },
3992 "node" : {
3993 "description" : "The cluster node name.",
44660702
DM
3994 "format" : "pve-node",
3995 "type" : "string"
7aacca6f
DM
3996 },
3997 "vmid" : {
44660702 3998 "description" : "The (unique) ID of the VM.",
7aacca6f 3999 "format" : "pve-vmid",
44660702
DM
4000 "minimum" : 1,
4001 "type" : "integer"
7aacca6f 4002 }
44660702 4003 }
7aacca6f 4004 },
7aacca6f
DM
4005 "permissions" : {
4006 "check" : [
4007 "perm",
4008 "/vms/{vmid}",
4009 [
4010 "VM.Config.Network"
4011 ]
4012 ]
4013 },
4014 "protected" : 1,
44660702
DM
4015 "returns" : {
4016 "type" : "null"
4017 }
56122987 4018 },
44660702
DM
4019 "GET" : {
4020 "description" : "Read IP or Network settings from IPSet.",
4021 "method" : "GET",
4022 "name" : "read_ip",
7aacca6f 4023 "parameters" : {
44660702 4024 "additionalProperties" : 0,
7aacca6f 4025 "properties" : {
7aacca6f 4026 "cidr" : {
44660702 4027 "description" : "Network/IP specification in CIDR format.",
7aacca6f 4028 "format" : "IPorCIDRorAlias",
44660702 4029 "type" : "string"
7aacca6f
DM
4030 },
4031 "name" : {
7aacca6f 4032 "description" : "IP set name.",
44660702 4033 "maxLength" : 64,
7aacca6f 4034 "minLength" : 2,
44660702
DM
4035 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4036 "type" : "string"
7aacca6f 4037 },
44660702
DM
4038 "node" : {
4039 "description" : "The cluster node name.",
4040 "format" : "pve-node",
7aacca6f
DM
4041 "type" : "string"
4042 },
44660702
DM
4043 "vmid" : {
4044 "description" : "The (unique) ID of the VM.",
4045 "format" : "pve-vmid",
4046 "minimum" : 1,
4047 "type" : "integer"
7aacca6f 4048 }
44660702 4049 }
7aacca6f 4050 },
44660702
DM
4051 "permissions" : {
4052 "check" : [
4053 "perm",
4054 "/vms/{vmid}",
4055 [
4056 "VM.Audit"
4057 ]
4058 ]
4059 },
4060 "protected" : 1,
7aacca6f 4061 "returns" : {
44660702 4062 "type" : "object"
7aacca6f 4063 }
56122987 4064 },
44660702
DM
4065 "PUT" : {
4066 "description" : "Update IP or Network settings",
4067 "method" : "PUT",
4068 "name" : "update_ip",
7aacca6f
DM
4069 "parameters" : {
4070 "additionalProperties" : 0,
4071 "properties" : {
44660702
DM
4072 "cidr" : {
4073 "description" : "Network/IP specification in CIDR format.",
4074 "format" : "IPorCIDRorAlias",
4075 "type" : "string"
4076 },
4077 "comment" : {
4078 "optional" : 1,
4079 "type" : "string"
4080 },
4081 "digest" : {
4082 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4083 "maxLength" : 40,
4084 "optional" : 1,
4085 "type" : "string"
4086 },
7aacca6f 4087 "name" : {
7aacca6f 4088 "description" : "IP set name.",
44660702 4089 "maxLength" : 64,
7aacca6f 4090 "minLength" : 2,
44660702
DM
4091 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4092 "type" : "string"
7aacca6f
DM
4093 },
4094 "node" : {
7aacca6f 4095 "description" : "The cluster node name.",
44660702 4096 "format" : "pve-node",
7aacca6f
DM
4097 "type" : "string"
4098 },
44660702
DM
4099 "nomatch" : {
4100 "optional" : 1,
4101 "type" : "boolean"
7aacca6f
DM
4102 },
4103 "vmid" : {
4104 "description" : "The (unique) ID of the VM.",
44660702 4105 "format" : "pve-vmid",
7aacca6f 4106 "minimum" : 1,
44660702 4107 "type" : "integer"
7aacca6f
DM
4108 }
4109 }
4110 },
4111 "permissions" : {
4112 "check" : [
4113 "perm",
4114 "/vms/{vmid}",
4115 [
44660702 4116 "VM.Config.Network"
7aacca6f
DM
4117 ]
4118 ]
4119 },
7aacca6f 4120 "protected" : 1,
7aacca6f 4121 "returns" : {
44660702 4122 "type" : "null"
7aacca6f 4123 }
56122987 4124 }
7aacca6f 4125 },
7aacca6f 4126 "leaf" : 1,
44660702
DM
4127 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}",
4128 "text" : "{cidr}"
7aacca6f 4129 }
44660702
DM
4130 ],
4131 "info" : {
4132 "DELETE" : {
4133 "description" : "Delete IPSet",
4134 "method" : "DELETE",
4135 "name" : "delete_ipset",
4136 "parameters" : {
4137 "additionalProperties" : 0,
4138 "properties" : {
4139 "name" : {
4140 "description" : "IP set name.",
4141 "maxLength" : 64,
4142 "minLength" : 2,
4143 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4144 "type" : "string"
4145 },
4146 "node" : {
4147 "description" : "The cluster node name.",
4148 "format" : "pve-node",
4149 "type" : "string"
4150 },
4151 "vmid" : {
4152 "description" : "The (unique) ID of the VM.",
4153 "format" : "pve-vmid",
4154 "minimum" : 1,
4155 "type" : "integer"
4156 }
4157 }
7aacca6f 4158 },
44660702
DM
4159 "permissions" : {
4160 "check" : [
4161 "perm",
4162 "/vms/{vmid}",
4163 [
4164 "VM.Config.Network"
4165 ]
4166 ]
7aacca6f 4167 },
44660702
DM
4168 "protected" : 1,
4169 "returns" : {
4170 "type" : "null"
4171 }
4172 },
4173 "GET" : {
4174 "description" : "List IPSet content",
4175 "method" : "GET",
4176 "name" : "get_ipset",
4177 "parameters" : {
4178 "additionalProperties" : 0,
4179 "properties" : {
4180 "name" : {
4181 "description" : "IP set name.",
4182 "maxLength" : 64,
4183 "minLength" : 2,
4184 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4185 "type" : "string"
4186 },
4187 "node" : {
4188 "description" : "The cluster node name.",
4189 "format" : "pve-node",
4190 "type" : "string"
4191 },
4192 "vmid" : {
4193 "description" : "The (unique) ID of the VM.",
4194 "format" : "pve-vmid",
4195 "minimum" : 1,
4196 "type" : "integer"
4197 }
4198 }
7aacca6f 4199 },
44660702
DM
4200 "permissions" : {
4201 "check" : [
4202 "perm",
4203 "/vms/{vmid}",
4204 [
4205 "VM.Audit"
4206 ]
4207 ]
7aacca6f 4208 },
44660702
DM
4209 "returns" : {
4210 "items" : {
4211 "properties" : {
4212 "cidr" : {
4213 "type" : "string"
4214 },
4215 "comment" : {
4216 "optional" : 1,
4217 "type" : "string"
4218 },
4219 "digest" : {
4220 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4221 "maxLength" : 40,
4222 "optional" : 0,
4223 "type" : "string"
4224 },
4225 "nomatch" : {
4226 "optional" : 1,
4227 "type" : "boolean"
4228 }
4229 },
4230 "type" : "object"
4231 },
4232 "links" : [
4233 {
4234 "href" : "{cidr}",
4235 "rel" : "child"
4236 }
4237 ],
4238 "type" : "array"
56122987
DM
4239 }
4240 },
44660702
DM
4241 "POST" : {
4242 "description" : "Add IP or Network to IPSet.",
4243 "method" : "POST",
4244 "name" : "create_ip",
4245 "parameters" : {
4246 "additionalProperties" : 0,
4247 "properties" : {
4248 "cidr" : {
4249 "description" : "Network/IP specification in CIDR format.",
4250 "format" : "IPorCIDRorAlias",
4251 "type" : "string"
4252 },
4253 "comment" : {
4254 "optional" : 1,
4255 "type" : "string"
4256 },
4257 "name" : {
4258 "description" : "IP set name.",
4259 "maxLength" : 64,
4260 "minLength" : 2,
4261 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4262 "type" : "string"
4263 },
4264 "node" : {
4265 "description" : "The cluster node name.",
4266 "format" : "pve-node",
4267 "type" : "string"
4268 },
4269 "nomatch" : {
4270 "optional" : 1,
4271 "type" : "boolean"
4272 },
4273 "vmid" : {
4274 "description" : "The (unique) ID of the VM.",
4275 "format" : "pve-vmid",
4276 "minimum" : 1,
4277 "type" : "integer"
4278 }
4279 }
4280 },
4281 "permissions" : {
4282 "check" : [
4283 "perm",
4284 "/vms/{vmid}",
4285 [
4286 "VM.Config.Network"
4287 ]
4288 ]
4289 },
4290 "protected" : 1,
4291 "returns" : {
4292 "type" : "null"
4293 }
4294 }
4295 },
4296 "leaf" : 0,
4297 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}",
4298 "text" : "{name}"
4299 }
4300 ],
4301 "info" : {
4302 "GET" : {
4303 "description" : "List IPSets",
4304 "method" : "GET",
4305 "name" : "ipset_index",
4306 "parameters" : {
4307 "additionalProperties" : 0,
4308 "properties" : {
4309 "node" : {
4310 "description" : "The cluster node name.",
4311 "format" : "pve-node",
4312 "type" : "string"
4313 },
4314 "vmid" : {
4315 "description" : "The (unique) ID of the VM.",
4316 "format" : "pve-vmid",
4317 "minimum" : 1,
4318 "type" : "integer"
4319 }
4320 }
56122987
DM
4321 },
4322 "permissions" : {
4323 "check" : [
4324 "perm",
4325 "/vms/{vmid}",
4326 [
44660702 4327 "VM.Audit"
56122987
DM
4328 ]
4329 ]
4330 },
7aacca6f 4331 "returns" : {
7aacca6f
DM
4332 "items" : {
4333 "properties" : {
7aacca6f
DM
4334 "comment" : {
4335 "optional" : 1,
4336 "type" : "string"
4337 },
4338 "digest" : {
7aacca6f 4339 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
4340 "maxLength" : 40,
4341 "optional" : 0,
4342 "type" : "string"
4343 },
4344 "name" : {
4345 "description" : "IP set name.",
4346 "maxLength" : 64,
4347 "minLength" : 2,
4348 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4349 "type" : "string"
7aacca6f
DM
4350 }
4351 },
4352 "type" : "object"
4353 },
4354 "links" : [
4355 {
44660702
DM
4356 "href" : "{name}",
4357 "rel" : "child"
7aacca6f 4358 }
44660702
DM
4359 ],
4360 "type" : "array"
4361 }
4362 },
4363 "POST" : {
4364 "description" : "Create new IPSet",
4365 "method" : "POST",
4366 "name" : "create_ipset",
56122987
DM
4367 "parameters" : {
4368 "additionalProperties" : 0,
4369 "properties" : {
44660702
DM
4370 "comment" : {
4371 "optional" : 1,
4372 "type" : "string"
56122987 4373 },
44660702
DM
4374 "digest" : {
4375 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4376 "maxLength" : 40,
4377 "optional" : 1,
4378 "type" : "string"
4379 },
4380 "name" : {
4381 "description" : "IP set name.",
4382 "maxLength" : 64,
4383 "minLength" : 2,
4384 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4385 "type" : "string"
4386 },
4387 "node" : {
4388 "description" : "The cluster node name.",
4389 "format" : "pve-node",
4390 "type" : "string"
4391 },
4392 "rename" : {
4393 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
4394 "maxLength" : 64,
4395 "minLength" : 2,
4396 "optional" : 1,
4397 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4398 "type" : "string"
4399 },
4400 "vmid" : {
4401 "description" : "The (unique) ID of the VM.",
4402 "format" : "pve-vmid",
4403 "minimum" : 1,
4404 "type" : "integer"
4405 }
4406 }
4407 },
7aacca6f
DM
4408 "permissions" : {
4409 "check" : [
4410 "perm",
4411 "/vms/{vmid}",
4412 [
4413 "VM.Config.Network"
4414 ]
4415 ]
4416 },
44660702 4417 "protected" : 1,
56122987 4418 "returns" : {
7aacca6f 4419 "type" : "null"
44660702
DM
4420 }
4421 }
4422 },
4423 "leaf" : 0,
4424 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset",
4425 "text" : "ipset"
4426 },
4427 {
4428 "info" : {
4429 "GET" : {
4430 "description" : "Get VM firewall options.",
4431 "method" : "GET",
4432 "name" : "get_options",
7aacca6f
DM
4433 "parameters" : {
4434 "additionalProperties" : 0,
56122987 4435 "properties" : {
7aacca6f
DM
4436 "node" : {
4437 "description" : "The cluster node name.",
44660702
DM
4438 "format" : "pve-node",
4439 "type" : "string"
7aacca6f 4440 },
44660702
DM
4441 "vmid" : {
4442 "description" : "The (unique) ID of the VM.",
4443 "format" : "pve-vmid",
4444 "minimum" : 1,
4445 "type" : "integer"
4446 }
4447 }
4448 },
4449 "permissions" : {
4450 "check" : [
4451 "perm",
4452 "/vms/{vmid}",
4453 [
4454 "VM.Audit"
4455 ]
4456 ]
4457 },
4458 "proxyto" : "node",
4459 "returns" : {
4460 "properties" : {
4461 "dhcp" : {
4462 "description" : "Enable DHCP.",
56122987 4463 "optional" : 1,
44660702 4464 "type" : "boolean"
56122987 4465 },
44660702
DM
4466 "enable" : {
4467 "description" : "Enable/disable firewall rules.",
7aacca6f 4468 "optional" : 1,
44660702 4469 "type" : "boolean"
56122987 4470 },
44660702
DM
4471 "ipfilter" : {
4472 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
7aacca6f 4473 "optional" : 1,
44660702 4474 "type" : "boolean"
7aacca6f 4475 },
56122987 4476 "log_level_in" : {
7aacca6f 4477 "description" : "Log level for incoming traffic.",
56122987
DM
4478 "enum" : [
4479 "emerg",
4480 "alert",
4481 "crit",
4482 "err",
4483 "warning",
4484 "notice",
4485 "info",
4486 "debug",
4487 "nolog"
4488 ],
56122987
DM
4489 "optional" : 1,
4490 "type" : "string"
4491 },
44660702
DM
4492 "log_level_out" : {
4493 "description" : "Log level for outgoing traffic.",
4494 "enum" : [
4495 "emerg",
4496 "alert",
4497 "crit",
4498 "err",
4499 "warning",
4500 "notice",
4501 "info",
4502 "debug",
4503 "nolog"
4504 ],
4505 "optional" : 1,
4506 "type" : "string"
4507 },
4508 "macfilter" : {
4509 "description" : "Enable/disable MAC address filter.",
56122987 4510 "optional" : 1,
7aacca6f 4511 "type" : "boolean"
56122987
DM
4512 },
4513 "ndp" : {
44660702 4514 "description" : "Enable NDP.",
56122987 4515 "optional" : 1,
44660702 4516 "type" : "boolean"
56122987
DM
4517 },
4518 "policy_in" : {
56122987
DM
4519 "description" : "Input policy.",
4520 "enum" : [
4521 "ACCEPT",
4522 "REJECT",
4523 "DROP"
44660702
DM
4524 ],
4525 "optional" : 1,
4526 "type" : "string"
56122987 4527 },
44660702
DM
4528 "policy_out" : {
4529 "description" : "Output policy.",
4530 "enum" : [
4531 "ACCEPT",
4532 "REJECT",
4533 "DROP"
4534 ],
4535 "optional" : 1,
4536 "type" : "string"
4537 },
4538 "radv" : {
4539 "description" : "Allow sending Router Advertisement.",
4540 "optional" : 1,
4541 "type" : "boolean"
4542 }
4543 },
4544 "type" : "object"
4545 }
4546 },
4547 "PUT" : {
4548 "description" : "Set Firewall options.",
4549 "method" : "PUT",
4550 "name" : "set_options",
4551 "parameters" : {
4552 "additionalProperties" : 0,
4553 "properties" : {
4554 "delete" : {
4555 "description" : "A list of settings you want to delete.",
4556 "format" : "pve-configid-list",
4557 "optional" : 1,
4558 "type" : "string"
4559 },
4560 "dhcp" : {
4561 "description" : "Enable DHCP.",
7aacca6f 4562 "optional" : 1,
44660702 4563 "type" : "boolean"
7aacca6f
DM
4564 },
4565 "digest" : {
4566 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 4567 "maxLength" : 40,
7aacca6f 4568 "optional" : 1,
44660702 4569 "type" : "string"
7aacca6f
DM
4570 },
4571 "enable" : {
4572 "description" : "Enable/disable firewall rules.",
56122987 4573 "optional" : 1,
7aacca6f
DM
4574 "type" : "boolean"
4575 },
44660702
DM
4576 "ipfilter" : {
4577 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
4578 "optional" : 1,
4579 "type" : "boolean"
4580 },
4581 "log_level_in" : {
4582 "description" : "Log level for incoming traffic.",
56122987
DM
4583 "enum" : [
4584 "emerg",
4585 "alert",
4586 "crit",
4587 "err",
4588 "warning",
4589 "notice",
4590 "info",
4591 "debug",
4592 "nolog"
7aacca6f 4593 ],
7aacca6f 4594 "optional" : 1,
44660702 4595 "type" : "string"
7aacca6f 4596 },
44660702
DM
4597 "log_level_out" : {
4598 "description" : "Log level for outgoing traffic.",
56122987
DM
4599 "enum" : [
4600 "emerg",
4601 "alert",
4602 "crit",
4603 "err",
4604 "warning",
4605 "notice",
4606 "info",
4607 "debug",
4608 "nolog"
4609 ],
56122987 4610 "optional" : 1,
44660702 4611 "type" : "string"
56122987
DM
4612 },
4613 "macfilter" : {
56122987 4614 "description" : "Enable/disable MAC address filter.",
7aacca6f
DM
4615 "optional" : 1,
4616 "type" : "boolean"
56122987 4617 },
44660702
DM
4618 "ndp" : {
4619 "description" : "Enable NDP.",
4620 "optional" : 1,
4621 "type" : "boolean"
4622 },
4623 "node" : {
4624 "description" : "The cluster node name.",
4625 "format" : "pve-node",
4626 "type" : "string"
4627 },
56122987 4628 "policy_in" : {
44660702 4629 "description" : "Input policy.",
56122987
DM
4630 "enum" : [
4631 "ACCEPT",
4632 "REJECT",
4633 "DROP"
7aacca6f 4634 ],
56122987 4635 "optional" : 1,
7aacca6f 4636 "type" : "string"
56122987 4637 },
44660702
DM
4638 "policy_out" : {
4639 "description" : "Output policy.",
4640 "enum" : [
4641 "ACCEPT",
4642 "REJECT",
4643 "DROP"
4644 ],
56122987 4645 "optional" : 1,
44660702 4646 "type" : "string"
56122987 4647 },
44660702
DM
4648 "radv" : {
4649 "description" : "Allow sending Router Advertisement.",
56122987 4650 "optional" : 1,
44660702 4651 "type" : "boolean"
7aacca6f
DM
4652 },
4653 "vmid" : {
4654 "description" : "The (unique) ID of the VM.",
44660702 4655 "format" : "pve-vmid",
7aacca6f 4656 "minimum" : 1,
44660702 4657 "type" : "integer"
56122987
DM
4658 }
4659 }
4660 },
56122987
DM
4661 "permissions" : {
4662 "check" : [
4663 "perm",
4664 "/vms/{vmid}",
4665 [
44660702 4666 "VM.Config.Network"
56122987
DM
4667 ]
4668 ]
7aacca6f 4669 },
44660702 4670 "protected" : 1,
7aacca6f 4671 "proxyto" : "node",
44660702
DM
4672 "returns" : {
4673 "type" : "null"
4674 }
56122987
DM
4675 }
4676 },
44660702 4677 "leaf" : 1,
7aacca6f 4678 "path" : "/nodes/{node}/qemu/{vmid}/firewall/options",
44660702 4679 "text" : "options"
56122987
DM
4680 },
4681 {
56122987
DM
4682 "info" : {
4683 "GET" : {
44660702
DM
4684 "description" : "Read firewall log",
4685 "method" : "GET",
4686 "name" : "log",
4687 "parameters" : {
4688 "additionalProperties" : 0,
4689 "properties" : {
4690 "limit" : {
4691 "minimum" : 0,
4692 "optional" : 1,
4693 "type" : "integer"
56122987 4694 },
44660702
DM
4695 "node" : {
4696 "description" : "The cluster node name.",
4697 "format" : "pve-node",
4698 "type" : "string"
4699 },
4700 "start" : {
4701 "minimum" : 0,
4702 "optional" : 1,
4703 "type" : "integer"
4704 },
4705 "vmid" : {
4706 "description" : "The (unique) ID of the VM.",
4707 "format" : "pve-vmid",
4708 "minimum" : 1,
4709 "type" : "integer"
4710 }
4711 }
7aacca6f 4712 },
7aacca6f
DM
4713 "permissions" : {
4714 "check" : [
4715 "perm",
4716 "/vms/{vmid}",
4717 [
4718 "VM.Console"
4719 ]
4720 ]
56122987 4721 },
7aacca6f 4722 "protected" : 1,
44660702
DM
4723 "proxyto" : "node",
4724 "returns" : {
4725 "items" : {
4726 "properties" : {
4727 "n" : {
4728 "description" : "Line number",
4729 "type" : "integer"
4730 },
4731 "t" : {
4732 "description" : "Line text",
4733 "type" : "string"
4734 }
56122987 4735 },
44660702 4736 "type" : "object"
7aacca6f 4737 },
44660702 4738 "type" : "array"
7aacca6f
DM
4739 }
4740 }
4741 },
44660702 4742 "leaf" : 1,
7aacca6f 4743 "path" : "/nodes/{node}/qemu/{vmid}/firewall/log",
44660702 4744 "text" : "log"
7aacca6f
DM
4745 },
4746 {
7aacca6f
DM
4747 "info" : {
4748 "GET" : {
4749 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
4750 "method" : "GET",
4751 "name" : "refs",
56122987 4752 "parameters" : {
44660702 4753 "additionalProperties" : 0,
56122987
DM
4754 "properties" : {
4755 "node" : {
7aacca6f 4756 "description" : "The cluster node name.",
44660702 4757 "format" : "pve-node",
7aacca6f 4758 "type" : "string"
56122987
DM
4759 },
4760 "type" : {
56122987
DM
4761 "description" : "Only list references of specified type.",
4762 "enum" : [
4763 "alias",
4764 "ipset"
7aacca6f 4765 ],
44660702
DM
4766 "optional" : 1,
4767 "type" : "string"
4768 },
4769 "vmid" : {
4770 "description" : "The (unique) ID of the VM.",
4771 "format" : "pve-vmid",
4772 "minimum" : 1,
4773 "type" : "integer"
56122987 4774 }
44660702
DM
4775 }
4776 },
4777 "permissions" : {
4778 "check" : [
4779 "perm",
4780 "/vms/{vmid}",
4781 [
4782 "VM.Audit"
4783 ]
4784 ]
56122987
DM
4785 },
4786 "returns" : {
56122987
DM
4787 "items" : {
4788 "properties" : {
44660702
DM
4789 "comment" : {
4790 "optional" : 1,
56122987
DM
4791 "type" : "string"
4792 },
4793 "name" : {
4794 "type" : "string"
4795 },
44660702
DM
4796 "type" : {
4797 "enum" : [
4798 "alias",
4799 "ipset"
4800 ],
7aacca6f 4801 "type" : "string"
56122987
DM
4802 }
4803 },
4804 "type" : "object"
7aacca6f
DM
4805 },
4806 "type" : "array"
4807 }
56122987 4808 }
44660702
DM
4809 },
4810 "leaf" : 1,
4811 "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs",
4812 "text" : "refs"
56122987
DM
4813 }
4814 ],
56122987
DM
4815 "info" : {
4816 "GET" : {
44660702 4817 "description" : "Directory index.",
56122987 4818 "method" : "GET",
44660702 4819 "name" : "index",
56122987 4820 "parameters" : {
44660702 4821 "additionalProperties" : 0,
56122987
DM
4822 "properties" : {
4823 "node" : {
4824 "description" : "The cluster node name.",
44660702
DM
4825 "format" : "pve-node",
4826 "type" : "string"
56122987
DM
4827 },
4828 "vmid" : {
44660702 4829 "description" : "The (unique) ID of the VM.",
56122987
DM
4830 "format" : "pve-vmid",
4831 "minimum" : 1,
44660702 4832 "type" : "integer"
56122987 4833 }
44660702 4834 }
56122987 4835 },
56122987
DM
4836 "permissions" : {
4837 "user" : "all"
7aacca6f 4838 },
44660702
DM
4839 "returns" : {
4840 "items" : {
4841 "properties" : {},
4842 "type" : "object"
4843 },
4844 "links" : [
4845 {
4846 "href" : "{name}",
4847 "rel" : "child"
4848 }
4849 ],
4850 "type" : "array"
4851 }
56122987 4852 }
44660702
DM
4853 },
4854 "leaf" : 0,
4855 "path" : "/nodes/{node}/qemu/{vmid}/firewall",
4856 "text" : "firewall"
56122987
DM
4857 },
4858 {
56122987
DM
4859 "info" : {
4860 "GET" : {
44660702
DM
4861 "description" : "Read VM RRD statistics (returns PNG)",
4862 "method" : "GET",
7aacca6f 4863 "name" : "rrd",
56122987
DM
4864 "parameters" : {
4865 "additionalProperties" : 0,
4866 "properties" : {
7aacca6f 4867 "cf" : {
44660702 4868 "description" : "The RRD consolidation function",
7aacca6f
DM
4869 "enum" : [
4870 "AVERAGE",
4871 "MAX"
4872 ],
7aacca6f
DM
4873 "optional" : 1,
4874 "type" : "string"
4875 },
44660702
DM
4876 "ds" : {
4877 "description" : "The list of datasources you want to display.",
4878 "format" : "pve-configid-list",
4879 "type" : "string"
56122987
DM
4880 },
4881 "node" : {
44660702 4882 "description" : "The cluster node name.",
56122987 4883 "format" : "pve-node",
44660702 4884 "type" : "string"
56122987
DM
4885 },
4886 "timeframe" : {
44660702 4887 "description" : "Specify the time frame you are interested in.",
56122987
DM
4888 "enum" : [
4889 "hour",
4890 "day",
4891 "week",
4892 "month",
4893 "year"
4894 ],
56122987
DM
4895 "type" : "string"
4896 },
44660702
DM
4897 "vmid" : {
4898 "description" : "The (unique) ID of the VM.",
4899 "format" : "pve-vmid",
4900 "minimum" : 1,
4901 "type" : "integer"
56122987
DM
4902 }
4903 }
4904 },
56122987
DM
4905 "permissions" : {
4906 "check" : [
4907 "perm",
4908 "/vms/{vmid}",
4909 [
4910 "VM.Audit"
4911 ]
4912 ]
4913 },
7aacca6f
DM
4914 "protected" : 1,
4915 "returns" : {
4916 "properties" : {
4917 "filename" : {
4918 "type" : "string"
4919 }
4920 },
4921 "type" : "object"
44660702 4922 }
56122987 4923 }
44660702
DM
4924 },
4925 "leaf" : 1,
4926 "path" : "/nodes/{node}/qemu/{vmid}/rrd",
4927 "text" : "rrd"
56122987
DM
4928 },
4929 {
7aacca6f 4930 "info" : {
56122987 4931 "GET" : {
7aacca6f 4932 "description" : "Read VM RRD statistics",
44660702 4933 "method" : "GET",
56122987 4934 "name" : "rrddata",
56122987 4935 "parameters" : {
44660702 4936 "additionalProperties" : 0,
56122987 4937 "properties" : {
44660702
DM
4938 "cf" : {
4939 "description" : "The RRD consolidation function",
4940 "enum" : [
4941 "AVERAGE",
4942 "MAX"
4943 ],
4944 "optional" : 1,
4945 "type" : "string"
4946 },
56122987 4947 "node" : {
44660702 4948 "description" : "The cluster node name.",
56122987 4949 "format" : "pve-node",
44660702 4950 "type" : "string"
56122987
DM
4951 },
4952 "timeframe" : {
44660702 4953 "description" : "Specify the time frame you are interested in.",
56122987
DM
4954 "enum" : [
4955 "hour",
4956 "day",
4957 "week",
4958 "month",
4959 "year"
7aacca6f 4960 ],
44660702 4961 "type" : "string"
7aacca6f
DM
4962 },
4963 "vmid" : {
7aacca6f
DM
4964 "description" : "The (unique) ID of the VM.",
4965 "format" : "pve-vmid",
44660702
DM
4966 "minimum" : 1,
4967 "type" : "integer"
56122987 4968 }
44660702 4969 }
56122987 4970 },
56122987
DM
4971 "permissions" : {
4972 "check" : [
4973 "perm",
4974 "/vms/{vmid}",
4975 [
4976 "VM.Audit"
4977 ]
4978 ]
4979 },
44660702 4980 "protected" : 1,
7aacca6f 4981 "returns" : {
7aacca6f 4982 "items" : {
44660702
DM
4983 "properties" : {},
4984 "type" : "object"
4985 },
4986 "type" : "array"
7aacca6f 4987 }
56122987
DM
4988 }
4989 },
44660702
DM
4990 "leaf" : 1,
4991 "path" : "/nodes/{node}/qemu/{vmid}/rrddata",
56122987
DM
4992 "text" : "rrddata"
4993 },
4994 {
56122987 4995 "info" : {
44660702
DM
4996 "GET" : {
4997 "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API).",
4998 "method" : "GET",
4999 "name" : "vm_config",
5000 "parameters" : {
5001 "additionalProperties" : 0,
5002 "properties" : {
5003 "current" : {
5004 "default" : 0,
5005 "description" : "Get current values (instead of pending values).",
5006 "optional" : 1,
5007 "type" : "boolean"
5008 },
5009 "node" : {
5010 "description" : "The cluster node name.",
5011 "format" : "pve-node",
5012 "type" : "string"
5013 },
5014 "vmid" : {
5015 "description" : "The (unique) ID of the VM.",
5016 "format" : "pve-vmid",
5017 "minimum" : 1,
5018 "type" : "integer"
5019 }
5020 }
7aacca6f 5021 },
56122987
DM
5022 "permissions" : {
5023 "check" : [
5024 "perm",
5025 "/vms/{vmid}",
5026 [
44660702
DM
5027 "VM.Audit"
5028 ]
56122987
DM
5029 ]
5030 },
56122987 5031 "proxyto" : "node",
44660702
DM
5032 "returns" : {
5033 "properties" : {
5034 "digest" : {
5035 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
5036 "type" : "string"
5037 }
5038 },
5039 "type" : "object"
5040 }
5041 },
5042 "POST" : {
7aacca6f
DM
5043 "description" : "Set virtual machine options (asynchrounous API).",
5044 "method" : "POST",
44660702 5045 "name" : "update_vm_async",
56122987 5046 "parameters" : {
44660702 5047 "additionalProperties" : 0,
56122987 5048 "properties" : {
44660702
DM
5049 "acpi" : {
5050 "default" : 1,
5051 "description" : "Enable/disable ACPI.",
5052 "optional" : 1,
5053 "type" : "boolean"
5054 },
5055 "agent" : {
7aacca6f 5056 "default" : 0,
44660702 5057 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 5058 "optional" : 1,
44660702 5059 "type" : "boolean"
7aacca6f 5060 },
44660702 5061 "args" : {
c2993fe5 5062 "description" : "Arbitrary arguments passed to kvm.",
44660702 5063 "optional" : 1,
c2993fe5
DM
5064 "type" : "string",
5065 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
7aacca6f 5066 },
44660702
DM
5067 "autostart" : {
5068 "default" : 0,
5069 "description" : "Automatic restart after crash (currently ignored).",
56122987 5070 "optional" : 1,
44660702 5071 "type" : "boolean"
56122987 5072 },
44660702
DM
5073 "background_delay" : {
5074 "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.",
5075 "maximum" : 30,
5076 "minimum" : 1,
7aacca6f 5077 "optional" : 1,
44660702 5078 "type" : "integer"
56122987 5079 },
44660702
DM
5080 "balloon" : {
5081 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
5082 "minimum" : 0,
7aacca6f 5083 "optional" : 1,
44660702 5084 "type" : "integer"
7aacca6f 5085 },
44660702
DM
5086 "bios" : {
5087 "default" : "seabios",
5088 "description" : "Select BIOS implementation.",
5089 "enum" : [
5090 "seabios",
5091 "ovmf"
5092 ],
56122987 5093 "optional" : 1,
44660702 5094 "type" : "string"
7aacca6f 5095 },
44660702
DM
5096 "boot" : {
5097 "default" : "cdn",
5098 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
5099 "optional" : 1,
5100 "pattern" : "[acdn]{1,4}",
5101 "type" : "string"
5102 },
5103 "bootdisk" : {
5104 "description" : "Enable booting from specified disk.",
5105 "format" : "pve-qm-bootdisk",
5106 "optional" : 1,
5107 "pattern" : "(ide|sata|scsi|virtio)\\d+",
5108 "type" : "string"
5109 },
5110 "cdrom" : {
5111 "description" : "This is an alias for option -ide2",
5112 "format" : "pve-qm-drive",
5113 "optional" : 1,
7aacca6f 5114 "type" : "string",
44660702
DM
5115 "typetext" : "volume"
5116 },
5117 "cores" : {
5118 "default" : 1,
5119 "description" : "The number of cores per socket.",
5120 "minimum" : 1,
7aacca6f 5121 "optional" : 1,
44660702 5122 "type" : "integer"
7aacca6f 5123 },
44660702
DM
5124 "cpu" : {
5125 "description" : "Emulated CPU type.",
56122987 5126 "format" : {
44660702
DM
5127 "cputype" : {
5128 "default" : "kvm64",
7aacca6f 5129 "default_key" : 1,
44660702 5130 "description" : "Emulated CPU type.",
56122987 5131 "enum" : [
44660702
DM
5132 "486",
5133 "athlon",
f004f5b9
DM
5134 "Broadwell",
5135 "Broadwell-noTSX",
5136 "Conroe",
44660702 5137 "core2duo",
f004f5b9
DM
5138 "coreduo",
5139 "Haswell",
5140 "Haswell-noTSX",
5141 "host",
5142 "IvyBridge",
44660702
DM
5143 "kvm32",
5144 "kvm64",
44660702 5145 "Nehalem",
44660702
DM
5146 "Opteron_G1",
5147 "Opteron_G2",
5148 "Opteron_G3",
5149 "Opteron_G4",
5150 "Opteron_G5",
f004f5b9
DM
5151 "Penryn",
5152 "pentium",
5153 "pentium2",
5154 "pentium3",
5155 "phenom",
5156 "qemu32",
5157 "qemu64",
5158 "SandyBridge",
5159 "Westmere"
56122987 5160 ],
44660702 5161 "format_description" : "cputype",
56122987
DM
5162 "type" : "string"
5163 },
44660702
DM
5164 "hidden" : {
5165 "default" : 0,
5166 "description" : "Do not identify as a KVM virtual machine.",
56122987 5167 "optional" : 1,
44660702
DM
5168 "type" : "boolean"
5169 }
5170 },
5171 "optional" : 1,
5172 "type" : "string"
5173 },
5174 "cpulimit" : {
5175 "default" : 0,
c2993fe5 5176 "description" : "Limit of CPU usage.",
44660702
DM
5177 "maximum" : 128,
5178 "minimum" : 0,
5179 "optional" : 1,
c2993fe5
DM
5180 "type" : "number",
5181 "verbose_description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."
44660702
DM
5182 },
5183 "cpuunits" : {
5184 "default" : 1000,
c2993fe5 5185 "description" : "CPU weight for a VM.",
44660702
DM
5186 "maximum" : 500000,
5187 "minimum" : 0,
5188 "optional" : 1,
c2993fe5
DM
5189 "type" : "integer",
5190 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
5191 },
5192 "delete" : {
5193 "description" : "A list of settings you want to delete.",
5194 "format" : "pve-configid-list",
5195 "optional" : 1,
5196 "type" : "string"
5197 },
5198 "description" : {
5199 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
5200 "optional" : 1,
5201 "type" : "string"
5202 },
5203 "digest" : {
5204 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
5205 "maxLength" : 40,
5206 "optional" : 1,
5207 "type" : "string"
5208 },
5209 "force" : {
5210 "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.",
5211 "optional" : 1,
5212 "requires" : "delete",
5213 "type" : "boolean"
5214 },
5215 "freeze" : {
5216 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
5217 "optional" : 1,
5218 "type" : "boolean"
5219 },
5220 "hostpci[n]" : {
c2993fe5 5221 "description" : "Map host PCI devices into guest.",
44660702
DM
5222 "format" : "pve-qm-hostpci",
5223 "optional" : 1,
57b78691
DM
5224 "type" : "string",
5225 "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer \npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
44660702
DM
5226 },
5227 "hotplug" : {
5228 "default" : "network,disk,usb",
5229 "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.",
5230 "format" : "pve-hotplug-features",
5231 "optional" : 1,
5232 "type" : "string"
5233 },
5234 "ide[n]" : {
5235 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
5236 "format" : {
5237 "aio" : {
5238 "description" : "AIO type to use.",
5239 "enum" : [
5240 "native",
5241 "threads"
56122987 5242 ],
56122987 5243 "optional" : 1,
44660702 5244 "type" : "string"
56122987 5245 },
44660702
DM
5246 "backup" : {
5247 "description" : "Whether the drive should be included when making backups.",
56122987 5248 "optional" : 1,
44660702 5249 "type" : "boolean"
56122987 5250 },
7aacca6f
DM
5251 "bps" : {
5252 "description" : "Maximum r/w speed speed in bytes per second.",
44660702
DM
5253 "format_description" : "bps",
5254 "optional" : 1,
5255 "type" : "integer"
5256 },
5257 "bps_rd" : {
5258 "description" : "Maximum read speed speed in bytes per second.",
5259 "format_description" : "bps",
56122987 5260 "optional" : 1,
44660702 5261 "type" : "integer"
56122987 5262 },
44660702
DM
5263 "bps_wr" : {
5264 "description" : "Maximum write speed speed in bytes per second.",
5265 "format_description" : "bps",
5266 "optional" : 1,
5267 "type" : "integer"
5268 },
5269 "cache" : {
5270 "description" : "The drive's cache mode",
5271 "enum" : [
5272 "none",
5273 "writethrough",
5274 "writeback",
5275 "unsafe",
5276 "directsync"
5277 ],
44660702
DM
5278 "optional" : 1,
5279 "type" : "string"
5280 },
5281 "cyls" : {
5282 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
5283 "optional" : 1,
5284 "type" : "integer"
5285 },
5286 "detect_zeroes" : {
5287 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
5288 "optional" : 1,
5289 "type" : "boolean"
5290 },
5291 "discard" : {
5292 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5293 "enum" : [
5294 "ignore",
5295 "on"
5296 ],
56122987 5297 "optional" : 1,
44660702
DM
5298 "type" : "string"
5299 },
5300 "file" : {
5301 "default_key" : 1,
5302 "description" : "The drive's backing volume.",
5303 "format" : "pve-volume-id-or-qm-path",
5304 "format_description" : "volume",
5305 "type" : "string"
56122987 5306 },
7aacca6f 5307 "format" : {
7aacca6f 5308 "description" : "The drive's backing file's data format.",
56122987 5309 "enum" : [
7aacca6f
DM
5310 "raw",
5311 "cow",
5312 "qcow",
5313 "qed",
5314 "qcow2",
5315 "vmdk",
5316 "cloop"
56122987 5317 ],
f004f5b9 5318 "format_description" : "image format",
56122987 5319 "optional" : 1,
56122987
DM
5320 "type" : "string"
5321 },
44660702
DM
5322 "heads" : {
5323 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
5324 "optional" : 1,
5325 "type" : "integer"
7aacca6f 5326 },
44660702
DM
5327 "iops" : {
5328 "description" : "Maximum r/w I/O speed in operations per second.",
5329 "format_description" : "iops",
56122987 5330 "optional" : 1,
44660702 5331 "type" : "integer"
56122987 5332 },
44660702
DM
5333 "iops_max" : {
5334 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5335 "format_description" : "iops",
56122987 5336 "optional" : 1,
44660702 5337 "type" : "integer"
56122987 5338 },
44660702
DM
5339 "iops_rd" : {
5340 "description" : "Maximum read I/O speed in operations per second.",
5341 "format_description" : "iops",
5342 "optional" : 1,
5343 "type" : "integer"
5344 },
5345 "iops_rd_max" : {
5346 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 5347 "format_description" : "iops",
44660702
DM
5348 "optional" : 1,
5349 "type" : "integer"
5350 },
5351 "iops_wr" : {
7aacca6f 5352 "description" : "Maximum write I/O speed in operations per second.",
44660702 5353 "format_description" : "iops",
56122987 5354 "optional" : 1,
7aacca6f 5355 "type" : "integer"
56122987 5356 },
44660702
DM
5357 "iops_wr_max" : {
5358 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
5359 "format_description" : "iops",
7aacca6f 5360 "optional" : 1,
44660702 5361 "type" : "integer"
56122987 5362 },
44660702
DM
5363 "mbps" : {
5364 "description" : "Maximum r/w speed speed in megabytes per second.",
5365 "format_description" : "mbps",
5366 "optional" : 1,
5367 "type" : "number"
5368 },
5369 "mbps_max" : {
5370 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5371 "format_description" : "mbps",
5372 "optional" : 1,
5373 "type" : "number"
5374 },
5375 "mbps_rd" : {
5376 "description" : "Maximum read speed speed in megabytes per second.",
5377 "format_description" : "mbps",
5378 "optional" : 1,
5379 "type" : "number"
5380 },
5381 "mbps_rd_max" : {
5382 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5383 "format_description" : "mbps",
5384 "optional" : 1,
5385 "type" : "number"
5386 },
5387 "mbps_wr" : {
5388 "description" : "Maximum write speed speed in megabytes per second.",
5389 "format_description" : "mbps",
5390 "optional" : 1,
5391 "type" : "number"
5392 },
5393 "mbps_wr_max" : {
5394 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5395 "format_description" : "mbps",
56122987 5396 "optional" : 1,
44660702 5397 "type" : "number"
56122987 5398 },
7aacca6f 5399 "media" : {
7aacca6f 5400 "default" : "disk",
7aacca6f
DM
5401 "description" : "The drive's media type.",
5402 "enum" : [
5403 "cdrom",
5404 "disk"
44660702 5405 ],
44660702
DM
5406 "optional" : 1,
5407 "type" : "string"
56122987 5408 },
44660702
DM
5409 "model" : {
5410 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
5411 "format" : "urlencoded",
5412 "format_description" : "model",
5413 "maxLength" : 120,
56122987 5414 "optional" : 1,
44660702 5415 "type" : "string"
56122987 5416 },
44660702
DM
5417 "rerror" : {
5418 "description" : "Read error action.",
5419 "enum" : [
5420 "ignore",
5421 "report",
5422 "stop"
5423 ],
56122987 5424 "optional" : 1,
44660702
DM
5425 "type" : "string"
5426 },
5427 "secs" : {
5428 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
5429 "optional" : 1,
5430 "type" : "integer"
5431 },
5432 "serial" : {
5433 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5434 "format" : "urlencoded",
5435 "format_description" : "serial",
5436 "maxLength" : 60,
5437 "optional" : 1,
5438 "type" : "string"
5439 },
5440 "size" : {
5441 "description" : "Disk size. This is purely informational and has no effect.",
5442 "format" : "disk-size",
f004f5b9 5443 "format_description" : "DiskSize",
44660702
DM
5444 "optional" : 1,
5445 "type" : "string"
5446 },
5447 "snapshot" : {
5448 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
5449 "optional" : 1,
5450 "type" : "boolean"
5451 },
5452 "trans" : {
5453 "description" : "Force disk geometry bios translation mode.",
5454 "enum" : [
5455 "none",
5456 "lba",
5457 "auto"
5458 ],
44660702
DM
5459 "optional" : 1,
5460 "type" : "string"
5461 },
5462 "volume" : {
5463 "alias" : "file"
5464 },
5465 "werror" : {
5466 "description" : "Write error action.",
5467 "enum" : [
5468 "enospc",
5469 "ignore",
5470 "report",
5471 "stop"
5472 ],
44660702
DM
5473 "optional" : 1,
5474 "type" : "string"
56122987
DM
5475 }
5476 },
44660702
DM
5477 "optional" : 1,
5478 "type" : "string"
56122987 5479 },
44660702
DM
5480 "keyboard" : {
5481 "default" : "en-us",
c2993fe5 5482 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
44660702
DM
5483 "enum" : [
5484 "de",
5485 "de-ch",
5486 "da",
5487 "en-gb",
5488 "en-us",
5489 "es",
5490 "fi",
5491 "fr",
5492 "fr-be",
5493 "fr-ca",
5494 "fr-ch",
5495 "hu",
5496 "is",
5497 "it",
5498 "ja",
5499 "lt",
5500 "mk",
5501 "nl",
5502 "no",
5503 "pl",
5504 "pt",
5505 "pt-br",
5506 "sv",
5507 "sl",
5508 "tr"
5509 ],
56122987 5510 "optional" : 1,
44660702
DM
5511 "type" : "string"
5512 },
5513 "kvm" : {
7aacca6f 5514 "default" : 1,
44660702
DM
5515 "description" : "Enable/disable KVM hardware virtualization.",
5516 "optional" : 1,
5517 "type" : "boolean"
56122987 5518 },
44660702
DM
5519 "localtime" : {
5520 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 5521 "optional" : 1,
44660702 5522 "type" : "boolean"
56122987 5523 },
44660702
DM
5524 "lock" : {
5525 "description" : "Lock/unlock the VM.",
5526 "enum" : [
5527 "migrate",
5528 "backup",
5529 "snapshot",
5530 "rollback"
5531 ],
7aacca6f 5532 "optional" : 1,
44660702
DM
5533 "type" : "string"
5534 },
5535 "machine" : {
5536 "description" : "Specific the Qemu machine type.",
5537 "maxLength" : 40,
5538 "optional" : 1,
5539 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
5540 "type" : "string"
5541 },
5542 "memory" : {
5543 "default" : 512,
5544 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
5545 "minimum" : 16,
5546 "optional" : 1,
5547 "type" : "integer"
5548 },
5549 "migrate_downtime" : {
5550 "default" : 0.1,
5551 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
5552 "minimum" : 0,
5553 "optional" : 1,
5554 "type" : "number"
5555 },
5556 "migrate_speed" : {
5557 "default" : 0,
5558 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
5559 "minimum" : 0,
5560 "optional" : 1,
5561 "type" : "integer"
5562 },
5563 "name" : {
5564 "description" : "Set a name for the VM. Only used on the configuration web interface.",
5565 "format" : "dns-name",
5566 "optional" : 1,
5567 "type" : "string"
5568 },
5569 "net[n]" : {
c2993fe5 5570 "description" : "Specify network devices.",
f004f5b9
DM
5571 "format" : {
5572 "bridge" : {
c2993fe5 5573 "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n",
f004f5b9
DM
5574 "format_description" : "bridge",
5575 "optional" : 1,
5576 "type" : "string"
5577 },
5578 "e1000" : {
5579 "alias" : "macaddr",
5580 "keyAlias" : "model"
5581 },
5582 "e1000-82540em" : {
5583 "alias" : "macaddr",
5584 "keyAlias" : "model"
5585 },
5586 "e1000-82544gc" : {
5587 "alias" : "macaddr",
5588 "keyAlias" : "model"
5589 },
5590 "e1000-82545em" : {
5591 "alias" : "macaddr",
5592 "keyAlias" : "model"
5593 },
5594 "firewall" : {
5595 "description" : "Whether this interface should be protected by the firewall.",
5596 "optional" : 1,
5597 "type" : "boolean"
5598 },
5599 "i82551" : {
5600 "alias" : "macaddr",
5601 "keyAlias" : "model"
5602 },
5603 "i82557b" : {
5604 "alias" : "macaddr",
5605 "keyAlias" : "model"
5606 },
5607 "i82559er" : {
5608 "alias" : "macaddr",
5609 "keyAlias" : "model"
5610 },
5611 "link_down" : {
c2993fe5 5612 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
5613 "optional" : 1,
5614 "type" : "boolean"
5615 },
5616 "macaddr" : {
c2993fe5 5617 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 5618 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
5619 "optional" : 1,
5620 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
5621 "type" : "string"
5622 },
5623 "model" : {
5624 "default_key" : 1,
c2993fe5 5625 "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.",
f004f5b9
DM
5626 "enum" : [
5627 "rtl8139",
5628 "ne2k_pci",
5629 "e1000",
5630 "pcnet",
5631 "virtio",
5632 "ne2k_isa",
5633 "i82551",
5634 "i82557b",
5635 "i82559er",
5636 "vmxnet3",
5637 "e1000-82540em",
5638 "e1000-82544gc",
5639 "e1000-82545em"
5640 ],
5641 "format_description" : "model",
5642 "type" : "string"
5643 },
5644 "ne2k_isa" : {
5645 "alias" : "macaddr",
5646 "keyAlias" : "model"
5647 },
5648 "ne2k_pci" : {
5649 "alias" : "macaddr",
5650 "keyAlias" : "model"
5651 },
5652 "pcnet" : {
5653 "alias" : "macaddr",
5654 "keyAlias" : "model"
5655 },
5656 "queues" : {
5657 "description" : "Number of packet queues to be used on the device.",
5658 "maximum" : 16,
5659 "minimum" : 0,
5660 "optional" : 1,
5661 "type" : "integer"
5662 },
5663 "rate" : {
c2993fe5 5664 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
5665 "minimum" : 0,
5666 "optional" : 1,
5667 "type" : "number"
5668 },
5669 "rtl8139" : {
5670 "alias" : "macaddr",
5671 "keyAlias" : "model"
5672 },
5673 "tag" : {
5674 "description" : "VLAN tag to apply to packets on this interface.",
5675 "maximum" : 4094,
c2993fe5 5676 "minimum" : 1,
f004f5b9
DM
5677 "optional" : 1,
5678 "type" : "integer"
5679 },
5680 "trunks" : {
5681 "description" : "VLAN trunks to pass through this interface.",
5682 "format_description" : "vlanid[;vlanid...]",
5683 "optional" : 1,
5684 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5685 "type" : "string"
5686 },
5687 "virtio" : {
5688 "alias" : "macaddr",
5689 "keyAlias" : "model"
5690 },
5691 "vmxnet3" : {
5692 "alias" : "macaddr",
5693 "keyAlias" : "model"
5694 }
5695 },
44660702
DM
5696 "optional" : 1,
5697 "type" : "string"
5698 },
5699 "node" : {
5700 "description" : "The cluster node name.",
5701 "format" : "pve-node",
5702 "type" : "string"
5703 },
5704 "numa" : {
5705 "default" : 0,
5706 "description" : "Enable/disable NUMA.",
5707 "optional" : 1,
5708 "type" : "boolean"
5709 },
5710 "numa[n]" : {
c2993fe5 5711 "description" : "NUMA topology.",
56122987 5712 "format" : {
7aacca6f 5713 "cpus" : {
c2993fe5 5714 "description" : "CPUs accessing this NUMA node.",
44660702
DM
5715 "format_description" : "id[-id];...",
5716 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5717 "type" : "string"
7aacca6f
DM
5718 },
5719 "hostnodes" : {
c2993fe5 5720 "description" : "Host NUMA nodes to use.",
44660702 5721 "format_description" : "id[-id];...",
7aacca6f 5722 "optional" : 1,
7aacca6f 5723 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
44660702 5724 "type" : "string"
7aacca6f 5725 },
44660702 5726 "memory" : {
c2993fe5 5727 "description" : "Amount of memory this NUMA node provides.",
7aacca6f 5728 "optional" : 1,
44660702
DM
5729 "type" : "number"
5730 },
5731 "policy" : {
c2993fe5 5732 "description" : "NUMA allocation policy.",
7aacca6f
DM
5733 "enum" : [
5734 "preferred",
5735 "bind",
5736 "interleave"
5737 ],
44660702
DM
5738 "optional" : 1,
5739 "type" : "string"
56122987 5740 }
44660702 5741 },
56122987 5742 "optional" : 1,
44660702 5743 "type" : "string"
56122987 5744 },
44660702 5745 "onboot" : {
7aacca6f 5746 "default" : 0,
44660702
DM
5747 "description" : "Specifies whether a VM will be started during system bootup.",
5748 "optional" : 1,
5749 "type" : "boolean"
7aacca6f
DM
5750 },
5751 "ostype" : {
c2993fe5 5752 "description" : "Specify guest operating system.",
7aacca6f
DM
5753 "enum" : [
5754 "other",
5755 "wxp",
5756 "w2k",
5757 "w2k3",
5758 "w2k8",
5759 "wvista",
5760 "win7",
5761 "win8",
5762 "l24",
5763 "l26",
5764 "solaris"
5765 ],
7aacca6f 5766 "optional" : 1,
c2993fe5
DM
5767 "type" : "string",
5768 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
56122987 5769 },
44660702 5770 "parallel[n]" : {
c2993fe5 5771 "description" : "Map host parallel devices (n is 0 to 2).",
7aacca6f 5772 "optional" : 1,
44660702 5773 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
5774 "type" : "string",
5775 "verbose_description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
7aacca6f
DM
5776 },
5777 "protection" : {
5778 "default" : 0,
c2993fe5 5779 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
7aacca6f 5780 "optional" : 1,
44660702 5781 "type" : "boolean"
7aacca6f 5782 },
44660702
DM
5783 "reboot" : {
5784 "default" : 1,
5785 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 5786 "optional" : 1,
44660702 5787 "type" : "boolean"
7aacca6f 5788 },
44660702
DM
5789 "revert" : {
5790 "description" : "Revert a pending change.",
5791 "format" : "pve-configid-list",
7aacca6f 5792 "optional" : 1,
44660702
DM
5793 "type" : "string"
5794 },
5795 "sata[n]" : {
5796 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 5797 "format" : {
44660702
DM
5798 "aio" : {
5799 "description" : "AIO type to use.",
7aacca6f 5800 "enum" : [
44660702
DM
5801 "native",
5802 "threads"
7aacca6f 5803 ],
44660702
DM
5804 "optional" : 1,
5805 "type" : "string"
7aacca6f 5806 },
44660702
DM
5807 "backup" : {
5808 "description" : "Whether the drive should be included when making backups.",
56122987 5809 "optional" : 1,
7aacca6f 5810 "type" : "boolean"
44660702
DM
5811 },
5812 "bps" : {
5813 "description" : "Maximum r/w speed speed in bytes per second.",
5814 "format_description" : "bps",
7aacca6f 5815 "optional" : 1,
44660702 5816 "type" : "integer"
56122987 5817 },
44660702
DM
5818 "bps_rd" : {
5819 "description" : "Maximum read speed speed in bytes per second.",
5820 "format_description" : "bps",
56122987 5821 "optional" : 1,
44660702 5822 "type" : "integer"
56122987 5823 },
44660702
DM
5824 "bps_wr" : {
5825 "description" : "Maximum write speed speed in bytes per second.",
5826 "format_description" : "bps",
56122987 5827 "optional" : 1,
44660702 5828 "type" : "integer"
56122987
DM
5829 },
5830 "cache" : {
44660702 5831 "description" : "The drive's cache mode",
56122987
DM
5832 "enum" : [
5833 "none",
5834 "writethrough",
5835 "writeback",
5836 "unsafe",
5837 "directsync"
5838 ],
56122987 5839 "optional" : 1,
44660702 5840 "type" : "string"
56122987 5841 },
44660702
DM
5842 "cyls" : {
5843 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 5844 "optional" : 1,
44660702 5845 "type" : "integer"
7aacca6f
DM
5846 },
5847 "detect_zeroes" : {
5848 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 5849 "optional" : 1,
44660702 5850 "type" : "boolean"
56122987 5851 },
44660702
DM
5852 "discard" : {
5853 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5854 "enum" : [
5855 "ignore",
5856 "on"
5857 ],
56122987 5858 "optional" : 1,
44660702 5859 "type" : "string"
7aacca6f 5860 },
44660702
DM
5861 "file" : {
5862 "default_key" : 1,
5863 "description" : "The drive's backing volume.",
5864 "format" : "pve-volume-id-or-qm-path",
5865 "format_description" : "volume",
5866 "type" : "string"
56122987 5867 },
7aacca6f 5868 "format" : {
44660702 5869 "description" : "The drive's backing file's data format.",
7aacca6f
DM
5870 "enum" : [
5871 "raw",
5872 "cow",
5873 "qcow",
5874 "qed",
5875 "qcow2",
5876 "vmdk",
5877 "cloop"
5878 ],
f004f5b9 5879 "format_description" : "image format",
7aacca6f 5880 "optional" : 1,
44660702 5881 "type" : "string"
56122987 5882 },
7aacca6f 5883 "heads" : {
7aacca6f 5884 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 5885 "optional" : 1,
7aacca6f 5886 "type" : "integer"
56122987 5887 },
44660702
DM
5888 "iops" : {
5889 "description" : "Maximum r/w I/O speed in operations per second.",
5890 "format_description" : "iops",
56122987 5891 "optional" : 1,
44660702 5892 "type" : "integer"
56122987 5893 },
44660702
DM
5894 "iops_max" : {
5895 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5896 "format_description" : "iops",
56122987 5897 "optional" : 1,
44660702 5898 "type" : "integer"
56122987 5899 },
44660702
DM
5900 "iops_rd" : {
5901 "description" : "Maximum read I/O speed in operations per second.",
5902 "format_description" : "iops",
7aacca6f 5903 "optional" : 1,
44660702 5904 "type" : "integer"
56122987 5905 },
44660702
DM
5906 "iops_rd_max" : {
5907 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
5908 "format_description" : "iops",
56122987 5909 "optional" : 1,
44660702 5910 "type" : "integer"
7aacca6f 5911 },
44660702
DM
5912 "iops_wr" : {
5913 "description" : "Maximum write I/O speed in operations per second.",
5914 "format_description" : "iops",
56122987 5915 "optional" : 1,
44660702 5916 "type" : "integer"
56122987
DM
5917 },
5918 "iops_wr_max" : {
5919 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
44660702 5920 "format_description" : "iops",
56122987 5921 "optional" : 1,
44660702 5922 "type" : "integer"
56122987 5923 },
44660702
DM
5924 "mbps" : {
5925 "description" : "Maximum r/w speed speed in megabytes per second.",
5926 "format_description" : "mbps",
56122987 5927 "optional" : 1,
44660702 5928 "type" : "number"
56122987 5929 },
44660702
DM
5930 "mbps_max" : {
5931 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5932 "format_description" : "mbps",
5933 "optional" : 1,
5934 "type" : "number"
56122987 5935 },
44660702
DM
5936 "mbps_rd" : {
5937 "description" : "Maximum read speed speed in megabytes per second.",
5938 "format_description" : "mbps",
56122987 5939 "optional" : 1,
44660702 5940 "type" : "number"
56122987 5941 },
44660702
DM
5942 "mbps_rd_max" : {
5943 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5944 "format_description" : "mbps",
56122987 5945 "optional" : 1,
44660702 5946 "type" : "number"
56122987 5947 },
44660702
DM
5948 "mbps_wr" : {
5949 "description" : "Maximum write speed speed in megabytes per second.",
56122987 5950 "format_description" : "mbps",
44660702
DM
5951 "optional" : 1,
5952 "type" : "number"
56122987 5953 },
44660702
DM
5954 "mbps_wr_max" : {
5955 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5956 "format_description" : "mbps",
5957 "optional" : 1,
5958 "type" : "number"
7aacca6f 5959 },
44660702
DM
5960 "media" : {
5961 "default" : "disk",
5962 "description" : "The drive's media type.",
5963 "enum" : [
5964 "cdrom",
5965 "disk"
5966 ],
56122987 5967 "optional" : 1,
44660702
DM
5968 "type" : "string"
5969 },
5970 "rerror" : {
5971 "description" : "Read error action.",
7aacca6f 5972 "enum" : [
44660702
DM
5973 "ignore",
5974 "report",
5975 "stop"
5976 ],
7aacca6f 5977 "optional" : 1,
44660702 5978 "type" : "string"
56122987 5979 },
44660702
DM
5980 "secs" : {
5981 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 5982 "optional" : 1,
44660702 5983 "type" : "integer"
56122987 5984 },
44660702
DM
5985 "serial" : {
5986 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5987 "format" : "urlencoded",
5988 "format_description" : "serial",
5989 "maxLength" : 60,
56122987 5990 "optional" : 1,
44660702 5991 "type" : "string"
56122987 5992 },
44660702
DM
5993 "size" : {
5994 "description" : "Disk size. This is purely informational and has no effect.",
5995 "format" : "disk-size",
f004f5b9 5996 "format_description" : "DiskSize",
44660702
DM
5997 "optional" : 1,
5998 "type" : "string"
5999 },
6000 "snapshot" : {
6001 "description" : "Whether the drive should be included when making snapshots.",
56122987 6002 "optional" : 1,
44660702
DM
6003 "type" : "boolean"
6004 },
6005 "trans" : {
6006 "description" : "Force disk geometry bios translation mode.",
56122987 6007 "enum" : [
7aacca6f
DM
6008 "none",
6009 "lba",
6010 "auto"
56122987 6011 ],
44660702
DM
6012 "optional" : 1,
6013 "type" : "string"
56122987 6014 },
7aacca6f
DM
6015 "volume" : {
6016 "alias" : "file"
56122987 6017 },
44660702
DM
6018 "werror" : {
6019 "description" : "Write error action.",
6020 "enum" : [
6021 "enospc",
6022 "ignore",
6023 "report",
6024 "stop"
6025 ],
7aacca6f 6026 "optional" : 1,
44660702
DM
6027 "type" : "string"
6028 }
6029 },
6030 "optional" : 1,
6031 "type" : "string"
6032 },
6033 "scsi[n]" : {
6034 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
6035 "format" : {
56122987 6036 "aio" : {
56122987
DM
6037 "description" : "AIO type to use.",
6038 "enum" : [
6039 "native",
6040 "threads"
6041 ],
7aacca6f 6042 "optional" : 1,
44660702 6043 "type" : "string"
56122987 6044 },
44660702
DM
6045 "backup" : {
6046 "description" : "Whether the drive should be included when making backups.",
56122987 6047 "optional" : 1,
44660702 6048 "type" : "boolean"
56122987 6049 },
44660702
DM
6050 "bps" : {
6051 "description" : "Maximum r/w speed speed in bytes per second.",
6052 "format_description" : "bps",
56122987 6053 "optional" : 1,
44660702 6054 "type" : "integer"
56122987 6055 },
44660702
DM
6056 "bps_rd" : {
6057 "description" : "Maximum read speed speed in bytes per second.",
6058 "format_description" : "bps",
56122987 6059 "optional" : 1,
44660702 6060 "type" : "integer"
56122987 6061 },
7aacca6f 6062 "bps_wr" : {
44660702 6063 "description" : "Maximum write speed speed in bytes per second.",
7aacca6f 6064 "format_description" : "bps",
56122987 6065 "optional" : 1,
44660702 6066 "type" : "integer"
56122987 6067 },
44660702
DM
6068 "cache" : {
6069 "description" : "The drive's cache mode",
7aacca6f 6070 "enum" : [
44660702
DM
6071 "none",
6072 "writethrough",
6073 "writeback",
6074 "unsafe",
6075 "directsync"
7aacca6f 6076 ],
56122987 6077 "optional" : 1,
44660702 6078 "type" : "string"
56122987 6079 },
44660702
DM
6080 "cyls" : {
6081 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 6082 "optional" : 1,
44660702 6083 "type" : "integer"
56122987 6084 },
44660702
DM
6085 "detect_zeroes" : {
6086 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 6087 "optional" : 1,
44660702 6088 "type" : "boolean"
56122987 6089 },
44660702
DM
6090 "discard" : {
6091 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6092 "enum" : [
6093 "ignore",
6094 "on"
6095 ],
7aacca6f 6096 "optional" : 1,
44660702 6097 "type" : "string"
56122987 6098 },
44660702
DM
6099 "file" : {
6100 "default_key" : 1,
6101 "description" : "The drive's backing volume.",
6102 "format" : "pve-volume-id-or-qm-path",
6103 "format_description" : "volume",
6104 "type" : "string"
56122987 6105 },
7aacca6f 6106 "format" : {
44660702 6107 "description" : "The drive's backing file's data format.",
56122987 6108 "enum" : [
7aacca6f
DM
6109 "raw",
6110 "cow",
6111 "qcow",
6112 "qed",
6113 "qcow2",
6114 "vmdk",
6115 "cloop"
6116 ],
f004f5b9 6117 "format_description" : "image format",
44660702
DM
6118 "optional" : 1,
6119 "type" : "string"
56122987 6120 },
44660702
DM
6121 "heads" : {
6122 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6123 "optional" : 1,
7aacca6f 6124 "type" : "integer"
56122987 6125 },
44660702
DM
6126 "iops" : {
6127 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6128 "format_description" : "iops",
44660702
DM
6129 "optional" : 1,
6130 "type" : "integer"
7aacca6f 6131 },
44660702
DM
6132 "iops_max" : {
6133 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6134 "format_description" : "iops",
56122987 6135 "optional" : 1,
44660702 6136 "type" : "integer"
7aacca6f 6137 },
44660702
DM
6138 "iops_rd" : {
6139 "description" : "Maximum read I/O speed in operations per second.",
6140 "format_description" : "iops",
7aacca6f 6141 "optional" : 1,
44660702 6142 "type" : "integer"
56122987 6143 },
44660702
DM
6144 "iops_rd_max" : {
6145 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6146 "format_description" : "iops",
6147 "optional" : 1,
6148 "type" : "integer"
6149 },
6150 "iops_wr" : {
6151 "description" : "Maximum write I/O speed in operations per second.",
6152 "format_description" : "iops",
56122987 6153 "optional" : 1,
44660702
DM
6154 "type" : "integer"
6155 },
6156 "iops_wr_max" : {
6157 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6158 "format_description" : "iops",
6159 "optional" : 1,
6160 "type" : "integer"
56122987 6161 },
7aacca6f 6162 "iothread" : {
7aacca6f 6163 "description" : "Whether to use iothreads for this drive",
56122987 6164 "optional" : 1,
56122987
DM
6165 "type" : "boolean"
6166 },
44660702
DM
6167 "mbps" : {
6168 "description" : "Maximum r/w speed speed in megabytes per second.",
6169 "format_description" : "mbps",
6170 "optional" : 1,
6171 "type" : "number"
6172 },
6173 "mbps_max" : {
6174 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6175 "format_description" : "mbps",
6176 "optional" : 1,
6177 "type" : "number"
6178 },
6179 "mbps_rd" : {
6180 "description" : "Maximum read speed speed in megabytes per second.",
6181 "format_description" : "mbps",
6182 "optional" : 1,
6183 "type" : "number"
6184 },
6185 "mbps_rd_max" : {
6186 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6187 "format_description" : "mbps",
6188 "optional" : 1,
6189 "type" : "number"
6190 },
6191 "mbps_wr" : {
6192 "description" : "Maximum write speed speed in megabytes per second.",
6193 "format_description" : "mbps",
6194 "optional" : 1,
6195 "type" : "number"
6196 },
6197 "mbps_wr_max" : {
6198 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6199 "format_description" : "mbps",
6200 "optional" : 1,
6201 "type" : "number"
6202 },
7aacca6f 6203 "media" : {
44660702
DM
6204 "default" : "disk",
6205 "description" : "The drive's media type.",
7aacca6f
DM
6206 "enum" : [
6207 "cdrom",
6208 "disk"
6209 ],
56122987 6210 "optional" : 1,
44660702
DM
6211 "type" : "string"
6212 },
6213 "queues" : {
6214 "description" : "Number of queues.",
44660702
DM
6215 "minimum" : 2,
6216 "optional" : 1,
6217 "type" : "integer"
6218 },
6219 "secs" : {
6220 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6221 "optional" : 1,
6222 "type" : "integer"
6223 },
6224 "serial" : {
6225 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6226 "format" : "urlencoded",
6227 "format_description" : "serial",
6228 "maxLength" : 60,
6229 "optional" : 1,
6230 "type" : "string"
6231 },
6232 "size" : {
6233 "description" : "Disk size. This is purely informational and has no effect.",
6234 "format" : "disk-size",
f004f5b9 6235 "format_description" : "DiskSize",
44660702
DM
6236 "optional" : 1,
6237 "type" : "string"
56122987 6238 },
7aacca6f
DM
6239 "snapshot" : {
6240 "description" : "Whether the drive should be included when making snapshots.",
6241 "optional" : 1,
44660702 6242 "type" : "boolean"
7aacca6f 6243 },
44660702
DM
6244 "trans" : {
6245 "description" : "Force disk geometry bios translation mode.",
6246 "enum" : [
6247 "none",
6248 "lba",
6249 "auto"
6250 ],
44660702
DM
6251 "optional" : 1,
6252 "type" : "string"
6253 },
6254 "volume" : {
6255 "alias" : "file"
6256 },
6257 "werror" : {
6258 "description" : "Write error action.",
6259 "enum" : [
6260 "enospc",
6261 "ignore",
6262 "report",
6263 "stop"
6264 ],
56122987 6265 "optional" : 1,
44660702 6266 "type" : "string"
56122987 6267 }
44660702 6268 },
7aacca6f 6269 "optional" : 1,
44660702
DM
6270 "type" : "string"
6271 },
6272 "scsihw" : {
6273 "default" : "lsi",
c2993fe5 6274 "description" : "SCSI controller model",
7aacca6f 6275 "enum" : [
44660702
DM
6276 "lsi",
6277 "lsi53c810",
6278 "virtio-scsi-pci",
6279 "virtio-scsi-single",
6280 "megasas",
6281 "pvscsi"
7aacca6f 6282 ],
44660702
DM
6283 "optional" : 1,
6284 "type" : "string"
56122987 6285 },
44660702 6286 "serial[n]" : {
c2993fe5 6287 "description" : "Create a serial device inside the VM (n is 0 to 3)",
7aacca6f 6288 "optional" : 1,
44660702 6289 "pattern" : "(/dev/.+|socket)",
c2993fe5 6290 "type" : "string",
57b78691 6291 "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
7aacca6f 6292 },
44660702
DM
6293 "shares" : {
6294 "default" : 1000,
6295 "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning",
6296 "maximum" : 50000,
6297 "minimum" : 0,
56122987 6298 "optional" : 1,
44660702 6299 "type" : "integer"
56122987 6300 },
44660702
DM
6301 "skiplock" : {
6302 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 6303 "optional" : 1,
44660702 6304 "type" : "boolean"
56122987 6305 },
44660702
DM
6306 "smbios1" : {
6307 "description" : "Specify SMBIOS type 1 fields.",
6308 "format" : "pve-qm-smbios1",
6309 "maxLength" : 256,
56122987 6310 "optional" : 1,
44660702 6311 "type" : "string"
56122987 6312 },
44660702
DM
6313 "smp" : {
6314 "default" : 1,
6315 "description" : "The number of CPUs. Please use option -sockets instead.",
7aacca6f 6316 "minimum" : 1,
7aacca6f 6317 "optional" : 1,
44660702 6318 "type" : "integer"
7aacca6f 6319 },
44660702
DM
6320 "sockets" : {
6321 "default" : 1,
6322 "description" : "The number of CPU sockets.",
6323 "minimum" : 1,
7aacca6f 6324 "optional" : 1,
44660702 6325 "type" : "integer"
56122987 6326 },
44660702
DM
6327 "startdate" : {
6328 "default" : "now",
6329 "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.",
7aacca6f 6330 "optional" : 1,
44660702 6331 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 6332 "type" : "string",
44660702 6333 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
56122987 6334 },
7aacca6f 6335 "startup" : {
7aacca6f 6336 "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.",
44660702 6337 "format" : "pve-startup-order",
56122987 6338 "optional" : 1,
44660702
DM
6339 "type" : "string",
6340 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
56122987 6341 },
44660702 6342 "tablet" : {
7aacca6f 6343 "default" : 1,
c2993fe5 6344 "description" : "Enable/disable the USB tablet device.",
7aacca6f 6345 "optional" : 1,
c2993fe5
DM
6346 "type" : "boolean",
6347 "verbose_description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)."
56122987 6348 },
44660702
DM
6349 "tdf" : {
6350 "default" : 0,
6351 "description" : "Enable/disable time drift fix.",
7aacca6f 6352 "optional" : 1,
44660702 6353 "type" : "boolean"
7aacca6f 6354 },
44660702
DM
6355 "template" : {
6356 "default" : 0,
6357 "description" : "Enable/disable Template.",
7aacca6f 6358 "optional" : 1,
44660702 6359 "type" : "boolean"
7aacca6f 6360 },
44660702 6361 "unused[n]" : {
c2993fe5 6362 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 6363 "format" : "pve-volume-id",
7aacca6f 6364 "optional" : 1,
44660702 6365 "type" : "string"
7aacca6f 6366 },
44660702 6367 "usb[n]" : {
c2993fe5 6368 "description" : "Configure an USB device (n is 0 to 4).",
44660702
DM
6369 "format" : {
6370 "host" : {
6371 "default_key" : 1,
c2993fe5 6372 "description" : "The Host USB device or port or the value 'spice'. HOSTUSBDEVICE syntax is:\n\n 'bus-port(.port)*' (decimal numbers) or\n 'vendor_id:product_id' (hexadeciaml numbers) or\n 'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n",
44660702
DM
6373 "format" : "pve-qm-usb-device",
6374 "format_description" : "HOSTUSBDEVICE|spice",
6375 "type" : "string"
6376 },
6377 "usb3" : {
c2993fe5
DM
6378 "default" : 0,
6379 "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).",
44660702
DM
6380 "optional" : 1,
6381 "type" : "boolean"
6382 }
6383 },
7aacca6f 6384 "optional" : 1,
44660702 6385 "type" : "string"
56122987 6386 },
44660702
DM
6387 "vcpus" : {
6388 "default" : 0,
6389 "description" : "Number of hotplugged vcpus.",
6390 "minimum" : 1,
56122987 6391 "optional" : 1,
44660702 6392 "type" : "integer"
56122987 6393 },
44660702 6394 "vga" : {
c2993fe5 6395 "description" : "Select the VGA type.",
44660702
DM
6396 "enum" : [
6397 "std",
6398 "cirrus",
6399 "vmware",
6400 "qxl",
6401 "serial0",
6402 "serial1",
6403 "serial2",
6404 "serial3",
6405 "qxl2",
6406 "qxl3",
6407 "qxl4"
6408 ],
56122987 6409 "optional" : 1,
c2993fe5
DM
6410 "type" : "string",
6411 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
56122987 6412 },
44660702
DM
6413 "virtio[n]" : {
6414 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
56122987 6415 "format" : {
44660702
DM
6416 "aio" : {
6417 "description" : "AIO type to use.",
56122987 6418 "enum" : [
44660702
DM
6419 "native",
6420 "threads"
56122987 6421 ],
56122987
DM
6422 "optional" : 1,
6423 "type" : "string"
6424 },
44660702
DM
6425 "backup" : {
6426 "description" : "Whether the drive should be included when making backups.",
44660702
DM
6427 "optional" : 1,
6428 "type" : "boolean"
7aacca6f 6429 },
44660702
DM
6430 "bps" : {
6431 "description" : "Maximum r/w speed speed in bytes per second.",
6432 "format_description" : "bps",
6433 "optional" : 1,
6434 "type" : "integer"
56122987 6435 },
44660702
DM
6436 "bps_rd" : {
6437 "description" : "Maximum read speed speed in bytes per second.",
6438 "format_description" : "bps",
56122987 6439 "optional" : 1,
44660702 6440 "type" : "integer"
56122987 6441 },
44660702
DM
6442 "bps_wr" : {
6443 "description" : "Maximum write speed speed in bytes per second.",
6444 "format_description" : "bps",
56122987 6445 "optional" : 1,
44660702
DM
6446 "type" : "integer"
6447 },
6448 "cache" : {
6449 "description" : "The drive's cache mode",
56122987 6450 "enum" : [
44660702
DM
6451 "none",
6452 "writethrough",
6453 "writeback",
6454 "unsafe",
6455 "directsync"
56122987 6456 ],
56122987 6457 "optional" : 1,
44660702 6458 "type" : "string"
56122987 6459 },
44660702
DM
6460 "cyls" : {
6461 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 6462 "optional" : 1,
44660702 6463 "type" : "integer"
7aacca6f 6464 },
44660702
DM
6465 "detect_zeroes" : {
6466 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6467 "optional" : 1,
6468 "type" : "boolean"
7aacca6f 6469 },
44660702
DM
6470 "discard" : {
6471 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6472 "enum" : [
6473 "ignore",
6474 "on"
6475 ],
56122987 6476 "optional" : 1,
44660702 6477 "type" : "string"
56122987
DM
6478 },
6479 "file" : {
7aacca6f 6480 "default_key" : 1,
44660702 6481 "description" : "The drive's backing volume.",
7aacca6f 6482 "format" : "pve-volume-id-or-qm-path",
44660702
DM
6483 "format_description" : "volume",
6484 "type" : "string"
7aacca6f
DM
6485 },
6486 "format" : {
7aacca6f
DM
6487 "description" : "The drive's backing file's data format.",
6488 "enum" : [
6489 "raw",
6490 "cow",
6491 "qcow",
6492 "qed",
6493 "qcow2",
6494 "vmdk",
6495 "cloop"
56122987 6496 ],
f004f5b9 6497 "format_description" : "image format",
56122987 6498 "optional" : 1,
56122987
DM
6499 "type" : "string"
6500 },
44660702
DM
6501 "heads" : {
6502 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6503 "optional" : 1,
44660702 6504 "type" : "integer"
56122987 6505 },
44660702
DM
6506 "iops" : {
6507 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6508 "format_description" : "iops",
56122987 6509 "optional" : 1,
44660702 6510 "type" : "integer"
56122987 6511 },
44660702
DM
6512 "iops_max" : {
6513 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6514 "format_description" : "iops",
56122987 6515 "optional" : 1,
56122987
DM
6516 "type" : "integer"
6517 },
44660702
DM
6518 "iops_rd" : {
6519 "description" : "Maximum read I/O speed in operations per second.",
6520 "format_description" : "iops",
56122987 6521 "optional" : 1,
44660702 6522 "type" : "integer"
56122987 6523 },
44660702
DM
6524 "iops_rd_max" : {
6525 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6526 "format_description" : "iops",
7aacca6f 6527 "optional" : 1,
44660702 6528 "type" : "integer"
56122987 6529 },
44660702
DM
6530 "iops_wr" : {
6531 "description" : "Maximum write I/O speed in operations per second.",
6532 "format_description" : "iops",
7aacca6f 6533 "optional" : 1,
44660702 6534 "type" : "integer"
56122987 6535 },
44660702
DM
6536 "iops_wr_max" : {
6537 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6538 "format_description" : "iops",
56122987
DM
6539 "optional" : 1,
6540 "type" : "integer"
6541 },
44660702
DM
6542 "iothread" : {
6543 "description" : "Whether to use iothreads for this drive",
44660702
DM
6544 "optional" : 1,
6545 "type" : "boolean"
6546 },
6547 "mbps" : {
6548 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 6549 "format_description" : "mbps",
44660702
DM
6550 "optional" : 1,
6551 "type" : "number"
6552 },
6553 "mbps_max" : {
7aacca6f 6554 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702
DM
6555 "format_description" : "mbps",
6556 "optional" : 1,
6557 "type" : "number"
7aacca6f 6558 },
44660702
DM
6559 "mbps_rd" : {
6560 "description" : "Maximum read speed speed in megabytes per second.",
6561 "format_description" : "mbps",
56122987 6562 "optional" : 1,
44660702 6563 "type" : "number"
56122987 6564 },
44660702
DM
6565 "mbps_rd_max" : {
6566 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6567 "format_description" : "mbps",
7aacca6f 6568 "optional" : 1,
44660702 6569 "type" : "number"
56122987 6570 },
44660702
DM
6571 "mbps_wr" : {
6572 "description" : "Maximum write speed speed in megabytes per second.",
6573 "format_description" : "mbps",
56122987 6574 "optional" : 1,
44660702 6575 "type" : "number"
56122987 6576 },
44660702
DM
6577 "mbps_wr_max" : {
6578 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6579 "format_description" : "mbps",
56122987 6580 "optional" : 1,
44660702 6581 "type" : "number"
56122987
DM
6582 },
6583 "media" : {
7aacca6f 6584 "default" : "disk",
44660702 6585 "description" : "The drive's media type.",
56122987
DM
6586 "enum" : [
6587 "cdrom",
6588 "disk"
6589 ],
44660702
DM
6590 "optional" : 1,
6591 "type" : "string"
56122987 6592 },
7aacca6f 6593 "rerror" : {
44660702 6594 "description" : "Read error action.",
56122987 6595 "enum" : [
7aacca6f
DM
6596 "ignore",
6597 "report",
6598 "stop"
56122987 6599 ],
56122987 6600 "optional" : 1,
44660702 6601 "type" : "string"
56122987 6602 },
44660702
DM
6603 "secs" : {
6604 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6605 "optional" : 1,
6606 "type" : "integer"
6607 },
6608 "serial" : {
6609 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6610 "format" : "urlencoded",
6611 "format_description" : "serial",
6612 "maxLength" : 60,
56122987 6613 "optional" : 1,
7aacca6f 6614 "type" : "string"
56122987 6615 },
44660702
DM
6616 "size" : {
6617 "description" : "Disk size. This is purely informational and has no effect.",
6618 "format" : "disk-size",
f004f5b9 6619 "format_description" : "DiskSize",
56122987 6620 "optional" : 1,
44660702 6621 "type" : "string"
56122987 6622 },
44660702
DM
6623 "snapshot" : {
6624 "description" : "Whether the drive should be included when making snapshots.",
56122987 6625 "optional" : 1,
44660702 6626 "type" : "boolean"
56122987 6627 },
44660702
DM
6628 "trans" : {
6629 "description" : "Force disk geometry bios translation mode.",
6630 "enum" : [
6631 "none",
6632 "lba",
6633 "auto"
6634 ],
44660702
DM
6635 "optional" : 1,
6636 "type" : "string"
6637 },
6638 "volume" : {
6639 "alias" : "file"
6640 },
6641 "werror" : {
6642 "description" : "Write error action.",
6643 "enum" : [
6644 "enospc",
6645 "ignore",
6646 "report",
6647 "stop"
6648 ],
56122987 6649 "optional" : 1,
44660702 6650 "type" : "string"
56122987 6651 }
44660702 6652 },
56122987 6653 "optional" : 1,
44660702 6654 "type" : "string"
56122987 6655 },
7aacca6f
DM
6656 "vmid" : {
6657 "description" : "The (unique) ID of the VM.",
7aacca6f 6658 "format" : "pve-vmid",
44660702
DM
6659 "minimum" : 1,
6660 "type" : "integer"
56122987 6661 },
44660702 6662 "watchdog" : {
c2993fe5 6663 "description" : "Create a virtual hardware watchdog device.",
44660702 6664 "format" : "pve-qm-watchdog",
56122987 6665 "optional" : 1,
c2993fe5
DM
6666 "type" : "string",
6667 "verbose_description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"
56122987 6668 }
44660702 6669 }
56122987 6670 },
7aacca6f
DM
6671 "permissions" : {
6672 "check" : [
6673 "perm",
6674 "/vms/{vmid}",
6675 [
44660702
DM
6676 "VM.Config.Disk",
6677 "VM.Config.CDROM",
6678 "VM.Config.CPU",
6679 "VM.Config.Memory",
6680 "VM.Config.Network",
6681 "VM.Config.HWType",
6682 "VM.Config.Options"
6683 ],
6684 "any",
6685 1
7aacca6f 6686 ]
56122987 6687 },
44660702 6688 "protected" : 1,
7aacca6f 6689 "proxyto" : "node",
44660702
DM
6690 "returns" : {
6691 "optional" : 1,
6692 "type" : "string"
6693 }
56122987 6694 },
7aacca6f 6695 "PUT" : {
44660702
DM
6696 "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.",
6697 "method" : "PUT",
6698 "name" : "update_vm",
56122987 6699 "parameters" : {
7aacca6f 6700 "additionalProperties" : 0,
56122987 6701 "properties" : {
44660702
DM
6702 "acpi" : {
6703 "default" : 1,
6704 "description" : "Enable/disable ACPI.",
7aacca6f 6705 "optional" : 1,
44660702 6706 "type" : "boolean"
7aacca6f 6707 },
44660702
DM
6708 "agent" : {
6709 "default" : 0,
6710 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 6711 "optional" : 1,
44660702 6712 "type" : "boolean"
56122987 6713 },
44660702 6714 "args" : {
c2993fe5 6715 "description" : "Arbitrary arguments passed to kvm.",
7aacca6f 6716 "optional" : 1,
c2993fe5
DM
6717 "type" : "string",
6718 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
7aacca6f 6719 },
44660702
DM
6720 "autostart" : {
6721 "default" : 0,
6722 "description" : "Automatic restart after crash (currently ignored).",
7aacca6f
DM
6723 "optional" : 1,
6724 "type" : "boolean"
6725 },
44660702
DM
6726 "balloon" : {
6727 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
6728 "minimum" : 0,
6729 "optional" : 1,
6730 "type" : "integer"
6731 },
6732 "bios" : {
6733 "default" : "seabios",
6734 "description" : "Select BIOS implementation.",
7aacca6f 6735 "enum" : [
44660702
DM
6736 "seabios",
6737 "ovmf"
7aacca6f 6738 ],
56122987 6739 "optional" : 1,
7aacca6f
DM
6740 "type" : "string"
6741 },
44660702
DM
6742 "boot" : {
6743 "default" : "cdn",
6744 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
7aacca6f 6745 "optional" : 1,
44660702
DM
6746 "pattern" : "[acdn]{1,4}",
6747 "type" : "string"
56122987 6748 },
44660702
DM
6749 "bootdisk" : {
6750 "description" : "Enable booting from specified disk.",
6751 "format" : "pve-qm-bootdisk",
6752 "optional" : 1,
6753 "pattern" : "(ide|sata|scsi|virtio)\\d+",
6754 "type" : "string"
6755 },
6756 "cdrom" : {
6757 "description" : "This is an alias for option -ide2",
6758 "format" : "pve-qm-drive",
56122987 6759 "optional" : 1,
7aacca6f 6760 "type" : "string",
44660702
DM
6761 "typetext" : "volume"
6762 },
6763 "cores" : {
6764 "default" : 1,
6765 "description" : "The number of cores per socket.",
6766 "minimum" : 1,
6767 "optional" : 1,
6768 "type" : "integer"
6769 },
6770 "cpu" : {
6771 "description" : "Emulated CPU type.",
6772 "format" : {
6773 "cputype" : {
6774 "default" : "kvm64",
6775 "default_key" : 1,
6776 "description" : "Emulated CPU type.",
6777 "enum" : [
6778 "486",
6779 "athlon",
f004f5b9
DM
6780 "Broadwell",
6781 "Broadwell-noTSX",
6782 "Conroe",
44660702 6783 "core2duo",
f004f5b9
DM
6784 "coreduo",
6785 "Haswell",
6786 "Haswell-noTSX",
6787 "host",
6788 "IvyBridge",
44660702
DM
6789 "kvm32",
6790 "kvm64",
44660702 6791 "Nehalem",
44660702
DM
6792 "Opteron_G1",
6793 "Opteron_G2",
6794 "Opteron_G3",
6795 "Opteron_G4",
6796 "Opteron_G5",
f004f5b9
DM
6797 "Penryn",
6798 "pentium",
6799 "pentium2",
6800 "pentium3",
6801 "phenom",
6802 "qemu32",
6803 "qemu64",
6804 "SandyBridge",
6805 "Westmere"
44660702
DM
6806 ],
6807 "format_description" : "cputype",
6808 "type" : "string"
6809 },
6810 "hidden" : {
6811 "default" : 0,
6812 "description" : "Do not identify as a KVM virtual machine.",
6813 "optional" : 1,
6814 "type" : "boolean"
6815 }
6816 },
6817 "optional" : 1,
6818 "type" : "string"
6819 },
6820 "cpulimit" : {
6821 "default" : 0,
c2993fe5 6822 "description" : "Limit of CPU usage.",
44660702
DM
6823 "maximum" : 128,
6824 "minimum" : 0,
6825 "optional" : 1,
c2993fe5
DM
6826 "type" : "number",
6827 "verbose_description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."
44660702
DM
6828 },
6829 "cpuunits" : {
6830 "default" : 1000,
c2993fe5 6831 "description" : "CPU weight for a VM.",
44660702
DM
6832 "maximum" : 500000,
6833 "minimum" : 0,
6834 "optional" : 1,
c2993fe5
DM
6835 "type" : "integer",
6836 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
6837 },
6838 "delete" : {
6839 "description" : "A list of settings you want to delete.",
6840 "format" : "pve-configid-list",
6841 "optional" : 1,
6842 "type" : "string"
6843 },
6844 "description" : {
6845 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
6846 "optional" : 1,
6847 "type" : "string"
6848 },
6849 "digest" : {
6850 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
6851 "maxLength" : 40,
6852 "optional" : 1,
6853 "type" : "string"
6854 },
6855 "force" : {
6856 "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.",
6857 "optional" : 1,
6858 "requires" : "delete",
6859 "type" : "boolean"
6860 },
6861 "freeze" : {
6862 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
6863 "optional" : 1,
6864 "type" : "boolean"
6865 },
6866 "hostpci[n]" : {
c2993fe5 6867 "description" : "Map host PCI devices into guest.",
44660702
DM
6868 "format" : "pve-qm-hostpci",
6869 "optional" : 1,
57b78691
DM
6870 "type" : "string",
6871 "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer \npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
56122987 6872 },
7aacca6f 6873 "hotplug" : {
7aacca6f 6874 "default" : "network,disk,usb",
44660702
DM
6875 "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.",
6876 "format" : "pve-hotplug-features",
56122987 6877 "optional" : 1,
56122987
DM
6878 "type" : "string"
6879 },
6880 "ide[n]" : {
7aacca6f 6881 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 6882 "format" : {
44660702
DM
6883 "aio" : {
6884 "description" : "AIO type to use.",
6885 "enum" : [
6886 "native",
6887 "threads"
6888 ],
56122987 6889 "optional" : 1,
44660702 6890 "type" : "string"
56122987 6891 },
44660702
DM
6892 "backup" : {
6893 "description" : "Whether the drive should be included when making backups.",
44660702
DM
6894 "optional" : 1,
6895 "type" : "boolean"
6896 },
6897 "bps" : {
6898 "description" : "Maximum r/w speed speed in bytes per second.",
6899 "format_description" : "bps",
56122987 6900 "optional" : 1,
44660702 6901 "type" : "integer"
56122987 6902 },
44660702
DM
6903 "bps_rd" : {
6904 "description" : "Maximum read speed speed in bytes per second.",
6905 "format_description" : "bps",
56122987 6906 "optional" : 1,
44660702 6907 "type" : "integer"
56122987 6908 },
7aacca6f 6909 "bps_wr" : {
7aacca6f 6910 "description" : "Maximum write speed speed in bytes per second.",
44660702
DM
6911 "format_description" : "bps",
6912 "optional" : 1,
6913 "type" : "integer"
7aacca6f 6914 },
44660702
DM
6915 "cache" : {
6916 "description" : "The drive's cache mode",
6917 "enum" : [
6918 "none",
6919 "writethrough",
6920 "writeback",
6921 "unsafe",
6922 "directsync"
6923 ],
56122987 6924 "optional" : 1,
44660702
DM
6925 "type" : "string"
6926 },
6927 "cyls" : {
6928 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
6929 "optional" : 1,
6930 "type" : "integer"
6931 },
6932 "detect_zeroes" : {
6933 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6934 "optional" : 1,
6935 "type" : "boolean"
56122987 6936 },
7aacca6f 6937 "discard" : {
7aacca6f 6938 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 6939 "enum" : [
7aacca6f
DM
6940 "ignore",
6941 "on"
56122987
DM
6942 ],
6943 "optional" : 1,
44660702 6944 "type" : "string"
7aacca6f 6945 },
44660702
DM
6946 "file" : {
6947 "default_key" : 1,
6948 "description" : "The drive's backing volume.",
6949 "format" : "pve-volume-id-or-qm-path",
6950 "format_description" : "volume",
6951 "type" : "string"
7aacca6f
DM
6952 },
6953 "format" : {
44660702 6954 "description" : "The drive's backing file's data format.",
7aacca6f
DM
6955 "enum" : [
6956 "raw",
6957 "cow",
6958 "qcow",
6959 "qed",
6960 "qcow2",
6961 "vmdk",
6962 "cloop"
6963 ],
f004f5b9 6964 "format_description" : "image format",
7aacca6f 6965 "optional" : 1,
44660702 6966 "type" : "string"
56122987 6967 },
7aacca6f 6968 "heads" : {
44660702 6969 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6970 "optional" : 1,
44660702 6971 "type" : "integer"
7aacca6f 6972 },
44660702
DM
6973 "iops" : {
6974 "description" : "Maximum r/w I/O speed in operations per second.",
6975 "format_description" : "iops",
7aacca6f 6976 "optional" : 1,
44660702 6977 "type" : "integer"
56122987 6978 },
44660702
DM
6979 "iops_max" : {
6980 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6981 "format_description" : "iops",
56122987 6982 "optional" : 1,
44660702 6983 "type" : "integer"
56122987 6984 },
44660702
DM
6985 "iops_rd" : {
6986 "description" : "Maximum read I/O speed in operations per second.",
6987 "format_description" : "iops",
56122987 6988 "optional" : 1,
44660702 6989 "type" : "integer"
7aacca6f 6990 },
44660702
DM
6991 "iops_rd_max" : {
6992 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6993 "format_description" : "iops",
7aacca6f 6994 "optional" : 1,
44660702 6995 "type" : "integer"
7aacca6f 6996 },
44660702
DM
6997 "iops_wr" : {
6998 "description" : "Maximum write I/O speed in operations per second.",
6999 "format_description" : "iops",
7aacca6f 7000 "optional" : 1,
44660702 7001 "type" : "integer"
56122987 7002 },
44660702
DM
7003 "iops_wr_max" : {
7004 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7005 "format_description" : "iops",
7aacca6f 7006 "optional" : 1,
44660702 7007 "type" : "integer"
7aacca6f
DM
7008 },
7009 "mbps" : {
44660702 7010 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 7011 "format_description" : "mbps",
7aacca6f 7012 "optional" : 1,
44660702 7013 "type" : "number"
7aacca6f 7014 },
44660702
DM
7015 "mbps_max" : {
7016 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7017 "format_description" : "mbps",
7aacca6f 7018 "optional" : 1,
44660702 7019 "type" : "number"
7aacca6f 7020 },
44660702
DM
7021 "mbps_rd" : {
7022 "description" : "Maximum read speed speed in megabytes per second.",
7023 "format_description" : "mbps",
7aacca6f 7024 "optional" : 1,
44660702 7025 "type" : "number"
7aacca6f 7026 },
44660702
DM
7027 "mbps_rd_max" : {
7028 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7029 "format_description" : "mbps",
7030 "optional" : 1,
7031 "type" : "number"
7aacca6f 7032 },
44660702
DM
7033 "mbps_wr" : {
7034 "description" : "Maximum write speed speed in megabytes per second.",
7035 "format_description" : "mbps",
7aacca6f 7036 "optional" : 1,
44660702
DM
7037 "type" : "number"
7038 },
7039 "mbps_wr_max" : {
7040 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7041 "format_description" : "mbps",
7042 "optional" : 1,
7043 "type" : "number"
7044 },
7045 "media" : {
7046 "default" : "disk",
7047 "description" : "The drive's media type.",
56122987 7048 "enum" : [
44660702
DM
7049 "cdrom",
7050 "disk"
56122987 7051 ],
44660702
DM
7052 "optional" : 1,
7053 "type" : "string"
56122987 7054 },
7aacca6f 7055 "model" : {
44660702 7056 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
56122987 7057 "format" : "urlencoded",
7aacca6f 7058 "format_description" : "model",
44660702 7059 "maxLength" : 120,
56122987 7060 "optional" : 1,
44660702 7061 "type" : "string"
56122987 7062 },
44660702
DM
7063 "rerror" : {
7064 "description" : "Read error action.",
7065 "enum" : [
7066 "ignore",
7067 "report",
7068 "stop"
7069 ],
56122987 7070 "optional" : 1,
44660702 7071 "type" : "string"
56122987 7072 },
44660702
DM
7073 "secs" : {
7074 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
7075 "optional" : 1,
7076 "type" : "integer"
56122987 7077 },
44660702
DM
7078 "serial" : {
7079 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7080 "format" : "urlencoded",
7081 "format_description" : "serial",
7082 "maxLength" : 60,
56122987 7083 "optional" : 1,
44660702 7084 "type" : "string"
56122987 7085 },
44660702
DM
7086 "size" : {
7087 "description" : "Disk size. This is purely informational and has no effect.",
7088 "format" : "disk-size",
f004f5b9 7089 "format_description" : "DiskSize",
56122987 7090 "optional" : 1,
44660702 7091 "type" : "string"
56122987 7092 },
44660702
DM
7093 "snapshot" : {
7094 "description" : "Whether the drive should be included when making snapshots.",
56122987 7095 "optional" : 1,
44660702 7096 "type" : "boolean"
56122987 7097 },
44660702
DM
7098 "trans" : {
7099 "description" : "Force disk geometry bios translation mode.",
7100 "enum" : [
7101 "none",
7102 "lba",
7103 "auto"
7104 ],
56122987 7105 "optional" : 1,
44660702
DM
7106 "type" : "string"
7107 },
7108 "volume" : {
7109 "alias" : "file"
56122987 7110 },
7aacca6f 7111 "werror" : {
44660702 7112 "description" : "Write error action.",
7aacca6f
DM
7113 "enum" : [
7114 "enospc",
7115 "ignore",
7116 "report",
7117 "stop"
7118 ],
56122987 7119 "optional" : 1,
44660702 7120 "type" : "string"
7aacca6f 7121 }
44660702
DM
7122 },
7123 "optional" : 1,
7124 "type" : "string"
7aacca6f 7125 },
44660702
DM
7126 "keyboard" : {
7127 "default" : "en-us",
c2993fe5 7128 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
44660702
DM
7129 "enum" : [
7130 "de",
7131 "de-ch",
7132 "da",
7133 "en-gb",
7134 "en-us",
7135 "es",
7136 "fi",
7137 "fr",
7138 "fr-be",
7139 "fr-ca",
7140 "fr-ch",
7141 "hu",
7142 "is",
7143 "it",
7144 "ja",
7145 "lt",
7146 "mk",
7147 "nl",
7148 "no",
7149 "pl",
7150 "pt",
7151 "pt-br",
7152 "sv",
7153 "sl",
7154 "tr"
7155 ],
7aacca6f 7156 "optional" : 1,
44660702 7157 "type" : "string"
7aacca6f 7158 },
44660702 7159 "kvm" : {
7aacca6f 7160 "default" : 1,
44660702 7161 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 7162 "optional" : 1,
44660702 7163 "type" : "boolean"
7aacca6f 7164 },
44660702
DM
7165 "localtime" : {
7166 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
7aacca6f 7167 "optional" : 1,
44660702 7168 "type" : "boolean"
7aacca6f 7169 },
44660702
DM
7170 "lock" : {
7171 "description" : "Lock/unlock the VM.",
7172 "enum" : [
7173 "migrate",
7174 "backup",
7175 "snapshot",
7176 "rollback"
7177 ],
7aacca6f 7178 "optional" : 1,
44660702 7179 "type" : "string"
7aacca6f 7180 },
44660702
DM
7181 "machine" : {
7182 "description" : "Specific the Qemu machine type.",
7183 "maxLength" : 40,
7aacca6f 7184 "optional" : 1,
44660702
DM
7185 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
7186 "type" : "string"
7aacca6f 7187 },
44660702
DM
7188 "memory" : {
7189 "default" : 512,
7190 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
7191 "minimum" : 16,
7aacca6f 7192 "optional" : 1,
44660702 7193 "type" : "integer"
7aacca6f 7194 },
44660702
DM
7195 "migrate_downtime" : {
7196 "default" : 0.1,
7197 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
7198 "minimum" : 0,
7aacca6f 7199 "optional" : 1,
44660702 7200 "type" : "number"
7aacca6f 7201 },
44660702 7202 "migrate_speed" : {
7aacca6f 7203 "default" : 0,
44660702
DM
7204 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
7205 "minimum" : 0,
7206 "optional" : 1,
7207 "type" : "integer"
7aacca6f 7208 },
44660702
DM
7209 "name" : {
7210 "description" : "Set a name for the VM. Only used on the configuration web interface.",
7211 "format" : "dns-name",
7aacca6f 7212 "optional" : 1,
44660702 7213 "type" : "string"
7aacca6f 7214 },
44660702 7215 "net[n]" : {
c2993fe5 7216 "description" : "Specify network devices.",
f004f5b9
DM
7217 "format" : {
7218 "bridge" : {
c2993fe5 7219 "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n",
f004f5b9
DM
7220 "format_description" : "bridge",
7221 "optional" : 1,
7222 "type" : "string"
7223 },
7224 "e1000" : {
7225 "alias" : "macaddr",
7226 "keyAlias" : "model"
7227 },
7228 "e1000-82540em" : {
7229 "alias" : "macaddr",
7230 "keyAlias" : "model"
7231 },
7232 "e1000-82544gc" : {
7233 "alias" : "macaddr",
7234 "keyAlias" : "model"
7235 },
7236 "e1000-82545em" : {
7237 "alias" : "macaddr",
7238 "keyAlias" : "model"
7239 },
7240 "firewall" : {
7241 "description" : "Whether this interface should be protected by the firewall.",
7242 "optional" : 1,
7243 "type" : "boolean"
7244 },
7245 "i82551" : {
7246 "alias" : "macaddr",
7247 "keyAlias" : "model"
7248 },
7249 "i82557b" : {
7250 "alias" : "macaddr",
7251 "keyAlias" : "model"
7252 },
7253 "i82559er" : {
7254 "alias" : "macaddr",
7255 "keyAlias" : "model"
7256 },
7257 "link_down" : {
c2993fe5 7258 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
7259 "optional" : 1,
7260 "type" : "boolean"
7261 },
7262 "macaddr" : {
c2993fe5 7263 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 7264 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
7265 "optional" : 1,
7266 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
7267 "type" : "string"
7268 },
7269 "model" : {
7270 "default_key" : 1,
c2993fe5 7271 "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.",
f004f5b9
DM
7272 "enum" : [
7273 "rtl8139",
7274 "ne2k_pci",
7275 "e1000",
7276 "pcnet",
7277 "virtio",
7278 "ne2k_isa",
7279 "i82551",
7280 "i82557b",
7281 "i82559er",
7282 "vmxnet3",
7283 "e1000-82540em",
7284 "e1000-82544gc",
7285 "e1000-82545em"
7286 ],
7287 "format_description" : "model",
7288 "type" : "string"
7289 },
7290 "ne2k_isa" : {
7291 "alias" : "macaddr",
7292 "keyAlias" : "model"
7293 },
7294 "ne2k_pci" : {
7295 "alias" : "macaddr",
7296 "keyAlias" : "model"
7297 },
7298 "pcnet" : {
7299 "alias" : "macaddr",
7300 "keyAlias" : "model"
7301 },
7302 "queues" : {
7303 "description" : "Number of packet queues to be used on the device.",
7304 "maximum" : 16,
7305 "minimum" : 0,
7306 "optional" : 1,
7307 "type" : "integer"
7308 },
7309 "rate" : {
c2993fe5 7310 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
7311 "minimum" : 0,
7312 "optional" : 1,
7313 "type" : "number"
7314 },
7315 "rtl8139" : {
7316 "alias" : "macaddr",
7317 "keyAlias" : "model"
7318 },
7319 "tag" : {
7320 "description" : "VLAN tag to apply to packets on this interface.",
7321 "maximum" : 4094,
c2993fe5 7322 "minimum" : 1,
f004f5b9
DM
7323 "optional" : 1,
7324 "type" : "integer"
7325 },
7326 "trunks" : {
7327 "description" : "VLAN trunks to pass through this interface.",
7328 "format_description" : "vlanid[;vlanid...]",
7329 "optional" : 1,
7330 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7331 "type" : "string"
7332 },
7333 "virtio" : {
7334 "alias" : "macaddr",
7335 "keyAlias" : "model"
7336 },
7337 "vmxnet3" : {
7338 "alias" : "macaddr",
7339 "keyAlias" : "model"
7340 }
7341 },
7aacca6f 7342 "optional" : 1,
44660702 7343 "type" : "string"
7aacca6f 7344 },
44660702
DM
7345 "node" : {
7346 "description" : "The cluster node name.",
7347 "format" : "pve-node",
7348 "type" : "string"
7349 },
7350 "numa" : {
7351 "default" : 0,
7352 "description" : "Enable/disable NUMA.",
7aacca6f
DM
7353 "optional" : 1,
7354 "type" : "boolean"
7355 },
44660702 7356 "numa[n]" : {
c2993fe5 7357 "description" : "NUMA topology.",
44660702
DM
7358 "format" : {
7359 "cpus" : {
c2993fe5 7360 "description" : "CPUs accessing this NUMA node.",
44660702
DM
7361 "format_description" : "id[-id];...",
7362 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7363 "type" : "string"
7364 },
7365 "hostnodes" : {
c2993fe5 7366 "description" : "Host NUMA nodes to use.",
44660702
DM
7367 "format_description" : "id[-id];...",
7368 "optional" : 1,
7369 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7370 "type" : "string"
7371 },
7372 "memory" : {
c2993fe5 7373 "description" : "Amount of memory this NUMA node provides.",
44660702
DM
7374 "optional" : 1,
7375 "type" : "number"
7376 },
7377 "policy" : {
c2993fe5 7378 "description" : "NUMA allocation policy.",
44660702
DM
7379 "enum" : [
7380 "preferred",
7381 "bind",
7382 "interleave"
7383 ],
44660702
DM
7384 "optional" : 1,
7385 "type" : "string"
7386 }
7387 },
7aacca6f 7388 "optional" : 1,
44660702 7389 "type" : "string"
7aacca6f 7390 },
44660702
DM
7391 "onboot" : {
7392 "default" : 0,
7393 "description" : "Specifies whether a VM will be started during system bootup.",
7aacca6f 7394 "optional" : 1,
44660702 7395 "type" : "boolean"
7aacca6f 7396 },
44660702 7397 "ostype" : {
c2993fe5 7398 "description" : "Specify guest operating system.",
44660702
DM
7399 "enum" : [
7400 "other",
7401 "wxp",
7402 "w2k",
7403 "w2k3",
7404 "w2k8",
7405 "wvista",
7406 "win7",
7407 "win8",
7408 "l24",
7409 "l26",
7410 "solaris"
7411 ],
7aacca6f 7412 "optional" : 1,
c2993fe5
DM
7413 "type" : "string",
7414 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
7aacca6f 7415 },
44660702 7416 "parallel[n]" : {
c2993fe5 7417 "description" : "Map host parallel devices (n is 0 to 2).",
7aacca6f 7418 "optional" : 1,
44660702 7419 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
7420 "type" : "string",
7421 "verbose_description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
7aacca6f 7422 },
44660702
DM
7423 "protection" : {
7424 "default" : 0,
c2993fe5 7425 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
7aacca6f 7426 "optional" : 1,
44660702 7427 "type" : "boolean"
7aacca6f 7428 },
44660702
DM
7429 "reboot" : {
7430 "default" : 1,
7431 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 7432 "optional" : 1,
44660702 7433 "type" : "boolean"
7aacca6f 7434 },
44660702
DM
7435 "revert" : {
7436 "description" : "Revert a pending change.",
7437 "format" : "pve-configid-list",
7aacca6f 7438 "optional" : 1,
44660702 7439 "type" : "string"
7aacca6f 7440 },
44660702
DM
7441 "sata[n]" : {
7442 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
7aacca6f 7443 "format" : {
44660702
DM
7444 "aio" : {
7445 "description" : "AIO type to use.",
7446 "enum" : [
7447 "native",
7448 "threads"
7449 ],
44660702
DM
7450 "optional" : 1,
7451 "type" : "string"
7452 },
7453 "backup" : {
7454 "description" : "Whether the drive should be included when making backups.",
44660702
DM
7455 "optional" : 1,
7456 "type" : "boolean"
7457 },
7458 "bps" : {
7459 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 7460 "format_description" : "bps",
7aacca6f
DM
7461 "optional" : 1,
7462 "type" : "integer"
56122987 7463 },
44660702
DM
7464 "bps_rd" : {
7465 "description" : "Maximum read speed speed in bytes per second.",
7466 "format_description" : "bps",
7aacca6f 7467 "optional" : 1,
44660702 7468 "type" : "integer"
7aacca6f 7469 },
44660702
DM
7470 "bps_wr" : {
7471 "description" : "Maximum write speed speed in bytes per second.",
7472 "format_description" : "bps",
7aacca6f 7473 "optional" : 1,
44660702 7474 "type" : "integer"
7aacca6f 7475 },
44660702
DM
7476 "cache" : {
7477 "description" : "The drive's cache mode",
7478 "enum" : [
7479 "none",
7480 "writethrough",
7481 "writeback",
7482 "unsafe",
7483 "directsync"
7484 ],
7aacca6f 7485 "optional" : 1,
44660702 7486 "type" : "string"
7aacca6f 7487 },
44660702
DM
7488 "cyls" : {
7489 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 7490 "optional" : 1,
44660702 7491 "type" : "integer"
7aacca6f 7492 },
44660702
DM
7493 "detect_zeroes" : {
7494 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7aacca6f 7495 "optional" : 1,
44660702 7496 "type" : "boolean"
7aacca6f 7497 },
44660702
DM
7498 "discard" : {
7499 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7500 "enum" : [
7501 "ignore",
7502 "on"
7503 ],
7aacca6f 7504 "optional" : 1,
44660702
DM
7505 "type" : "string"
7506 },
7507 "file" : {
7508 "default_key" : 1,
7509 "description" : "The drive's backing volume.",
7510 "format" : "pve-volume-id-or-qm-path",
7511 "format_description" : "volume",
7512 "type" : "string"
7aacca6f
DM
7513 },
7514 "format" : {
7aacca6f 7515 "description" : "The drive's backing file's data format.",
56122987
DM
7516 "enum" : [
7517 "raw",
7518 "cow",
7519 "qcow",
7520 "qed",
7521 "qcow2",
7522 "vmdk",
7523 "cloop"
7524 ],
f004f5b9 7525 "format_description" : "image format",
56122987 7526 "optional" : 1,
7aacca6f 7527 "type" : "string"
56122987 7528 },
7aacca6f 7529 "heads" : {
7aacca6f 7530 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
7531 "optional" : 1,
7532 "type" : "integer"
56122987 7533 },
44660702
DM
7534 "iops" : {
7535 "description" : "Maximum r/w I/O speed in operations per second.",
7536 "format_description" : "iops",
56122987 7537 "optional" : 1,
44660702 7538 "type" : "integer"
7aacca6f 7539 },
44660702
DM
7540 "iops_max" : {
7541 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7542 "format_description" : "iops",
7aacca6f 7543 "optional" : 1,
44660702 7544 "type" : "integer"
56122987 7545 },
44660702
DM
7546 "iops_rd" : {
7547 "description" : "Maximum read I/O speed in operations per second.",
7548 "format_description" : "iops",
56122987 7549 "optional" : 1,
44660702 7550 "type" : "integer"
7aacca6f 7551 },
44660702
DM
7552 "iops_rd_max" : {
7553 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7554 "format_description" : "iops",
56122987 7555 "optional" : 1,
44660702 7556 "type" : "integer"
56122987 7557 },
44660702
DM
7558 "iops_wr" : {
7559 "description" : "Maximum write I/O speed in operations per second.",
7560 "format_description" : "iops",
7561 "optional" : 1,
7562 "type" : "integer"
56122987 7563 },
44660702
DM
7564 "iops_wr_max" : {
7565 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7566 "format_description" : "iops",
7567 "optional" : 1,
7568 "type" : "integer"
7569 },
7570 "mbps" : {
7571 "description" : "Maximum r/w speed speed in megabytes per second.",
7572 "format_description" : "mbps",
7573 "optional" : 1,
7574 "type" : "number"
7575 },
7576 "mbps_max" : {
7577 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7578 "format_description" : "mbps",
7579 "optional" : 1,
7580 "type" : "number"
7581 },
7582 "mbps_rd" : {
7583 "description" : "Maximum read speed speed in megabytes per second.",
7584 "format_description" : "mbps",
7585 "optional" : 1,
7586 "type" : "number"
7587 },
7588 "mbps_rd_max" : {
7589 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7590 "format_description" : "mbps",
7591 "optional" : 1,
7592 "type" : "number"
7593 },
7594 "mbps_wr" : {
7595 "description" : "Maximum write speed speed in megabytes per second.",
7596 "format_description" : "mbps",
7597 "optional" : 1,
7598 "type" : "number"
7599 },
7600 "mbps_wr_max" : {
7601 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7602 "format_description" : "mbps",
7603 "optional" : 1,
7604 "type" : "number"
7605 },
7606 "media" : {
7607 "default" : "disk",
7608 "description" : "The drive's media type.",
7609 "enum" : [
7610 "cdrom",
7611 "disk"
7612 ],
56122987 7613 "optional" : 1,
44660702
DM
7614 "type" : "string"
7615 },
7616 "rerror" : {
7aacca6f
DM
7617 "description" : "Read error action.",
7618 "enum" : [
7619 "ignore",
7620 "report",
7621 "stop"
44660702 7622 ],
56122987 7623 "optional" : 1,
44660702 7624 "type" : "string"
56122987 7625 },
7aacca6f 7626 "secs" : {
44660702 7627 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7628 "optional" : 1,
44660702 7629 "type" : "integer"
56122987 7630 },
44660702
DM
7631 "serial" : {
7632 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7633 "format" : "urlencoded",
7634 "format_description" : "serial",
7635 "maxLength" : 60,
56122987 7636 "optional" : 1,
44660702 7637 "type" : "string"
56122987 7638 },
44660702
DM
7639 "size" : {
7640 "description" : "Disk size. This is purely informational and has no effect.",
7641 "format" : "disk-size",
f004f5b9 7642 "format_description" : "DiskSize",
56122987 7643 "optional" : 1,
44660702 7644 "type" : "string"
56122987
DM
7645 },
7646 "snapshot" : {
7aacca6f 7647 "description" : "Whether the drive should be included when making snapshots.",
56122987 7648 "optional" : 1,
44660702 7649 "type" : "boolean"
56122987 7650 },
56122987 7651 "trans" : {
7aacca6f 7652 "description" : "Force disk geometry bios translation mode.",
56122987
DM
7653 "enum" : [
7654 "none",
7655 "lba",
7656 "auto"
7657 ],
7658 "optional" : 1,
44660702 7659 "type" : "string"
56122987 7660 },
44660702
DM
7661 "volume" : {
7662 "alias" : "file"
56122987 7663 },
7aacca6f 7664 "werror" : {
44660702 7665 "description" : "Write error action.",
56122987 7666 "enum" : [
7aacca6f 7667 "enospc",
56122987 7668 "ignore",
7aacca6f
DM
7669 "report",
7670 "stop"
7671 ],
7aacca6f 7672 "optional" : 1,
44660702
DM
7673 "type" : "string"
7674 }
7675 },
7676 "optional" : 1,
7677 "type" : "string"
7678 },
7679 "scsi[n]" : {
7680 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
7681 "format" : {
7682 "aio" : {
7aacca6f 7683 "description" : "AIO type to use.",
56122987
DM
7684 "enum" : [
7685 "native",
7686 "threads"
44660702 7687 ],
56122987 7688 "optional" : 1,
44660702 7689 "type" : "string"
56122987 7690 },
7aacca6f 7691 "backup" : {
7aacca6f 7692 "description" : "Whether the drive should be included when making backups.",
7aacca6f 7693 "optional" : 1,
44660702 7694 "type" : "boolean"
56122987 7695 },
44660702
DM
7696 "bps" : {
7697 "description" : "Maximum r/w speed speed in bytes per second.",
7698 "format_description" : "bps",
7aacca6f 7699 "optional" : 1,
44660702 7700 "type" : "integer"
7aacca6f 7701 },
44660702
DM
7702 "bps_rd" : {
7703 "description" : "Maximum read speed speed in bytes per second.",
7704 "format_description" : "bps",
56122987 7705 "optional" : 1,
44660702 7706 "type" : "integer"
56122987 7707 },
44660702
DM
7708 "bps_wr" : {
7709 "description" : "Maximum write speed speed in bytes per second.",
7710 "format_description" : "bps",
56122987 7711 "optional" : 1,
44660702 7712 "type" : "integer"
56122987 7713 },
44660702
DM
7714 "cache" : {
7715 "description" : "The drive's cache mode",
7716 "enum" : [
7717 "none",
7718 "writethrough",
7719 "writeback",
7720 "unsafe",
7721 "directsync"
7722 ],
56122987 7723 "optional" : 1,
44660702
DM
7724 "type" : "string"
7725 },
7726 "cyls" : {
7727 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
7728 "optional" : 1,
7729 "type" : "integer"
7730 },
7731 "detect_zeroes" : {
7732 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7733 "optional" : 1,
7734 "type" : "boolean"
7735 },
7736 "discard" : {
7737 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7738 "enum" : [
7739 "ignore",
7740 "on"
7741 ],
44660702
DM
7742 "optional" : 1,
7743 "type" : "string"
7744 },
7745 "file" : {
7746 "default_key" : 1,
7747 "description" : "The drive's backing volume.",
7748 "format" : "pve-volume-id-or-qm-path",
7749 "format_description" : "volume",
7750 "type" : "string"
56122987 7751 },
7aacca6f 7752 "format" : {
44660702 7753 "description" : "The drive's backing file's data format.",
7aacca6f
DM
7754 "enum" : [
7755 "raw",
7756 "cow",
7757 "qcow",
7758 "qed",
7759 "qcow2",
7760 "vmdk",
7761 "cloop"
7762 ],
f004f5b9 7763 "format_description" : "image format",
56122987 7764 "optional" : 1,
44660702 7765 "type" : "string"
56122987 7766 },
44660702
DM
7767 "heads" : {
7768 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 7769 "optional" : 1,
44660702 7770 "type" : "integer"
56122987 7771 },
44660702
DM
7772 "iops" : {
7773 "description" : "Maximum r/w I/O speed in operations per second.",
7774 "format_description" : "iops",
7aacca6f 7775 "optional" : 1,
44660702 7776 "type" : "integer"
56122987 7777 },
44660702
DM
7778 "iops_max" : {
7779 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7aacca6f 7780 "format_description" : "iops",
7aacca6f 7781 "optional" : 1,
44660702 7782 "type" : "integer"
56122987 7783 },
44660702
DM
7784 "iops_rd" : {
7785 "description" : "Maximum read I/O speed in operations per second.",
7786 "format_description" : "iops",
56122987 7787 "optional" : 1,
44660702 7788 "type" : "integer"
56122987 7789 },
44660702
DM
7790 "iops_rd_max" : {
7791 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7792 "format_description" : "iops",
56122987 7793 "optional" : 1,
44660702 7794 "type" : "integer"
56122987 7795 },
44660702
DM
7796 "iops_wr" : {
7797 "description" : "Maximum write I/O speed in operations per second.",
7798 "format_description" : "iops",
56122987 7799 "optional" : 1,
44660702 7800 "type" : "integer"
56122987 7801 },
44660702
DM
7802 "iops_wr_max" : {
7803 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7aacca6f 7804 "format_description" : "iops",
44660702
DM
7805 "optional" : 1,
7806 "type" : "integer"
7aacca6f
DM
7807 },
7808 "iothread" : {
44660702 7809 "description" : "Whether to use iothreads for this drive",
56122987 7810 "optional" : 1,
44660702 7811 "type" : "boolean"
56122987 7812 },
44660702
DM
7813 "mbps" : {
7814 "description" : "Maximum r/w speed speed in megabytes per second.",
7815 "format_description" : "mbps",
56122987 7816 "optional" : 1,
44660702 7817 "type" : "number"
56122987 7818 },
44660702
DM
7819 "mbps_max" : {
7820 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7821 "format_description" : "mbps",
56122987 7822 "optional" : 1,
44660702 7823 "type" : "number"
56122987 7824 },
44660702
DM
7825 "mbps_rd" : {
7826 "description" : "Maximum read speed speed in megabytes per second.",
7827 "format_description" : "mbps",
7aacca6f 7828 "optional" : 1,
44660702 7829 "type" : "number"
56122987 7830 },
44660702
DM
7831 "mbps_rd_max" : {
7832 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7833 "format_description" : "mbps",
7aacca6f 7834 "optional" : 1,
44660702 7835 "type" : "number"
7aacca6f 7836 },
44660702
DM
7837 "mbps_wr" : {
7838 "description" : "Maximum write speed speed in megabytes per second.",
7839 "format_description" : "mbps",
56122987 7840 "optional" : 1,
44660702 7841 "type" : "number"
56122987 7842 },
44660702
DM
7843 "mbps_wr_max" : {
7844 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7845 "format_description" : "mbps",
56122987 7846 "optional" : 1,
44660702
DM
7847 "type" : "number"
7848 },
7849 "media" : {
7850 "default" : "disk",
7851 "description" : "The drive's media type.",
7aacca6f 7852 "enum" : [
44660702
DM
7853 "cdrom",
7854 "disk"
7aacca6f 7855 ],
56122987 7856 "optional" : 1,
44660702 7857 "type" : "string"
56122987 7858 },
7aacca6f 7859 "queues" : {
44660702 7860 "description" : "Number of queues.",
7aacca6f 7861 "minimum" : 2,
7aacca6f
DM
7862 "optional" : 1,
7863 "type" : "integer"
56122987 7864 },
44660702
DM
7865 "secs" : {
7866 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7867 "optional" : 1,
44660702 7868 "type" : "integer"
56122987 7869 },
44660702
DM
7870 "serial" : {
7871 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7872 "format" : "urlencoded",
7873 "format_description" : "serial",
7874 "maxLength" : 60,
56122987 7875 "optional" : 1,
44660702 7876 "type" : "string"
56122987 7877 },
44660702
DM
7878 "size" : {
7879 "description" : "Disk size. This is purely informational and has no effect.",
7880 "format" : "disk-size",
f004f5b9 7881 "format_description" : "DiskSize",
44660702
DM
7882 "optional" : 1,
7883 "type" : "string"
7884 },
7885 "snapshot" : {
7886 "description" : "Whether the drive should be included when making snapshots.",
56122987 7887 "optional" : 1,
44660702
DM
7888 "type" : "boolean"
7889 },
7890 "trans" : {
7891 "description" : "Force disk geometry bios translation mode.",
56122987 7892 "enum" : [
44660702
DM
7893 "none",
7894 "lba",
7895 "auto"
56122987 7896 ],
44660702
DM
7897 "optional" : 1,
7898 "type" : "string"
7899 },
7900 "volume" : {
7901 "alias" : "file"
56122987 7902 },
7aacca6f 7903 "werror" : {
7aacca6f
DM
7904 "description" : "Write error action.",
7905 "enum" : [
7906 "enospc",
7907 "ignore",
7908 "report",
7909 "stop"
44660702 7910 ],
56122987 7911 "optional" : 1,
7aacca6f 7912 "type" : "string"
56122987 7913 }
44660702 7914 },
56122987 7915 "optional" : 1,
44660702 7916 "type" : "string"
56122987
DM
7917 },
7918 "scsihw" : {
44660702 7919 "default" : "lsi",
c2993fe5 7920 "description" : "SCSI controller model",
56122987
DM
7921 "enum" : [
7922 "lsi",
7923 "lsi53c810",
7924 "virtio-scsi-pci",
7925 "virtio-scsi-single",
7926 "megasas",
7927 "pvscsi"
7928 ],
7929 "optional" : 1,
56122987
DM
7930 "type" : "string"
7931 },
44660702 7932 "serial[n]" : {
c2993fe5 7933 "description" : "Create a serial device inside the VM (n is 0 to 3)",
56122987 7934 "optional" : 1,
44660702 7935 "pattern" : "(/dev/.+|socket)",
c2993fe5 7936 "type" : "string",
57b78691 7937 "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
56122987 7938 },
44660702
DM
7939 "shares" : {
7940 "default" : 1000,
7941 "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning",
7942 "maximum" : 50000,
7943 "minimum" : 0,
7aacca6f 7944 "optional" : 1,
44660702 7945 "type" : "integer"
56122987 7946 },
7aacca6f
DM
7947 "skiplock" : {
7948 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
7949 "optional" : 1,
7950 "type" : "boolean"
56122987 7951 },
44660702
DM
7952 "smbios1" : {
7953 "description" : "Specify SMBIOS type 1 fields.",
7954 "format" : "pve-qm-smbios1",
7955 "maxLength" : 256,
56122987 7956 "optional" : 1,
44660702 7957 "type" : "string"
56122987 7958 },
44660702
DM
7959 "smp" : {
7960 "default" : 1,
7961 "description" : "The number of CPUs. Please use option -sockets instead.",
7962 "minimum" : 1,
56122987 7963 "optional" : 1,
44660702 7964 "type" : "integer"
56122987 7965 },
44660702
DM
7966 "sockets" : {
7967 "default" : 1,
7968 "description" : "The number of CPU sockets.",
7969 "minimum" : 1,
56122987 7970 "optional" : 1,
44660702 7971 "type" : "integer"
56122987 7972 },
44660702
DM
7973 "startdate" : {
7974 "default" : "now",
7975 "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.",
7976 "optional" : 1,
7977 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 7978 "type" : "string",
44660702
DM
7979 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
7980 },
7981 "startup" : {
7982 "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.",
7983 "format" : "pve-startup-order",
7aacca6f 7984 "optional" : 1,
44660702
DM
7985 "type" : "string",
7986 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 7987 },
44660702
DM
7988 "tablet" : {
7989 "default" : 1,
c2993fe5 7990 "description" : "Enable/disable the USB tablet device.",
7aacca6f 7991 "optional" : 1,
c2993fe5
DM
7992 "type" : "boolean",
7993 "verbose_description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)."
7aacca6f 7994 },
44660702
DM
7995 "tdf" : {
7996 "default" : 0,
7997 "description" : "Enable/disable time drift fix.",
7aacca6f 7998 "optional" : 1,
44660702 7999 "type" : "boolean"
7aacca6f 8000 },
44660702
DM
8001 "template" : {
8002 "default" : 0,
8003 "description" : "Enable/disable Template.",
7aacca6f 8004 "optional" : 1,
44660702 8005 "type" : "boolean"
7aacca6f 8006 },
44660702 8007 "unused[n]" : {
c2993fe5 8008 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 8009 "format" : "pve-volume-id",
7aacca6f
DM
8010 "optional" : 1,
8011 "type" : "string"
8012 },
44660702 8013 "usb[n]" : {
c2993fe5 8014 "description" : "Configure an USB device (n is 0 to 4).",
56122987 8015 "format" : {
44660702
DM
8016 "host" : {
8017 "default_key" : 1,
c2993fe5 8018 "description" : "The Host USB device or port or the value 'spice'. HOSTUSBDEVICE syntax is:\n\n 'bus-port(.port)*' (decimal numbers) or\n 'vendor_id:product_id' (hexadeciaml numbers) or\n 'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n",
44660702
DM
8019 "format" : "pve-qm-usb-device",
8020 "format_description" : "HOSTUSBDEVICE|spice",
8021 "type" : "string"
7aacca6f 8022 },
44660702 8023 "usb3" : {
c2993fe5
DM
8024 "default" : 0,
8025 "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).",
7aacca6f 8026 "optional" : 1,
44660702 8027 "type" : "boolean"
7aacca6f 8028 }
44660702 8029 },
7aacca6f 8030 "optional" : 1,
44660702 8031 "type" : "string"
7aacca6f 8032 },
44660702 8033 "vcpus" : {
7aacca6f 8034 "default" : 0,
44660702
DM
8035 "description" : "Number of hotplugged vcpus.",
8036 "minimum" : 1,
7aacca6f 8037 "optional" : 1,
44660702 8038 "type" : "integer"
7aacca6f 8039 },
44660702 8040 "vga" : {
c2993fe5 8041 "description" : "Select the VGA type.",
44660702
DM
8042 "enum" : [
8043 "std",
8044 "cirrus",
8045 "vmware",
8046 "qxl",
8047 "serial0",
8048 "serial1",
8049 "serial2",
8050 "serial3",
8051 "qxl2",
8052 "qxl3",
8053 "qxl4"
8054 ],
7aacca6f 8055 "optional" : 1,
c2993fe5
DM
8056 "type" : "string",
8057 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
7aacca6f 8058 },
44660702
DM
8059 "virtio[n]" : {
8060 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
7aacca6f 8061 "format" : {
7aacca6f 8062 "aio" : {
7aacca6f 8063 "description" : "AIO type to use.",
56122987 8064 "enum" : [
7aacca6f
DM
8065 "native",
8066 "threads"
7aacca6f 8067 ],
44660702
DM
8068 "optional" : 1,
8069 "type" : "string"
56122987 8070 },
44660702
DM
8071 "backup" : {
8072 "description" : "Whether the drive should be included when making backups.",
56122987 8073 "optional" : 1,
44660702 8074 "type" : "boolean"
7aacca6f 8075 },
44660702
DM
8076 "bps" : {
8077 "description" : "Maximum r/w speed speed in bytes per second.",
8078 "format_description" : "bps",
7aacca6f 8079 "optional" : 1,
44660702 8080 "type" : "integer"
56122987
DM
8081 },
8082 "bps_rd" : {
7aacca6f 8083 "description" : "Maximum read speed speed in bytes per second.",
44660702 8084 "format_description" : "bps",
56122987 8085 "optional" : 1,
7aacca6f 8086 "type" : "integer"
56122987 8087 },
44660702
DM
8088 "bps_wr" : {
8089 "description" : "Maximum write speed speed in bytes per second.",
8090 "format_description" : "bps",
56122987 8091 "optional" : 1,
7aacca6f 8092 "type" : "integer"
56122987 8093 },
7aacca6f 8094 "cache" : {
44660702 8095 "description" : "The drive's cache mode",
7aacca6f
DM
8096 "enum" : [
8097 "none",
8098 "writethrough",
8099 "writeback",
8100 "unsafe",
8101 "directsync"
8102 ],
56122987 8103 "optional" : 1,
44660702 8104 "type" : "string"
7aacca6f 8105 },
44660702
DM
8106 "cyls" : {
8107 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
8108 "optional" : 1,
8109 "type" : "integer"
8110 },
8111 "detect_zeroes" : {
8112 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
8113 "optional" : 1,
8114 "type" : "boolean"
8115 },
8116 "discard" : {
8117 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 8118 "enum" : [
44660702
DM
8119 "ignore",
8120 "on"
56122987
DM
8121 ],
8122 "optional" : 1,
44660702 8123 "type" : "string"
56122987 8124 },
44660702
DM
8125 "file" : {
8126 "default_key" : 1,
8127 "description" : "The drive's backing volume.",
8128 "format" : "pve-volume-id-or-qm-path",
8129 "format_description" : "volume",
8130 "type" : "string"
8131 },
8132 "format" : {
8133 "description" : "The drive's backing file's data format.",
8134 "enum" : [
8135 "raw",
8136 "cow",
8137 "qcow",
8138 "qed",
8139 "qcow2",
8140 "vmdk",
8141 "cloop"
8142 ],
f004f5b9 8143 "format_description" : "image format",
56122987 8144 "optional" : 1,
44660702 8145 "type" : "string"
56122987 8146 },
44660702
DM
8147 "heads" : {
8148 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
8149 "optional" : 1,
8150 "type" : "integer"
8151 },
8152 "iops" : {
8153 "description" : "Maximum r/w I/O speed in operations per second.",
8154 "format_description" : "iops",
56122987 8155 "optional" : 1,
44660702
DM
8156 "type" : "integer"
8157 },
8158 "iops_max" : {
7aacca6f 8159 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
44660702
DM
8160 "format_description" : "iops",
8161 "optional" : 1,
8162 "type" : "integer"
56122987 8163 },
7aacca6f 8164 "iops_rd" : {
44660702 8165 "description" : "Maximum read I/O speed in operations per second.",
7aacca6f 8166 "format_description" : "iops",
7aacca6f 8167 "optional" : 1,
44660702 8168 "type" : "integer"
56122987 8169 },
44660702
DM
8170 "iops_rd_max" : {
8171 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
8172 "format_description" : "iops",
8173 "optional" : 1,
8174 "type" : "integer"
8175 },
8176 "iops_wr" : {
8177 "description" : "Maximum write I/O speed in operations per second.",
8178 "format_description" : "iops",
8179 "optional" : 1,
8180 "type" : "integer"
8181 },
8182 "iops_wr_max" : {
8183 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
8184 "format_description" : "iops",
8185 "optional" : 1,
8186 "type" : "integer"
8187 },
8188 "iothread" : {
8189 "description" : "Whether to use iothreads for this drive",
44660702
DM
8190 "optional" : 1,
8191 "type" : "boolean"
8192 },
8193 "mbps" : {
8194 "description" : "Maximum r/w speed speed in megabytes per second.",
8195 "format_description" : "mbps",
7aacca6f 8196 "optional" : 1,
44660702 8197 "type" : "number"
7aacca6f
DM
8198 },
8199 "mbps_max" : {
8200 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 8201 "format_description" : "mbps",
56122987 8202 "optional" : 1,
44660702 8203 "type" : "number"
56122987 8204 },
44660702
DM
8205 "mbps_rd" : {
8206 "description" : "Maximum read speed speed in megabytes per second.",
8207 "format_description" : "mbps",
56122987 8208 "optional" : 1,
44660702 8209 "type" : "number"
56122987 8210 },
44660702
DM
8211 "mbps_rd_max" : {
8212 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
8213 "format_description" : "mbps",
8214 "optional" : 1,
8215 "type" : "number"
8216 },
8217 "mbps_wr" : {
8218 "description" : "Maximum write speed speed in megabytes per second.",
8219 "format_description" : "mbps",
8220 "optional" : 1,
8221 "type" : "number"
8222 },
8223 "mbps_wr_max" : {
8224 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
8225 "format_description" : "mbps",
8226 "optional" : 1,
8227 "type" : "number"
8228 },
8229 "media" : {
8230 "default" : "disk",
8231 "description" : "The drive's media type.",
56122987 8232 "enum" : [
44660702
DM
8233 "cdrom",
8234 "disk"
56122987
DM
8235 ],
8236 "optional" : 1,
44660702 8237 "type" : "string"
56122987 8238 },
44660702
DM
8239 "rerror" : {
8240 "description" : "Read error action.",
8241 "enum" : [
8242 "ignore",
8243 "report",
8244 "stop"
8245 ],
56122987 8246 "optional" : 1,
44660702 8247 "type" : "string"
56122987 8248 },
44660702
DM
8249 "secs" : {
8250 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 8251 "optional" : 1,
44660702 8252 "type" : "integer"
56122987 8253 },
7aacca6f
DM
8254 "serial" : {
8255 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7aacca6f 8256 "format" : "urlencoded",
44660702 8257 "format_description" : "serial",
7aacca6f 8258 "maxLength" : 60,
44660702
DM
8259 "optional" : 1,
8260 "type" : "string"
56122987 8261 },
44660702
DM
8262 "size" : {
8263 "description" : "Disk size. This is purely informational and has no effect.",
8264 "format" : "disk-size",
f004f5b9 8265 "format_description" : "DiskSize",
44660702
DM
8266 "optional" : 1,
8267 "type" : "string"
56122987 8268 },
44660702
DM
8269 "snapshot" : {
8270 "description" : "Whether the drive should be included when making snapshots.",
56122987 8271 "optional" : 1,
44660702 8272 "type" : "boolean"
56122987 8273 },
44660702
DM
8274 "trans" : {
8275 "description" : "Force disk geometry bios translation mode.",
8276 "enum" : [
8277 "none",
8278 "lba",
8279 "auto"
8280 ],
7aacca6f 8281 "optional" : 1,
44660702 8282 "type" : "string"
7aacca6f 8283 },
44660702
DM
8284 "volume" : {
8285 "alias" : "file"
8286 },
8287 "werror" : {
8288 "description" : "Write error action.",
8289 "enum" : [
8290 "enospc",
8291 "ignore",
8292 "report",
8293 "stop"
8294 ],
7aacca6f 8295 "optional" : 1,
44660702 8296 "type" : "string"
56122987
DM
8297 }
8298 },
7aacca6f 8299 "optional" : 1,
44660702 8300 "type" : "string"
7aacca6f 8301 },
44660702
DM
8302 "vmid" : {
8303 "description" : "The (unique) ID of the VM.",
8304 "format" : "pve-vmid",
8305 "minimum" : 1,
8306 "type" : "integer"
56122987 8307 },
44660702 8308 "watchdog" : {
c2993fe5 8309 "description" : "Create a virtual hardware watchdog device.",
44660702 8310 "format" : "pve-qm-watchdog",
56122987 8311 "optional" : 1,
c2993fe5
DM
8312 "type" : "string",
8313 "verbose_description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"
56122987 8314 }
7aacca6f 8315 }
56122987 8316 },
56122987
DM
8317 "permissions" : {
8318 "check" : [
8319 "perm",
8320 "/vms/{vmid}",
8321 [
8322 "VM.Config.Disk",
8323 "VM.Config.CDROM",
8324 "VM.Config.CPU",
8325 "VM.Config.Memory",
8326 "VM.Config.Network",
8327 "VM.Config.HWType",
8328 "VM.Config.Options"
8329 ],
8330 "any",
8331 1
8332 ]
8333 },
44660702 8334 "protected" : 1,
7aacca6f 8335 "proxyto" : "node",
56122987 8336 "returns" : {
7aacca6f
DM
8337 "type" : "null"
8338 }
8339 }
8340 },
44660702
DM
8341 "leaf" : 1,
8342 "path" : "/nodes/{node}/qemu/{vmid}/config",
7aacca6f
DM
8343 "text" : "config"
8344 },
8345 {
8346 "info" : {
56122987 8347 "GET" : {
44660702 8348 "description" : "Get virtual machine configuration, including pending changes.",
56122987 8349 "method" : "GET",
44660702 8350 "name" : "vm_pending",
7aacca6f 8351 "parameters" : {
44660702 8352 "additionalProperties" : 0,
7aacca6f
DM
8353 "properties" : {
8354 "node" : {
7aacca6f 8355 "description" : "The cluster node name.",
44660702 8356 "format" : "pve-node",
7aacca6f
DM
8357 "type" : "string"
8358 },
8359 "vmid" : {
44660702 8360 "description" : "The (unique) ID of the VM.",
7aacca6f 8361 "format" : "pve-vmid",
44660702
DM
8362 "minimum" : 1,
8363 "type" : "integer"
7aacca6f 8364 }
44660702 8365 }
7aacca6f 8366 },
56122987
DM
8367 "permissions" : {
8368 "check" : [
8369 "perm",
8370 "/vms/{vmid}",
8371 [
8372 "VM.Audit"
8373 ]
8374 ]
8375 },
7aacca6f 8376 "proxyto" : "node",
44660702
DM
8377 "returns" : {
8378 "items" : {
8379 "properties" : {
8380 "delete" : {
8381 "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.",
8382 "maximum" : 2,
8383 "minimum" : 0,
8384 "optional" : 1,
8385 "type" : "integer"
8386 },
8387 "key" : {
8388 "description" : "Configuration option name.",
8389 "type" : "string"
8390 },
8391 "pending" : {
8392 "description" : "Pending value.",
8393 "optional" : 1,
8394 "type" : "string"
8395 },
8396 "value" : {
8397 "description" : "Current value.",
8398 "optional" : 1,
8399 "type" : "string"
8400 }
8401 },
8402 "type" : "object"
8403 },
8404 "type" : "array"
8405 }
56122987
DM
8406 }
8407 },
7aacca6f 8408 "leaf" : 1,
44660702
DM
8409 "path" : "/nodes/{node}/qemu/{vmid}/pending",
8410 "text" : "pending"
56122987
DM
8411 },
8412 {
56122987
DM
8413 "info" : {
8414 "PUT" : {
7aacca6f 8415 "description" : "Unlink/delete disk images.",
7aacca6f 8416 "method" : "PUT",
7aacca6f 8417 "name" : "unlink",
56122987 8418 "parameters" : {
44660702 8419 "additionalProperties" : 0,
56122987 8420 "properties" : {
7aacca6f 8421 "force" : {
44660702 8422 "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.",
7aacca6f 8423 "optional" : 1,
44660702 8424 "type" : "boolean"
7aacca6f 8425 },
56122987
DM
8426 "idlist" : {
8427 "description" : "A list of disk IDs you want to delete.",
44660702
DM
8428 "format" : "pve-configid-list",
8429 "type" : "string"
8430 },
8431 "node" : {
8432 "description" : "The cluster node name.",
8433 "format" : "pve-node",
8434 "type" : "string"
56122987
DM
8435 },
8436 "vmid" : {
7aacca6f 8437 "description" : "The (unique) ID of the VM.",
44660702 8438 "format" : "pve-vmid",
7aacca6f 8439 "minimum" : 1,
44660702 8440 "type" : "integer"
56122987 8441 }
44660702
DM
8442 }
8443 },
8444 "permissions" : {
8445 "check" : [
8446 "perm",
8447 "/vms/{vmid}",
8448 [
8449 "VM.Config.Disk"
8450 ]
8451 ]
8452 },
8453 "protected" : 1,
8454 "proxyto" : "node",
8455 "returns" : {
8456 "type" : "null"
7aacca6f 8457 }
56122987 8458 }
7aacca6f 8459 },
44660702 8460 "leaf" : 1,
7aacca6f 8461 "path" : "/nodes/{node}/qemu/{vmid}/unlink",
44660702 8462 "text" : "unlink"
56122987
DM
8463 },
8464 {
56122987
DM
8465 "info" : {
8466 "POST" : {
7aacca6f 8467 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
8468 "method" : "POST",
8469 "name" : "vncproxy",
56122987 8470 "parameters" : {
44660702 8471 "additionalProperties" : 0,
56122987 8472 "properties" : {
44660702
DM
8473 "node" : {
8474 "description" : "The cluster node name.",
8475 "format" : "pve-node",
8476 "type" : "string"
8477 },
56122987 8478 "vmid" : {
7aacca6f 8479 "description" : "The (unique) ID of the VM.",
44660702 8480 "format" : "pve-vmid",
56122987 8481 "minimum" : 1,
44660702 8482 "type" : "integer"
7aacca6f
DM
8483 },
8484 "websocket" : {
8485 "description" : "starts websockify instead of vncproxy",
44660702
DM
8486 "optional" : 1,
8487 "type" : "boolean"
56122987 8488 }
44660702 8489 }
56122987 8490 },
44660702
DM
8491 "permissions" : {
8492 "check" : [
8493 "perm",
8494 "/vms/{vmid}",
8495 [
8496 "VM.Console"
8497 ]
8498 ]
8499 },
8500 "protected" : 1,
56122987 8501 "returns" : {
7aacca6f 8502 "additionalProperties" : 0,
56122987 8503 "properties" : {
7aacca6f 8504 "cert" : {
56122987
DM
8505 "type" : "string"
8506 },
56122987
DM
8507 "port" : {
8508 "type" : "integer"
8509 },
7aacca6f
DM
8510 "ticket" : {
8511 "type" : "string"
8512 },
44660702
DM
8513 "upid" : {
8514 "type" : "string"
8515 },
7aacca6f 8516 "user" : {
56122987
DM
8517 "type" : "string"
8518 }
7aacca6f 8519 }
56122987
DM
8520 }
8521 }
8522 },
44660702
DM
8523 "leaf" : 1,
8524 "path" : "/nodes/{node}/qemu/{vmid}/vncproxy",
7aacca6f 8525 "text" : "vncproxy"
56122987
DM
8526 },
8527 {
56122987
DM
8528 "info" : {
8529 "GET" : {
44660702
DM
8530 "description" : "Opens a weksocket for VNC traffic.",
8531 "method" : "GET",
8532 "name" : "vncwebsocket",
56122987 8533 "parameters" : {
44660702 8534 "additionalProperties" : 0,
56122987 8535 "properties" : {
7aacca6f 8536 "node" : {
7aacca6f 8537 "description" : "The cluster node name.",
44660702 8538 "format" : "pve-node",
7aacca6f
DM
8539 "type" : "string"
8540 },
44660702
DM
8541 "port" : {
8542 "description" : "Port number returned by previous vncproxy call.",
8543 "maximum" : 5999,
8544 "minimum" : 5900,
8545 "type" : "integer"
56122987 8546 },
7aacca6f 8547 "vmid" : {
44660702 8548 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8549 "format" : "pve-vmid",
8550 "minimum" : 1,
44660702
DM
8551 "type" : "integer"
8552 },
8553 "vncticket" : {
8554 "description" : "Ticket from previous call to vncproxy.",
8555 "maxLength" : 512,
8556 "type" : "string"
56122987 8557 }
44660702
DM
8558 }
8559 },
8560 "permissions" : {
8561 "check" : [
8562 "perm",
8563 "/vms/{vmid}",
8564 [
8565 "VM.Console"
8566 ]
8567 ],
8568 "description" : "You also need to pass a valid ticket (vncticket)."
56122987 8569 },
7aacca6f
DM
8570 "returns" : {
8571 "properties" : {
8572 "port" : {
8573 "type" : "string"
8574 }
8575 },
8576 "type" : "object"
8577 }
56122987
DM
8578 }
8579 },
7aacca6f 8580 "leaf" : 1,
44660702
DM
8581 "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket",
8582 "text" : "vncwebsocket"
56122987
DM
8583 },
8584 {
8585 "info" : {
8586 "POST" : {
44660702
DM
8587 "description" : "Returns a SPICE configuration to connect to the VM.",
8588 "method" : "POST",
7aacca6f
DM
8589 "name" : "spiceproxy",
8590 "parameters" : {
44660702 8591 "additionalProperties" : 0,
56122987 8592 "properties" : {
44660702
DM
8593 "node" : {
8594 "description" : "The cluster node name.",
8595 "format" : "pve-node",
8596 "type" : "string"
8597 },
7aacca6f 8598 "proxy" : {
44660702 8599 "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).",
7aacca6f 8600 "format" : "address",
7aacca6f 8601 "optional" : 1,
44660702 8602 "type" : "string"
56122987 8603 },
7aacca6f 8604 "vmid" : {
44660702 8605 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8606 "format" : "pve-vmid",
8607 "minimum" : 1,
44660702 8608 "type" : "integer"
56122987 8609 }
44660702 8610 }
56122987 8611 },
56122987
DM
8612 "permissions" : {
8613 "check" : [
8614 "perm",
8615 "/vms/{vmid}",
8616 [
8617 "VM.Console"
8618 ]
8619 ]
8620 },
44660702
DM
8621 "protected" : 1,
8622 "proxyto" : "node",
7aacca6f 8623 "returns" : {
44660702
DM
8624 "additionalProperties" : 1,
8625 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 8626 "properties" : {
44660702 8627 "host" : {
7aacca6f
DM
8628 "type" : "string"
8629 },
7aacca6f
DM
8630 "password" : {
8631 "type" : "string"
8632 },
44660702 8633 "proxy" : {
7aacca6f
DM
8634 "type" : "string"
8635 },
44660702
DM
8636 "tls-port" : {
8637 "type" : "integer"
8638 },
8639 "type" : {
7aacca6f
DM
8640 "type" : "string"
8641 }
44660702 8642 }
7aacca6f
DM
8643 }
8644 }
8645 },
44660702
DM
8646 "leaf" : 1,
8647 "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy",
7aacca6f
DM
8648 "text" : "spiceproxy"
8649 },
8650 {
56122987
DM
8651 "children" : [
8652 {
56122987
DM
8653 "info" : {
8654 "GET" : {
44660702
DM
8655 "description" : "Get virtual machine status.",
8656 "method" : "GET",
8657 "name" : "vm_status",
56122987 8658 "parameters" : {
44660702 8659 "additionalProperties" : 0,
56122987 8660 "properties" : {
44660702
DM
8661 "node" : {
8662 "description" : "The cluster node name.",
8663 "format" : "pve-node",
8664 "type" : "string"
8665 },
56122987 8666 "vmid" : {
44660702 8667 "description" : "The (unique) ID of the VM.",
7aacca6f 8668 "format" : "pve-vmid",
56122987 8669 "minimum" : 1,
7aacca6f 8670 "type" : "integer"
56122987 8671 }
44660702 8672 }
56122987
DM
8673 },
8674 "permissions" : {
8675 "check" : [
8676 "perm",
8677 "/vms/{vmid}",
8678 [
8679 "VM.Audit"
8680 ]
8681 ]
8682 },
44660702 8683 "protected" : 1,
7aacca6f 8684 "proxyto" : "node",
56122987
DM
8685 "returns" : {
8686 "type" : "object"
7aacca6f 8687 }
56122987 8688 }
7aacca6f 8689 },
7aacca6f 8690 "leaf" : 1,
44660702
DM
8691 "path" : "/nodes/{node}/qemu/{vmid}/status/current",
8692 "text" : "current"
56122987
DM
8693 },
8694 {
56122987
DM
8695 "info" : {
8696 "POST" : {
44660702 8697 "description" : "Start virtual machine.",
56122987 8698 "method" : "POST",
44660702 8699 "name" : "vm_start",
56122987 8700 "parameters" : {
44660702 8701 "additionalProperties" : 0,
56122987 8702 "properties" : {
44660702
DM
8703 "machine" : {
8704 "description" : "Specific the Qemu machine type.",
8705 "maxLength" : 40,
8706 "optional" : 1,
8707 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
8708 "type" : "string"
8709 },
8710 "migratedfrom" : {
8711 "description" : "The cluster node name.",
8712 "format" : "pve-node",
56122987 8713 "optional" : 1,
44660702 8714 "type" : "string"
56122987 8715 },
7aacca6f 8716 "node" : {
7aacca6f 8717 "description" : "The cluster node name.",
44660702
DM
8718 "format" : "pve-node",
8719 "type" : "string"
7aacca6f 8720 },
44660702
DM
8721 "skiplock" : {
8722 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8723 "optional" : 1,
44660702 8724 "type" : "boolean"
56122987 8725 },
44660702
DM
8726 "stateuri" : {
8727 "description" : "Some command save/restore state from this location.",
8728 "maxLength" : 128,
56122987 8729 "optional" : 1,
44660702 8730 "type" : "string"
56122987
DM
8731 },
8732 "vmid" : {
7aacca6f 8733 "description" : "The (unique) ID of the VM.",
44660702
DM
8734 "format" : "pve-vmid",
8735 "minimum" : 1,
7aacca6f 8736 "type" : "integer"
56122987 8737 }
44660702 8738 }
7aacca6f 8739 },
56122987
DM
8740 "permissions" : {
8741 "check" : [
8742 "perm",
8743 "/vms/{vmid}",
8744 [
8745 "VM.PowerMgmt"
8746 ]
8747 ]
44660702
DM
8748 },
8749 "protected" : 1,
8750 "proxyto" : "node",
8751 "returns" : {
8752 "type" : "string"
56122987
DM
8753 }
8754 }
44660702
DM
8755 },
8756 "leaf" : 1,
8757 "path" : "/nodes/{node}/qemu/{vmid}/status/start",
8758 "text" : "start"
56122987
DM
8759 },
8760 {
56122987
DM
8761 "info" : {
8762 "POST" : {
7aacca6f 8763 "description" : "Stop virtual machine. The qemu process will exit immediately. Thisis akin to pulling the power plug of a running computer and may damage the VM data",
44660702
DM
8764 "method" : "POST",
8765 "name" : "vm_stop",
56122987 8766 "parameters" : {
44660702 8767 "additionalProperties" : 0,
56122987 8768 "properties" : {
44660702
DM
8769 "keepActive" : {
8770 "default" : 0,
8771 "description" : "Do not decativate storage volumes.",
56122987 8772 "optional" : 1,
44660702 8773 "type" : "boolean"
56122987
DM
8774 },
8775 "migratedfrom" : {
56122987 8776 "description" : "The cluster node name.",
44660702 8777 "format" : "pve-node",
7aacca6f 8778 "optional" : 1,
44660702 8779 "type" : "string"
7aacca6f 8780 },
44660702
DM
8781 "node" : {
8782 "description" : "The cluster node name.",
8783 "format" : "pve-node",
8784 "type" : "string"
56122987
DM
8785 },
8786 "skiplock" : {
8787 "description" : "Ignore locks - only root is allowed to use this option.",
8788 "optional" : 1,
8789 "type" : "boolean"
8790 },
44660702
DM
8791 "timeout" : {
8792 "description" : "Wait maximal timeout seconds.",
8793 "minimum" : 0,
56122987 8794 "optional" : 1,
44660702 8795 "type" : "integer"
7aacca6f 8796 },
44660702
DM
8797 "vmid" : {
8798 "description" : "The (unique) ID of the VM.",
8799 "format" : "pve-vmid",
8800 "minimum" : 1,
8801 "type" : "integer"
56122987 8802 }
44660702 8803 }
56122987 8804 },
56122987
DM
8805 "permissions" : {
8806 "check" : [
8807 "perm",
8808 "/vms/{vmid}",
8809 [
8810 "VM.PowerMgmt"
8811 ]
8812 ]
8813 },
44660702
DM
8814 "protected" : 1,
8815 "proxyto" : "node",
7aacca6f
DM
8816 "returns" : {
8817 "type" : "string"
44660702
DM
8818 }
8819 }
8820 },
8821 "leaf" : 1,
8822 "path" : "/nodes/{node}/qemu/{vmid}/status/stop",
8823 "text" : "stop"
8824 },
8825 {
8826 "info" : {
8827 "POST" : {
8828 "description" : "Reset virtual machine.",
8829 "method" : "POST",
8830 "name" : "vm_reset",
56122987 8831 "parameters" : {
7aacca6f 8832 "additionalProperties" : 0,
56122987 8833 "properties" : {
56122987
DM
8834 "node" : {
8835 "description" : "The cluster node name.",
44660702
DM
8836 "format" : "pve-node",
8837 "type" : "string"
56122987
DM
8838 },
8839 "skiplock" : {
44660702 8840 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8841 "optional" : 1,
44660702 8842 "type" : "boolean"
7aacca6f
DM
8843 },
8844 "vmid" : {
44660702 8845 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8846 "format" : "pve-vmid",
8847 "minimum" : 1,
44660702 8848 "type" : "integer"
56122987 8849 }
7aacca6f 8850 }
56122987 8851 },
7aacca6f
DM
8852 "permissions" : {
8853 "check" : [
8854 "perm",
8855 "/vms/{vmid}",
8856 [
8857 "VM.PowerMgmt"
8858 ]
8859 ]
8860 },
44660702 8861 "protected" : 1,
7aacca6f 8862 "proxyto" : "node",
56122987
DM
8863 "returns" : {
8864 "type" : "string"
44660702
DM
8865 }
8866 }
8867 },
8868 "leaf" : 1,
8869 "path" : "/nodes/{node}/qemu/{vmid}/status/reset",
8870 "text" : "reset"
8871 },
8872 {
8873 "info" : {
8874 "POST" : {
8875 "description" : "Shutdown virtual machine. This is similar to pressing the power button on a physical machine.This will send an ACPI event for the guest OS, which should then proceed to a clean shutdown.",
8876 "method" : "POST",
56122987 8877 "name" : "vm_shutdown",
56122987 8878 "parameters" : {
7aacca6f 8879 "additionalProperties" : 0,
56122987 8880 "properties" : {
56122987 8881 "forceStop" : {
56122987 8882 "default" : 0,
44660702 8883 "description" : "Make sure the VM stops.",
7aacca6f 8884 "optional" : 1,
44660702 8885 "type" : "boolean"
56122987
DM
8886 },
8887 "keepActive" : {
7aacca6f 8888 "default" : 0,
44660702
DM
8889 "description" : "Do not decativate storage volumes.",
8890 "optional" : 1,
8891 "type" : "boolean"
8892 },
8893 "node" : {
8894 "description" : "The cluster node name.",
8895 "format" : "pve-node",
8896 "type" : "string"
8897 },
8898 "skiplock" : {
8899 "description" : "Ignore locks - only root is allowed to use this option.",
8900 "optional" : 1,
8901 "type" : "boolean"
56122987 8902 },
7aacca6f 8903 "timeout" : {
7aacca6f 8904 "description" : "Wait maximal timeout seconds.",
44660702 8905 "minimum" : 0,
7aacca6f
DM
8906 "optional" : 1,
8907 "type" : "integer"
8908 },
56122987 8909 "vmid" : {
7aacca6f 8910 "description" : "The (unique) ID of the VM.",
44660702
DM
8911 "format" : "pve-vmid",
8912 "minimum" : 1,
7aacca6f 8913 "type" : "integer"
56122987 8914 }
7aacca6f 8915 }
56122987 8916 },
44660702
DM
8917 "permissions" : {
8918 "check" : [
8919 "perm",
8920 "/vms/{vmid}",
8921 [
8922 "VM.PowerMgmt"
8923 ]
8924 ]
8925 },
7aacca6f 8926 "protected" : 1,
44660702
DM
8927 "proxyto" : "node",
8928 "returns" : {
8929 "type" : "string"
8930 }
56122987
DM
8931 }
8932 },
44660702 8933 "leaf" : 1,
7aacca6f 8934 "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown",
44660702 8935 "text" : "shutdown"
56122987
DM
8936 },
8937 {
56122987
DM
8938 "info" : {
8939 "POST" : {
44660702 8940 "description" : "Suspend virtual machine.",
56122987 8941 "method" : "POST",
44660702 8942 "name" : "vm_suspend",
7aacca6f 8943 "parameters" : {
44660702 8944 "additionalProperties" : 0,
7aacca6f
DM
8945 "properties" : {
8946 "node" : {
7aacca6f 8947 "description" : "The cluster node name.",
44660702
DM
8948 "format" : "pve-node",
8949 "type" : "string"
7aacca6f
DM
8950 },
8951 "skiplock" : {
8952 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
8953 "optional" : 1,
8954 "type" : "boolean"
8955 },
8956 "vmid" : {
8957 "description" : "The (unique) ID of the VM.",
8958 "format" : "pve-vmid",
8959 "minimum" : 1,
8960 "type" : "integer"
8961 }
8962 }
56122987
DM
8963 },
8964 "permissions" : {
8965 "check" : [
8966 "perm",
8967 "/vms/{vmid}",
8968 [
8969 "VM.PowerMgmt"
8970 ]
8971 ]
8972 },
44660702
DM
8973 "protected" : 1,
8974 "proxyto" : "node",
8975 "returns" : {
8976 "type" : "string"
8977 }
56122987
DM
8978 }
8979 },
44660702 8980 "leaf" : 1,
7aacca6f 8981 "path" : "/nodes/{node}/qemu/{vmid}/status/suspend",
44660702 8982 "text" : "suspend"
56122987
DM
8983 },
8984 {
56122987
DM
8985 "info" : {
8986 "POST" : {
44660702
DM
8987 "description" : "Resume virtual machine.",
8988 "method" : "POST",
7aacca6f 8989 "name" : "vm_resume",
56122987
DM
8990 "parameters" : {
8991 "additionalProperties" : 0,
8992 "properties" : {
44660702
DM
8993 "nocheck" : {
8994 "optional" : 1,
8995 "type" : "boolean"
8996 },
7aacca6f 8997 "node" : {
44660702 8998 "description" : "The cluster node name.",
7aacca6f 8999 "format" : "pve-node",
44660702 9000 "type" : "string"
56122987
DM
9001 },
9002 "skiplock" : {
56122987 9003 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
9004 "optional" : 1,
9005 "type" : "boolean"
56122987 9006 },
7aacca6f 9007 "vmid" : {
7aacca6f
DM
9008 "description" : "The (unique) ID of the VM.",
9009 "format" : "pve-vmid",
44660702
DM
9010 "minimum" : 1,
9011 "type" : "integer"
56122987
DM
9012 }
9013 }
9014 },
9015 "permissions" : {
9016 "check" : [
9017 "perm",
9018 "/vms/{vmid}",
9019 [
9020 "VM.PowerMgmt"
9021 ]
9022 ]
9023 },
44660702
DM
9024 "protected" : 1,
9025 "proxyto" : "node",
56122987
DM
9026 "returns" : {
9027 "type" : "string"
7aacca6f 9028 }
56122987
DM
9029 }
9030 },
44660702
DM
9031 "leaf" : 1,
9032 "path" : "/nodes/{node}/qemu/{vmid}/status/resume",
7aacca6f 9033 "text" : "resume"
56122987
DM
9034 }
9035 ],
9036 "info" : {
44660702
DM
9037 "GET" : {
9038 "description" : "Directory index",
9039 "method" : "GET",
9040 "name" : "vmcmdidx",
56122987 9041 "parameters" : {
44660702 9042 "additionalProperties" : 0,
56122987 9043 "properties" : {
44660702
DM
9044 "node" : {
9045 "description" : "The cluster node name.",
9046 "format" : "pve-node",
7aacca6f
DM
9047 "type" : "string"
9048 },
56122987 9049 "vmid" : {
7aacca6f 9050 "description" : "The (unique) ID of the VM.",
44660702
DM
9051 "format" : "pve-vmid",
9052 "minimum" : 1,
7aacca6f 9053 "type" : "integer"
56122987 9054 }
44660702 9055 }
56122987 9056 },
44660702
DM
9057 "permissions" : {
9058 "user" : "all"
9059 },
9060 "proxyto" : "node",
9061 "returns" : {
9062 "items" : {
9063 "properties" : {
9064 "subdir" : {
9065 "type" : "string"
9066 }
9067 },
9068 "type" : "object"
9069 },
9070 "links" : [
9071 {
9072 "href" : "{subdir}",
9073 "rel" : "child"
9074 }
9075 ],
9076 "type" : "array"
9077 }
56122987 9078 }
7aacca6f 9079 },
44660702
DM
9080 "leaf" : 0,
9081 "path" : "/nodes/{node}/qemu/{vmid}/status",
9082 "text" : "status"
56122987
DM
9083 },
9084 {
56122987 9085 "info" : {
44660702
DM
9086 "PUT" : {
9087 "description" : "Send key event to virtual machine.",
9088 "method" : "PUT",
9089 "name" : "vm_sendkey",
9090 "parameters" : {
9091 "additionalProperties" : 0,
56122987 9092 "properties" : {
44660702
DM
9093 "key" : {
9094 "description" : "The key (qemu monitor encoding).",
9095 "type" : "string"
9096 },
9097 "node" : {
9098 "description" : "The cluster node name.",
9099 "format" : "pve-node",
9100 "type" : "string"
9101 },
9102 "skiplock" : {
9103 "description" : "Ignore locks - only root is allowed to use this option.",
9104 "optional" : 1,
56122987 9105 "type" : "boolean"
7aacca6f 9106 },
44660702
DM
9107 "vmid" : {
9108 "description" : "The (unique) ID of the VM.",
9109 "format" : "pve-vmid",
9110 "minimum" : 1,
9111 "type" : "integer"
56122987 9112 }
7aacca6f 9113 }
56122987 9114 },
56122987
DM
9115 "permissions" : {
9116 "check" : [
9117 "perm",
9118 "/vms/{vmid}",
9119 [
44660702 9120 "VM.Console"
56122987
DM
9121 ]
9122 ]
9123 },
7aacca6f 9124 "protected" : 1,
44660702
DM
9125 "proxyto" : "node",
9126 "returns" : {
9127 "type" : "null"
9128 }
9129 }
9130 },
9131 "leaf" : 1,
9132 "path" : "/nodes/{node}/qemu/{vmid}/sendkey",
9133 "text" : "sendkey"
9134 },
9135 {
9136 "info" : {
9137 "GET" : {
9138 "description" : "Check if feature for virtual machine is available.",
9139 "method" : "GET",
7aacca6f 9140 "name" : "vm_feature",
56122987 9141 "parameters" : {
44660702 9142 "additionalProperties" : 0,
56122987 9143 "properties" : {
56122987 9144 "feature" : {
44660702 9145 "description" : "Feature to check.",
56122987
DM
9146 "enum" : [
9147 "snapshot",
9148 "clone",
9149 "copy"
9150 ],
44660702
DM
9151 "type" : "string"
9152 },
9153 "node" : {
9154 "description" : "The cluster node name.",
9155 "format" : "pve-node",
7aacca6f 9156 "type" : "string"
56122987
DM
9157 },
9158 "snapname" : {
56122987 9159 "description" : "The name of the snapshot.",
44660702
DM
9160 "format" : "pve-configid",
9161 "maxLength" : 40,
7aacca6f
DM
9162 "optional" : 1,
9163 "type" : "string"
9164 },
44660702
DM
9165 "vmid" : {
9166 "description" : "The (unique) ID of the VM.",
9167 "format" : "pve-vmid",
9168 "minimum" : 1,
9169 "type" : "integer"
9170 }
9171 }
9172 },
9173 "permissions" : {
9174 "check" : [
9175 "perm",
9176 "/vms/{vmid}",
9177 [
9178 "VM.Audit"
9179 ]
9180 ]
9181 },
9182 "protected" : 1,
9183 "proxyto" : "node",
9184 "returns" : {
9185 "properties" : {
9186 "hasFeature" : {
9187 "type" : "boolean"
9188 },
9189 "nodes" : {
9190 "items" : {
9191 "type" : "string"
9192 },
9193 "type" : "array"
56122987
DM
9194 }
9195 },
44660702 9196 "type" : "object"
56122987
DM
9197 }
9198 }
9199 },
7aacca6f 9200 "leaf" : 1,
44660702
DM
9201 "path" : "/nodes/{node}/qemu/{vmid}/feature",
9202 "text" : "feature"
56122987
DM
9203 },
9204 {
56122987
DM
9205 "info" : {
9206 "POST" : {
44660702 9207 "description" : "Create a copy of virtual machine/template.",
56122987 9208 "method" : "POST",
7aacca6f 9209 "name" : "clone_vm",
56122987
DM
9210 "parameters" : {
9211 "additionalProperties" : 0,
9212 "properties" : {
44660702
DM
9213 "description" : {
9214 "description" : "Description for the new VM.",
56122987 9215 "optional" : 1,
7aacca6f 9216 "type" : "string"
56122987 9217 },
44660702
DM
9218 "format" : {
9219 "description" : "Target format for file storage.",
9220 "enum" : [
9221 "raw",
9222 "qcow2",
9223 "vmdk"
9224 ],
9225 "optional" : 1,
9226 "requires" : "full",
56122987
DM
9227 "type" : "string"
9228 },
44660702
DM
9229 "full" : {
9230 "default" : 0,
9231 "description" : "Create a full copy of all disk. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default.",
7aacca6f 9232 "optional" : 1,
44660702
DM
9233 "type" : "boolean"
9234 },
9235 "name" : {
56122987 9236 "description" : "Set a name for the new VM.",
44660702
DM
9237 "format" : "dns-name",
9238 "optional" : 1,
9239 "type" : "string"
9240 },
9241 "newid" : {
9242 "description" : "VMID for the clone.",
9243 "format" : "pve-vmid",
9244 "minimum" : 1,
9245 "type" : "integer"
9246 },
9247 "node" : {
9248 "description" : "The cluster node name.",
9249 "format" : "pve-node",
9250 "type" : "string"
7aacca6f
DM
9251 },
9252 "pool" : {
9253 "description" : "Add the new VM to the specified pool.",
44660702 9254 "format" : "pve-poolid",
56122987 9255 "optional" : 1,
44660702 9256 "type" : "string"
56122987 9257 },
44660702
DM
9258 "snapname" : {
9259 "description" : "The name of the snapshot.",
9260 "format" : "pve-configid",
9261 "maxLength" : 40,
7aacca6f
DM
9262 "optional" : 1,
9263 "type" : "string"
56122987 9264 },
44660702
DM
9265 "storage" : {
9266 "description" : "Target storage for full clone.",
9267 "format" : "pve-storage-id",
7aacca6f 9268 "optional" : 1,
44660702
DM
9269 "requires" : "full",
9270 "type" : "string"
56122987 9271 },
44660702
DM
9272 "target" : {
9273 "description" : "Target node. Only allowed if the original VM is on shared storage.",
9274 "format" : "pve-node",
56122987 9275 "optional" : 1,
56122987 9276 "type" : "string"
44660702
DM
9277 },
9278 "vmid" : {
9279 "description" : "The (unique) ID of the VM.",
9280 "format" : "pve-vmid",
9281 "minimum" : 1,
9282 "type" : "integer"
56122987
DM
9283 }
9284 }
9285 },
56122987
DM
9286 "permissions" : {
9287 "check" : [
9288 "and",
9289 [
9290 "perm",
9291 "/vms/{vmid}",
9292 [
9293 "VM.Clone"
9294 ]
9295 ],
9296 [
9297 "or",
9298 [
9299 "perm",
9300 "/vms/{newid}",
9301 [
9302 "VM.Allocate"
9303 ]
9304 ],
9305 [
9306 "perm",
9307 "/pool/{pool}",
9308 [
9309 "VM.Allocate"
9310 ],
9311 "require_param",
9312 "pool"
9313 ]
9314 ]
44660702
DM
9315 ],
9316 "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage."
9317 },
9318 "protected" : 1,
9319 "proxyto" : "node",
9320 "returns" : {
9321 "type" : "string"
56122987
DM
9322 }
9323 }
9324 },
44660702
DM
9325 "leaf" : 1,
9326 "path" : "/nodes/{node}/qemu/{vmid}/clone",
56122987
DM
9327 "text" : "clone"
9328 },
9329 {
56122987
DM
9330 "info" : {
9331 "POST" : {
7aacca6f 9332 "description" : "Move volume to different storage.",
44660702
DM
9333 "method" : "POST",
9334 "name" : "move_vm_disk",
56122987
DM
9335 "parameters" : {
9336 "additionalProperties" : 0,
9337 "properties" : {
9338 "delete" : {
44660702 9339 "default" : 0,
56122987 9340 "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.",
7aacca6f 9341 "optional" : 1,
44660702 9342 "type" : "boolean"
56122987 9343 },
44660702
DM
9344 "digest" : {
9345 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9346 "maxLength" : 40,
9347 "optional" : 1,
9348 "type" : "string"
56122987 9349 },
56122987 9350 "disk" : {
56122987
DM
9351 "description" : "The disk you want to move.",
9352 "enum" : [
9353 "ide0",
9354 "ide1",
9355 "ide2",
9356 "ide3",
9357 "scsi0",
9358 "scsi1",
9359 "scsi2",
9360 "scsi3",
9361 "scsi4",
9362 "scsi5",
9363 "scsi6",
9364 "scsi7",
9365 "scsi8",
9366 "scsi9",
9367 "scsi10",
9368 "scsi11",
9369 "scsi12",
9370 "scsi13",
9371 "virtio0",
9372 "virtio1",
9373 "virtio2",
9374 "virtio3",
9375 "virtio4",
9376 "virtio5",
9377 "virtio6",
9378 "virtio7",
9379 "virtio8",
9380 "virtio9",
9381 "virtio10",
9382 "virtio11",
9383 "virtio12",
9384 "virtio13",
9385 "virtio14",
9386 "virtio15",
9387 "sata0",
9388 "sata1",
9389 "sata2",
9390 "sata3",
9391 "sata4",
9392 "sata5"
44660702
DM
9393 ],
9394 "type" : "string"
7aacca6f
DM
9395 },
9396 "format" : {
9397 "description" : "Target Format.",
9398 "enum" : [
9399 "raw",
9400 "qcow2",
9401 "vmdk"
9402 ],
9403 "optional" : 1,
9404 "type" : "string"
44660702
DM
9405 },
9406 "node" : {
9407 "description" : "The cluster node name.",
9408 "format" : "pve-node",
9409 "type" : "string"
9410 },
9411 "storage" : {
9412 "description" : "Target storage.",
9413 "format" : "pve-storage-id",
9414 "type" : "string"
9415 },
9416 "vmid" : {
9417 "description" : "The (unique) ID of the VM.",
9418 "format" : "pve-vmid",
9419 "minimum" : 1,
9420 "type" : "integer"
56122987
DM
9421 }
9422 }
9423 },
44660702
DM
9424 "permissions" : {
9425 "check" : [
9426 "and",
9427 [
9428 "perm",
9429 "/vms/{vmid}",
9430 [
9431 "VM.Config.Disk"
9432 ]
9433 ],
9434 [
9435 "perm",
9436 "/storage/{storage}",
9437 [
9438 "Datastore.AllocateSpace"
9439 ]
9440 ]
9441 ],
9442 "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage."
9443 },
9444 "protected" : 1,
9445 "proxyto" : "node",
9446 "returns" : {
9447 "description" : "the task ID.",
9448 "type" : "string"
9449 }
56122987 9450 }
7aacca6f 9451 },
44660702 9452 "leaf" : 1,
7aacca6f 9453 "path" : "/nodes/{node}/qemu/{vmid}/move_disk",
44660702 9454 "text" : "move_disk"
56122987
DM
9455 },
9456 {
56122987
DM
9457 "info" : {
9458 "POST" : {
7aacca6f 9459 "description" : "Migrate virtual machine. Creates a new migration task.",
44660702 9460 "method" : "POST",
7aacca6f 9461 "name" : "migrate_vm",
56122987 9462 "parameters" : {
44660702 9463 "additionalProperties" : 0,
56122987 9464 "properties" : {
44660702
DM
9465 "force" : {
9466 "description" : "Allow to migrate VMs which use local devices. Only root may use this option.",
9467 "optional" : 1,
9468 "type" : "boolean"
9469 },
7aacca6f 9470 "node" : {
44660702 9471 "description" : "The cluster node name.",
7aacca6f 9472 "format" : "pve-node",
44660702 9473 "type" : "string"
56122987
DM
9474 },
9475 "online" : {
44660702 9476 "description" : "Use online/live migration.",
56122987 9477 "optional" : 1,
44660702 9478 "type" : "boolean"
56122987 9479 },
44660702
DM
9480 "target" : {
9481 "description" : "Target node.",
9482 "format" : "pve-node",
9483 "type" : "string"
56122987 9484 },
7aacca6f 9485 "vmid" : {
7aacca6f 9486 "description" : "The (unique) ID of the VM.",
44660702 9487 "format" : "pve-vmid",
7aacca6f 9488 "minimum" : 1,
44660702 9489 "type" : "integer"
56122987 9490 }
44660702
DM
9491 }
9492 },
9493 "permissions" : {
9494 "check" : [
9495 "perm",
9496 "/vms/{vmid}",
9497 [
9498 "VM.Migrate"
9499 ]
9500 ]
56122987
DM
9501 },
9502 "protected" : 1,
44660702
DM
9503 "proxyto" : "node",
9504 "returns" : {
9505 "description" : "the task ID.",
9506 "type" : "string"
9507 }
56122987 9508 }
7aacca6f 9509 },
44660702
DM
9510 "leaf" : 1,
9511 "path" : "/nodes/{node}/qemu/{vmid}/migrate",
7aacca6f 9512 "text" : "migrate"
56122987
DM
9513 },
9514 {
9515 "info" : {
9516 "POST" : {
44660702 9517 "description" : "Execute Qemu monitor commands.",
56122987 9518 "method" : "POST",
44660702 9519 "name" : "monitor",
56122987 9520 "parameters" : {
7aacca6f 9521 "additionalProperties" : 0,
56122987 9522 "properties" : {
44660702
DM
9523 "command" : {
9524 "description" : "The monitor command.",
9525 "type" : "string"
9526 },
56122987 9527 "node" : {
44660702 9528 "description" : "The cluster node name.",
7aacca6f 9529 "format" : "pve-node",
44660702 9530 "type" : "string"
56122987
DM
9531 },
9532 "vmid" : {
44660702 9533 "description" : "The (unique) ID of the VM.",
56122987 9534 "format" : "pve-vmid",
7aacca6f 9535 "minimum" : 1,
44660702 9536 "type" : "integer"
56122987 9537 }
7aacca6f 9538 }
56122987 9539 },
56122987
DM
9540 "permissions" : {
9541 "check" : [
9542 "perm",
9543 "/vms/{vmid}",
9544 [
9545 "VM.Monitor"
9546 ]
9547 ]
7aacca6f 9548 },
44660702
DM
9549 "protected" : 1,
9550 "proxyto" : "node",
9551 "returns" : {
9552 "type" : "string"
9553 }
56122987 9554 }
44660702
DM
9555 },
9556 "leaf" : 1,
9557 "path" : "/nodes/{node}/qemu/{vmid}/monitor",
9558 "text" : "monitor"
56122987
DM
9559 },
9560 {
56122987
DM
9561 "info" : {
9562 "PUT" : {
44660702
DM
9563 "description" : "Extend volume size.",
9564 "method" : "PUT",
9565 "name" : "resize_vm",
56122987 9566 "parameters" : {
44660702 9567 "additionalProperties" : 0,
56122987 9568 "properties" : {
44660702
DM
9569 "digest" : {
9570 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9571 "maxLength" : 40,
9572 "optional" : 1,
56122987
DM
9573 "type" : "string"
9574 },
56122987
DM
9575 "disk" : {
9576 "description" : "The disk you want to resize.",
9577 "enum" : [
9578 "ide0",
9579 "ide1",
9580 "ide2",
9581 "ide3",
9582 "scsi0",
9583 "scsi1",
9584 "scsi2",
9585 "scsi3",
9586 "scsi4",
9587 "scsi5",
9588 "scsi6",
9589 "scsi7",
9590 "scsi8",
9591 "scsi9",
9592 "scsi10",
9593 "scsi11",
9594 "scsi12",
9595 "scsi13",
9596 "virtio0",
9597 "virtio1",
9598 "virtio2",
9599 "virtio3",
9600 "virtio4",
9601 "virtio5",
9602 "virtio6",
9603 "virtio7",
9604 "virtio8",
9605 "virtio9",
9606 "virtio10",
9607 "virtio11",
9608 "virtio12",
9609 "virtio13",
9610 "virtio14",
9611 "virtio15",
9612 "sata0",
9613 "sata1",
9614 "sata2",
9615 "sata3",
9616 "sata4",
9617 "sata5"
44660702
DM
9618 ],
9619 "type" : "string"
56122987 9620 },
44660702
DM
9621 "node" : {
9622 "description" : "The cluster node name.",
9623 "format" : "pve-node",
9624 "type" : "string"
7aacca6f 9625 },
44660702
DM
9626 "size" : {
9627 "description" : "The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.",
9628 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
9629 "type" : "string"
56122987
DM
9630 },
9631 "skiplock" : {
9632 "description" : "Ignore locks - only root is allowed to use this option.",
9633 "optional" : 1,
9634 "type" : "boolean"
56122987
DM
9635 },
9636 "vmid" : {
7aacca6f 9637 "description" : "The (unique) ID of the VM.",
56122987 9638 "format" : "pve-vmid",
44660702
DM
9639 "minimum" : 1,
9640 "type" : "integer"
56122987
DM
9641 }
9642 }
9643 },
9644 "permissions" : {
9645 "check" : [
9646 "perm",
9647 "/vms/{vmid}",
9648 [
44660702 9649 "VM.Config.Disk"
56122987
DM
9650 ]
9651 ]
9652 },
7aacca6f 9653 "protected" : 1,
7aacca6f 9654 "proxyto" : "node",
44660702
DM
9655 "returns" : {
9656 "type" : "null"
9657 }
7aacca6f
DM
9658 }
9659 },
44660702
DM
9660 "leaf" : 1,
9661 "path" : "/nodes/{node}/qemu/{vmid}/resize",
9662 "text" : "resize"
9663 },
9664 {
56122987
DM
9665 "children" : [
9666 {
9667 "children" : [
9668 {
56122987 9669 "info" : {
44660702
DM
9670 "GET" : {
9671 "description" : "Get snapshot configuration",
9672 "method" : "GET",
9673 "name" : "get_snapshot_config",
56122987 9674 "parameters" : {
44660702 9675 "additionalProperties" : 0,
56122987 9676 "properties" : {
56122987 9677 "node" : {
44660702 9678 "description" : "The cluster node name.",
56122987 9679 "format" : "pve-node",
44660702 9680 "type" : "string"
7aacca6f
DM
9681 },
9682 "snapname" : {
44660702 9683 "description" : "The name of the snapshot.",
7aacca6f 9684 "format" : "pve-configid",
44660702
DM
9685 "maxLength" : 40,
9686 "type" : "string"
7aacca6f
DM
9687 },
9688 "vmid" : {
44660702 9689 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
9690 "format" : "pve-vmid",
9691 "minimum" : 1,
44660702 9692 "type" : "integer"
56122987 9693 }
44660702 9694 }
56122987
DM
9695 },
9696 "permissions" : {
9697 "check" : [
9698 "perm",
9699 "/vms/{vmid}",
9700 [
9701 "VM.Snapshot"
9702 ]
9703 ]
9704 },
44660702 9705 "proxyto" : "node",
56122987 9706 "returns" : {
44660702 9707 "type" : "object"
7aacca6f
DM
9708 }
9709 },
44660702
DM
9710 "PUT" : {
9711 "description" : "Update snapshot metadata.",
9712 "method" : "PUT",
9713 "name" : "update_snapshot_config",
56122987 9714 "parameters" : {
44660702 9715 "additionalProperties" : 0,
56122987 9716 "properties" : {
44660702
DM
9717 "description" : {
9718 "description" : "A textual description or comment.",
9719 "optional" : 1,
9720 "type" : "string"
9721 },
56122987 9722 "node" : {
7aacca6f 9723 "description" : "The cluster node name.",
44660702
DM
9724 "format" : "pve-node",
9725 "type" : "string"
56122987 9726 },
56122987
DM
9727 "snapname" : {
9728 "description" : "The name of the snapshot.",
44660702 9729 "format" : "pve-configid",
7aacca6f 9730 "maxLength" : 40,
44660702 9731 "type" : "string"
7aacca6f
DM
9732 },
9733 "vmid" : {
9734 "description" : "The (unique) ID of the VM.",
44660702 9735 "format" : "pve-vmid",
7aacca6f 9736 "minimum" : 1,
44660702 9737 "type" : "integer"
56122987 9738 }
44660702 9739 }
56122987 9740 },
7aacca6f
DM
9741 "permissions" : {
9742 "check" : [
9743 "perm",
9744 "/vms/{vmid}",
9745 [
9746 "VM.Snapshot"
9747 ]
9748 ]
44660702
DM
9749 },
9750 "protected" : 1,
9751 "proxyto" : "node",
9752 "returns" : {
9753 "type" : "null"
7aacca6f 9754 }
56122987
DM
9755 }
9756 },
44660702 9757 "leaf" : 1,
7aacca6f 9758 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config",
44660702 9759 "text" : "config"
56122987
DM
9760 },
9761 {
56122987
DM
9762 "info" : {
9763 "POST" : {
44660702 9764 "description" : "Rollback VM state to specified snapshot.",
7aacca6f 9765 "method" : "POST",
44660702 9766 "name" : "rollback",
56122987
DM
9767 "parameters" : {
9768 "additionalProperties" : 0,
9769 "properties" : {
44660702
DM
9770 "node" : {
9771 "description" : "The cluster node name.",
9772 "format" : "pve-node",
9773 "type" : "string"
9774 },
56122987 9775 "snapname" : {
44660702 9776 "description" : "The name of the snapshot.",
56122987
DM
9777 "format" : "pve-configid",
9778 "maxLength" : 40,
7aacca6f
DM
9779 "type" : "string"
9780 },
56122987 9781 "vmid" : {
7aacca6f 9782 "description" : "The (unique) ID of the VM.",
44660702 9783 "format" : "pve-vmid",
56122987 9784 "minimum" : 1,
44660702 9785 "type" : "integer"
56122987
DM
9786 }
9787 }
9788 },
7aacca6f 9789 "permissions" : {
56122987
DM
9790 "check" : [
9791 "perm",
9792 "/vms/{vmid}",
9793 [
9794 "VM.Snapshot"
9795 ]
9796 ]
9797 },
44660702 9798 "protected" : 1,
7aacca6f 9799 "proxyto" : "node",
44660702
DM
9800 "returns" : {
9801 "description" : "the task ID.",
9802 "type" : "string"
9803 }
56122987
DM
9804 }
9805 },
44660702
DM
9806 "leaf" : 1,
9807 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback",
7aacca6f 9808 "text" : "rollback"
56122987 9809 }
44660702
DM
9810 ],
9811 "info" : {
9812 "DELETE" : {
9813 "description" : "Delete a VM snapshot.",
9814 "method" : "DELETE",
9815 "name" : "delsnapshot",
9816 "parameters" : {
9817 "additionalProperties" : 0,
9818 "properties" : {
9819 "force" : {
9820 "description" : "For removal from config file, even if removing disk snapshots fails.",
9821 "optional" : 1,
9822 "type" : "boolean"
9823 },
9824 "node" : {
9825 "description" : "The cluster node name.",
9826 "format" : "pve-node",
9827 "type" : "string"
9828 },
9829 "snapname" : {
9830 "description" : "The name of the snapshot.",
9831 "format" : "pve-configid",
9832 "maxLength" : 40,
9833 "type" : "string"
9834 },
9835 "vmid" : {
9836 "description" : "The (unique) ID of the VM.",
9837 "format" : "pve-vmid",
9838 "minimum" : 1,
9839 "type" : "integer"
9840 }
9841 }
9842 },
9843 "permissions" : {
9844 "check" : [
9845 "perm",
9846 "/vms/{vmid}",
9847 [
9848 "VM.Snapshot"
9849 ]
9850 ]
9851 },
9852 "protected" : 1,
9853 "proxyto" : "node",
9854 "returns" : {
9855 "description" : "the task ID.",
9856 "type" : "string"
9857 }
9858 },
9859 "GET" : {
9860 "description" : "",
9861 "method" : "GET",
9862 "name" : "snapshot_cmd_idx",
9863 "parameters" : {
9864 "additionalProperties" : 0,
9865 "properties" : {
9866 "node" : {
9867 "description" : "The cluster node name.",
9868 "format" : "pve-node",
9869 "type" : "string"
9870 },
9871 "snapname" : {
9872 "description" : "The name of the snapshot.",
9873 "format" : "pve-configid",
9874 "maxLength" : 40,
9875 "type" : "string"
9876 },
9877 "vmid" : {
9878 "description" : "The (unique) ID of the VM.",
9879 "format" : "pve-vmid",
9880 "minimum" : 1,
9881 "type" : "integer"
9882 }
9883 }
9884 },
9885 "permissions" : {
9886 "user" : "all"
9887 },
9888 "returns" : {
9889 "items" : {
9890 "properties" : {},
9891 "type" : "object"
9892 },
9893 "links" : [
9894 {
9895 "href" : "{cmd}",
9896 "rel" : "child"
9897 }
9898 ],
9899 "type" : "array"
9900 }
9901 }
9902 },
9903 "leaf" : 0,
9904 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}",
9905 "text" : "{snapname}"
56122987
DM
9906 }
9907 ],
44660702
DM
9908 "info" : {
9909 "GET" : {
9910 "description" : "List all snapshots.",
9911 "method" : "GET",
9912 "name" : "snapshot_list",
9913 "parameters" : {
9914 "additionalProperties" : 0,
9915 "properties" : {
9916 "node" : {
9917 "description" : "The cluster node name.",
9918 "format" : "pve-node",
9919 "type" : "string"
9920 },
9921 "vmid" : {
9922 "description" : "The (unique) ID of the VM.",
9923 "format" : "pve-vmid",
9924 "minimum" : 1,
9925 "type" : "integer"
9926 }
9927 }
9928 },
9929 "permissions" : {
9930 "check" : [
9931 "perm",
9932 "/vms/{vmid}",
9933 [
9934 "VM.Audit"
9935 ]
9936 ]
9937 },
9938 "protected" : 1,
9939 "proxyto" : "node",
9940 "returns" : {
9941 "items" : {
9942 "properties" : {},
9943 "type" : "object"
9944 },
9945 "links" : [
9946 {
9947 "href" : "{name}",
9948 "rel" : "child"
9949 }
9950 ],
9951 "type" : "array"
9952 }
9953 },
9954 "POST" : {
9955 "description" : "Snapshot a VM.",
9956 "method" : "POST",
9957 "name" : "snapshot",
9958 "parameters" : {
9959 "additionalProperties" : 0,
9960 "properties" : {
9961 "description" : {
9962 "description" : "A textual description or comment.",
9963 "optional" : 1,
9964 "type" : "string"
9965 },
9966 "node" : {
9967 "description" : "The cluster node name.",
9968 "format" : "pve-node",
9969 "type" : "string"
9970 },
9971 "snapname" : {
9972 "description" : "The name of the snapshot.",
9973 "format" : "pve-configid",
9974 "maxLength" : 40,
9975 "type" : "string"
9976 },
9977 "vmid" : {
9978 "description" : "The (unique) ID of the VM.",
9979 "format" : "pve-vmid",
9980 "minimum" : 1,
9981 "type" : "integer"
9982 },
9983 "vmstate" : {
9984 "description" : "Save the vmstate",
9985 "optional" : 1,
9986 "type" : "boolean"
9987 }
9988 }
9989 },
9990 "permissions" : {
9991 "check" : [
9992 "perm",
9993 "/vms/{vmid}",
9994 [
9995 "VM.Snapshot"
9996 ]
9997 ]
9998 },
9999 "protected" : 1,
10000 "proxyto" : "node",
10001 "returns" : {
10002 "description" : "the task ID.",
10003 "type" : "string"
10004 }
10005 }
10006 },
10007 "leaf" : 0,
10008 "path" : "/nodes/{node}/qemu/{vmid}/snapshot",
7aacca6f 10009 "text" : "snapshot"
56122987
DM
10010 },
10011 {
56122987
DM
10012 "info" : {
10013 "POST" : {
44660702
DM
10014 "description" : "Create a Template.",
10015 "method" : "POST",
56122987 10016 "name" : "template",
56122987 10017 "parameters" : {
7aacca6f 10018 "additionalProperties" : 0,
56122987 10019 "properties" : {
56122987 10020 "disk" : {
56122987
DM
10021 "description" : "If you want to convert only 1 disk to base image.",
10022 "enum" : [
10023 "ide0",
10024 "ide1",
10025 "ide2",
10026 "ide3",
10027 "scsi0",
10028 "scsi1",
10029 "scsi2",
10030 "scsi3",
10031 "scsi4",
10032 "scsi5",
10033 "scsi6",
10034 "scsi7",
10035 "scsi8",
10036 "scsi9",
10037 "scsi10",
10038 "scsi11",
10039 "scsi12",
10040 "scsi13",
10041 "virtio0",
10042 "virtio1",
10043 "virtio2",
10044 "virtio3",
10045 "virtio4",
10046 "virtio5",
10047 "virtio6",
10048 "virtio7",
10049 "virtio8",
10050 "virtio9",
10051 "virtio10",
10052 "virtio11",
10053 "virtio12",
10054 "virtio13",
10055 "virtio14",
10056 "virtio15",
10057 "sata0",
10058 "sata1",
10059 "sata2",
10060 "sata3",
10061 "sata4",
10062 "sata5"
10063 ],
7aacca6f 10064 "optional" : 1,
56122987
DM
10065 "type" : "string"
10066 },
44660702
DM
10067 "node" : {
10068 "description" : "The cluster node name.",
10069 "format" : "pve-node",
10070 "type" : "string"
10071 },
10072 "vmid" : {
10073 "description" : "The (unique) ID of the VM.",
7aacca6f 10074 "format" : "pve-vmid",
44660702
DM
10075 "minimum" : 1,
10076 "type" : "integer"
56122987 10077 }
7aacca6f 10078 }
56122987 10079 },
7aacca6f
DM
10080 "permissions" : {
10081 "check" : [
10082 "perm",
10083 "/vms/{vmid}",
10084 [
10085 "VM.Allocate"
10086 ]
10087 ],
10088 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
10089 },
44660702 10090 "protected" : 1,
7aacca6f 10091 "proxyto" : "node",
7aacca6f
DM
10092 "returns" : {
10093 "type" : "null"
10094 }
56122987
DM
10095 }
10096 },
44660702 10097 "leaf" : 1,
7aacca6f 10098 "path" : "/nodes/{node}/qemu/{vmid}/template",
44660702 10099 "text" : "template"
56122987
DM
10100 }
10101 ],
7aacca6f 10102 "info" : {
44660702
DM
10103 "DELETE" : {
10104 "description" : "Destroy the vm (also delete all used/owned volumes).",
10105 "method" : "DELETE",
10106 "name" : "destroy_vm",
7aacca6f 10107 "parameters" : {
44660702 10108 "additionalProperties" : 0,
7aacca6f
DM
10109 "properties" : {
10110 "node" : {
44660702 10111 "description" : "The cluster node name.",
7aacca6f 10112 "format" : "pve-node",
44660702
DM
10113 "type" : "string"
10114 },
10115 "skiplock" : {
10116 "description" : "Ignore locks - only root is allowed to use this option.",
10117 "optional" : 1,
10118 "type" : "boolean"
7aacca6f
DM
10119 },
10120 "vmid" : {
44660702 10121 "description" : "The (unique) ID of the VM.",
7aacca6f 10122 "format" : "pve-vmid",
44660702
DM
10123 "minimum" : 1,
10124 "type" : "integer"
7aacca6f 10125 }
44660702 10126 }
7aacca6f 10127 },
7aacca6f
DM
10128 "permissions" : {
10129 "check" : [
10130 "perm",
10131 "/vms/{vmid}",
10132 [
10133 "VM.Allocate"
10134 ]
10135 ]
10136 },
44660702
DM
10137 "protected" : 1,
10138 "proxyto" : "node",
7aacca6f
DM
10139 "returns" : {
10140 "type" : "string"
44660702
DM
10141 }
10142 },
10143 "GET" : {
10144 "description" : "Directory index",
10145 "method" : "GET",
10146 "name" : "vmdiridx",
7aacca6f 10147 "parameters" : {
44660702 10148 "additionalProperties" : 0,
7aacca6f 10149 "properties" : {
7aacca6f 10150 "node" : {
7aacca6f 10151 "description" : "The cluster node name.",
44660702
DM
10152 "format" : "pve-node",
10153 "type" : "string"
10154 },
10155 "vmid" : {
10156 "description" : "The (unique) ID of the VM.",
10157 "format" : "pve-vmid",
10158 "minimum" : 1,
10159 "type" : "integer"
7aacca6f 10160 }
44660702 10161 }
7aacca6f 10162 },
44660702
DM
10163 "permissions" : {
10164 "user" : "all"
10165 },
10166 "proxyto" : "node",
10167 "returns" : {
10168 "items" : {
10169 "properties" : {
10170 "subdir" : {
10171 "type" : "string"
10172 }
10173 },
10174 "type" : "object"
10175 },
10176 "links" : [
10177 {
10178 "href" : "{subdir}",
10179 "rel" : "child"
10180 }
10181 ],
10182 "type" : "array"
10183 }
7aacca6f 10184 }
44660702
DM
10185 },
10186 "leaf" : 0,
10187 "path" : "/nodes/{node}/qemu/{vmid}",
10188 "text" : "{vmid}"
56122987
DM
10189 }
10190 ],
10191 "info" : {
44660702
DM
10192 "GET" : {
10193 "description" : "Virtual machine index (per node).",
10194 "method" : "GET",
10195 "name" : "vmlist",
56122987 10196 "parameters" : {
44660702 10197 "additionalProperties" : 0,
56122987 10198 "properties" : {
44660702
DM
10199 "full" : {
10200 "description" : "Determine the full status of active VMs.",
56122987 10201 "optional" : 1,
44660702 10202 "type" : "boolean"
56122987 10203 },
44660702
DM
10204 "node" : {
10205 "description" : "The cluster node name.",
10206 "format" : "pve-node",
7aacca6f 10207 "type" : "string"
44660702
DM
10208 }
10209 }
10210 },
10211 "permissions" : {
10212 "description" : "Only list VMs where you have VM.Audit permissons on /vms/<vmid>.",
10213 "user" : "all"
10214 },
10215 "protected" : 1,
10216 "proxyto" : "node",
10217 "returns" : {
10218 "items" : {
10219 "properties" : {},
10220 "type" : "object"
10221 },
10222 "links" : [
10223 {
10224 "href" : "{vmid}",
10225 "rel" : "child"
10226 }
10227 ],
10228 "type" : "array"
10229 }
10230 },
10231 "POST" : {
10232 "description" : "Create or restore a virtual machine.",
10233 "method" : "POST",
10234 "name" : "create_vm",
10235 "parameters" : {
10236 "additionalProperties" : 0,
10237 "properties" : {
7aacca6f 10238 "acpi" : {
7aacca6f 10239 "default" : 1,
44660702 10240 "description" : "Enable/disable ACPI.",
56122987 10241 "optional" : 1,
7aacca6f 10242 "type" : "boolean"
56122987 10243 },
44660702
DM
10244 "agent" : {
10245 "default" : 0,
10246 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 10247 "optional" : 1,
44660702 10248 "type" : "boolean"
56122987 10249 },
44660702
DM
10250 "archive" : {
10251 "description" : "The backup file.",
10252 "maxLength" : 255,
56122987 10253 "optional" : 1,
44660702 10254 "type" : "string"
56122987 10255 },
44660702 10256 "args" : {
c2993fe5 10257 "description" : "Arbitrary arguments passed to kvm.",
56122987 10258 "optional" : 1,
c2993fe5
DM
10259 "type" : "string",
10260 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
56122987 10261 },
44660702 10262 "autostart" : {
7aacca6f 10263 "default" : 0,
44660702
DM
10264 "description" : "Automatic restart after crash (currently ignored).",
10265 "optional" : 1,
10266 "type" : "boolean"
7aacca6f 10267 },
44660702
DM
10268 "balloon" : {
10269 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
10270 "minimum" : 0,
56122987 10271 "optional" : 1,
44660702 10272 "type" : "integer"
56122987 10273 },
44660702
DM
10274 "bios" : {
10275 "default" : "seabios",
10276 "description" : "Select BIOS implementation.",
10277 "enum" : [
10278 "seabios",
10279 "ovmf"
10280 ],
56122987 10281 "optional" : 1,
44660702 10282 "type" : "string"
56122987 10283 },
44660702
DM
10284 "boot" : {
10285 "default" : "cdn",
10286 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
56122987 10287 "optional" : 1,
44660702
DM
10288 "pattern" : "[acdn]{1,4}",
10289 "type" : "string"
56122987 10290 },
7aacca6f
DM
10291 "bootdisk" : {
10292 "description" : "Enable booting from specified disk.",
44660702
DM
10293 "format" : "pve-qm-bootdisk",
10294 "optional" : 1,
7aacca6f 10295 "pattern" : "(ide|sata|scsi|virtio)\\d+",
44660702
DM
10296 "type" : "string"
10297 },
10298 "cdrom" : {
10299 "description" : "This is an alias for option -ide2",
10300 "format" : "pve-qm-drive",
56122987 10301 "optional" : 1,
44660702
DM
10302 "type" : "string",
10303 "typetext" : "volume"
56122987 10304 },
44660702
DM
10305 "cores" : {
10306 "default" : 1,
10307 "description" : "The number of cores per socket.",
7aacca6f 10308 "minimum" : 1,
44660702 10309 "optional" : 1,
7aacca6f
DM
10310 "type" : "integer"
10311 },
44660702
DM
10312 "cpu" : {
10313 "description" : "Emulated CPU type.",
10314 "format" : {
10315 "cputype" : {
10316 "default" : "kvm64",
10317 "default_key" : 1,
10318 "description" : "Emulated CPU type.",
10319 "enum" : [
10320 "486",
10321 "athlon",
f004f5b9
DM
10322 "Broadwell",
10323 "Broadwell-noTSX",
10324 "Conroe",
44660702 10325 "core2duo",
f004f5b9
DM
10326 "coreduo",
10327 "Haswell",
10328 "Haswell-noTSX",
10329 "host",
10330 "IvyBridge",
44660702
DM
10331 "kvm32",
10332 "kvm64",
44660702 10333 "Nehalem",
44660702
DM
10334 "Opteron_G1",
10335 "Opteron_G2",
10336 "Opteron_G3",
10337 "Opteron_G4",
10338 "Opteron_G5",
f004f5b9
DM
10339 "Penryn",
10340 "pentium",
10341 "pentium2",
10342 "pentium3",
10343 "phenom",
10344 "qemu32",
10345 "qemu64",
10346 "SandyBridge",
10347 "Westmere"
44660702
DM
10348 ],
10349 "format_description" : "cputype",
10350 "type" : "string"
10351 },
10352 "hidden" : {
10353 "default" : 0,
10354 "description" : "Do not identify as a KVM virtual machine.",
10355 "optional" : 1,
10356 "type" : "boolean"
10357 }
10358 },
56122987 10359 "optional" : 1,
44660702 10360 "type" : "string"
56122987 10361 },
44660702 10362 "cpulimit" : {
7aacca6f 10363 "default" : 0,
c2993fe5 10364 "description" : "Limit of CPU usage.",
44660702
DM
10365 "maximum" : 128,
10366 "minimum" : 0,
7aacca6f 10367 "optional" : 1,
c2993fe5
DM
10368 "type" : "number",
10369 "verbose_description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."
7aacca6f
DM
10370 },
10371 "cpuunits" : {
7aacca6f 10372 "default" : 1000,
c2993fe5 10373 "description" : "CPU weight for a VM.",
7aacca6f 10374 "maximum" : 500000,
44660702
DM
10375 "minimum" : 0,
10376 "optional" : 1,
c2993fe5
DM
10377 "type" : "integer",
10378 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
10379 },
10380 "description" : {
10381 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
56122987 10382 "optional" : 1,
44660702
DM
10383 "type" : "string"
10384 },
10385 "force" : {
10386 "description" : "Allow to overwrite existing VM.",
10387 "optional" : 1,
10388 "requires" : "archive",
10389 "type" : "boolean"
10390 },
10391 "freeze" : {
10392 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
10393 "optional" : 1,
10394 "type" : "boolean"
10395 },
10396 "hostpci[n]" : {
c2993fe5 10397 "description" : "Map host PCI devices into guest.",
44660702
DM
10398 "format" : "pve-qm-hostpci",
10399 "optional" : 1,
57b78691
DM
10400 "type" : "string",
10401 "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer \npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
44660702
DM
10402 },
10403 "hotplug" : {
10404 "default" : "network,disk,usb",
10405 "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.",
10406 "format" : "pve-hotplug-features",
10407 "optional" : 1,
10408 "type" : "string"
7aacca6f
DM
10409 },
10410 "ide[n]" : {
44660702 10411 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 10412 "format" : {
44660702
DM
10413 "aio" : {
10414 "description" : "AIO type to use.",
10415 "enum" : [
10416 "native",
10417 "threads"
10418 ],
44660702
DM
10419 "optional" : 1,
10420 "type" : "string"
10421 },
10422 "backup" : {
10423 "description" : "Whether the drive should be included when making backups.",
44660702
DM
10424 "optional" : 1,
10425 "type" : "boolean"
10426 },
10427 "bps" : {
10428 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 10429 "format_description" : "bps",
56122987 10430 "optional" : 1,
44660702 10431 "type" : "integer"
56122987 10432 },
44660702
DM
10433 "bps_rd" : {
10434 "description" : "Maximum read speed speed in bytes per second.",
10435 "format_description" : "bps",
56122987 10436 "optional" : 1,
44660702 10437 "type" : "integer"
56122987 10438 },
44660702
DM
10439 "bps_wr" : {
10440 "description" : "Maximum write speed speed in bytes per second.",
10441 "format_description" : "bps",
56122987 10442 "optional" : 1,
44660702 10443 "type" : "integer"
56122987 10444 },
44660702
DM
10445 "cache" : {
10446 "description" : "The drive's cache mode",
56122987 10447 "enum" : [
7aacca6f 10448 "none",
44660702
DM
10449 "writethrough",
10450 "writeback",
10451 "unsafe",
10452 "directsync"
56122987 10453 ],
56122987 10454 "optional" : 1,
44660702 10455 "type" : "string"
56122987 10456 },
44660702
DM
10457 "cyls" : {
10458 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
10459 "optional" : 1,
10460 "type" : "integer"
7aacca6f 10461 },
44660702
DM
10462 "detect_zeroes" : {
10463 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10464 "optional" : 1,
44660702 10465 "type" : "boolean"
56122987 10466 },
44660702
DM
10467 "discard" : {
10468 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
10469 "enum" : [
10470 "ignore",
10471 "on"
10472 ],
56122987 10473 "optional" : 1,
44660702 10474 "type" : "string"
56122987 10475 },
7aacca6f 10476 "file" : {
44660702 10477 "default_key" : 1,
7aacca6f 10478 "description" : "The drive's backing volume.",
7aacca6f
DM
10479 "format" : "pve-volume-id-or-qm-path",
10480 "format_description" : "volume",
7aacca6f 10481 "type" : "string"
56122987 10482 },
44660702
DM
10483 "format" : {
10484 "description" : "The drive's backing file's data format.",
56122987 10485 "enum" : [
44660702
DM
10486 "raw",
10487 "cow",
10488 "qcow",
10489 "qed",
10490 "qcow2",
10491 "vmdk",
10492 "cloop"
7aacca6f 10493 ],
f004f5b9 10494 "format_description" : "image format",
7aacca6f
DM
10495 "optional" : 1,
10496 "type" : "string"
56122987 10497 },
44660702
DM
10498 "heads" : {
10499 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 10500 "optional" : 1,
44660702 10501 "type" : "integer"
56122987 10502 },
44660702
DM
10503 "iops" : {
10504 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 10505 "format_description" : "iops",
56122987 10506 "optional" : 1,
44660702 10507 "type" : "integer"
56122987 10508 },
44660702
DM
10509 "iops_max" : {
10510 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
10511 "format_description" : "iops",
56122987 10512 "optional" : 1,
44660702 10513 "type" : "integer"
56122987 10514 },
7aacca6f 10515 "iops_rd" : {
7aacca6f 10516 "description" : "Maximum read I/O speed in operations per second.",
44660702
DM
10517 "format_description" : "iops",
10518 "optional" : 1,
10519 "type" : "integer"
7aacca6f 10520 },
44660702
DM
10521 "iops_rd_max" : {
10522 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
10523 "format_description" : "iops",
56122987 10524 "optional" : 1,
44660702 10525 "type" : "integer"
56122987 10526 },
44660702
DM
10527 "iops_wr" : {
10528 "description" : "Maximum write I/O speed in operations per second.",
10529 "format_description" : "iops",
56122987 10530 "optional" : 1,
44660702 10531 "type" : "integer"
7aacca6f 10532 },
44660702
DM
10533 "iops_wr_max" : {
10534 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
10535 "format_description" : "iops",
7aacca6f 10536 "optional" : 1,
44660702 10537 "type" : "integer"
56122987 10538 },
44660702
DM
10539 "mbps" : {
10540 "description" : "Maximum r/w speed speed in megabytes per second.",
10541 "format_description" : "mbps",
7aacca6f 10542 "optional" : 1,
44660702 10543 "type" : "number"
56122987 10544 },
44660702
DM
10545 "mbps_max" : {
10546 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7aacca6f 10547 "format_description" : "mbps",
56122987 10548 "optional" : 1,
44660702 10549 "type" : "number"
56122987 10550 },
44660702
DM
10551 "mbps_rd" : {
10552 "description" : "Maximum read speed speed in megabytes per second.",
10553 "format_description" : "mbps",
7aacca6f 10554 "optional" : 1,
44660702 10555 "type" : "number"
7aacca6f 10556 },
44660702
DM
10557 "mbps_rd_max" : {
10558 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
10559 "format_description" : "mbps",
56122987 10560 "optional" : 1,
44660702 10561 "type" : "number"
56122987 10562 },
44660702
DM
10563 "mbps_wr" : {
10564 "description" : "Maximum write speed speed in megabytes per second.",
10565 "format_description" : "mbps",
7aacca6f 10566 "optional" : 1,
44660702 10567 "type" : "number"
56122987 10568 },
44660702
DM
10569 "mbps_wr_max" : {
10570 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
10571 "format_description" : "mbps",
56122987 10572 "optional" : 1,
44660702 10573 "type" : "number"
7aacca6f
DM
10574 },
10575 "media" : {
44660702
DM
10576 "default" : "disk",
10577 "description" : "The drive's media type.",
56122987 10578 "enum" : [
7aacca6f
DM
10579 "cdrom",
10580 "disk"
56122987 10581 ],
56122987 10582 "optional" : 1,
44660702 10583 "type" : "string"
56122987 10584 },
44660702
DM
10585 "model" : {
10586 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
10587 "format" : "urlencoded",
10588 "format_description" : "model",
10589 "maxLength" : 120,
56122987 10590 "optional" : 1,
44660702 10591 "type" : "string"
56122987 10592 },
7aacca6f 10593 "rerror" : {
7aacca6f
DM
10594 "description" : "Read error action.",
10595 "enum" : [
10596 "ignore",
10597 "report",
10598 "stop"
44660702 10599 ],
44660702
DM
10600 "optional" : 1,
10601 "type" : "string"
56122987 10602 },
44660702
DM
10603 "secs" : {
10604 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 10605 "optional" : 1,
44660702
DM
10606 "type" : "integer"
10607 },
10608 "serial" : {
10609 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
10610 "format" : "urlencoded",
10611 "format_description" : "serial",
10612 "maxLength" : 60,
10613 "optional" : 1,
10614 "type" : "string"
10615 },
10616 "size" : {
10617 "description" : "Disk size. This is purely informational and has no effect.",
10618 "format" : "disk-size",
f004f5b9 10619 "format_description" : "DiskSize",
44660702
DM
10620 "optional" : 1,
10621 "type" : "string"
7aacca6f
DM
10622 },
10623 "snapshot" : {
44660702 10624 "description" : "Whether the drive should be included when making snapshots.",
7aacca6f 10625 "optional" : 1,
44660702 10626 "type" : "boolean"
7aacca6f 10627 },
44660702
DM
10628 "trans" : {
10629 "description" : "Force disk geometry bios translation mode.",
10630 "enum" : [
10631 "none",
10632 "lba",
10633 "auto"
10634 ],
7aacca6f 10635 "optional" : 1,
44660702
DM
10636 "type" : "string"
10637 },
10638 "volume" : {
10639 "alias" : "file"
10640 },
10641 "werror" : {
10642 "description" : "Write error action.",
10643 "enum" : [
10644 "enospc",
10645 "ignore",
10646 "report",
10647 "stop"
10648 ],
44660702
DM
10649 "optional" : 1,
10650 "type" : "string"
56122987
DM
10651 }
10652 },
56122987 10653 "optional" : 1,
7aacca6f 10654 "type" : "string"
56122987 10655 },
56122987 10656 "keyboard" : {
44660702 10657 "default" : "en-us",
c2993fe5 10658 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
56122987 10659 "enum" : [
44660702
DM
10660 "de",
10661 "de-ch",
7aacca6f 10662 "da",
56122987 10663 "en-gb",
44660702
DM
10664 "en-us",
10665 "es",
10666 "fi",
10667 "fr",
10668 "fr-be",
10669 "fr-ca",
10670 "fr-ch",
10671 "hu",
7aacca6f 10672 "is",
44660702
DM
10673 "it",
10674 "ja",
10675 "lt",
56122987 10676 "mk",
7aacca6f 10677 "nl",
56122987 10678 "no",
44660702 10679 "pl",
7aacca6f 10680 "pt",
44660702
DM
10681 "pt-br",
10682 "sv",
10683 "sl",
10684 "tr"
56122987 10685 ],
44660702
DM
10686 "optional" : 1,
10687 "type" : "string"
56122987 10688 },
44660702
DM
10689 "kvm" : {
10690 "default" : 1,
10691 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 10692 "optional" : 1,
44660702 10693 "type" : "boolean"
7aacca6f 10694 },
44660702
DM
10695 "localtime" : {
10696 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 10697 "optional" : 1,
44660702
DM
10698 "type" : "boolean"
10699 },
10700 "lock" : {
10701 "description" : "Lock/unlock the VM.",
7aacca6f
DM
10702 "enum" : [
10703 "migrate",
10704 "backup",
10705 "snapshot",
10706 "rollback"
10707 ],
44660702
DM
10708 "optional" : 1,
10709 "type" : "string"
56122987 10710 },
44660702
DM
10711 "machine" : {
10712 "description" : "Specific the Qemu machine type.",
10713 "maxLength" : 40,
10714 "optional" : 1,
10715 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
10716 "type" : "string"
10717 },
10718 "memory" : {
10719 "default" : 512,
10720 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
10721 "minimum" : 16,
10722 "optional" : 1,
10723 "type" : "integer"
10724 },
10725 "migrate_downtime" : {
10726 "default" : 0.1,
10727 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
10728 "minimum" : 0,
10729 "optional" : 1,
10730 "type" : "number"
10731 },
10732 "migrate_speed" : {
56122987 10733 "default" : 0,
44660702
DM
10734 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
10735 "minimum" : 0,
56122987 10736 "optional" : 1,
44660702 10737 "type" : "integer"
56122987 10738 },
44660702
DM
10739 "name" : {
10740 "description" : "Set a name for the VM. Only used on the configuration web interface.",
10741 "format" : "dns-name",
10742 "optional" : 1,
10743 "type" : "string"
10744 },
10745 "net[n]" : {
c2993fe5 10746 "description" : "Specify network devices.",
f004f5b9
DM
10747 "format" : {
10748 "bridge" : {
c2993fe5 10749 "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n",
f004f5b9
DM
10750 "format_description" : "bridge",
10751 "optional" : 1,
10752 "type" : "string"
10753 },
10754 "e1000" : {
10755 "alias" : "macaddr",
10756 "keyAlias" : "model"
10757 },
10758 "e1000-82540em" : {
10759 "alias" : "macaddr",
10760 "keyAlias" : "model"
10761 },
10762 "e1000-82544gc" : {
10763 "alias" : "macaddr",
10764 "keyAlias" : "model"
10765 },
10766 "e1000-82545em" : {
10767 "alias" : "macaddr",
10768 "keyAlias" : "model"
10769 },
10770 "firewall" : {
10771 "description" : "Whether this interface should be protected by the firewall.",
10772 "optional" : 1,
10773 "type" : "boolean"
10774 },
10775 "i82551" : {
10776 "alias" : "macaddr",
10777 "keyAlias" : "model"
10778 },
10779 "i82557b" : {
10780 "alias" : "macaddr",
10781 "keyAlias" : "model"
10782 },
10783 "i82559er" : {
10784 "alias" : "macaddr",
10785 "keyAlias" : "model"
10786 },
10787 "link_down" : {
c2993fe5 10788 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
10789 "optional" : 1,
10790 "type" : "boolean"
10791 },
10792 "macaddr" : {
c2993fe5 10793 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 10794 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
10795 "optional" : 1,
10796 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
10797 "type" : "string"
10798 },
10799 "model" : {
10800 "default_key" : 1,
c2993fe5 10801 "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.",
f004f5b9
DM
10802 "enum" : [
10803 "rtl8139",
10804 "ne2k_pci",
10805 "e1000",
10806 "pcnet",
10807 "virtio",
10808 "ne2k_isa",
10809 "i82551",
10810 "i82557b",
10811 "i82559er",
10812 "vmxnet3",
10813 "e1000-82540em",
10814 "e1000-82544gc",
10815 "e1000-82545em"
10816 ],
10817 "format_description" : "model",
10818 "type" : "string"
10819 },
10820 "ne2k_isa" : {
10821 "alias" : "macaddr",
10822 "keyAlias" : "model"
10823 },
10824 "ne2k_pci" : {
10825 "alias" : "macaddr",
10826 "keyAlias" : "model"
10827 },
10828 "pcnet" : {
10829 "alias" : "macaddr",
10830 "keyAlias" : "model"
10831 },
10832 "queues" : {
10833 "description" : "Number of packet queues to be used on the device.",
10834 "maximum" : 16,
10835 "minimum" : 0,
10836 "optional" : 1,
10837 "type" : "integer"
10838 },
10839 "rate" : {
c2993fe5 10840 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
10841 "minimum" : 0,
10842 "optional" : 1,
10843 "type" : "number"
10844 },
10845 "rtl8139" : {
10846 "alias" : "macaddr",
10847 "keyAlias" : "model"
10848 },
10849 "tag" : {
10850 "description" : "VLAN tag to apply to packets on this interface.",
10851 "maximum" : 4094,
c2993fe5 10852 "minimum" : 1,
f004f5b9
DM
10853 "optional" : 1,
10854 "type" : "integer"
10855 },
10856 "trunks" : {
10857 "description" : "VLAN trunks to pass through this interface.",
10858 "format_description" : "vlanid[;vlanid...]",
10859 "optional" : 1,
10860 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10861 "type" : "string"
10862 },
10863 "virtio" : {
10864 "alias" : "macaddr",
10865 "keyAlias" : "model"
10866 },
10867 "vmxnet3" : {
10868 "alias" : "macaddr",
10869 "keyAlias" : "model"
10870 }
10871 },
44660702
DM
10872 "optional" : 1,
10873 "type" : "string"
10874 },
10875 "node" : {
10876 "description" : "The cluster node name.",
10877 "format" : "pve-node",
10878 "type" : "string"
10879 },
10880 "numa" : {
7aacca6f 10881 "default" : 0,
44660702
DM
10882 "description" : "Enable/disable NUMA.",
10883 "optional" : 1,
10884 "type" : "boolean"
56122987 10885 },
7aacca6f 10886 "numa[n]" : {
c2993fe5 10887 "description" : "NUMA topology.",
7aacca6f 10888 "format" : {
44660702 10889 "cpus" : {
c2993fe5 10890 "description" : "CPUs accessing this NUMA node.",
44660702
DM
10891 "format_description" : "id[-id];...",
10892 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10893 "type" : "string"
10894 },
7aacca6f 10895 "hostnodes" : {
c2993fe5 10896 "description" : "Host NUMA nodes to use.",
44660702 10897 "format_description" : "id[-id];...",
7aacca6f 10898 "optional" : 1,
44660702
DM
10899 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10900 "type" : "string"
7aacca6f 10901 },
44660702 10902 "memory" : {
c2993fe5 10903 "description" : "Amount of memory this NUMA node provides.",
44660702
DM
10904 "optional" : 1,
10905 "type" : "number"
7aacca6f
DM
10906 },
10907 "policy" : {
c2993fe5 10908 "description" : "NUMA allocation policy.",
7aacca6f
DM
10909 "enum" : [
10910 "preferred",
10911 "bind",
10912 "interleave"
10913 ],
7aacca6f 10914 "optional" : 1,
44660702 10915 "type" : "string"
7aacca6f
DM
10916 }
10917 },
56122987 10918 "optional" : 1,
44660702 10919 "type" : "string"
56122987 10920 },
44660702
DM
10921 "onboot" : {
10922 "default" : 0,
10923 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 10924 "optional" : 1,
44660702 10925 "type" : "boolean"
56122987
DM
10926 },
10927 "ostype" : {
c2993fe5 10928 "description" : "Specify guest operating system.",
56122987
DM
10929 "enum" : [
10930 "other",
10931 "wxp",
10932 "w2k",
10933 "w2k3",
10934 "w2k8",
10935 "wvista",
10936 "win7",
10937 "win8",
10938 "l24",
10939 "l26",
10940 "solaris"
44660702 10941 ],
56122987 10942 "optional" : 1,
c2993fe5
DM
10943 "type" : "string",
10944 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
56122987 10945 },
44660702 10946 "parallel[n]" : {
c2993fe5 10947 "description" : "Map host parallel devices (n is 0 to 2).",
56122987 10948 "optional" : 1,
44660702 10949 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
10950 "type" : "string",
10951 "verbose_description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
56122987 10952 },
44660702
DM
10953 "pool" : {
10954 "description" : "Add the VM to the specified pool.",
10955 "format" : "pve-poolid",
56122987 10956 "optional" : 1,
44660702 10957 "type" : "string"
56122987 10958 },
44660702
DM
10959 "protection" : {
10960 "default" : 0,
c2993fe5 10961 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
56122987 10962 "optional" : 1,
44660702 10963 "type" : "boolean"
56122987 10964 },
44660702 10965 "reboot" : {
7aacca6f 10966 "default" : 1,
44660702
DM
10967 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
10968 "optional" : 1,
10969 "type" : "boolean"
56122987 10970 },
56122987 10971 "sata[n]" : {
44660702 10972 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 10973 "format" : {
7aacca6f 10974 "aio" : {
44660702 10975 "description" : "AIO type to use.",
56122987 10976 "enum" : [
7aacca6f
DM
10977 "native",
10978 "threads"
56122987 10979 ],
7aacca6f 10980 "optional" : 1,
44660702 10981 "type" : "string"
7aacca6f
DM
10982 },
10983 "backup" : {
7aacca6f 10984 "description" : "Whether the drive should be included when making backups.",
7aacca6f 10985 "optional" : 1,
44660702 10986 "type" : "boolean"
56122987 10987 },
44660702
DM
10988 "bps" : {
10989 "description" : "Maximum r/w speed speed in bytes per second.",
10990 "format_description" : "bps",
7aacca6f 10991 "optional" : 1,
44660702 10992 "type" : "integer"
56122987 10993 },
44660702
DM
10994 "bps_rd" : {
10995 "description" : "Maximum read speed speed in bytes per second.",
10996 "format_description" : "bps",
56122987 10997 "optional" : 1,
44660702 10998 "type" : "integer"
7aacca6f 10999 },
44660702
DM
11000 "bps_wr" : {
11001 "description" : "Maximum write speed speed in bytes per second.",
11002 "format_description" : "bps",
56122987 11003 "optional" : 1,
44660702 11004 "type" : "integer"
56122987 11005 },
7aacca6f 11006 "cache" : {
7aacca6f
DM
11007 "description" : "The drive's cache mode",
11008 "enum" : [
11009 "none",
11010 "writethrough",
11011 "writeback",
11012 "unsafe",
11013 "directsync"
11014 ],
44660702
DM
11015 "optional" : 1,
11016 "type" : "string"
56122987 11017 },
44660702
DM
11018 "cyls" : {
11019 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 11020 "optional" : 1,
7aacca6f 11021 "type" : "integer"
56122987 11022 },
7aacca6f
DM
11023 "detect_zeroes" : {
11024 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11025 "optional" : 1,
7aacca6f 11026 "type" : "boolean"
56122987 11027 },
44660702
DM
11028 "discard" : {
11029 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11030 "enum" : [
11031 "ignore",
11032 "on"
11033 ],
56122987 11034 "optional" : 1,
44660702 11035 "type" : "string"
56122987 11036 },
44660702
DM
11037 "file" : {
11038 "default_key" : 1,
11039 "description" : "The drive's backing volume.",
11040 "format" : "pve-volume-id-or-qm-path",
11041 "format_description" : "volume",
11042 "type" : "string"
56122987
DM
11043 },
11044 "format" : {
44660702 11045 "description" : "The drive's backing file's data format.",
56122987
DM
11046 "enum" : [
11047 "raw",
11048 "cow",
11049 "qcow",
11050 "qed",
11051 "qcow2",
11052 "vmdk",
11053 "cloop"
11054 ],
f004f5b9 11055 "format_description" : "image format",
56122987 11056 "optional" : 1,
44660702 11057 "type" : "string"
56122987 11058 },
7aacca6f 11059 "heads" : {
7aacca6f 11060 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11061 "optional" : 1,
11062 "type" : "integer"
56122987 11063 },
44660702
DM
11064 "iops" : {
11065 "description" : "Maximum r/w I/O speed in operations per second.",
11066 "format_description" : "iops",
11067 "optional" : 1,
11068 "type" : "integer"
56122987 11069 },
44660702
DM
11070 "iops_max" : {
11071 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11072 "format_description" : "iops",
56122987 11073 "optional" : 1,
44660702 11074 "type" : "integer"
56122987 11075 },
44660702
DM
11076 "iops_rd" : {
11077 "description" : "Maximum read I/O speed in operations per second.",
11078 "format_description" : "iops",
56122987 11079 "optional" : 1,
44660702 11080 "type" : "integer"
56122987 11081 },
44660702
DM
11082 "iops_rd_max" : {
11083 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 11084 "format_description" : "iops",
56122987 11085 "optional" : 1,
44660702 11086 "type" : "integer"
56122987 11087 },
44660702
DM
11088 "iops_wr" : {
11089 "description" : "Maximum write I/O speed in operations per second.",
11090 "format_description" : "iops",
7aacca6f 11091 "optional" : 1,
44660702 11092 "type" : "integer"
7aacca6f 11093 },
44660702
DM
11094 "iops_wr_max" : {
11095 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11096 "format_description" : "iops",
56122987 11097 "optional" : 1,
7aacca6f 11098 "type" : "integer"
56122987 11099 },
44660702
DM
11100 "mbps" : {
11101 "description" : "Maximum r/w speed speed in megabytes per second.",
11102 "format_description" : "mbps",
56122987 11103 "optional" : 1,
44660702 11104 "type" : "number"
56122987 11105 },
44660702
DM
11106 "mbps_max" : {
11107 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11108 "format_description" : "mbps",
7aacca6f 11109 "optional" : 1,
44660702 11110 "type" : "number"
7aacca6f 11111 },
44660702
DM
11112 "mbps_rd" : {
11113 "description" : "Maximum read speed speed in megabytes per second.",
11114 "format_description" : "mbps",
7aacca6f 11115 "optional" : 1,
44660702 11116 "type" : "number"
7aacca6f 11117 },
44660702
DM
11118 "mbps_rd_max" : {
11119 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11120 "format_description" : "mbps",
7aacca6f 11121 "optional" : 1,
44660702 11122 "type" : "number"
7aacca6f 11123 },
44660702
DM
11124 "mbps_wr" : {
11125 "description" : "Maximum write speed speed in megabytes per second.",
11126 "format_description" : "mbps",
7aacca6f 11127 "optional" : 1,
44660702 11128 "type" : "number"
7aacca6f
DM
11129 },
11130 "mbps_wr_max" : {
7aacca6f 11131 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
44660702 11132 "format_description" : "mbps",
7aacca6f 11133 "optional" : 1,
44660702 11134 "type" : "number"
7aacca6f 11135 },
44660702
DM
11136 "media" : {
11137 "default" : "disk",
11138 "description" : "The drive's media type.",
56122987 11139 "enum" : [
44660702
DM
11140 "cdrom",
11141 "disk"
56122987 11142 ],
56122987 11143 "optional" : 1,
44660702 11144 "type" : "string"
56122987 11145 },
44660702
DM
11146 "rerror" : {
11147 "description" : "Read error action.",
7aacca6f
DM
11148 "enum" : [
11149 "ignore",
44660702
DM
11150 "report",
11151 "stop"
7aacca6f 11152 ],
56122987 11153 "optional" : 1,
44660702 11154 "type" : "string"
56122987 11155 },
44660702
DM
11156 "secs" : {
11157 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 11158 "optional" : 1,
44660702 11159 "type" : "integer"
56122987 11160 },
44660702
DM
11161 "serial" : {
11162 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11163 "format" : "urlencoded",
11164 "format_description" : "serial",
11165 "maxLength" : 60,
11166 "optional" : 1,
11167 "type" : "string"
7aacca6f
DM
11168 },
11169 "size" : {
11170 "description" : "Disk size. This is purely informational and has no effect.",
44660702 11171 "format" : "disk-size",
f004f5b9 11172 "format_description" : "DiskSize",
56122987 11173 "optional" : 1,
44660702 11174 "type" : "string"
56122987 11175 },
44660702
DM
11176 "snapshot" : {
11177 "description" : "Whether the drive should be included when making snapshots.",
56122987 11178 "optional" : 1,
44660702 11179 "type" : "boolean"
56122987 11180 },
44660702
DM
11181 "trans" : {
11182 "description" : "Force disk geometry bios translation mode.",
56122987 11183 "enum" : [
44660702
DM
11184 "none",
11185 "lba",
11186 "auto"
7aacca6f 11187 ],
44660702
DM
11188 "optional" : 1,
11189 "type" : "string"
11190 },
11191 "volume" : {
11192 "alias" : "file"
56122987
DM
11193 },
11194 "werror" : {
56122987
DM
11195 "description" : "Write error action.",
11196 "enum" : [
11197 "enospc",
11198 "ignore",
11199 "report",
11200 "stop"
11201 ],
56122987 11202 "optional" : 1,
44660702
DM
11203 "type" : "string"
11204 }
11205 },
11206 "optional" : 1,
11207 "type" : "string"
11208 },
11209 "scsi[n]" : {
11210 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
11211 "format" : {
11212 "aio" : {
11213 "description" : "AIO type to use.",
11214 "enum" : [
11215 "native",
11216 "threads"
11217 ],
44660702
DM
11218 "optional" : 1,
11219 "type" : "string"
56122987 11220 },
7aacca6f 11221 "backup" : {
44660702 11222 "description" : "Whether the drive should be included when making backups.",
7aacca6f 11223 "optional" : 1,
44660702 11224 "type" : "boolean"
7aacca6f 11225 },
44660702
DM
11226 "bps" : {
11227 "description" : "Maximum r/w speed speed in bytes per second.",
11228 "format_description" : "bps",
7aacca6f 11229 "optional" : 1,
44660702 11230 "type" : "integer"
7aacca6f 11231 },
44660702
DM
11232 "bps_rd" : {
11233 "description" : "Maximum read speed speed in bytes per second.",
11234 "format_description" : "bps",
56122987 11235 "optional" : 1,
44660702 11236 "type" : "integer"
56122987 11237 },
44660702
DM
11238 "bps_wr" : {
11239 "description" : "Maximum write speed speed in bytes per second.",
11240 "format_description" : "bps",
7aacca6f 11241 "optional" : 1,
44660702 11242 "type" : "integer"
56122987 11243 },
44660702
DM
11244 "cache" : {
11245 "description" : "The drive's cache mode",
7aacca6f
DM
11246 "enum" : [
11247 "none",
44660702
DM
11248 "writethrough",
11249 "writeback",
11250 "unsafe",
11251 "directsync"
7aacca6f 11252 ],
56122987 11253 "optional" : 1,
44660702 11254 "type" : "string"
56122987 11255 },
7aacca6f
DM
11256 "cyls" : {
11257 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
11258 "optional" : 1,
44660702 11259 "type" : "integer"
7aacca6f 11260 },
44660702
DM
11261 "detect_zeroes" : {
11262 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11263 "optional" : 1,
44660702 11264 "type" : "boolean"
56122987 11265 },
44660702
DM
11266 "discard" : {
11267 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7aacca6f 11268 "enum" : [
44660702
DM
11269 "ignore",
11270 "on"
7aacca6f 11271 ],
7aacca6f 11272 "optional" : 1,
44660702 11273 "type" : "string"
56122987
DM
11274 },
11275 "file" : {
7aacca6f
DM
11276 "default_key" : 1,
11277 "description" : "The drive's backing volume.",
44660702
DM
11278 "format" : "pve-volume-id-or-qm-path",
11279 "format_description" : "volume",
7aacca6f 11280 "type" : "string"
56122987 11281 },
7aacca6f 11282 "format" : {
44660702 11283 "description" : "The drive's backing file's data format.",
56122987 11284 "enum" : [
7aacca6f
DM
11285 "raw",
11286 "cow",
11287 "qcow",
11288 "qed",
11289 "qcow2",
11290 "vmdk",
11291 "cloop"
56122987 11292 ],
f004f5b9 11293 "format_description" : "image format",
44660702
DM
11294 "optional" : 1,
11295 "type" : "string"
56122987 11296 },
44660702
DM
11297 "heads" : {
11298 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11299 "optional" : 1,
11300 "type" : "integer"
11301 },
11302 "iops" : {
11303 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 11304 "format_description" : "iops",
56122987 11305 "optional" : 1,
44660702 11306 "type" : "integer"
56122987 11307 },
44660702
DM
11308 "iops_max" : {
11309 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11310 "format_description" : "iops",
7aacca6f 11311 "optional" : 1,
44660702 11312 "type" : "integer"
56122987 11313 },
44660702
DM
11314 "iops_rd" : {
11315 "description" : "Maximum read I/O speed in operations per second.",
11316 "format_description" : "iops",
56122987 11317 "optional" : 1,
44660702 11318 "type" : "integer"
56122987 11319 },
44660702
DM
11320 "iops_rd_max" : {
11321 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11322 "format_description" : "iops",
11323 "optional" : 1,
11324 "type" : "integer"
56122987 11325 },
44660702
DM
11326 "iops_wr" : {
11327 "description" : "Maximum write I/O speed in operations per second.",
11328 "format_description" : "iops",
56122987 11329 "optional" : 1,
44660702 11330 "type" : "integer"
56122987 11331 },
44660702
DM
11332 "iops_wr_max" : {
11333 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11334 "format_description" : "iops",
56122987 11335 "optional" : 1,
56122987
DM
11336 "type" : "integer"
11337 },
44660702
DM
11338 "iothread" : {
11339 "description" : "Whether to use iothreads for this drive",
44660702
DM
11340 "optional" : 1,
11341 "type" : "boolean"
11342 },
11343 "mbps" : {
11344 "description" : "Maximum r/w speed speed in megabytes per second.",
11345 "format_description" : "mbps",
11346 "optional" : 1,
11347 "type" : "number"
11348 },
7aacca6f
DM
11349 "mbps_max" : {
11350 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 11351 "format_description" : "mbps",
56122987 11352 "optional" : 1,
44660702 11353 "type" : "number"
56122987 11354 },
44660702
DM
11355 "mbps_rd" : {
11356 "description" : "Maximum read speed speed in megabytes per second.",
11357 "format_description" : "mbps",
11358 "optional" : 1,
11359 "type" : "number"
56122987 11360 },
44660702
DM
11361 "mbps_rd_max" : {
11362 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11363 "format_description" : "mbps",
56122987 11364 "optional" : 1,
44660702 11365 "type" : "number"
56122987 11366 },
44660702
DM
11367 "mbps_wr" : {
11368 "description" : "Maximum write speed speed in megabytes per second.",
11369 "format_description" : "mbps",
56122987 11370 "optional" : 1,
44660702 11371 "type" : "number"
56122987 11372 },
44660702
DM
11373 "mbps_wr_max" : {
11374 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11375 "format_description" : "mbps",
7aacca6f 11376 "optional" : 1,
44660702 11377 "type" : "number"
56122987 11378 },
7aacca6f 11379 "media" : {
44660702 11380 "default" : "disk",
7aacca6f
DM
11381 "description" : "The drive's media type.",
11382 "enum" : [
11383 "cdrom",
11384 "disk"
11385 ],
56122987 11386 "optional" : 1,
44660702 11387 "type" : "string"
56122987 11388 },
44660702
DM
11389 "queues" : {
11390 "description" : "Number of queues.",
44660702
DM
11391 "minimum" : 2,
11392 "optional" : 1,
11393 "type" : "integer"
56122987 11394 },
7aacca6f 11395 "secs" : {
7aacca6f 11396 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11397 "optional" : 1,
11398 "type" : "integer"
11399 },
11400 "serial" : {
11401 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11402 "format" : "urlencoded",
11403 "format_description" : "serial",
11404 "maxLength" : 60,
11405 "optional" : 1,
11406 "type" : "string"
11407 },
11408 "size" : {
11409 "description" : "Disk size. This is purely informational and has no effect.",
11410 "format" : "disk-size",
f004f5b9 11411 "format_description" : "DiskSize",
44660702
DM
11412 "optional" : 1,
11413 "type" : "string"
11414 },
11415 "snapshot" : {
11416 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
11417 "optional" : 1,
11418 "type" : "boolean"
11419 },
11420 "trans" : {
11421 "description" : "Force disk geometry bios translation mode.",
11422 "enum" : [
11423 "none",
11424 "lba",
11425 "auto"
11426 ],
44660702
DM
11427 "optional" : 1,
11428 "type" : "string"
11429 },
11430 "volume" : {
11431 "alias" : "file"
11432 },
11433 "werror" : {
11434 "description" : "Write error action.",
11435 "enum" : [
11436 "enospc",
11437 "ignore",
11438 "report",
11439 "stop"
11440 ],
44660702
DM
11441 "optional" : 1,
11442 "type" : "string"
56122987
DM
11443 }
11444 },
7aacca6f 11445 "optional" : 1,
44660702 11446 "type" : "string"
56122987 11447 },
44660702
DM
11448 "scsihw" : {
11449 "default" : "lsi",
c2993fe5 11450 "description" : "SCSI controller model",
44660702
DM
11451 "enum" : [
11452 "lsi",
11453 "lsi53c810",
11454 "virtio-scsi-pci",
11455 "virtio-scsi-single",
11456 "megasas",
11457 "pvscsi"
11458 ],
7aacca6f 11459 "optional" : 1,
44660702 11460 "type" : "string"
7aacca6f 11461 },
44660702 11462 "serial[n]" : {
c2993fe5 11463 "description" : "Create a serial device inside the VM (n is 0 to 3)",
44660702
DM
11464 "optional" : 1,
11465 "pattern" : "(/dev/.+|socket)",
c2993fe5 11466 "type" : "string",
57b78691 11467 "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
44660702
DM
11468 },
11469 "shares" : {
11470 "default" : 1000,
11471 "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning",
11472 "maximum" : 50000,
11473 "minimum" : 0,
11474 "optional" : 1,
11475 "type" : "integer"
11476 },
11477 "smbios1" : {
11478 "description" : "Specify SMBIOS type 1 fields.",
11479 "format" : "pve-qm-smbios1",
11480 "maxLength" : 256,
7aacca6f
DM
11481 "optional" : 1,
11482 "type" : "string"
11483 },
11484 "smp" : {
44660702 11485 "default" : 1,
7aacca6f 11486 "description" : "The number of CPUs. Please use option -sockets instead.",
44660702 11487 "minimum" : 1,
56122987 11488 "optional" : 1,
44660702
DM
11489 "type" : "integer"
11490 },
11491 "sockets" : {
7aacca6f 11492 "default" : 1,
44660702
DM
11493 "description" : "The number of CPU sockets.",
11494 "minimum" : 1,
11495 "optional" : 1,
11496 "type" : "integer"
7aacca6f 11497 },
44660702
DM
11498 "startdate" : {
11499 "default" : "now",
11500 "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.",
11501 "optional" : 1,
11502 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
11503 "type" : "string",
11504 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
11505 },
11506 "startup" : {
11507 "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.",
11508 "format" : "pve-startup-order",
11509 "optional" : 1,
11510 "type" : "string",
11511 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
11512 },
11513 "storage" : {
11514 "description" : "Default storage.",
11515 "format" : "pve-storage-id",
7aacca6f 11516 "optional" : 1,
56122987
DM
11517 "type" : "string"
11518 },
44660702
DM
11519 "tablet" : {
11520 "default" : 1,
c2993fe5 11521 "description" : "Enable/disable the USB tablet device.",
56122987 11522 "optional" : 1,
c2993fe5
DM
11523 "type" : "boolean",
11524 "verbose_description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)."
44660702
DM
11525 },
11526 "tdf" : {
11527 "default" : 0,
11528 "description" : "Enable/disable time drift fix.",
11529 "optional" : 1,
11530 "type" : "boolean"
7aacca6f
DM
11531 },
11532 "template" : {
7aacca6f 11533 "default" : 0,
44660702 11534 "description" : "Enable/disable Template.",
7aacca6f
DM
11535 "optional" : 1,
11536 "type" : "boolean"
11537 },
44660702
DM
11538 "unique" : {
11539 "description" : "Assign a unique random ethernet address.",
7aacca6f 11540 "optional" : 1,
44660702
DM
11541 "requires" : "archive",
11542 "type" : "boolean"
56122987 11543 },
44660702 11544 "unused[n]" : {
c2993fe5 11545 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 11546 "format" : "pve-volume-id",
7aacca6f 11547 "optional" : 1,
44660702
DM
11548 "type" : "string"
11549 },
11550 "usb[n]" : {
c2993fe5 11551 "description" : "Configure an USB device (n is 0 to 4).",
56122987 11552 "format" : {
7aacca6f
DM
11553 "host" : {
11554 "default_key" : 1,
c2993fe5 11555 "description" : "The Host USB device or port or the value 'spice'. HOSTUSBDEVICE syntax is:\n\n 'bus-port(.port)*' (decimal numbers) or\n 'vendor_id:product_id' (hexadeciaml numbers) or\n 'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n",
7aacca6f 11556 "format" : "pve-qm-usb-device",
44660702
DM
11557 "format_description" : "HOSTUSBDEVICE|spice",
11558 "type" : "string"
7aacca6f 11559 },
56122987 11560 "usb3" : {
c2993fe5
DM
11561 "default" : 0,
11562 "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).",
56122987 11563 "optional" : 1,
56122987 11564 "type" : "boolean"
7aacca6f 11565 }
56122987 11566 },
56122987 11567 "optional" : 1,
44660702 11568 "type" : "string"
56122987 11569 },
44660702
DM
11570 "vcpus" : {
11571 "default" : 0,
11572 "description" : "Number of hotplugged vcpus.",
11573 "minimum" : 1,
56122987 11574 "optional" : 1,
44660702 11575 "type" : "integer"
7aacca6f 11576 },
44660702 11577 "vga" : {
c2993fe5 11578 "description" : "Select the VGA type.",
44660702
DM
11579 "enum" : [
11580 "std",
11581 "cirrus",
11582 "vmware",
11583 "qxl",
11584 "serial0",
11585 "serial1",
11586 "serial2",
11587 "serial3",
11588 "qxl2",
11589 "qxl3",
11590 "qxl4"
11591 ],
11592 "optional" : 1,
c2993fe5
DM
11593 "type" : "string",
11594 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
7aacca6f 11595 },
44660702
DM
11596 "virtio[n]" : {
11597 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
11598 "format" : {
11599 "aio" : {
11600 "description" : "AIO type to use.",
11601 "enum" : [
11602 "native",
11603 "threads"
11604 ],
44660702
DM
11605 "optional" : 1,
11606 "type" : "string"
11607 },
11608 "backup" : {
11609 "description" : "Whether the drive should be included when making backups.",
44660702
DM
11610 "optional" : 1,
11611 "type" : "boolean"
11612 },
11613 "bps" : {
11614 "description" : "Maximum r/w speed speed in bytes per second.",
11615 "format_description" : "bps",
11616 "optional" : 1,
11617 "type" : "integer"
11618 },
11619 "bps_rd" : {
11620 "description" : "Maximum read speed speed in bytes per second.",
11621 "format_description" : "bps",
11622 "optional" : 1,
11623 "type" : "integer"
11624 },
11625 "bps_wr" : {
11626 "description" : "Maximum write speed speed in bytes per second.",
11627 "format_description" : "bps",
11628 "optional" : 1,
11629 "type" : "integer"
11630 },
11631 "cache" : {
11632 "description" : "The drive's cache mode",
11633 "enum" : [
11634 "none",
11635 "writethrough",
11636 "writeback",
11637 "unsafe",
11638 "directsync"
11639 ],
44660702
DM
11640 "optional" : 1,
11641 "type" : "string"
11642 },
11643 "cyls" : {
11644 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
11645 "optional" : 1,
11646 "type" : "integer"
11647 },
11648 "detect_zeroes" : {
11649 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
11650 "optional" : 1,
11651 "type" : "boolean"
11652 },
11653 "discard" : {
11654 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11655 "enum" : [
11656 "ignore",
11657 "on"
11658 ],
44660702
DM
11659 "optional" : 1,
11660 "type" : "string"
11661 },
11662 "file" : {
11663 "default_key" : 1,
11664 "description" : "The drive's backing volume.",
11665 "format" : "pve-volume-id-or-qm-path",
11666 "format_description" : "volume",
11667 "type" : "string"
11668 },
11669 "format" : {
11670 "description" : "The drive's backing file's data format.",
11671 "enum" : [
11672 "raw",
11673 "cow",
11674 "qcow",
11675 "qed",
11676 "qcow2",
11677 "vmdk",
11678 "cloop"
11679 ],
f004f5b9 11680 "format_description" : "image format",
44660702
DM
11681 "optional" : 1,
11682 "type" : "string"
11683 },
11684 "heads" : {
11685 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11686 "optional" : 1,
11687 "type" : "integer"
11688 },
11689 "iops" : {
11690 "description" : "Maximum r/w I/O speed in operations per second.",
11691 "format_description" : "iops",
11692 "optional" : 1,
11693 "type" : "integer"
11694 },
11695 "iops_max" : {
11696 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11697 "format_description" : "iops",
11698 "optional" : 1,
11699 "type" : "integer"
11700 },
11701 "iops_rd" : {
11702 "description" : "Maximum read I/O speed in operations per second.",
11703 "format_description" : "iops",
11704 "optional" : 1,
11705 "type" : "integer"
11706 },
11707 "iops_rd_max" : {
11708 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11709 "format_description" : "iops",
11710 "optional" : 1,
11711 "type" : "integer"
11712 },
11713 "iops_wr" : {
11714 "description" : "Maximum write I/O speed in operations per second.",
11715 "format_description" : "iops",
11716 "optional" : 1,
11717 "type" : "integer"
11718 },
11719 "iops_wr_max" : {
11720 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11721 "format_description" : "iops",
11722 "optional" : 1,
11723 "type" : "integer"
11724 },
11725 "iothread" : {
11726 "description" : "Whether to use iothreads for this drive",
44660702
DM
11727 "optional" : 1,
11728 "type" : "boolean"
11729 },
11730 "mbps" : {
11731 "description" : "Maximum r/w speed speed in megabytes per second.",
11732 "format_description" : "mbps",
11733 "optional" : 1,
11734 "type" : "number"
11735 },
11736 "mbps_max" : {
11737 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11738 "format_description" : "mbps",
11739 "optional" : 1,
11740 "type" : "number"
11741 },
11742 "mbps_rd" : {
11743 "description" : "Maximum read speed speed in megabytes per second.",
11744 "format_description" : "mbps",
11745 "optional" : 1,
11746 "type" : "number"
11747 },
11748 "mbps_rd_max" : {
11749 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11750 "format_description" : "mbps",
11751 "optional" : 1,
11752 "type" : "number"
11753 },
11754 "mbps_wr" : {
11755 "description" : "Maximum write speed speed in megabytes per second.",
11756 "format_description" : "mbps",
11757 "optional" : 1,
11758 "type" : "number"
11759 },
11760 "mbps_wr_max" : {
11761 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11762 "format_description" : "mbps",
11763 "optional" : 1,
11764 "type" : "number"
11765 },
11766 "media" : {
11767 "default" : "disk",
11768 "description" : "The drive's media type.",
11769 "enum" : [
11770 "cdrom",
11771 "disk"
11772 ],
44660702
DM
11773 "optional" : 1,
11774 "type" : "string"
11775 },
11776 "rerror" : {
11777 "description" : "Read error action.",
11778 "enum" : [
11779 "ignore",
11780 "report",
11781 "stop"
11782 ],
44660702
DM
11783 "optional" : 1,
11784 "type" : "string"
11785 },
11786 "secs" : {
11787 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11788 "optional" : 1,
11789 "type" : "integer"
11790 },
11791 "serial" : {
11792 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11793 "format" : "urlencoded",
11794 "format_description" : "serial",
11795 "maxLength" : 60,
11796 "optional" : 1,
11797 "type" : "string"
11798 },
11799 "size" : {
11800 "description" : "Disk size. This is purely informational and has no effect.",
11801 "format" : "disk-size",
f004f5b9 11802 "format_description" : "DiskSize",
44660702
DM
11803 "optional" : 1,
11804 "type" : "string"
11805 },
11806 "snapshot" : {
11807 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
11808 "optional" : 1,
11809 "type" : "boolean"
11810 },
11811 "trans" : {
11812 "description" : "Force disk geometry bios translation mode.",
11813 "enum" : [
11814 "none",
11815 "lba",
11816 "auto"
11817 ],
44660702
DM
11818 "optional" : 1,
11819 "type" : "string"
11820 },
11821 "volume" : {
11822 "alias" : "file"
11823 },
11824 "werror" : {
11825 "description" : "Write error action.",
11826 "enum" : [
11827 "enospc",
11828 "ignore",
11829 "report",
11830 "stop"
11831 ],
44660702
DM
11832 "optional" : 1,
11833 "type" : "string"
11834 }
11835 },
11836 "optional" : 1,
11837 "type" : "string"
7aacca6f 11838 },
44660702
DM
11839 "vmid" : {
11840 "description" : "The (unique) ID of the VM.",
11841 "format" : "pve-vmid",
11842 "minimum" : 1,
11843 "type" : "integer"
11844 },
11845 "watchdog" : {
c2993fe5 11846 "description" : "Create a virtual hardware watchdog device.",
44660702 11847 "format" : "pve-qm-watchdog",
7aacca6f 11848 "optional" : 1,
c2993fe5
DM
11849 "type" : "string",
11850 "verbose_description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"
56122987 11851 }
44660702 11852 }
56122987 11853 },
56122987 11854 "permissions" : {
44660702
DM
11855 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore (option 'archive'), it is enough if the user has 'VM.Backup' permission and the VM already exists. If you create disks you need 'Datastore.AllocateSpace' on any used storage.",
11856 "user" : "all"
56122987 11857 },
44660702
DM
11858 "protected" : 1,
11859 "proxyto" : "node",
56122987 11860 "returns" : {
44660702 11861 "type" : "string"
7aacca6f 11862 }
56122987 11863 }
7aacca6f 11864 },
44660702 11865 "leaf" : 0,
7aacca6f 11866 "path" : "/nodes/{node}/qemu",
44660702 11867 "text" : "qemu"
56122987
DM
11868 },
11869 {
11870 "children" : [
11871 {
56122987
DM
11872 "children" : [
11873 {
56122987 11874 "info" : {
44660702
DM
11875 "GET" : {
11876 "description" : "Get container configuration.",
11877 "method" : "GET",
11878 "name" : "vm_config",
11879 "parameters" : {
11880 "additionalProperties" : 0,
11881 "properties" : {
11882 "node" : {
11883 "description" : "The cluster node name.",
11884 "format" : "pve-node",
11885 "type" : "string"
11886 },
11887 "vmid" : {
11888 "description" : "The (unique) ID of the VM.",
11889 "format" : "pve-vmid",
11890 "minimum" : 1,
11891 "type" : "integer"
11892 }
11893 }
11894 },
11895 "permissions" : {
11896 "check" : [
11897 "perm",
11898 "/vms/{vmid}",
11899 [
11900 "VM.Audit"
11901 ]
11902 ]
11903 },
11904 "proxyto" : "node",
11905 "returns" : {
11906 "properties" : {
11907 "digest" : {
11908 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
11909 "type" : "string"
11910 }
11911 },
11912 "type" : "object"
11913 }
11914 },
56122987 11915 "PUT" : {
44660702
DM
11916 "description" : "Set container options.",
11917 "method" : "PUT",
11918 "name" : "update_vm",
56122987 11919 "parameters" : {
44660702 11920 "additionalProperties" : 0,
56122987 11921 "properties" : {
44660702
DM
11922 "arch" : {
11923 "default" : "amd64",
11924 "description" : "OS architecture type.",
11925 "enum" : [
11926 "amd64",
11927 "i386"
11928 ],
7aacca6f 11929 "optional" : 1,
44660702
DM
11930 "type" : "string"
11931 },
11932 "cmode" : {
7aacca6f 11933 "default" : "tty",
44660702 11934 "description" : "Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).",
7aacca6f
DM
11935 "enum" : [
11936 "shell",
11937 "console",
11938 "tty"
11939 ],
44660702
DM
11940 "optional" : 1,
11941 "type" : "string"
7aacca6f 11942 },
44660702
DM
11943 "console" : {
11944 "default" : 1,
11945 "description" : "Attach a console device (/dev/console) to the container.",
7aacca6f 11946 "optional" : 1,
44660702 11947 "type" : "boolean"
7aacca6f 11948 },
44660702
DM
11949 "cpulimit" : {
11950 "default" : 0,
11951 "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.",
11952 "maximum" : 128,
7aacca6f 11953 "minimum" : 0,
7aacca6f 11954 "optional" : 1,
44660702 11955 "type" : "number"
7aacca6f 11956 },
44660702
DM
11957 "cpuunits" : {
11958 "default" : 1024,
11959 "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.",
11960 "maximum" : 500000,
11961 "minimum" : 0,
11962 "optional" : 1,
11963 "type" : "integer"
7aacca6f 11964 },
44660702
DM
11965 "delete" : {
11966 "description" : "A list of settings you want to delete.",
11967 "format" : "pve-configid-list",
7aacca6f 11968 "optional" : 1,
44660702 11969 "type" : "string"
7aacca6f 11970 },
44660702
DM
11971 "description" : {
11972 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 11973 "optional" : 1,
44660702 11974 "type" : "string"
7aacca6f 11975 },
44660702
DM
11976 "digest" : {
11977 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
11978 "maxLength" : 40,
7aacca6f 11979 "optional" : 1,
44660702 11980 "type" : "string"
7aacca6f 11981 },
44660702
DM
11982 "hostname" : {
11983 "description" : "Set a host name for the container.",
11984 "format" : "dns-name",
11985 "maxLength" : 255,
56122987 11986 "optional" : 1,
44660702
DM
11987 "type" : "string"
11988 },
11989 "lock" : {
11990 "description" : "Lock/unlock the VM.",
11991 "enum" : [
11992 "migrate",
11993 "backup",
11994 "snapshot",
11995 "rollback"
11996 ],
11997 "optional" : 1,
11998 "type" : "string"
11999 },
12000 "memory" : {
12001 "default" : 512,
12002 "description" : "Amount of RAM for the VM in MB.",
12003 "minimum" : 16,
12004 "optional" : 1,
12005 "type" : "integer"
7aacca6f
DM
12006 },
12007 "mp[n]" : {
c2993fe5 12008 "description" : "Use volume as container mount point.",
7aacca6f 12009 "format" : {
7aacca6f
DM
12010 "acl" : {
12011 "description" : "Explicitly enable or disable ACL support.",
7aacca6f 12012 "optional" : 1,
44660702 12013 "type" : "boolean"
7aacca6f
DM
12014 },
12015 "backup" : {
12016 "description" : "Whether to include the mountpoint in backups.",
12017 "optional" : 1,
44660702 12018 "type" : "boolean"
7aacca6f
DM
12019 },
12020 "mp" : {
12021 "description" : "Path to the mountpoint as seen from inside the container.",
7aacca6f 12022 "format" : "pve-lxc-mp-string",
44660702
DM
12023 "format_description" : "Path",
12024 "type" : "string"
12025 },
12026 "quota" : {
12027 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12028 "optional" : 1,
12029 "type" : "boolean"
12030 },
12031 "ro" : {
12032 "description" : "Read-only mountpoint (not supported with bind mounts)",
44660702
DM
12033 "optional" : 1,
12034 "type" : "boolean"
12035 },
12036 "size" : {
12037 "description" : "Volume size (read only value).",
12038 "format" : "disk-size",
12039 "format_description" : "DiskSize",
12040 "optional" : 1,
12041 "type" : "string"
12042 },
12043 "volume" : {
12044 "default_key" : 1,
12045 "description" : "Volume, device or directory to mount into the container.",
12046 "format" : "pve-lxc-mp-string",
12047 "format_description" : "volume",
12048 "type" : "string"
12049 }
12050 },
7aacca6f 12051 "optional" : 1,
44660702 12052 "type" : "string"
56122987 12053 },
44660702
DM
12054 "nameserver" : {
12055 "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
12056 "format" : "address-list",
56122987 12057 "optional" : 1,
44660702 12058 "type" : "string"
56122987
DM
12059 },
12060 "net[n]" : {
44660702 12061 "description" : "Specifies network interfaces for the container.",
56122987 12062 "format" : {
44660702
DM
12063 "bridge" : {
12064 "description" : "Bridge to attach the network device to.",
f004f5b9 12065 "format_description" : "bridge",
56122987 12066 "optional" : 1,
44660702
DM
12067 "pattern" : "[-_.\\w\\d]+",
12068 "type" : "string"
56122987 12069 },
44660702
DM
12070 "firewall" : {
12071 "description" : "Controls whether this interface's firewall rules should be used.",
56122987 12072 "optional" : 1,
44660702 12073 "type" : "boolean"
56122987 12074 },
44660702
DM
12075 "gw" : {
12076 "description" : "Default gateway for IPv4 traffic.",
12077 "format" : "ipv4",
12078 "format_description" : "GatewayIPv4",
56122987 12079 "optional" : 1,
44660702 12080 "type" : "string"
56122987
DM
12081 },
12082 "gw6" : {
7aacca6f 12083 "description" : "Default gateway for IPv6 traffic.",
44660702
DM
12084 "format" : "ipv6",
12085 "format_description" : "GatewayIPv6",
7aacca6f 12086 "optional" : 1,
56122987
DM
12087 "type" : "string"
12088 },
44660702 12089 "hwaddr" : {
f004f5b9
DM
12090 "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)",
12091 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
12092 "optional" : 1,
12093 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
12094 "type" : "string"
12095 },
12096 "ip" : {
12097 "description" : "IPv4 address in CIDR format.",
12098 "format" : "pve-ipv4-config",
12099 "format_description" : "IPv4Format/CIDR",
56122987 12100 "optional" : 1,
44660702 12101 "type" : "string"
56122987 12102 },
7aacca6f 12103 "ip6" : {
7aacca6f
DM
12104 "description" : "IPv6 address in CIDR format.",
12105 "format" : "pve-ipv6-config",
44660702 12106 "format_description" : "IPv6Format/CIDR",
7aacca6f 12107 "optional" : 1,
44660702 12108 "type" : "string"
56122987 12109 },
44660702
DM
12110 "mtu" : {
12111 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702 12112 "minimum" : 64,
56122987 12113 "optional" : 1,
44660702 12114 "type" : "integer"
56122987
DM
12115 },
12116 "name" : {
44660702 12117 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 12118 "format_description" : "string",
56122987 12119 "pattern" : "[-_.\\w\\d]+",
44660702 12120 "type" : "string"
56122987 12121 },
44660702
DM
12122 "rate" : {
12123 "description" : "Apply rate limiting to the interface",
12124 "format_description" : "mbps",
56122987 12125 "optional" : 1,
44660702 12126 "type" : "number"
7aacca6f 12127 },
44660702
DM
12128 "tag" : {
12129 "description" : "VLAN tag for this interface.",
44660702 12130 "maximum" : "4094",
c2993fe5 12131 "minimum" : "1",
56122987 12132 "optional" : 1,
7aacca6f 12133 "type" : "integer"
56122987 12134 },
44660702
DM
12135 "trunks" : {
12136 "description" : "VLAN ids to pass through the interface",
12137 "format_description" : "vlanid[;vlanid...]",
12138 "optional" : 1,
12139 "pattern" : "(?^:\\d+(?:;\\d+)*)",
12140 "type" : "string"
12141 },
12142 "type" : {
12143 "description" : "Network interface type.",
12144 "enum" : [
12145 "veth"
12146 ],
56122987 12147 "optional" : 1,
44660702 12148 "type" : "string"
56122987
DM
12149 }
12150 },
7aacca6f 12151 "optional" : 1,
56122987
DM
12152 "type" : "string"
12153 },
44660702
DM
12154 "node" : {
12155 "description" : "The cluster node name.",
12156 "format" : "pve-node",
12157 "type" : "string"
56122987 12158 },
44660702
DM
12159 "onboot" : {
12160 "default" : 0,
12161 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 12162 "optional" : 1,
44660702 12163 "type" : "boolean"
56122987 12164 },
44660702
DM
12165 "ostype" : {
12166 "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.",
12167 "enum" : [
12168 "debian",
12169 "ubuntu",
12170 "centos",
12171 "fedora",
12172 "opensuse",
12173 "archlinux",
12174 "alpine",
57b78691 12175 "gentoo",
44660702
DM
12176 "unmanaged"
12177 ],
56122987 12178 "optional" : 1,
44660702 12179 "type" : "string"
56122987 12180 },
44660702
DM
12181 "protection" : {
12182 "default" : 0,
12183 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
56122987 12184 "optional" : 1,
44660702 12185 "type" : "boolean"
56122987 12186 },
7aacca6f
DM
12187 "rootfs" : {
12188 "description" : "Use volume as container root.",
56122987
DM
12189 "format" : {
12190 "acl" : {
44660702 12191 "description" : "Explicitly enable or disable ACL support.",
7aacca6f
DM
12192 "optional" : 1,
12193 "type" : "boolean"
56122987 12194 },
44660702
DM
12195 "quota" : {
12196 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12197 "optional" : 1,
12198 "type" : "boolean"
12199 },
12200 "ro" : {
12201 "description" : "Read-only mountpoint (not supported with bind mounts)",
56122987 12202 "optional" : 1,
44660702
DM
12203 "type" : "boolean"
12204 },
12205 "size" : {
7aacca6f 12206 "description" : "Volume size (read only value).",
44660702 12207 "format" : "disk-size",
56122987 12208 "format_description" : "DiskSize",
56122987 12209 "optional" : 1,
44660702 12210 "type" : "string"
7aacca6f
DM
12211 },
12212 "volume" : {
7aacca6f
DM
12213 "default_key" : 1,
12214 "description" : "Volume, device or directory to mount into the container.",
44660702
DM
12215 "format" : "pve-lxc-mp-string",
12216 "format_description" : "volume",
7aacca6f 12217 "type" : "string"
56122987 12218 }
44660702
DM
12219 },
12220 "optional" : 1,
12221 "type" : "string"
12222 },
12223 "searchdomain" : {
12224 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
12225 "format" : "dns-name-list",
12226 "optional" : 1,
12227 "type" : "string"
12228 },
12229 "startup" : {
12230 "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.",
12231 "format" : "pve-startup-order",
12232 "optional" : 1,
12233 "type" : "string",
12234 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
12235 },
12236 "swap" : {
12237 "default" : 512,
12238 "description" : "Amount of SWAP for the VM in MB.",
12239 "minimum" : 0,
12240 "optional" : 1,
12241 "type" : "integer"
56122987 12242 },
56122987 12243 "template" : {
44660702 12244 "default" : 0,
7aacca6f 12245 "description" : "Enable/disable Template.",
56122987 12246 "optional" : 1,
44660702 12247 "type" : "boolean"
56122987 12248 },
44660702
DM
12249 "tty" : {
12250 "default" : 2,
12251 "description" : "Specify the number of tty available to the container",
12252 "maximum" : 6,
12253 "minimum" : 0,
12254 "optional" : 1,
12255 "type" : "integer"
56122987 12256 },
44660702
DM
12257 "unprivileged" : {
12258 "default" : 0,
12259 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
56122987 12260 "optional" : 1,
44660702 12261 "type" : "boolean"
56122987 12262 },
44660702 12263 "unused[n]" : {
c2993fe5 12264 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 12265 "format" : "pve-volume-id",
56122987 12266 "optional" : 1,
44660702
DM
12267 "type" : "string"
12268 },
12269 "vmid" : {
12270 "description" : "The (unique) ID of the VM.",
12271 "format" : "pve-vmid",
12272 "minimum" : 1,
12273 "type" : "integer"
56122987 12274 }
44660702 12275 }
56122987 12276 },
56122987
DM
12277 "permissions" : {
12278 "check" : [
12279 "perm",
12280 "/vms/{vmid}",
12281 [
12282 "VM.Config.Disk",
12283 "VM.Config.CPU",
12284 "VM.Config.Memory",
12285 "VM.Config.Network",
12286 "VM.Config.Options"
12287 ],
12288 "any",
12289 1
12290 ]
12291 },
44660702
DM
12292 "protected" : 1,
12293 "proxyto" : "node",
56122987
DM
12294 "returns" : {
12295 "type" : "null"
7aacca6f 12296 }
56122987 12297 }
7aacca6f 12298 },
44660702 12299 "leaf" : 1,
7aacca6f 12300 "path" : "/nodes/{node}/lxc/{vmid}/config",
44660702 12301 "text" : "config"
56122987
DM
12302 },
12303 {
56122987
DM
12304 "children" : [
12305 {
12306 "info" : {
12307 "GET" : {
44660702 12308 "description" : "Get virtual machine status.",
7aacca6f 12309 "method" : "GET",
44660702 12310 "name" : "vm_status",
56122987 12311 "parameters" : {
44660702 12312 "additionalProperties" : 0,
56122987 12313 "properties" : {
56122987 12314 "node" : {
44660702 12315 "description" : "The cluster node name.",
56122987 12316 "format" : "pve-node",
44660702 12317 "type" : "string"
7aacca6f
DM
12318 },
12319 "vmid" : {
12320 "description" : "The (unique) ID of the VM.",
44660702 12321 "format" : "pve-vmid",
7aacca6f 12322 "minimum" : 1,
44660702 12323 "type" : "integer"
56122987 12324 }
44660702 12325 }
7aacca6f
DM
12326 },
12327 "permissions" : {
12328 "check" : [
12329 "perm",
12330 "/vms/{vmid}",
12331 [
12332 "VM.Audit"
12333 ]
12334 ]
12335 },
44660702 12336 "protected" : 1,
7aacca6f 12337 "proxyto" : "node",
44660702
DM
12338 "returns" : {
12339 "type" : "object"
12340 }
56122987
DM
12341 }
12342 },
44660702
DM
12343 "leaf" : 1,
12344 "path" : "/nodes/{node}/lxc/{vmid}/status/current",
56122987
DM
12345 "text" : "current"
12346 },
12347 {
56122987
DM
12348 "info" : {
12349 "POST" : {
7aacca6f 12350 "description" : "Start the container.",
44660702 12351 "method" : "POST",
7aacca6f 12352 "name" : "vm_start",
56122987
DM
12353 "parameters" : {
12354 "additionalProperties" : 0,
12355 "properties" : {
56122987 12356 "node" : {
7aacca6f 12357 "description" : "The cluster node name.",
44660702
DM
12358 "format" : "pve-node",
12359 "type" : "string"
56122987 12360 },
7aacca6f 12361 "skiplock" : {
44660702 12362 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 12363 "optional" : 1,
44660702 12364 "type" : "boolean"
7aacca6f 12365 },
56122987 12366 "vmid" : {
7aacca6f 12367 "description" : "The (unique) ID of the VM.",
44660702 12368 "format" : "pve-vmid",
56122987 12369 "minimum" : 1,
44660702 12370 "type" : "integer"
56122987
DM
12371 }
12372 }
12373 },
12374 "permissions" : {
12375 "check" : [
12376 "perm",
12377 "/vms/{vmid}",
12378 [
12379 "VM.PowerMgmt"
12380 ]
12381 ]
12382 },
44660702 12383 "protected" : 1,
7aacca6f 12384 "proxyto" : "node",
44660702
DM
12385 "returns" : {
12386 "type" : "string"
12387 }
12388 }
12389 },
12390 "leaf" : 1,
12391 "path" : "/nodes/{node}/lxc/{vmid}/status/start",
12392 "text" : "start"
12393 },
12394 {
12395 "info" : {
12396 "POST" : {
12397 "description" : "Stop the container. This will abruptly stop all processes running in the container.",
7aacca6f
DM
12398 "method" : "POST",
12399 "name" : "vm_stop",
12400 "parameters" : {
44660702 12401 "additionalProperties" : 0,
7aacca6f 12402 "properties" : {
44660702
DM
12403 "node" : {
12404 "description" : "The cluster node name.",
12405 "format" : "pve-node",
12406 "type" : "string"
12407 },
7aacca6f
DM
12408 "skiplock" : {
12409 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
12410 "optional" : 1,
12411 "type" : "boolean"
7aacca6f
DM
12412 },
12413 "vmid" : {
44660702 12414 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12415 "format" : "pve-vmid",
12416 "minimum" : 1,
7aacca6f 12417 "type" : "integer"
7aacca6f 12418 }
44660702
DM
12419 }
12420 },
12421 "permissions" : {
12422 "check" : [
12423 "perm",
12424 "/vms/{vmid}",
12425 [
12426 "VM.PowerMgmt"
12427 ]
12428 ]
7aacca6f 12429 },
44660702
DM
12430 "protected" : 1,
12431 "proxyto" : "node",
12432 "returns" : {
12433 "type" : "string"
12434 }
56122987 12435 }
7aacca6f 12436 },
7aacca6f 12437 "leaf" : 1,
44660702
DM
12438 "path" : "/nodes/{node}/lxc/{vmid}/status/stop",
12439 "text" : "stop"
56122987
DM
12440 },
12441 {
56122987
DM
12442 "info" : {
12443 "POST" : {
44660702
DM
12444 "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.",
12445 "method" : "POST",
7aacca6f 12446 "name" : "vm_shutdown",
56122987 12447 "parameters" : {
44660702 12448 "additionalProperties" : 0,
56122987 12449 "properties" : {
7aacca6f 12450 "forceStop" : {
44660702 12451 "default" : 0,
7aacca6f
DM
12452 "description" : "Make sure the Container stops.",
12453 "optional" : 1,
44660702
DM
12454 "type" : "boolean"
12455 },
12456 "node" : {
12457 "description" : "The cluster node name.",
12458 "format" : "pve-node",
12459 "type" : "string"
7aacca6f
DM
12460 },
12461 "timeout" : {
7aacca6f 12462 "default" : 60,
44660702
DM
12463 "description" : "Wait maximal timeout seconds.",
12464 "minimum" : 0,
56122987 12465 "optional" : 1,
44660702 12466 "type" : "integer"
56122987
DM
12467 },
12468 "vmid" : {
7aacca6f 12469 "description" : "The (unique) ID of the VM.",
44660702
DM
12470 "format" : "pve-vmid",
12471 "minimum" : 1,
7aacca6f 12472 "type" : "integer"
56122987 12473 }
44660702 12474 }
56122987
DM
12475 },
12476 "permissions" : {
12477 "check" : [
12478 "perm",
12479 "/vms/{vmid}",
12480 [
12481 "VM.PowerMgmt"
12482 ]
12483 ]
12484 },
44660702
DM
12485 "protected" : 1,
12486 "proxyto" : "node",
7aacca6f
DM
12487 "returns" : {
12488 "type" : "string"
12489 }
56122987
DM
12490 }
12491 },
44660702
DM
12492 "leaf" : 1,
12493 "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown",
7aacca6f 12494 "text" : "shutdown"
56122987
DM
12495 },
12496 {
56122987
DM
12497 "info" : {
12498 "POST" : {
7aacca6f 12499 "description" : "Suspend the container.",
7aacca6f 12500 "method" : "POST",
7aacca6f 12501 "name" : "vm_suspend",
56122987
DM
12502 "parameters" : {
12503 "additionalProperties" : 0,
12504 "properties" : {
44660702
DM
12505 "node" : {
12506 "description" : "The cluster node name.",
12507 "format" : "pve-node",
12508 "type" : "string"
12509 },
7aacca6f 12510 "vmid" : {
7aacca6f
DM
12511 "description" : "The (unique) ID of the VM.",
12512 "format" : "pve-vmid",
44660702
DM
12513 "minimum" : 1,
12514 "type" : "integer"
56122987
DM
12515 }
12516 }
7aacca6f 12517 },
56122987
DM
12518 "permissions" : {
12519 "check" : [
12520 "perm",
12521 "/vms/{vmid}",
12522 [
12523 "VM.PowerMgmt"
12524 ]
12525 ]
12526 },
7aacca6f 12527 "protected" : 1,
44660702
DM
12528 "proxyto" : "node",
12529 "returns" : {
12530 "type" : "string"
12531 }
12532 }
12533 },
12534 "leaf" : 1,
12535 "path" : "/nodes/{node}/lxc/{vmid}/status/suspend",
12536 "text" : "suspend"
12537 },
12538 {
12539 "info" : {
12540 "POST" : {
12541 "description" : "Resume the container.",
12542 "method" : "POST",
12543 "name" : "vm_resume",
56122987 12544 "parameters" : {
44660702 12545 "additionalProperties" : 0,
56122987
DM
12546 "properties" : {
12547 "node" : {
7aacca6f 12548 "description" : "The cluster node name.",
44660702
DM
12549 "format" : "pve-node",
12550 "type" : "string"
56122987
DM
12551 },
12552 "vmid" : {
7aacca6f 12553 "description" : "The (unique) ID of the VM.",
56122987 12554 "format" : "pve-vmid",
44660702
DM
12555 "minimum" : 1,
12556 "type" : "integer"
56122987 12557 }
44660702
DM
12558 }
12559 },
12560 "permissions" : {
12561 "check" : [
12562 "perm",
12563 "/vms/{vmid}",
12564 [
12565 "VM.PowerMgmt"
12566 ]
12567 ]
56122987 12568 },
44660702
DM
12569 "protected" : 1,
12570 "proxyto" : "node",
12571 "returns" : {
12572 "type" : "string"
12573 }
7aacca6f
DM
12574 }
12575 },
44660702
DM
12576 "leaf" : 1,
12577 "path" : "/nodes/{node}/lxc/{vmid}/status/resume",
7aacca6f
DM
12578 "text" : "resume"
12579 }
12580 ],
12581 "info" : {
12582 "GET" : {
7aacca6f 12583 "description" : "Directory index",
44660702 12584 "method" : "GET",
7aacca6f 12585 "name" : "vmcmdidx",
7aacca6f
DM
12586 "parameters" : {
12587 "additionalProperties" : 0,
12588 "properties" : {
12589 "node" : {
12590 "description" : "The cluster node name.",
44660702
DM
12591 "format" : "pve-node",
12592 "type" : "string"
56122987 12593 },
7aacca6f 12594 "vmid" : {
44660702 12595 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12596 "format" : "pve-vmid",
12597 "minimum" : 1,
44660702 12598 "type" : "integer"
7aacca6f 12599 }
56122987
DM
12600 }
12601 },
44660702
DM
12602 "permissions" : {
12603 "user" : "all"
12604 },
12605 "proxyto" : "node",
7aacca6f 12606 "returns" : {
7aacca6f
DM
12607 "items" : {
12608 "properties" : {
12609 "subdir" : {
12610 "type" : "string"
12611 }
12612 },
12613 "type" : "object"
12614 },
12615 "links" : [
12616 {
44660702
DM
12617 "href" : "{subdir}",
12618 "rel" : "child"
7aacca6f 12619 }
44660702
DM
12620 ],
12621 "type" : "array"
7aacca6f
DM
12622 }
12623 }
44660702
DM
12624 },
12625 "leaf" : 0,
12626 "path" : "/nodes/{node}/lxc/{vmid}/status",
12627 "text" : "status"
7aacca6f
DM
12628 },
12629 {
7aacca6f 12630 "children" : [
56122987 12631 {
7aacca6f
DM
12632 "children" : [
12633 {
12634 "info" : {
12635 "POST" : {
7aacca6f 12636 "description" : "Rollback LXC state to specified snapshot.",
7aacca6f 12637 "method" : "POST",
44660702 12638 "name" : "rollback",
7aacca6f 12639 "parameters" : {
44660702 12640 "additionalProperties" : 0,
7aacca6f 12641 "properties" : {
44660702
DM
12642 "node" : {
12643 "description" : "The cluster node name.",
12644 "format" : "pve-node",
12645 "type" : "string"
12646 },
7aacca6f 12647 "snapname" : {
44660702 12648 "description" : "The name of the snapshot.",
7aacca6f
DM
12649 "format" : "pve-configid",
12650 "maxLength" : 40,
7aacca6f
DM
12651 "type" : "string"
12652 },
7aacca6f 12653 "vmid" : {
44660702 12654 "description" : "The (unique) ID of the VM.",
7aacca6f 12655 "format" : "pve-vmid",
44660702
DM
12656 "minimum" : 1,
12657 "type" : "integer"
7aacca6f 12658 }
44660702
DM
12659 }
12660 },
12661 "permissions" : {
12662 "check" : [
12663 "perm",
12664 "/vms/{vmid}",
12665 [
12666 "VM.Snapshot"
12667 ]
12668 ]
7aacca6f 12669 },
44660702
DM
12670 "protected" : 1,
12671 "proxyto" : "node",
12672 "returns" : {
12673 "description" : "the task ID.",
12674 "type" : "string"
12675 }
7aacca6f
DM
12676 }
12677 },
7aacca6f 12678 "leaf" : 1,
44660702
DM
12679 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback",
12680 "text" : "rollback"
7aacca6f
DM
12681 },
12682 {
7aacca6f
DM
12683 "info" : {
12684 "GET" : {
7aacca6f 12685 "description" : "Get snapshot configuration",
44660702
DM
12686 "method" : "GET",
12687 "name" : "get_snapshot_config",
7aacca6f
DM
12688 "parameters" : {
12689 "additionalProperties" : 0,
12690 "properties" : {
7aacca6f 12691 "node" : {
7aacca6f 12692 "description" : "The cluster node name.",
44660702 12693 "format" : "pve-node",
7aacca6f
DM
12694 "type" : "string"
12695 },
12696 "snapname" : {
44660702 12697 "description" : "The name of the snapshot.",
7aacca6f
DM
12698 "format" : "pve-configid",
12699 "maxLength" : 40,
44660702
DM
12700 "type" : "string"
12701 },
12702 "vmid" : {
12703 "description" : "The (unique) ID of the VM.",
12704 "format" : "pve-vmid",
12705 "minimum" : 1,
12706 "type" : "integer"
7aacca6f
DM
12707 }
12708 }
12709 },
12710 "permissions" : {
12711 "check" : [
12712 "perm",
12713 "/vms/{vmid}",
12714 [
12715 "VM.Snapshot"
12716 ]
12717 ]
12718 },
44660702
DM
12719 "proxyto" : "node",
12720 "returns" : {
12721 "type" : "object"
12722 }
7aacca6f
DM
12723 },
12724 "PUT" : {
44660702
DM
12725 "description" : "Update snapshot metadata.",
12726 "method" : "PUT",
7aacca6f
DM
12727 "name" : "update_snapshot_config",
12728 "parameters" : {
12729 "additionalProperties" : 0,
12730 "properties" : {
44660702
DM
12731 "description" : {
12732 "description" : "A textual description or comment.",
12733 "optional" : 1,
12734 "type" : "string"
12735 },
7aacca6f 12736 "node" : {
7aacca6f 12737 "description" : "The cluster node name.",
44660702
DM
12738 "format" : "pve-node",
12739 "type" : "string"
7aacca6f
DM
12740 },
12741 "snapname" : {
12742 "description" : "The name of the snapshot.",
7aacca6f 12743 "format" : "pve-configid",
44660702
DM
12744 "maxLength" : 40,
12745 "type" : "string"
7aacca6f
DM
12746 },
12747 "vmid" : {
44660702 12748 "description" : "The (unique) ID of the VM.",
7aacca6f 12749 "format" : "pve-vmid",
44660702
DM
12750 "minimum" : 1,
12751 "type" : "integer"
7aacca6f
DM
12752 }
12753 }
12754 },
7aacca6f
DM
12755 "permissions" : {
12756 "check" : [
12757 "perm",
12758 "/vms/{vmid}",
12759 [
12760 "VM.Snapshot"
12761 ]
12762 ]
12763 },
44660702
DM
12764 "protected" : 1,
12765 "proxyto" : "node",
7aacca6f
DM
12766 "returns" : {
12767 "type" : "null"
12768 }
12769 }
12770 },
44660702 12771 "leaf" : 1,
7aacca6f 12772 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config",
44660702 12773 "text" : "config"
7aacca6f
DM
12774 }
12775 ],
56122987 12776 "info" : {
44660702
DM
12777 "DELETE" : {
12778 "description" : "Delete a LXC snapshot.",
12779 "method" : "DELETE",
12780 "name" : "delsnapshot",
56122987 12781 "parameters" : {
44660702 12782 "additionalProperties" : 0,
56122987 12783 "properties" : {
44660702
DM
12784 "force" : {
12785 "description" : "For removal from config file, even if removing disk snapshots fails.",
12786 "optional" : 1,
12787 "type" : "boolean"
12788 },
12789 "node" : {
12790 "description" : "The cluster node name.",
12791 "format" : "pve-node",
12792 "type" : "string"
7aacca6f
DM
12793 },
12794 "snapname" : {
7aacca6f
DM
12795 "description" : "The name of the snapshot.",
12796 "format" : "pve-configid",
44660702 12797 "maxLength" : 40,
7aacca6f 12798 "type" : "string"
44660702
DM
12799 },
12800 "vmid" : {
12801 "description" : "The (unique) ID of the VM.",
12802 "format" : "pve-vmid",
12803 "minimum" : 1,
12804 "type" : "integer"
56122987 12805 }
44660702 12806 }
7aacca6f 12807 },
56122987
DM
12808 "permissions" : {
12809 "check" : [
12810 "perm",
12811 "/vms/{vmid}",
12812 [
7aacca6f 12813 "VM.Snapshot"
56122987
DM
12814 ]
12815 ]
12816 },
44660702 12817 "protected" : 1,
7aacca6f 12818 "proxyto" : "node",
56122987 12819 "returns" : {
7aacca6f 12820 "description" : "the task ID.",
56122987 12821 "type" : "string"
44660702
DM
12822 }
12823 },
12824 "GET" : {
12825 "description" : "",
12826 "method" : "GET",
12827 "name" : "snapshot_cmd_idx",
7aacca6f
DM
12828 "parameters" : {
12829 "additionalProperties" : 0,
12830 "properties" : {
7aacca6f 12831 "node" : {
44660702 12832 "description" : "The cluster node name.",
7aacca6f 12833 "format" : "pve-node",
44660702 12834 "type" : "string"
7aacca6f
DM
12835 },
12836 "snapname" : {
44660702 12837 "description" : "The name of the snapshot.",
7aacca6f 12838 "format" : "pve-configid",
44660702
DM
12839 "maxLength" : 40,
12840 "type" : "string"
12841 },
12842 "vmid" : {
12843 "description" : "The (unique) ID of the VM.",
12844 "format" : "pve-vmid",
12845 "minimum" : 1,
12846 "type" : "integer"
7aacca6f
DM
12847 }
12848 }
12849 },
44660702
DM
12850 "permissions" : {
12851 "user" : "all"
12852 },
12853 "returns" : {
12854 "items" : {
12855 "properties" : {},
12856 "type" : "object"
12857 },
12858 "links" : [
12859 {
12860 "href" : "{cmd}",
12861 "rel" : "child"
12862 }
12863 ],
12864 "type" : "array"
12865 }
12866 }
12867 },
12868 "leaf" : 0,
12869 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}",
12870 "text" : "{snapname}"
12871 }
12872 ],
12873 "info" : {
12874 "GET" : {
12875 "description" : "List all snapshots.",
12876 "method" : "GET",
12877 "name" : "list",
12878 "parameters" : {
12879 "additionalProperties" : 0,
12880 "properties" : {
12881 "node" : {
12882 "description" : "The cluster node name.",
12883 "format" : "pve-node",
12884 "type" : "string"
12885 },
12886 "vmid" : {
12887 "description" : "The (unique) ID of the VM.",
12888 "format" : "pve-vmid",
12889 "minimum" : 1,
12890 "type" : "integer"
12891 }
56122987
DM
12892 }
12893 },
56122987 12894 "permissions" : {
7aacca6f
DM
12895 "check" : [
12896 "perm",
12897 "/vms/{vmid}",
12898 [
12899 "VM.Audit"
12900 ]
12901 ]
12902 },
44660702 12903 "protected" : 1,
56122987 12904 "proxyto" : "node",
7aacca6f 12905 "returns" : {
44660702
DM
12906 "items" : {
12907 "properties" : {},
12908 "type" : "object"
12909 },
7aacca6f
DM
12910 "links" : [
12911 {
12912 "href" : "{name}",
12913 "rel" : "child"
12914 }
12915 ],
7aacca6f 12916 "type" : "array"
44660702 12917 }
7aacca6f
DM
12918 },
12919 "POST" : {
44660702
DM
12920 "description" : "Snapshot a container.",
12921 "method" : "POST",
12922 "name" : "snapshot",
56122987
DM
12923 "parameters" : {
12924 "additionalProperties" : 0,
12925 "properties" : {
7aacca6f 12926 "description" : {
44660702 12927 "description" : "A textual description or comment.",
7aacca6f 12928 "optional" : 1,
44660702
DM
12929 "type" : "string"
12930 },
12931 "node" : {
12932 "description" : "The cluster node name.",
12933 "format" : "pve-node",
12934 "type" : "string"
56122987
DM
12935 },
12936 "snapname" : {
56122987 12937 "description" : "The name of the snapshot.",
44660702 12938 "format" : "pve-configid",
7aacca6f 12939 "maxLength" : 40,
44660702 12940 "type" : "string"
56122987 12941 },
44660702
DM
12942 "vmid" : {
12943 "description" : "The (unique) ID of the VM.",
12944 "format" : "pve-vmid",
12945 "minimum" : 1,
12946 "type" : "integer"
56122987 12947 }
7aacca6f 12948 }
56122987 12949 },
56122987
DM
12950 "permissions" : {
12951 "check" : [
12952 "perm",
12953 "/vms/{vmid}",
12954 [
7aacca6f 12955 "VM.Snapshot"
56122987
DM
12956 ]
12957 ]
7aacca6f 12958 },
44660702 12959 "protected" : 1,
7aacca6f
DM
12960 "proxyto" : "node",
12961 "returns" : {
12962 "description" : "the task ID.",
12963 "type" : "string"
56122987
DM
12964 }
12965 }
44660702
DM
12966 },
12967 "leaf" : 0,
12968 "path" : "/nodes/{node}/lxc/{vmid}/snapshot",
12969 "text" : "snapshot"
7aacca6f
DM
12970 },
12971 {
56122987
DM
12972 "children" : [
12973 {
56122987
DM
12974 "children" : [
12975 {
56122987 12976 "info" : {
44660702
DM
12977 "DELETE" : {
12978 "description" : "Delete rule.",
12979 "method" : "DELETE",
12980 "name" : "delete_rule",
56122987 12981 "parameters" : {
44660702 12982 "additionalProperties" : 0,
56122987 12983 "properties" : {
44660702
DM
12984 "digest" : {
12985 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
12986 "maxLength" : 40,
7aacca6f 12987 "optional" : 1,
44660702 12988 "type" : "string"
7aacca6f
DM
12989 },
12990 "node" : {
44660702 12991 "description" : "The cluster node name.",
7aacca6f 12992 "format" : "pve-node",
44660702
DM
12993 "type" : "string"
12994 },
12995 "pos" : {
12996 "description" : "Update rule at position <pos>.",
12997 "minimum" : 0,
12998 "optional" : 1,
12999 "type" : "integer"
13000 },
13001 "vmid" : {
13002 "description" : "The (unique) ID of the VM.",
13003 "format" : "pve-vmid",
13004 "minimum" : 1,
13005 "type" : "integer"
56122987 13006 }
44660702 13007 }
56122987 13008 },
56122987
DM
13009 "permissions" : {
13010 "check" : [
13011 "perm",
13012 "/vms/{vmid}",
13013 [
44660702 13014 "VM.Config.Network"
56122987
DM
13015 ]
13016 ]
13017 },
44660702 13018 "protected" : 1,
7aacca6f 13019 "proxyto" : null,
44660702
DM
13020 "returns" : {
13021 "type" : "null"
13022 }
7aacca6f 13023 },
44660702
DM
13024 "GET" : {
13025 "description" : "Get single rule data.",
13026 "method" : "GET",
13027 "name" : "get_rule",
56122987 13028 "parameters" : {
44660702 13029 "additionalProperties" : 0,
56122987 13030 "properties" : {
7aacca6f 13031 "node" : {
7aacca6f 13032 "description" : "The cluster node name.",
44660702 13033 "format" : "pve-node",
56122987
DM
13034 "type" : "string"
13035 },
7aacca6f 13036 "pos" : {
7aacca6f 13037 "description" : "Update rule at position <pos>.",
44660702 13038 "minimum" : 0,
7aacca6f 13039 "optional" : 1,
44660702 13040 "type" : "integer"
56122987 13041 },
7aacca6f 13042 "vmid" : {
44660702 13043 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13044 "format" : "pve-vmid",
13045 "minimum" : 1,
7aacca6f 13046 "type" : "integer"
56122987 13047 }
44660702 13048 }
56122987 13049 },
7aacca6f
DM
13050 "permissions" : {
13051 "check" : [
13052 "perm",
13053 "/vms/{vmid}",
13054 [
44660702 13055 "VM.Audit"
7aacca6f
DM
13056 ]
13057 ]
13058 },
7aacca6f
DM
13059 "proxyto" : null,
13060 "returns" : {
44660702
DM
13061 "properties" : {
13062 "pos" : {
13063 "type" : "integer"
13064 }
13065 },
13066 "type" : "object"
7aacca6f 13067 }
56122987 13068 },
44660702
DM
13069 "PUT" : {
13070 "description" : "Modify rule data.",
13071 "method" : "PUT",
13072 "name" : "update_rule",
56122987
DM
13073 "parameters" : {
13074 "additionalProperties" : 0,
13075 "properties" : {
44660702
DM
13076 "action" : {
13077 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
13078 "maxLength" : 20,
13079 "minLength" : 2,
13080 "optional" : 1,
13081 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13082 "type" : "string"
13083 },
13084 "comment" : {
13085 "optional" : 1,
13086 "type" : "string"
13087 },
13088 "delete" : {
13089 "description" : "A list of settings you want to delete.",
13090 "format" : "pve-configid-list",
13091 "optional" : 1,
13092 "type" : "string"
13093 },
13094 "dest" : {
13095 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
13096 "format" : "pve-fw-addr-spec",
13097 "optional" : 1,
13098 "type" : "string"
13099 },
13100 "digest" : {
13101 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13102 "maxLength" : 40,
13103 "optional" : 1,
13104 "type" : "string"
13105 },
13106 "dport" : {
13107 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
13108 "format" : "pve-fw-dport-spec",
13109 "optional" : 1,
13110 "type" : "string"
13111 },
13112 "enable" : {
13113 "minimum" : 0,
13114 "optional" : 1,
13115 "type" : "integer"
13116 },
13117 "iface" : {
13118 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
13119 "format" : "pve-iface",
13120 "maxLength" : 20,
13121 "minLength" : 2,
13122 "optional" : 1,
13123 "type" : "string"
13124 },
13125 "macro" : {
13126 "maxLength" : 128,
13127 "optional" : 1,
13128 "type" : "string"
13129 },
13130 "moveto" : {
13131 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
13132 "minimum" : 0,
13133 "optional" : 1,
13134 "type" : "integer"
13135 },
7aacca6f
DM
13136 "node" : {
13137 "description" : "The cluster node name.",
44660702
DM
13138 "format" : "pve-node",
13139 "type" : "string"
56122987
DM
13140 },
13141 "pos" : {
44660702 13142 "description" : "Update rule at position <pos>.",
56122987 13143 "minimum" : 0,
7aacca6f 13144 "optional" : 1,
44660702 13145 "type" : "integer"
56122987 13146 },
44660702
DM
13147 "proto" : {
13148 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13149 "format" : "pve-fw-protocol-spec",
13150 "optional" : 1,
13151 "type" : "string"
7aacca6f 13152 },
44660702
DM
13153 "source" : {
13154 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
13155 "format" : "pve-fw-addr-spec",
13156 "optional" : 1,
13157 "type" : "string"
13158 },
13159 "sport" : {
13160 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
13161 "format" : "pve-fw-sport-spec",
13162 "optional" : 1,
13163 "type" : "string"
13164 },
13165 "type" : {
13166 "enum" : [
13167 "in",
13168 "out",
13169 "group"
13170 ],
7aacca6f 13171 "optional" : 1,
44660702
DM
13172 "type" : "string"
13173 },
13174 "vmid" : {
13175 "description" : "The (unique) ID of the VM.",
13176 "format" : "pve-vmid",
13177 "minimum" : 1,
13178 "type" : "integer"
56122987
DM
13179 }
13180 }
13181 },
56122987
DM
13182 "permissions" : {
13183 "check" : [
13184 "perm",
13185 "/vms/{vmid}",
13186 [
7aacca6f 13187 "VM.Config.Network"
56122987
DM
13188 ]
13189 ]
13190 },
44660702 13191 "protected" : 1,
56122987 13192 "proxyto" : null,
56122987 13193 "returns" : {
7aacca6f
DM
13194 "type" : "null"
13195 }
56122987 13196 }
44660702
DM
13197 },
13198 "leaf" : 1,
13199 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}",
13200 "text" : "{pos}"
56122987
DM
13201 }
13202 ],
13203 "info" : {
7aacca6f 13204 "GET" : {
44660702
DM
13205 "description" : "List rules.",
13206 "method" : "GET",
13207 "name" : "get_rules",
7aacca6f 13208 "parameters" : {
44660702 13209 "additionalProperties" : 0,
7aacca6f
DM
13210 "properties" : {
13211 "node" : {
7aacca6f 13212 "description" : "The cluster node name.",
44660702
DM
13213 "format" : "pve-node",
13214 "type" : "string"
7aacca6f
DM
13215 },
13216 "vmid" : {
13217 "description" : "The (unique) ID of the VM.",
44660702 13218 "format" : "pve-vmid",
7aacca6f 13219 "minimum" : 1,
44660702 13220 "type" : "integer"
7aacca6f 13221 }
44660702 13222 }
56122987 13223 },
56122987
DM
13224 "permissions" : {
13225 "check" : [
13226 "perm",
13227 "/vms/{vmid}",
13228 [
7aacca6f 13229 "VM.Audit"
56122987
DM
13230 ]
13231 ]
13232 },
13233 "proxyto" : null,
7aacca6f 13234 "returns" : {
7aacca6f
DM
13235 "items" : {
13236 "properties" : {
13237 "pos" : {
13238 "type" : "integer"
13239 }
13240 },
13241 "type" : "object"
13242 },
13243 "links" : [
13244 {
44660702
DM
13245 "href" : "{pos}",
13246 "rel" : "child"
7aacca6f 13247 }
44660702
DM
13248 ],
13249 "type" : "array"
13250 }
7aacca6f
DM
13251 },
13252 "POST" : {
44660702
DM
13253 "description" : "Create new rule.",
13254 "method" : "POST",
7aacca6f 13255 "name" : "create_rule",
56122987 13256 "parameters" : {
44660702 13257 "additionalProperties" : 0,
56122987 13258 "properties" : {
7aacca6f 13259 "action" : {
44660702 13260 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 13261 "maxLength" : 20,
44660702 13262 "minLength" : 2,
7aacca6f
DM
13263 "optional" : 0,
13264 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
13265 "type" : "string"
13266 },
44660702 13267 "comment" : {
7aacca6f 13268 "optional" : 1,
44660702 13269 "type" : "string"
56122987 13270 },
44660702
DM
13271 "dest" : {
13272 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
13273 "format" : "pve-fw-addr-spec",
56122987 13274 "optional" : 1,
44660702 13275 "type" : "string"
56122987 13276 },
44660702
DM
13277 "digest" : {
13278 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13279 "maxLength" : 40,
56122987 13280 "optional" : 1,
44660702 13281 "type" : "string"
56122987 13282 },
44660702
DM
13283 "dport" : {
13284 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
13285 "format" : "pve-fw-dport-spec",
56122987 13286 "optional" : 1,
44660702 13287 "type" : "string"
56122987 13288 },
44660702
DM
13289 "enable" : {
13290 "minimum" : 0,
56122987 13291 "optional" : 1,
44660702 13292 "type" : "integer"
56122987 13293 },
44660702
DM
13294 "iface" : {
13295 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
13296 "format" : "pve-iface",
13297 "maxLength" : 20,
13298 "minLength" : 2,
7aacca6f 13299 "optional" : 1,
56122987 13300 "type" : "string"
56122987 13301 },
44660702
DM
13302 "macro" : {
13303 "maxLength" : 128,
56122987
DM
13304 "optional" : 1,
13305 "type" : "string"
13306 },
13307 "node" : {
7aacca6f 13308 "description" : "The cluster node name.",
44660702
DM
13309 "format" : "pve-node",
13310 "type" : "string"
7aacca6f 13311 },
44660702
DM
13312 "pos" : {
13313 "description" : "Update rule at position <pos>.",
13314 "minimum" : 0,
13315 "optional" : 1,
13316 "type" : "integer"
13317 },
13318 "proto" : {
13319 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13320 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
13321 "optional" : 1,
13322 "type" : "string"
7aacca6f 13323 },
44660702
DM
13324 "source" : {
13325 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
13326 "format" : "pve-fw-addr-spec",
13327 "optional" : 1,
13328 "type" : "string"
56122987 13329 },
44660702
DM
13330 "sport" : {
13331 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
13332 "format" : "pve-fw-sport-spec",
13333 "optional" : 1,
13334 "type" : "string"
7aacca6f 13335 },
44660702
DM
13336 "type" : {
13337 "enum" : [
13338 "in",
13339 "out",
13340 "group"
13341 ],
13342 "optional" : 0,
13343 "type" : "string"
13344 },
13345 "vmid" : {
13346 "description" : "The (unique) ID of the VM.",
13347 "format" : "pve-vmid",
13348 "minimum" : 1,
13349 "type" : "integer"
13350 }
13351 }
13352 },
13353 "permissions" : {
13354 "check" : [
13355 "perm",
13356 "/vms/{vmid}",
13357 [
13358 "VM.Config.Network"
13359 ]
13360 ]
13361 },
13362 "protected" : 1,
13363 "proxyto" : null,
13364 "returns" : {
13365 "type" : "null"
13366 }
13367 }
13368 },
13369 "leaf" : 0,
13370 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules",
13371 "text" : "rules"
13372 },
13373 {
13374 "children" : [
13375 {
13376 "info" : {
13377 "DELETE" : {
13378 "description" : "Remove IP or Network alias.",
13379 "method" : "DELETE",
13380 "name" : "remove_alias",
56122987 13381 "parameters" : {
44660702 13382 "additionalProperties" : 0,
56122987 13383 "properties" : {
44660702
DM
13384 "digest" : {
13385 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13386 "maxLength" : 40,
56122987
DM
13387 "optional" : 1,
13388 "type" : "string"
13389 },
7aacca6f 13390 "name" : {
44660702 13391 "description" : "Alias name.",
7aacca6f 13392 "maxLength" : 64,
7aacca6f
DM
13393 "minLength" : 2,
13394 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13395 "type" : "string"
7aacca6f
DM
13396 },
13397 "node" : {
44660702 13398 "description" : "The cluster node name.",
56122987 13399 "format" : "pve-node",
44660702 13400 "type" : "string"
7aacca6f 13401 },
56122987 13402 "vmid" : {
44660702 13403 "description" : "The (unique) ID of the VM.",
56122987 13404 "format" : "pve-vmid",
44660702
DM
13405 "minimum" : 1,
13406 "type" : "integer"
56122987 13407 }
44660702 13408 }
56122987 13409 },
56122987
DM
13410 "permissions" : {
13411 "check" : [
13412 "perm",
13413 "/vms/{vmid}",
13414 [
7aacca6f 13415 "VM.Config.Network"
56122987
DM
13416 ]
13417 ]
13418 },
44660702 13419 "protected" : 1,
56122987 13420 "returns" : {
7aacca6f 13421 "type" : "null"
44660702 13422 }
56122987 13423 },
44660702
DM
13424 "GET" : {
13425 "description" : "Read alias.",
13426 "method" : "GET",
13427 "name" : "read_alias",
13428 "parameters" : {
13429 "additionalProperties" : 0,
13430 "properties" : {
13431 "name" : {
13432 "description" : "Alias name.",
13433 "maxLength" : 64,
13434 "minLength" : 2,
13435 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13436 "type" : "string"
13437 },
13438 "node" : {
13439 "description" : "The cluster node name.",
13440 "format" : "pve-node",
13441 "type" : "string"
13442 },
13443 "vmid" : {
13444 "description" : "The (unique) ID of the VM.",
13445 "format" : "pve-vmid",
13446 "minimum" : 1,
13447 "type" : "integer"
13448 }
13449 }
56122987 13450 },
7aacca6f
DM
13451 "permissions" : {
13452 "check" : [
13453 "perm",
13454 "/vms/{vmid}",
13455 [
44660702 13456 "VM.Audit"
7aacca6f
DM
13457 ]
13458 ]
13459 },
44660702
DM
13460 "returns" : {
13461 "type" : "object"
13462 }
13463 },
13464 "PUT" : {
13465 "description" : "Update IP or Network alias.",
13466 "method" : "PUT",
13467 "name" : "update_alias",
56122987
DM
13468 "parameters" : {
13469 "additionalProperties" : 0,
13470 "properties" : {
44660702
DM
13471 "cidr" : {
13472 "description" : "Network/IP specification in CIDR format.",
13473 "format" : "IPorCIDR",
13474 "type" : "string"
13475 },
13476 "comment" : {
13477 "optional" : 1,
13478 "type" : "string"
13479 },
13480 "digest" : {
13481 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13482 "maxLength" : 40,
13483 "optional" : 1,
13484 "type" : "string"
13485 },
56122987 13486 "name" : {
7aacca6f 13487 "description" : "Alias name.",
44660702
DM
13488 "maxLength" : 64,
13489 "minLength" : 2,
7aacca6f 13490 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13491 "type" : "string"
56122987
DM
13492 },
13493 "node" : {
13494 "description" : "The cluster node name.",
44660702
DM
13495 "format" : "pve-node",
13496 "type" : "string"
13497 },
13498 "rename" : {
13499 "description" : "Rename an existing alias.",
13500 "maxLength" : 64,
13501 "minLength" : 2,
13502 "optional" : 1,
13503 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13504 "type" : "string"
56122987 13505 },
7aacca6f 13506 "vmid" : {
7aacca6f 13507 "description" : "The (unique) ID of the VM.",
44660702 13508 "format" : "pve-vmid",
7aacca6f 13509 "minimum" : 1,
44660702 13510 "type" : "integer"
56122987
DM
13511 }
13512 }
13513 },
44660702
DM
13514 "permissions" : {
13515 "check" : [
13516 "perm",
13517 "/vms/{vmid}",
13518 [
13519 "VM.Config.Network"
13520 ]
13521 ]
7aacca6f 13522 },
44660702
DM
13523 "protected" : 1,
13524 "returns" : {
13525 "type" : "null"
7aacca6f
DM
13526 }
13527 }
13528 },
44660702
DM
13529 "leaf" : 1,
13530 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}",
13531 "text" : "{name}"
13532 }
13533 ],
13534 "info" : {
13535 "GET" : {
13536 "description" : "List aliases",
13537 "method" : "GET",
13538 "name" : "get_aliases",
56122987
DM
13539 "parameters" : {
13540 "additionalProperties" : 0,
13541 "properties" : {
13542 "node" : {
44660702 13543 "description" : "The cluster node name.",
56122987 13544 "format" : "pve-node",
44660702 13545 "type" : "string"
56122987
DM
13546 },
13547 "vmid" : {
7aacca6f 13548 "description" : "The (unique) ID of the VM.",
44660702 13549 "format" : "pve-vmid",
7aacca6f 13550 "minimum" : 1,
44660702 13551 "type" : "integer"
56122987
DM
13552 }
13553 }
13554 },
44660702
DM
13555 "permissions" : {
13556 "check" : [
13557 "perm",
13558 "/vms/{vmid}",
13559 [
13560 "VM.Audit"
13561 ]
13562 ]
13563 },
56122987
DM
13564 "returns" : {
13565 "items" : {
56122987 13566 "properties" : {
44660702
DM
13567 "cidr" : {
13568 "type" : "string"
7aacca6f 13569 },
44660702
DM
13570 "comment" : {
13571 "optional" : 1,
56122987
DM
13572 "type" : "string"
13573 },
56122987 13574 "digest" : {
56122987 13575 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
13576 "maxLength" : 40,
13577 "optional" : 0,
13578 "type" : "string"
13579 },
13580 "name" : {
13581 "type" : "string"
56122987 13582 }
44660702
DM
13583 },
13584 "type" : "object"
13585 },
13586 "links" : [
13587 {
13588 "href" : "{name}",
13589 "rel" : "child"
56122987 13590 }
44660702
DM
13591 ],
13592 "type" : "array"
7aacca6f
DM
13593 }
13594 },
13595 "POST" : {
44660702 13596 "description" : "Create IP or Network Alias.",
7aacca6f 13597 "method" : "POST",
44660702 13598 "name" : "create_alias",
7aacca6f
DM
13599 "parameters" : {
13600 "additionalProperties" : 0,
13601 "properties" : {
44660702
DM
13602 "cidr" : {
13603 "description" : "Network/IP specification in CIDR format.",
13604 "format" : "IPorCIDR",
7aacca6f
DM
13605 "type" : "string"
13606 },
13607 "comment" : {
13608 "optional" : 1,
13609 "type" : "string"
13610 },
44660702
DM
13611 "name" : {
13612 "description" : "Alias name.",
13613 "maxLength" : 64,
7aacca6f
DM
13614 "minLength" : 2,
13615 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13616 "type" : "string"
7aacca6f
DM
13617 },
13618 "node" : {
44660702 13619 "description" : "The cluster node name.",
7aacca6f 13620 "format" : "pve-node",
44660702 13621 "type" : "string"
7aacca6f 13622 },
44660702
DM
13623 "vmid" : {
13624 "description" : "The (unique) ID of the VM.",
13625 "format" : "pve-vmid",
13626 "minimum" : 1,
13627 "type" : "integer"
7aacca6f
DM
13628 }
13629 }
13630 },
44660702
DM
13631 "permissions" : {
13632 "check" : [
13633 "perm",
13634 "/vms/{vmid}",
13635 [
13636 "VM.Config.Network"
13637 ]
13638 ]
13639 },
13640 "protected" : 1,
13641 "returns" : {
13642 "type" : "null"
13643 }
56122987
DM
13644 }
13645 },
44660702
DM
13646 "leaf" : 0,
13647 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases",
13648 "text" : "aliases"
13649 },
13650 {
56122987
DM
13651 "children" : [
13652 {
56122987
DM
13653 "children" : [
13654 {
13655 "info" : {
13656 "DELETE" : {
44660702 13657 "description" : "Remove IP or Network from IPSet.",
7aacca6f 13658 "method" : "DELETE",
44660702 13659 "name" : "remove_ip",
56122987
DM
13660 "parameters" : {
13661 "additionalProperties" : 0,
13662 "properties" : {
44660702
DM
13663 "cidr" : {
13664 "description" : "Network/IP specification in CIDR format.",
13665 "format" : "IPorCIDRorAlias",
13666 "type" : "string"
56122987
DM
13667 },
13668 "digest" : {
44660702 13669 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987 13670 "maxLength" : 40,
7aacca6f 13671 "optional" : 1,
44660702 13672 "type" : "string"
56122987 13673 },
56122987 13674 "name" : {
44660702 13675 "description" : "IP set name.",
56122987 13676 "maxLength" : 64,
7aacca6f 13677 "minLength" : 2,
56122987 13678 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 13679 "type" : "string"
7aacca6f
DM
13680 },
13681 "node" : {
7aacca6f 13682 "description" : "The cluster node name.",
44660702
DM
13683 "format" : "pve-node",
13684 "type" : "string"
13685 },
13686 "vmid" : {
13687 "description" : "The (unique) ID of the VM.",
13688 "format" : "pve-vmid",
13689 "minimum" : 1,
13690 "type" : "integer"
56122987
DM
13691 }
13692 }
13693 },
44660702
DM
13694 "permissions" : {
13695 "check" : [
13696 "perm",
13697 "/vms/{vmid}",
13698 [
13699 "VM.Config.Network"
13700 ]
13701 ]
13702 },
7aacca6f 13703 "protected" : 1,
56122987
DM
13704 "returns" : {
13705 "type" : "null"
44660702
DM
13706 }
13707 },
13708 "GET" : {
13709 "description" : "Read IP or Network settings from IPSet.",
13710 "method" : "GET",
13711 "name" : "read_ip",
56122987
DM
13712 "parameters" : {
13713 "additionalProperties" : 0,
13714 "properties" : {
7aacca6f 13715 "cidr" : {
7aacca6f 13716 "description" : "Network/IP specification in CIDR format.",
44660702 13717 "format" : "IPorCIDRorAlias",
56122987
DM
13718 "type" : "string"
13719 },
7aacca6f 13720 "name" : {
44660702 13721 "description" : "IP set name.",
7aacca6f
DM
13722 "maxLength" : 64,
13723 "minLength" : 2,
7aacca6f
DM
13724 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13725 "type" : "string"
56122987 13726 },
44660702
DM
13727 "node" : {
13728 "description" : "The cluster node name.",
13729 "format" : "pve-node",
13730 "type" : "string"
13731 },
13732 "vmid" : {
13733 "description" : "The (unique) ID of the VM.",
13734 "format" : "pve-vmid",
13735 "minimum" : 1,
13736 "type" : "integer"
56122987
DM
13737 }
13738 }
13739 },
56122987
DM
13740 "permissions" : {
13741 "check" : [
13742 "perm",
13743 "/vms/{vmid}",
13744 [
44660702 13745 "VM.Audit"
56122987
DM
13746 ]
13747 ]
7aacca6f 13748 },
44660702 13749 "protected" : 1,
7aacca6f
DM
13750 "returns" : {
13751 "type" : "object"
44660702
DM
13752 }
13753 },
13754 "PUT" : {
13755 "description" : "Update IP or Network settings",
13756 "method" : "PUT",
13757 "name" : "update_ip",
7aacca6f 13758 "parameters" : {
44660702 13759 "additionalProperties" : 0,
7aacca6f
DM
13760 "properties" : {
13761 "cidr" : {
44660702 13762 "description" : "Network/IP specification in CIDR format.",
7aacca6f 13763 "format" : "IPorCIDRorAlias",
44660702 13764 "type" : "string"
7aacca6f 13765 },
44660702
DM
13766 "comment" : {
13767 "optional" : 1,
13768 "type" : "string"
13769 },
13770 "digest" : {
13771 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13772 "maxLength" : 40,
13773 "optional" : 1,
13774 "type" : "string"
13775 },
13776 "name" : {
13777 "description" : "IP set name.",
13778 "maxLength" : 64,
13779 "minLength" : 2,
13780 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13781 "type" : "string"
7aacca6f
DM
13782 },
13783 "node" : {
7aacca6f 13784 "description" : "The cluster node name.",
44660702 13785 "format" : "pve-node",
7aacca6f
DM
13786 "type" : "string"
13787 },
44660702
DM
13788 "nomatch" : {
13789 "optional" : 1,
13790 "type" : "boolean"
13791 },
13792 "vmid" : {
13793 "description" : "The (unique) ID of the VM.",
13794 "format" : "pve-vmid",
13795 "minimum" : 1,
13796 "type" : "integer"
7aacca6f 13797 }
44660702
DM
13798 }
13799 },
13800 "permissions" : {
13801 "check" : [
13802 "perm",
13803 "/vms/{vmid}",
13804 [
13805 "VM.Config.Network"
13806 ]
13807 ]
7aacca6f
DM
13808 },
13809 "protected" : 1,
44660702
DM
13810 "returns" : {
13811 "type" : "null"
13812 }
56122987
DM
13813 }
13814 },
56122987 13815 "leaf" : 1,
44660702
DM
13816 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}",
13817 "text" : "{cidr}"
56122987
DM
13818 }
13819 ],
13820 "info" : {
44660702
DM
13821 "DELETE" : {
13822 "description" : "Delete IPSet",
13823 "method" : "DELETE",
13824 "name" : "delete_ipset",
13825 "parameters" : {
13826 "additionalProperties" : 0,
13827 "properties" : {
13828 "name" : {
13829 "description" : "IP set name.",
13830 "maxLength" : 64,
13831 "minLength" : 2,
13832 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13833 "type" : "string"
13834 },
13835 "node" : {
13836 "description" : "The cluster node name.",
13837 "format" : "pve-node",
13838 "type" : "string"
13839 },
13840 "vmid" : {
13841 "description" : "The (unique) ID of the VM.",
13842 "format" : "pve-vmid",
13843 "minimum" : 1,
13844 "type" : "integer"
13845 }
13846 }
13847 },
13848 "permissions" : {
13849 "check" : [
13850 "perm",
13851 "/vms/{vmid}",
13852 [
13853 "VM.Config.Network"
13854 ]
13855 ]
13856 },
13857 "protected" : 1,
13858 "returns" : {
13859 "type" : "null"
13860 }
13861 },
56122987 13862 "GET" : {
7aacca6f 13863 "description" : "List IPSet content",
44660702
DM
13864 "method" : "GET",
13865 "name" : "get_ipset",
7aacca6f
DM
13866 "parameters" : {
13867 "additionalProperties" : 0,
13868 "properties" : {
13869 "name" : {
13870 "description" : "IP set name.",
44660702 13871 "maxLength" : 64,
7aacca6f 13872 "minLength" : 2,
44660702
DM
13873 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13874 "type" : "string"
7aacca6f
DM
13875 },
13876 "node" : {
7aacca6f 13877 "description" : "The cluster node name.",
44660702 13878 "format" : "pve-node",
7aacca6f
DM
13879 "type" : "string"
13880 },
13881 "vmid" : {
13882 "description" : "The (unique) ID of the VM.",
44660702 13883 "format" : "pve-vmid",
7aacca6f 13884 "minimum" : 1,
44660702 13885 "type" : "integer"
56122987 13886 }
7aacca6f
DM
13887 }
13888 },
7aacca6f
DM
13889 "permissions" : {
13890 "check" : [
13891 "perm",
13892 "/vms/{vmid}",
13893 [
13894 "VM.Audit"
13895 ]
13896 ]
13897 },
13898 "returns" : {
56122987
DM
13899 "items" : {
13900 "properties" : {
13901 "cidr" : {
13902 "type" : "string"
13903 },
44660702
DM
13904 "comment" : {
13905 "optional" : 1,
13906 "type" : "string"
13907 },
56122987 13908 "digest" : {
56122987 13909 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 13910 "maxLength" : 40,
7aacca6f 13911 "optional" : 0,
56122987 13912 "type" : "string"
7aacca6f
DM
13913 },
13914 "nomatch" : {
44660702
DM
13915 "optional" : 1,
13916 "type" : "boolean"
56122987 13917 }
44660702
DM
13918 },
13919 "type" : "object"
56122987 13920 },
7aacca6f
DM
13921 "links" : [
13922 {
44660702
DM
13923 "href" : "{cidr}",
13924 "rel" : "child"
56122987 13925 }
44660702
DM
13926 ],
13927 "type" : "array"
13928 }
56122987 13929 },
7aacca6f
DM
13930 "POST" : {
13931 "description" : "Add IP or Network to IPSet.",
44660702 13932 "method" : "POST",
7aacca6f 13933 "name" : "create_ip",
56122987 13934 "parameters" : {
44660702 13935 "additionalProperties" : 0,
56122987 13936 "properties" : {
44660702
DM
13937 "cidr" : {
13938 "description" : "Network/IP specification in CIDR format.",
13939 "format" : "IPorCIDRorAlias",
13940 "type" : "string"
13941 },
13942 "comment" : {
13943 "optional" : 1,
13944 "type" : "string"
56122987
DM
13945 },
13946 "name" : {
56122987 13947 "description" : "IP set name.",
44660702 13948 "maxLength" : 64,
7aacca6f 13949 "minLength" : 2,
44660702 13950 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 13951 "type" : "string"
56122987 13952 },
7aacca6f 13953 "node" : {
7aacca6f 13954 "description" : "The cluster node name.",
44660702 13955 "format" : "pve-node",
56122987
DM
13956 "type" : "string"
13957 },
44660702
DM
13958 "nomatch" : {
13959 "optional" : 1,
13960 "type" : "boolean"
7aacca6f
DM
13961 },
13962 "vmid" : {
44660702 13963 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13964 "format" : "pve-vmid",
13965 "minimum" : 1,
7aacca6f 13966 "type" : "integer"
56122987 13967 }
44660702
DM
13968 }
13969 },
13970 "permissions" : {
13971 "check" : [
13972 "perm",
13973 "/vms/{vmid}",
13974 [
13975 "VM.Config.Network"
13976 ]
13977 ]
13978 },
13979 "protected" : 1,
13980 "returns" : {
13981 "type" : "null"
13982 }
13983 }
13984 },
13985 "leaf" : 0,
13986 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}",
13987 "text" : "{name}"
13988 }
13989 ],
13990 "info" : {
13991 "GET" : {
13992 "description" : "List IPSets",
13993 "method" : "GET",
13994 "name" : "ipset_index",
13995 "parameters" : {
13996 "additionalProperties" : 0,
13997 "properties" : {
13998 "node" : {
13999 "description" : "The cluster node name.",
14000 "format" : "pve-node",
14001 "type" : "string"
14002 },
14003 "vmid" : {
14004 "description" : "The (unique) ID of the VM.",
14005 "format" : "pve-vmid",
14006 "minimum" : 1,
14007 "type" : "integer"
14008 }
14009 }
14010 },
14011 "permissions" : {
14012 "check" : [
14013 "perm",
14014 "/vms/{vmid}",
14015 [
14016 "VM.Audit"
14017 ]
14018 ]
14019 },
14020 "returns" : {
14021 "items" : {
14022 "properties" : {
14023 "comment" : {
14024 "optional" : 1,
14025 "type" : "string"
14026 },
14027 "digest" : {
14028 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14029 "maxLength" : 40,
14030 "optional" : 0,
14031 "type" : "string"
7aacca6f 14032 },
44660702
DM
14033 "name" : {
14034 "description" : "IP set name.",
14035 "maxLength" : 64,
14036 "minLength" : 2,
14037 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14038 "type" : "string"
14039 }
14040 },
14041 "type" : "object"
14042 },
14043 "links" : [
14044 {
14045 "href" : "{name}",
14046 "rel" : "child"
14047 }
14048 ],
14049 "type" : "array"
14050 }
14051 },
14052 "POST" : {
14053 "description" : "Create new IPSet",
14054 "method" : "POST",
14055 "name" : "create_ipset",
14056 "parameters" : {
14057 "additionalProperties" : 0,
14058 "properties" : {
14059 "comment" : {
14060 "optional" : 1,
14061 "type" : "string"
14062 },
14063 "digest" : {
14064 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14065 "maxLength" : 40,
14066 "optional" : 1,
14067 "type" : "string"
56122987 14068 },
44660702
DM
14069 "name" : {
14070 "description" : "IP set name.",
14071 "maxLength" : 64,
14072 "minLength" : 2,
14073 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14074 "type" : "string"
14075 },
14076 "node" : {
14077 "description" : "The cluster node name.",
14078 "format" : "pve-node",
14079 "type" : "string"
7aacca6f 14080 },
44660702
DM
14081 "rename" : {
14082 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
14083 "maxLength" : 64,
14084 "minLength" : 2,
14085 "optional" : 1,
14086 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14087 "type" : "string"
14088 },
14089 "vmid" : {
14090 "description" : "The (unique) ID of the VM.",
14091 "format" : "pve-vmid",
14092 "minimum" : 1,
14093 "type" : "integer"
14094 }
56122987 14095 }
44660702
DM
14096 },
14097 "permissions" : {
14098 "check" : [
14099 "perm",
14100 "/vms/{vmid}",
14101 [
14102 "VM.Config.Network"
14103 ]
14104 ]
14105 },
14106 "protected" : 1,
14107 "returns" : {
14108 "type" : "null"
56122987
DM
14109 }
14110 }
44660702
DM
14111 },
14112 "leaf" : 0,
14113 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset",
14114 "text" : "ipset"
56122987
DM
14115 },
14116 {
56122987 14117 "info" : {
7aacca6f 14118 "GET" : {
44660702 14119 "description" : "Get VM firewall options.",
7aacca6f 14120 "method" : "GET",
44660702
DM
14121 "name" : "get_options",
14122 "parameters" : {
14123 "additionalProperties" : 0,
14124 "properties" : {
14125 "node" : {
14126 "description" : "The cluster node name.",
14127 "format" : "pve-node",
14128 "type" : "string"
14129 },
14130 "vmid" : {
14131 "description" : "The (unique) ID of the VM.",
14132 "format" : "pve-vmid",
14133 "minimum" : 1,
14134 "type" : "integer"
14135 }
14136 }
14137 },
14138 "permissions" : {
14139 "check" : [
14140 "perm",
14141 "/vms/{vmid}",
14142 [
14143 "VM.Audit"
14144 ]
14145 ]
14146 },
14147 "proxyto" : "node",
56122987 14148 "returns" : {
56122987 14149 "properties" : {
44660702
DM
14150 "dhcp" : {
14151 "description" : "Enable DHCP.",
14152 "optional" : 1,
14153 "type" : "boolean"
14154 },
14155 "enable" : {
14156 "description" : "Enable/disable firewall rules.",
14157 "optional" : 1,
14158 "type" : "boolean"
14159 },
14160 "ipfilter" : {
14161 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
7aacca6f 14162 "optional" : 1,
44660702
DM
14163 "type" : "boolean"
14164 },
14165 "log_level_in" : {
7aacca6f
DM
14166 "description" : "Log level for incoming traffic.",
14167 "enum" : [
14168 "emerg",
14169 "alert",
14170 "crit",
14171 "err",
14172 "warning",
14173 "notice",
14174 "info",
14175 "debug",
14176 "nolog"
44660702
DM
14177 ],
14178 "optional" : 1,
14179 "type" : "string"
56122987 14180 },
44660702
DM
14181 "log_level_out" : {
14182 "description" : "Log level for outgoing traffic.",
56122987 14183 "enum" : [
44660702
DM
14184 "emerg",
14185 "alert",
14186 "crit",
14187 "err",
14188 "warning",
14189 "notice",
14190 "info",
14191 "debug",
14192 "nolog"
7aacca6f 14193 ],
7aacca6f
DM
14194 "optional" : 1,
14195 "type" : "string"
56122987 14196 },
44660702
DM
14197 "macfilter" : {
14198 "description" : "Enable/disable MAC address filter.",
14199 "optional" : 1,
14200 "type" : "boolean"
7aacca6f 14201 },
44660702
DM
14202 "ndp" : {
14203 "description" : "Enable NDP.",
56122987 14204 "optional" : 1,
44660702 14205 "type" : "boolean"
56122987
DM
14206 },
14207 "policy_in" : {
7aacca6f 14208 "description" : "Input policy.",
56122987
DM
14209 "enum" : [
14210 "ACCEPT",
14211 "REJECT",
14212 "DROP"
14213 ],
7aacca6f 14214 "optional" : 1,
44660702 14215 "type" : "string"
56122987 14216 },
44660702
DM
14217 "policy_out" : {
14218 "description" : "Output policy.",
56122987 14219 "enum" : [
44660702
DM
14220 "ACCEPT",
14221 "REJECT",
14222 "DROP"
56122987 14223 ],
7aacca6f 14224 "optional" : 1,
56122987
DM
14225 "type" : "string"
14226 },
44660702
DM
14227 "radv" : {
14228 "description" : "Allow sending Router Advertisement.",
56122987 14229 "optional" : 1,
7aacca6f
DM
14230 "type" : "boolean"
14231 }
7aacca6f 14232 },
44660702
DM
14233 "type" : "object"
14234 }
7aacca6f
DM
14235 },
14236 "PUT" : {
44660702
DM
14237 "description" : "Set Firewall options.",
14238 "method" : "PUT",
7aacca6f
DM
14239 "name" : "set_options",
14240 "parameters" : {
44660702 14241 "additionalProperties" : 0,
7aacca6f 14242 "properties" : {
44660702
DM
14243 "delete" : {
14244 "description" : "A list of settings you want to delete.",
14245 "format" : "pve-configid-list",
14246 "optional" : 1,
14247 "type" : "string"
14248 },
14249 "dhcp" : {
14250 "description" : "Enable DHCP.",
14251 "optional" : 1,
14252 "type" : "boolean"
14253 },
14254 "digest" : {
14255 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14256 "maxLength" : 40,
14257 "optional" : 1,
14258 "type" : "string"
14259 },
7aacca6f
DM
14260 "enable" : {
14261 "description" : "Enable/disable firewall rules.",
56122987 14262 "optional" : 1,
7aacca6f 14263 "type" : "boolean"
56122987 14264 },
44660702
DM
14265 "ipfilter" : {
14266 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
14267 "optional" : 1,
14268 "type" : "boolean"
14269 },
14270 "log_level_in" : {
14271 "description" : "Log level for incoming traffic.",
56122987
DM
14272 "enum" : [
14273 "emerg",
14274 "alert",
14275 "crit",
14276 "err",
14277 "warning",
14278 "notice",
14279 "info",
14280 "debug",
14281 "nolog"
14282 ],
56122987 14283 "optional" : 1,
44660702 14284 "type" : "string"
56122987 14285 },
44660702
DM
14286 "log_level_out" : {
14287 "description" : "Log level for outgoing traffic.",
56122987
DM
14288 "enum" : [
14289 "emerg",
14290 "alert",
14291 "crit",
14292 "err",
14293 "warning",
14294 "notice",
14295 "info",
14296 "debug",
14297 "nolog"
14298 ],
44660702
DM
14299 "optional" : 1,
14300 "type" : "string"
56122987 14301 },
44660702
DM
14302 "macfilter" : {
14303 "description" : "Enable/disable MAC address filter.",
14304 "optional" : 1,
14305 "type" : "boolean"
14306 },
14307 "ndp" : {
14308 "description" : "Enable NDP.",
56122987 14309 "optional" : 1,
56122987
DM
14310 "type" : "boolean"
14311 },
7aacca6f
DM
14312 "node" : {
14313 "description" : "The cluster node name.",
44660702
DM
14314 "format" : "pve-node",
14315 "type" : "string"
7aacca6f 14316 },
44660702
DM
14317 "policy_in" : {
14318 "description" : "Input policy.",
14319 "enum" : [
14320 "ACCEPT",
14321 "REJECT",
14322 "DROP"
14323 ],
7aacca6f 14324 "optional" : 1,
44660702 14325 "type" : "string"
7aacca6f 14326 },
44660702
DM
14327 "policy_out" : {
14328 "description" : "Output policy.",
56122987 14329 "enum" : [
7aacca6f
DM
14330 "ACCEPT",
14331 "REJECT",
14332 "DROP"
56122987
DM
14333 ],
14334 "optional" : 1,
56122987 14335 "type" : "string"
7aacca6f 14336 },
44660702
DM
14337 "radv" : {
14338 "description" : "Allow sending Router Advertisement.",
7aacca6f 14339 "optional" : 1,
44660702
DM
14340 "type" : "boolean"
14341 },
14342 "vmid" : {
14343 "description" : "The (unique) ID of the VM.",
14344 "format" : "pve-vmid",
14345 "minimum" : 1,
14346 "type" : "integer"
56122987 14347 }
44660702 14348 }
56122987 14349 },
7aacca6f
DM
14350 "permissions" : {
14351 "check" : [
14352 "perm",
14353 "/vms/{vmid}",
14354 [
14355 "VM.Config.Network"
14356 ]
14357 ]
14358 },
44660702
DM
14359 "protected" : 1,
14360 "proxyto" : "node",
7aacca6f
DM
14361 "returns" : {
14362 "type" : "null"
56122987
DM
14363 }
14364 }
14365 },
44660702 14366 "leaf" : 1,
7aacca6f 14367 "path" : "/nodes/{node}/lxc/{vmid}/firewall/options",
44660702 14368 "text" : "options"
56122987
DM
14369 },
14370 {
56122987
DM
14371 "info" : {
14372 "GET" : {
44660702 14373 "description" : "Read firewall log",
56122987 14374 "method" : "GET",
7aacca6f 14375 "name" : "log",
56122987
DM
14376 "parameters" : {
14377 "additionalProperties" : 0,
14378 "properties" : {
44660702
DM
14379 "limit" : {
14380 "minimum" : 0,
14381 "optional" : 1,
14382 "type" : "integer"
14383 },
56122987
DM
14384 "node" : {
14385 "description" : "The cluster node name.",
44660702
DM
14386 "format" : "pve-node",
14387 "type" : "string"
56122987 14388 },
44660702
DM
14389 "start" : {
14390 "minimum" : 0,
7aacca6f 14391 "optional" : 1,
44660702 14392 "type" : "integer"
56122987
DM
14393 },
14394 "vmid" : {
44660702 14395 "description" : "The (unique) ID of the VM.",
7aacca6f 14396 "format" : "pve-vmid",
56122987 14397 "minimum" : 1,
7aacca6f 14398 "type" : "integer"
56122987
DM
14399 }
14400 }
14401 },
44660702
DM
14402 "permissions" : {
14403 "check" : [
14404 "perm",
14405 "/vms/{vmid}",
14406 [
14407 "VM.Console"
14408 ]
14409 ]
14410 },
56122987 14411 "protected" : 1,
44660702 14412 "proxyto" : "node",
7aacca6f
DM
14413 "returns" : {
14414 "items" : {
14415 "properties" : {
7aacca6f
DM
14416 "n" : {
14417 "description" : "Line number",
14418 "type" : "integer"
44660702
DM
14419 },
14420 "t" : {
14421 "description" : "Line text",
14422 "type" : "string"
7aacca6f
DM
14423 }
14424 },
14425 "type" : "object"
14426 },
14427 "type" : "array"
44660702 14428 }
56122987
DM
14429 }
14430 },
7aacca6f 14431 "leaf" : 1,
44660702
DM
14432 "path" : "/nodes/{node}/lxc/{vmid}/firewall/log",
14433 "text" : "log"
56122987
DM
14434 },
14435 {
56122987
DM
14436 "info" : {
14437 "GET" : {
7aacca6f 14438 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
14439 "method" : "GET",
14440 "name" : "refs",
56122987 14441 "parameters" : {
7aacca6f 14442 "additionalProperties" : 0,
56122987 14443 "properties" : {
44660702
DM
14444 "node" : {
14445 "description" : "The cluster node name.",
14446 "format" : "pve-node",
14447 "type" : "string"
7aacca6f 14448 },
56122987 14449 "type" : {
44660702 14450 "description" : "Only list references of specified type.",
56122987
DM
14451 "enum" : [
14452 "alias",
14453 "ipset"
14454 ],
44660702
DM
14455 "optional" : 1,
14456 "type" : "string"
56122987 14457 },
44660702
DM
14458 "vmid" : {
14459 "description" : "The (unique) ID of the VM.",
14460 "format" : "pve-vmid",
14461 "minimum" : 1,
14462 "type" : "integer"
56122987 14463 }
7aacca6f 14464 }
56122987 14465 },
44660702
DM
14466 "permissions" : {
14467 "check" : [
14468 "perm",
14469 "/vms/{vmid}",
14470 [
14471 "VM.Audit"
14472 ]
14473 ]
14474 },
56122987 14475 "returns" : {
56122987 14476 "items" : {
56122987 14477 "properties" : {
44660702
DM
14478 "comment" : {
14479 "optional" : 1,
14480 "type" : "string"
14481 },
14482 "name" : {
14483 "type" : "string"
14484 },
56122987 14485 "type" : {
56122987
DM
14486 "enum" : [
14487 "alias",
14488 "ipset"
44660702 14489 ],
7aacca6f 14490 "type" : "string"
56122987 14491 }
44660702
DM
14492 },
14493 "type" : "object"
14494 },
14495 "type" : "array"
56122987
DM
14496 }
14497 }
14498 },
44660702 14499 "leaf" : 1,
7aacca6f 14500 "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs",
44660702 14501 "text" : "refs"
56122987
DM
14502 }
14503 ],
56122987
DM
14504 "info" : {
14505 "GET" : {
7aacca6f 14506 "description" : "Directory index.",
44660702
DM
14507 "method" : "GET",
14508 "name" : "index",
56122987 14509 "parameters" : {
44660702 14510 "additionalProperties" : 0,
56122987 14511 "properties" : {
56122987 14512 "node" : {
44660702 14513 "description" : "The cluster node name.",
56122987 14514 "format" : "pve-node",
44660702
DM
14515 "type" : "string"
14516 },
14517 "vmid" : {
14518 "description" : "The (unique) ID of the VM.",
14519 "format" : "pve-vmid",
14520 "minimum" : 1,
14521 "type" : "integer"
56122987 14522 }
44660702
DM
14523 }
14524 },
14525 "permissions" : {
14526 "user" : "all"
56122987
DM
14527 },
14528 "returns" : {
7aacca6f 14529 "items" : {
44660702
DM
14530 "properties" : {},
14531 "type" : "object"
7aacca6f 14532 },
56122987
DM
14533 "links" : [
14534 {
44660702
DM
14535 "href" : "{name}",
14536 "rel" : "child"
56122987 14537 }
44660702
DM
14538 ],
14539 "type" : "array"
56122987
DM
14540 }
14541 }
14542 },
44660702 14543 "leaf" : 0,
7aacca6f 14544 "path" : "/nodes/{node}/lxc/{vmid}/firewall",
44660702 14545 "text" : "firewall"
56122987
DM
14546 },
14547 {
56122987
DM
14548 "info" : {
14549 "GET" : {
56122987 14550 "description" : "Read VM RRD statistics (returns PNG)",
44660702 14551 "method" : "GET",
7aacca6f 14552 "name" : "rrd",
56122987 14553 "parameters" : {
7aacca6f 14554 "additionalProperties" : 0,
56122987 14555 "properties" : {
44660702
DM
14556 "cf" : {
14557 "description" : "The RRD consolidation function",
14558 "enum" : [
14559 "AVERAGE",
14560 "MAX"
14561 ],
14562 "optional" : 1,
14563 "type" : "string"
14564 },
14565 "ds" : {
14566 "description" : "The list of datasources you want to display.",
14567 "format" : "pve-configid-list",
14568 "type" : "string"
14569 },
7aacca6f
DM
14570 "node" : {
14571 "description" : "The cluster node name.",
44660702
DM
14572 "format" : "pve-node",
14573 "type" : "string"
56122987
DM
14574 },
14575 "timeframe" : {
14576 "description" : "Specify the time frame you are interested in.",
14577 "enum" : [
14578 "hour",
14579 "day",
14580 "week",
14581 "month",
14582 "year"
7aacca6f 14583 ],
44660702 14584 "type" : "string"
7aacca6f
DM
14585 },
14586 "vmid" : {
44660702 14587 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14588 "format" : "pve-vmid",
14589 "minimum" : 1,
7aacca6f 14590 "type" : "integer"
56122987 14591 }
7aacca6f
DM
14592 }
14593 },
14594 "permissions" : {
14595 "check" : [
14596 "perm",
14597 "/vms/{vmid}",
14598 [
14599 "VM.Audit"
14600 ]
14601 ]
56122987 14602 },
44660702 14603 "protected" : 1,
7aacca6f
DM
14604 "returns" : {
14605 "properties" : {
14606 "filename" : {
14607 "type" : "string"
14608 }
14609 },
14610 "type" : "object"
14611 }
56122987 14612 }
7aacca6f 14613 },
44660702 14614 "leaf" : 1,
7aacca6f 14615 "path" : "/nodes/{node}/lxc/{vmid}/rrd",
44660702 14616 "text" : "rrd"
56122987
DM
14617 },
14618 {
56122987
DM
14619 "info" : {
14620 "GET" : {
44660702
DM
14621 "description" : "Read VM RRD statistics",
14622 "method" : "GET",
14623 "name" : "rrddata",
56122987 14624 "parameters" : {
7aacca6f 14625 "additionalProperties" : 0,
56122987 14626 "properties" : {
44660702
DM
14627 "cf" : {
14628 "description" : "The RRD consolidation function",
14629 "enum" : [
14630 "AVERAGE",
14631 "MAX"
14632 ],
14633 "optional" : 1,
14634 "type" : "string"
14635 },
7aacca6f 14636 "node" : {
44660702 14637 "description" : "The cluster node name.",
7aacca6f 14638 "format" : "pve-node",
44660702 14639 "type" : "string"
7aacca6f 14640 },
56122987
DM
14641 "timeframe" : {
14642 "description" : "Specify the time frame you are interested in.",
14643 "enum" : [
14644 "hour",
14645 "day",
14646 "week",
14647 "month",
14648 "year"
44660702
DM
14649 ],
14650 "type" : "string"
7aacca6f
DM
14651 },
14652 "vmid" : {
14653 "description" : "The (unique) ID of the VM.",
44660702 14654 "format" : "pve-vmid",
7aacca6f 14655 "minimum" : 1,
44660702 14656 "type" : "integer"
56122987 14657 }
56122987
DM
14658 }
14659 },
56122987
DM
14660 "permissions" : {
14661 "check" : [
14662 "perm",
14663 "/vms/{vmid}",
14664 [
14665 "VM.Audit"
14666 ]
14667 ]
14668 },
7aacca6f
DM
14669 "protected" : 1,
14670 "returns" : {
7aacca6f
DM
14671 "items" : {
14672 "properties" : {},
14673 "type" : "object"
44660702
DM
14674 },
14675 "type" : "array"
14676 }
56122987
DM
14677 }
14678 },
44660702 14679 "leaf" : 1,
7aacca6f 14680 "path" : "/nodes/{node}/lxc/{vmid}/rrddata",
44660702 14681 "text" : "rrddata"
56122987
DM
14682 },
14683 {
14684 "info" : {
14685 "POST" : {
14686 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
14687 "method" : "POST",
14688 "name" : "vncproxy",
7aacca6f 14689 "parameters" : {
44660702 14690 "additionalProperties" : 0,
7aacca6f 14691 "properties" : {
44660702
DM
14692 "node" : {
14693 "description" : "The cluster node name.",
14694 "format" : "pve-node",
14695 "type" : "string"
14696 },
7aacca6f 14697 "vmid" : {
44660702 14698 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14699 "format" : "pve-vmid",
14700 "minimum" : 1,
7aacca6f
DM
14701 "type" : "integer"
14702 },
14703 "websocket" : {
44660702 14704 "description" : "use websocket instead of standard VNC.",
7aacca6f 14705 "optional" : 1,
44660702 14706 "type" : "boolean"
7aacca6f 14707 }
44660702 14708 }
7aacca6f 14709 },
56122987
DM
14710 "permissions" : {
14711 "check" : [
14712 "perm",
14713 "/vms/{vmid}",
14714 [
14715 "VM.Console"
14716 ]
14717 ]
14718 },
44660702 14719 "protected" : 1,
56122987 14720 "returns" : {
7aacca6f 14721 "additionalProperties" : 0,
56122987 14722 "properties" : {
7aacca6f 14723 "cert" : {
56122987
DM
14724 "type" : "string"
14725 },
44660702
DM
14726 "port" : {
14727 "type" : "integer"
56122987 14728 },
44660702 14729 "ticket" : {
56122987
DM
14730 "type" : "string"
14731 },
44660702 14732 "upid" : {
56122987
DM
14733 "type" : "string"
14734 },
44660702
DM
14735 "user" : {
14736 "type" : "string"
56122987 14737 }
7aacca6f 14738 }
56122987
DM
14739 }
14740 }
14741 },
44660702 14742 "leaf" : 1,
56122987 14743 "path" : "/nodes/{node}/lxc/{vmid}/vncproxy",
44660702 14744 "text" : "vncproxy"
56122987
DM
14745 },
14746 {
56122987
DM
14747 "info" : {
14748 "GET" : {
44660702
DM
14749 "description" : "Opens a weksocket for VNC traffic.",
14750 "method" : "GET",
14751 "name" : "vncwebsocket",
56122987 14752 "parameters" : {
44660702 14753 "additionalProperties" : 0,
56122987 14754 "properties" : {
56122987
DM
14755 "node" : {
14756 "description" : "The cluster node name.",
44660702 14757 "format" : "pve-node",
56122987 14758 "type" : "string"
7aacca6f 14759 },
44660702
DM
14760 "port" : {
14761 "description" : "Port number returned by previous vncproxy call.",
14762 "maximum" : 5999,
14763 "minimum" : 5900,
14764 "type" : "integer"
14765 },
7aacca6f
DM
14766 "vmid" : {
14767 "description" : "The (unique) ID of the VM.",
7aacca6f 14768 "format" : "pve-vmid",
44660702
DM
14769 "minimum" : 1,
14770 "type" : "integer"
14771 },
14772 "vncticket" : {
14773 "description" : "Ticket from previous call to vncproxy.",
14774 "maxLength" : 512,
14775 "type" : "string"
56122987 14776 }
44660702 14777 }
7aacca6f 14778 },
7aacca6f
DM
14779 "permissions" : {
14780 "check" : [
14781 "perm",
14782 "/vms/{vmid}",
14783 [
14784 "VM.Console"
14785 ]
14786 ],
14787 "description" : "You also need to pass a valid ticket (vncticket)."
56122987
DM
14788 },
14789 "returns" : {
56122987
DM
14790 "properties" : {
14791 "port" : {
14792 "type" : "string"
14793 }
44660702
DM
14794 },
14795 "type" : "object"
14796 }
56122987
DM
14797 }
14798 },
44660702 14799 "leaf" : 1,
7aacca6f 14800 "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket",
44660702 14801 "text" : "vncwebsocket"
56122987
DM
14802 },
14803 {
56122987
DM
14804 "info" : {
14805 "POST" : {
44660702
DM
14806 "description" : "Returns a SPICE configuration to connect to the CT.",
14807 "method" : "POST",
14808 "name" : "spiceproxy",
56122987
DM
14809 "parameters" : {
14810 "additionalProperties" : 0,
14811 "properties" : {
44660702
DM
14812 "node" : {
14813 "description" : "The cluster node name.",
14814 "format" : "pve-node",
14815 "type" : "string"
56122987
DM
14816 },
14817 "proxy" : {
7aacca6f 14818 "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).",
44660702
DM
14819 "format" : "address",
14820 "optional" : 1,
7aacca6f 14821 "type" : "string"
44660702
DM
14822 },
14823 "vmid" : {
14824 "description" : "The (unique) ID of the VM.",
14825 "format" : "pve-vmid",
14826 "minimum" : 1,
14827 "type" : "integer"
56122987
DM
14828 }
14829 }
14830 },
56122987
DM
14831 "permissions" : {
14832 "check" : [
14833 "perm",
14834 "/vms/{vmid}",
14835 [
14836 "VM.Console"
14837 ]
14838 ]
14839 },
44660702
DM
14840 "protected" : 1,
14841 "proxyto" : "node",
56122987 14842 "returns" : {
7aacca6f 14843 "additionalProperties" : 1,
44660702 14844 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 14845 "properties" : {
44660702 14846 "host" : {
56122987
DM
14847 "type" : "string"
14848 },
44660702 14849 "password" : {
56122987
DM
14850 "type" : "string"
14851 },
14852 "proxy" : {
14853 "type" : "string"
14854 },
56122987
DM
14855 "tls-port" : {
14856 "type" : "integer"
7aacca6f 14857 },
44660702 14858 "type" : {
7aacca6f 14859 "type" : "string"
56122987 14860 }
7aacca6f
DM
14861 }
14862 }
56122987 14863 }
44660702
DM
14864 },
14865 "leaf" : 1,
14866 "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy",
14867 "text" : "spiceproxy"
56122987
DM
14868 },
14869 {
56122987
DM
14870 "info" : {
14871 "POST" : {
44660702 14872 "description" : "Migrate the container to another node. Creates a new migration task.",
7aacca6f 14873 "method" : "POST",
44660702 14874 "name" : "migrate_vm",
56122987 14875 "parameters" : {
44660702 14876 "additionalProperties" : 0,
56122987 14877 "properties" : {
44660702
DM
14878 "force" : {
14879 "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node.",
14880 "optional" : 1,
14881 "type" : "boolean"
14882 },
14883 "node" : {
14884 "description" : "The cluster node name.",
7aacca6f 14885 "format" : "pve-node",
7aacca6f
DM
14886 "type" : "string"
14887 },
56122987 14888 "online" : {
56122987 14889 "description" : "Use online/live migration.",
44660702
DM
14890 "optional" : 1,
14891 "type" : "boolean"
56122987 14892 },
44660702
DM
14893 "target" : {
14894 "description" : "Target node.",
56122987 14895 "format" : "pve-node",
44660702 14896 "type" : "string"
56122987 14897 },
44660702
DM
14898 "vmid" : {
14899 "description" : "The (unique) ID of the VM.",
14900 "format" : "pve-vmid",
14901 "minimum" : 1,
14902 "type" : "integer"
56122987 14903 }
44660702 14904 }
7aacca6f 14905 },
56122987
DM
14906 "permissions" : {
14907 "check" : [
14908 "perm",
14909 "/vms/{vmid}",
14910 [
14911 "VM.Migrate"
14912 ]
14913 ]
14914 },
44660702 14915 "protected" : 1,
7aacca6f 14916 "proxyto" : "node",
44660702
DM
14917 "returns" : {
14918 "description" : "the task ID.",
14919 "type" : "string"
14920 }
56122987
DM
14921 }
14922 },
44660702
DM
14923 "leaf" : 1,
14924 "path" : "/nodes/{node}/lxc/{vmid}/migrate",
7aacca6f 14925 "text" : "migrate"
56122987
DM
14926 },
14927 {
56122987
DM
14928 "info" : {
14929 "GET" : {
44660702
DM
14930 "description" : "Check if feature for virtual machine is available.",
14931 "method" : "GET",
56122987 14932 "name" : "vm_feature",
56122987 14933 "parameters" : {
7aacca6f 14934 "additionalProperties" : 0,
56122987 14935 "properties" : {
44660702
DM
14936 "feature" : {
14937 "description" : "Feature to check.",
14938 "enum" : [
14939 "snapshot"
14940 ],
14941 "type" : "string"
14942 },
7aacca6f 14943 "node" : {
44660702 14944 "description" : "The cluster node name.",
7aacca6f 14945 "format" : "pve-node",
44660702 14946 "type" : "string"
7aacca6f 14947 },
56122987 14948 "snapname" : {
7aacca6f
DM
14949 "description" : "The name of the snapshot.",
14950 "format" : "pve-configid",
44660702
DM
14951 "maxLength" : 40,
14952 "optional" : 1,
56122987
DM
14953 "type" : "string"
14954 },
14955 "vmid" : {
7aacca6f 14956 "description" : "The (unique) ID of the VM.",
44660702 14957 "format" : "pve-vmid",
7aacca6f 14958 "minimum" : 1,
44660702 14959 "type" : "integer"
56122987 14960 }
7aacca6f 14961 }
56122987
DM
14962 },
14963 "permissions" : {
14964 "check" : [
14965 "perm",
14966 "/vms/{vmid}",
14967 [
14968 "VM.Audit"
14969 ]
14970 ]
14971 },
44660702 14972 "protected" : 1,
7aacca6f 14973 "proxyto" : "node",
7aacca6f
DM
14974 "returns" : {
14975 "properties" : {
14976 "hasFeature" : {
14977 "type" : "boolean"
14978 }
14979 },
14980 "type" : "object"
14981 }
56122987
DM
14982 }
14983 },
7aacca6f 14984 "leaf" : 1,
44660702
DM
14985 "path" : "/nodes/{node}/lxc/{vmid}/feature",
14986 "text" : "feature"
56122987
DM
14987 },
14988 {
56122987
DM
14989 "info" : {
14990 "POST" : {
44660702
DM
14991 "description" : "Create a Template.",
14992 "method" : "POST",
56122987 14993 "name" : "template",
56122987
DM
14994 "parameters" : {
14995 "additionalProperties" : 0,
14996 "properties" : {
44660702
DM
14997 "experimental" : {
14998 "default" : 0,
14999 "description" : "The template feature is experimental, set this flag if you know what you are doing.",
15000 "type" : "boolean"
7aacca6f
DM
15001 },
15002 "node" : {
7aacca6f 15003 "description" : "The cluster node name.",
44660702 15004 "format" : "pve-node",
7aacca6f 15005 "type" : "string"
56122987 15006 },
44660702
DM
15007 "vmid" : {
15008 "description" : "The (unique) ID of the VM.",
15009 "format" : "pve-vmid",
15010 "minimum" : 1,
15011 "type" : "integer"
56122987
DM
15012 }
15013 }
15014 },
56122987 15015 "permissions" : {
56122987
DM
15016 "check" : [
15017 "perm",
15018 "/vms/{vmid}",
15019 [
15020 "VM.Allocate"
15021 ]
44660702
DM
15022 ],
15023 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
7aacca6f 15024 },
44660702 15025 "protected" : 1,
7aacca6f
DM
15026 "proxyto" : "node",
15027 "returns" : {
15028 "type" : "null"
56122987
DM
15029 }
15030 }
15031 },
44660702 15032 "leaf" : 1,
7aacca6f 15033 "path" : "/nodes/{node}/lxc/{vmid}/template",
44660702 15034 "text" : "template"
56122987
DM
15035 },
15036 {
56122987
DM
15037 "info" : {
15038 "POST" : {
44660702
DM
15039 "description" : "Create a container clone/copy",
15040 "method" : "POST",
56122987 15041 "name" : "clone_vm",
7aacca6f
DM
15042 "parameters" : {
15043 "additionalProperties" : 0,
15044 "properties" : {
44660702
DM
15045 "description" : {
15046 "description" : "Description for the new CT.",
7aacca6f 15047 "optional" : 1,
44660702 15048 "type" : "string"
7aacca6f
DM
15049 },
15050 "experimental" : {
7aacca6f 15051 "default" : 0,
44660702
DM
15052 "description" : "The clone feature is experimental, set this flag if you know what you are doing.",
15053 "type" : "boolean"
7aacca6f 15054 },
44660702
DM
15055 "full" : {
15056 "default" : 0,
15057 "description" : "Create a full copy of all disk. This is always done when you clone a normal CT. For CT templates, we try to create a linked clone by default.",
7aacca6f 15058 "optional" : 1,
44660702 15059 "type" : "boolean"
7aacca6f
DM
15060 },
15061 "hostname" : {
44660702 15062 "description" : "Set a hostname for the new CT.",
7aacca6f 15063 "format" : "dns-name",
7aacca6f 15064 "optional" : 1,
44660702 15065 "type" : "string"
7aacca6f 15066 },
44660702
DM
15067 "newid" : {
15068 "description" : "VMID for the clone.",
7aacca6f 15069 "format" : "pve-vmid",
44660702 15070 "minimum" : 1,
7aacca6f
DM
15071 "type" : "integer"
15072 },
15073 "node" : {
15074 "description" : "The cluster node name.",
44660702
DM
15075 "format" : "pve-node",
15076 "type" : "string"
15077 },
15078 "pool" : {
15079 "description" : "Add the new CT to the specified pool.",
15080 "format" : "pve-poolid",
15081 "optional" : 1,
15082 "type" : "string"
7aacca6f
DM
15083 },
15084 "snapname" : {
44660702 15085 "description" : "The name of the snapshot.",
7aacca6f
DM
15086 "format" : "pve-configid",
15087 "maxLength" : 40,
7aacca6f 15088 "optional" : 1,
44660702 15089 "type" : "string"
7aacca6f
DM
15090 },
15091 "storage" : {
44660702 15092 "description" : "Target storage for full clone.",
7aacca6f
DM
15093 "format" : "pve-storage-id",
15094 "optional" : 1,
7aacca6f 15095 "requires" : "full",
44660702
DM
15096 "type" : "string"
15097 },
15098 "vmid" : {
15099 "description" : "The (unique) ID of the VM.",
15100 "format" : "pve-vmid",
15101 "minimum" : 1,
15102 "type" : "integer"
7aacca6f
DM
15103 }
15104 }
56122987
DM
15105 },
15106 "permissions" : {
56122987
DM
15107 "check" : [
15108 "and",
15109 [
15110 "perm",
15111 "/vms/{vmid}",
15112 [
15113 "VM.Clone"
15114 ]
15115 ],
15116 [
15117 "or",
15118 [
15119 "perm",
15120 "/vms/{newid}",
15121 [
15122 "VM.Allocate"
15123 ]
15124 ],
15125 [
15126 "perm",
15127 "/pool/{pool}",
15128 [
15129 "VM.Allocate"
15130 ],
15131 "require_param",
15132 "pool"
15133 ]
15134 ]
7aacca6f
DM
15135 ],
15136 "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage."
56122987 15137 },
44660702 15138 "protected" : 1,
56122987 15139 "proxyto" : "node",
7aacca6f
DM
15140 "returns" : {
15141 "type" : "string"
56122987
DM
15142 }
15143 }
44660702
DM
15144 },
15145 "leaf" : 1,
15146 "path" : "/nodes/{node}/lxc/{vmid}/clone",
15147 "text" : "clone"
56122987
DM
15148 },
15149 {
56122987
DM
15150 "info" : {
15151 "PUT" : {
44660702
DM
15152 "description" : "Resize a container mountpoint.",
15153 "method" : "PUT",
15154 "name" : "resize_vm",
56122987 15155 "parameters" : {
44660702 15156 "additionalProperties" : 0,
56122987 15157 "properties" : {
44660702
DM
15158 "digest" : {
15159 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
15160 "maxLength" : 40,
15161 "optional" : 1,
15162 "type" : "string"
56122987
DM
15163 },
15164 "disk" : {
7aacca6f 15165 "description" : "The disk you want to resize.",
56122987
DM
15166 "enum" : [
15167 "rootfs",
15168 "mp0",
15169 "mp1",
15170 "mp2",
15171 "mp3",
15172 "mp4",
15173 "mp5",
15174 "mp6",
15175 "mp7",
15176 "mp8",
15177 "mp9"
15178 ],
7aacca6f
DM
15179 "type" : "string"
15180 },
44660702
DM
15181 "node" : {
15182 "description" : "The cluster node name.",
15183 "format" : "pve-node",
15184 "type" : "string"
15185 },
15186 "size" : {
15187 "description" : "The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.",
15188 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
15189 "type" : "string"
15190 },
15191 "vmid" : {
15192 "description" : "The (unique) ID of the VM.",
15193 "format" : "pve-vmid",
15194 "minimum" : 1,
15195 "type" : "integer"
56122987 15196 }
44660702 15197 }
56122987 15198 },
7aacca6f
DM
15199 "permissions" : {
15200 "check" : [
15201 "perm",
15202 "/vms/{vmid}",
15203 [
15204 "VM.Config.Disk"
15205 ],
15206 "any",
15207 1
15208 ]
15209 },
44660702 15210 "protected" : 1,
7aacca6f
DM
15211 "proxyto" : "node",
15212 "returns" : {
15213 "description" : "the task ID.",
15214 "type" : "string"
15215 }
56122987
DM
15216 }
15217 },
44660702 15218 "leaf" : 1,
7aacca6f 15219 "path" : "/nodes/{node}/lxc/{vmid}/resize",
44660702 15220 "text" : "resize"
56122987
DM
15221 }
15222 ],
15223 "info" : {
15224 "DELETE" : {
7aacca6f 15225 "description" : "Destroy the container (also delete all uses files).",
44660702
DM
15226 "method" : "DELETE",
15227 "name" : "destroy_vm",
15228 "parameters" : {
15229 "additionalProperties" : 0,
15230 "properties" : {
15231 "node" : {
15232 "description" : "The cluster node name.",
15233 "format" : "pve-node",
15234 "type" : "string"
15235 },
15236 "vmid" : {
15237 "description" : "The (unique) ID of the VM.",
15238 "format" : "pve-vmid",
15239 "minimum" : 1,
15240 "type" : "integer"
15241 }
15242 }
15243 },
7aacca6f
DM
15244 "permissions" : {
15245 "check" : [
15246 "perm",
15247 "/vms/{vmid}",
15248 [
15249 "VM.Allocate"
15250 ]
15251 ]
15252 },
44660702
DM
15253 "protected" : 1,
15254 "proxyto" : "node",
56122987
DM
15255 "returns" : {
15256 "type" : "string"
44660702 15257 }
56122987
DM
15258 },
15259 "GET" : {
7aacca6f 15260 "description" : "Directory index",
44660702 15261 "method" : "GET",
7aacca6f 15262 "name" : "vmdiridx",
56122987 15263 "parameters" : {
7aacca6f 15264 "additionalProperties" : 0,
56122987
DM
15265 "properties" : {
15266 "node" : {
7aacca6f 15267 "description" : "The cluster node name.",
44660702
DM
15268 "format" : "pve-node",
15269 "type" : "string"
56122987
DM
15270 },
15271 "vmid" : {
15272 "description" : "The (unique) ID of the VM.",
56122987 15273 "format" : "pve-vmid",
44660702
DM
15274 "minimum" : 1,
15275 "type" : "integer"
56122987 15276 }
7aacca6f 15277 }
56122987 15278 },
56122987
DM
15279 "permissions" : {
15280 "user" : "all"
44660702
DM
15281 },
15282 "proxyto" : "node",
15283 "returns" : {
15284 "items" : {
15285 "properties" : {
15286 "subdir" : {
15287 "type" : "string"
15288 }
15289 },
15290 "type" : "object"
15291 },
15292 "links" : [
15293 {
15294 "href" : "{subdir}",
15295 "rel" : "child"
15296 }
15297 ],
15298 "type" : "array"
56122987
DM
15299 }
15300 }
44660702
DM
15301 },
15302 "leaf" : 0,
15303 "path" : "/nodes/{node}/lxc/{vmid}",
15304 "text" : "{vmid}"
56122987
DM
15305 }
15306 ],
56122987 15307 "info" : {
44660702
DM
15308 "GET" : {
15309 "description" : "LXC container index (per node).",
15310 "method" : "GET",
15311 "name" : "vmlist",
15312 "parameters" : {
15313 "additionalProperties" : 0,
15314 "properties" : {
15315 "node" : {
15316 "description" : "The cluster node name.",
15317 "format" : "pve-node",
15318 "type" : "string"
15319 }
15320 }
15321 },
15322 "permissions" : {
15323 "description" : "Only list CTs where you have VM.Audit permissons on /vms/<vmid>.",
15324 "user" : "all"
15325 },
15326 "protected" : 1,
15327 "proxyto" : "node",
15328 "returns" : {
15329 "items" : {
15330 "properties" : {},
15331 "type" : "object"
15332 },
15333 "links" : [
15334 {
15335 "href" : "{vmid}",
15336 "rel" : "child"
15337 }
15338 ],
15339 "type" : "array"
15340 }
15341 },
56122987 15342 "POST" : {
44660702 15343 "description" : "Create or restore a container.",
7aacca6f
DM
15344 "method" : "POST",
15345 "name" : "create_vm",
56122987 15346 "parameters" : {
7aacca6f 15347 "additionalProperties" : 0,
56122987 15348 "properties" : {
44660702
DM
15349 "arch" : {
15350 "default" : "amd64",
15351 "description" : "OS architecture type.",
15352 "enum" : [
15353 "amd64",
15354 "i386"
15355 ],
7aacca6f 15356 "optional" : 1,
44660702 15357 "type" : "string"
7aacca6f 15358 },
44660702
DM
15359 "cmode" : {
15360 "default" : "tty",
15361 "description" : "Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).",
15362 "enum" : [
15363 "shell",
15364 "console",
15365 "tty"
15366 ],
7aacca6f 15367 "optional" : 1,
44660702 15368 "type" : "string"
7aacca6f
DM
15369 },
15370 "console" : {
7aacca6f 15371 "default" : 1,
44660702 15372 "description" : "Attach a console device (/dev/console) to the container.",
56122987 15373 "optional" : 1,
7aacca6f 15374 "type" : "boolean"
56122987 15375 },
44660702
DM
15376 "cpulimit" : {
15377 "default" : 0,
15378 "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.",
15379 "maximum" : 128,
15380 "minimum" : 0,
56122987 15381 "optional" : 1,
44660702 15382 "type" : "number"
56122987 15383 },
44660702
DM
15384 "cpuunits" : {
15385 "default" : 1024,
15386 "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.",
15387 "maximum" : 500000,
15388 "minimum" : 0,
56122987 15389 "optional" : 1,
44660702 15390 "type" : "integer"
7aacca6f
DM
15391 },
15392 "description" : {
44660702 15393 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 15394 "optional" : 1,
44660702 15395 "type" : "string"
7aacca6f 15396 },
44660702
DM
15397 "force" : {
15398 "description" : "Allow to overwrite existing container.",
7aacca6f 15399 "optional" : 1,
44660702
DM
15400 "type" : "boolean"
15401 },
15402 "hostname" : {
15403 "description" : "Set a host name for the container.",
15404 "format" : "dns-name",
15405 "maxLength" : 255,
15406 "optional" : 1,
15407 "type" : "string"
15408 },
15409 "ignore-unpack-errors" : {
15410 "description" : "Ignore errors when extracting the template.",
15411 "optional" : 1,
15412 "type" : "boolean"
15413 },
15414 "lock" : {
15415 "description" : "Lock/unlock the VM.",
7aacca6f
DM
15416 "enum" : [
15417 "migrate",
15418 "backup",
15419 "snapshot",
15420 "rollback"
15421 ],
44660702
DM
15422 "optional" : 1,
15423 "type" : "string"
7aacca6f 15424 },
44660702
DM
15425 "memory" : {
15426 "default" : 512,
15427 "description" : "Amount of RAM for the VM in MB.",
15428 "minimum" : 16,
7aacca6f 15429 "optional" : 1,
44660702
DM
15430 "type" : "integer"
15431 },
15432 "mp[n]" : {
c2993fe5 15433 "description" : "Use volume as container mount point.",
56122987 15434 "format" : {
7aacca6f
DM
15435 "acl" : {
15436 "description" : "Explicitly enable or disable ACL support.",
15437 "optional" : 1,
44660702 15438 "type" : "boolean"
56122987
DM
15439 },
15440 "backup" : {
56122987 15441 "description" : "Whether to include the mountpoint in backups.",
44660702
DM
15442 "optional" : 1,
15443 "type" : "boolean"
15444 },
15445 "mp" : {
15446 "description" : "Path to the mountpoint as seen from inside the container.",
15447 "format" : "pve-lxc-mp-string",
15448 "format_description" : "Path",
15449 "type" : "string"
15450 },
15451 "quota" : {
15452 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15453 "optional" : 1,
44660702
DM
15454 "type" : "boolean"
15455 },
15456 "ro" : {
15457 "description" : "Read-only mountpoint (not supported with bind mounts)",
44660702
DM
15458 "optional" : 1,
15459 "type" : "boolean"
7aacca6f
DM
15460 },
15461 "size" : {
44660702 15462 "description" : "Volume size (read only value).",
7aacca6f
DM
15463 "format" : "disk-size",
15464 "format_description" : "DiskSize",
7aacca6f
DM
15465 "optional" : 1,
15466 "type" : "string"
56122987
DM
15467 },
15468 "volume" : {
7aacca6f 15469 "default_key" : 1,
44660702 15470 "description" : "Volume, device or directory to mount into the container.",
56122987 15471 "format" : "pve-lxc-mp-string",
56122987 15472 "format_description" : "volume",
44660702 15473 "type" : "string"
56122987 15474 }
44660702 15475 },
56122987 15476 "optional" : 1,
7aacca6f 15477 "type" : "string"
56122987 15478 },
44660702
DM
15479 "nameserver" : {
15480 "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
15481 "format" : "address-list",
56122987 15482 "optional" : 1,
44660702 15483 "type" : "string"
56122987 15484 },
44660702
DM
15485 "net[n]" : {
15486 "description" : "Specifies network interfaces for the container.",
7aacca6f 15487 "format" : {
44660702
DM
15488 "bridge" : {
15489 "description" : "Bridge to attach the network device to.",
f004f5b9 15490 "format_description" : "bridge",
7aacca6f 15491 "optional" : 1,
44660702
DM
15492 "pattern" : "[-_.\\w\\d]+",
15493 "type" : "string"
7aacca6f 15494 },
44660702
DM
15495 "firewall" : {
15496 "description" : "Controls whether this interface's firewall rules should be used.",
7aacca6f 15497 "optional" : 1,
44660702 15498 "type" : "boolean"
7aacca6f 15499 },
44660702
DM
15500 "gw" : {
15501 "description" : "Default gateway for IPv4 traffic.",
15502 "format" : "ipv4",
15503 "format_description" : "GatewayIPv4",
7aacca6f 15504 "optional" : 1,
44660702 15505 "type" : "string"
7aacca6f 15506 },
44660702
DM
15507 "gw6" : {
15508 "description" : "Default gateway for IPv6 traffic.",
15509 "format" : "ipv6",
15510 "format_description" : "GatewayIPv6",
15511 "optional" : 1,
15512 "type" : "string"
7aacca6f 15513 },
44660702 15514 "hwaddr" : {
f004f5b9
DM
15515 "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)",
15516 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
15517 "optional" : 1,
15518 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
7aacca6f
DM
15519 "type" : "string"
15520 },
44660702
DM
15521 "ip" : {
15522 "description" : "IPv4 address in CIDR format.",
15523 "format" : "pve-ipv4-config",
15524 "format_description" : "IPv4Format/CIDR",
7aacca6f 15525 "optional" : 1,
44660702 15526 "type" : "string"
7aacca6f 15527 },
44660702
DM
15528 "ip6" : {
15529 "description" : "IPv6 address in CIDR format.",
15530 "format" : "pve-ipv6-config",
15531 "format_description" : "IPv6Format/CIDR",
15532 "optional" : 1,
15533 "type" : "string"
15534 },
15535 "mtu" : {
15536 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702
DM
15537 "minimum" : 64,
15538 "optional" : 1,
15539 "type" : "integer"
15540 },
15541 "name" : {
15542 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 15543 "format_description" : "string",
44660702
DM
15544 "pattern" : "[-_.\\w\\d]+",
15545 "type" : "string"
15546 },
15547 "rate" : {
15548 "description" : "Apply rate limiting to the interface",
15549 "format_description" : "mbps",
15550 "optional" : 1,
15551 "type" : "number"
15552 },
15553 "tag" : {
15554 "description" : "VLAN tag for this interface.",
44660702 15555 "maximum" : "4094",
c2993fe5 15556 "minimum" : "1",
44660702
DM
15557 "optional" : 1,
15558 "type" : "integer"
15559 },
15560 "trunks" : {
15561 "description" : "VLAN ids to pass through the interface",
15562 "format_description" : "vlanid[;vlanid...]",
15563 "optional" : 1,
15564 "pattern" : "(?^:\\d+(?:;\\d+)*)",
15565 "type" : "string"
15566 },
15567 "type" : {
15568 "description" : "Network interface type.",
15569 "enum" : [
15570 "veth"
15571 ],
15572 "optional" : 1,
15573 "type" : "string"
7aacca6f
DM
15574 }
15575 },
56122987 15576 "optional" : 1,
44660702 15577 "type" : "string"
56122987 15578 },
44660702
DM
15579 "node" : {
15580 "description" : "The cluster node name.",
15581 "format" : "pve-node",
15582 "type" : "string"
56122987 15583 },
44660702
DM
15584 "onboot" : {
15585 "default" : 0,
15586 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 15587 "optional" : 1,
44660702
DM
15588 "type" : "boolean"
15589 },
15590 "ostemplate" : {
15591 "description" : "The OS template or backup file.",
15592 "maxLength" : 255,
15593 "type" : "string"
56122987
DM
15594 },
15595 "ostype" : {
7aacca6f 15596 "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.",
56122987
DM
15597 "enum" : [
15598 "debian",
15599 "ubuntu",
15600 "centos",
15601 "fedora",
15602 "opensuse",
15603 "archlinux",
15604 "alpine",
57b78691 15605 "gentoo",
56122987 15606 "unmanaged"
44660702 15607 ],
56122987 15608 "optional" : 1,
7aacca6f 15609 "type" : "string"
56122987 15610 },
44660702
DM
15611 "password" : {
15612 "description" : "Sets root password inside container.",
15613 "minLength" : 5,
7aacca6f
DM
15614 "optional" : 1,
15615 "type" : "string"
15616 },
44660702
DM
15617 "pool" : {
15618 "description" : "Add the VM to the specified pool.",
15619 "format" : "pve-poolid",
7aacca6f 15620 "optional" : 1,
44660702 15621 "type" : "string"
7aacca6f 15622 },
44660702
DM
15623 "protection" : {
15624 "default" : 0,
15625 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
7aacca6f 15626 "optional" : 1,
44660702 15627 "type" : "boolean"
7aacca6f 15628 },
44660702
DM
15629 "restore" : {
15630 "description" : "Mark this as restore task.",
15631 "optional" : 1,
15632 "type" : "boolean"
7aacca6f 15633 },
44660702
DM
15634 "rootfs" : {
15635 "description" : "Use volume as container root.",
56122987 15636 "format" : {
44660702
DM
15637 "acl" : {
15638 "description" : "Explicitly enable or disable ACL support.",
56122987 15639 "optional" : 1,
44660702 15640 "type" : "boolean"
56122987 15641 },
44660702
DM
15642 "quota" : {
15643 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15644 "optional" : 1,
44660702 15645 "type" : "boolean"
7aacca6f 15646 },
44660702
DM
15647 "ro" : {
15648 "description" : "Read-only mountpoint (not supported with bind mounts)",
7aacca6f 15649 "optional" : 1,
44660702 15650 "type" : "boolean"
7aacca6f 15651 },
44660702
DM
15652 "size" : {
15653 "description" : "Volume size (read only value).",
15654 "format" : "disk-size",
15655 "format_description" : "DiskSize",
7aacca6f
DM
15656 "optional" : 1,
15657 "type" : "string"
15658 },
44660702
DM
15659 "volume" : {
15660 "default_key" : 1,
15661 "description" : "Volume, device or directory to mount into the container.",
15662 "format" : "pve-lxc-mp-string",
15663 "format_description" : "volume",
15664 "type" : "string"
56122987 15665 }
7aacca6f 15666 },
7aacca6f
DM
15667 "optional" : 1,
15668 "type" : "string"
44660702
DM
15669 },
15670 "searchdomain" : {
15671 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
15672 "format" : "dns-name-list",
15673 "optional" : 1,
15674 "type" : "string"
15675 },
15676 "ssh-public-keys" : {
15677 "description" : "Setup public SSH keys (one key per line, OpenSSH format).",
15678 "optional" : 1,
15679 "type" : "string"
15680 },
15681 "startup" : {
15682 "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.",
15683 "format" : "pve-startup-order",
15684 "optional" : 1,
7aacca6f 15685 "type" : "string",
44660702 15686 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 15687 },
44660702
DM
15688 "storage" : {
15689 "default" : "local",
15690 "description" : "Default Storage.",
15691 "format" : "pve-storage-id",
15692 "optional" : 1,
7aacca6f 15693 "type" : "string"
7aacca6f 15694 },
44660702
DM
15695 "swap" : {
15696 "default" : 512,
15697 "description" : "Amount of SWAP for the VM in MB.",
15698 "minimum" : 0,
15699 "optional" : 1,
15700 "type" : "integer"
15701 },
15702 "template" : {
15703 "default" : 0,
15704 "description" : "Enable/disable Template.",
15705 "optional" : 1,
15706 "type" : "boolean"
7aacca6f 15707 },
44660702
DM
15708 "tty" : {
15709 "default" : 2,
15710 "description" : "Specify the number of tty available to the container",
15711 "maximum" : 6,
15712 "minimum" : 0,
15713 "optional" : 1,
15714 "type" : "integer"
7aacca6f 15715 },
44660702
DM
15716 "unprivileged" : {
15717 "default" : 0,
15718 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
15719 "optional" : 1,
15720 "type" : "boolean"
15721 },
15722 "unused[n]" : {
c2993fe5 15723 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702
DM
15724 "format" : "pve-volume-id",
15725 "optional" : 1,
15726 "type" : "string"
15727 },
15728 "vmid" : {
15729 "description" : "The (unique) ID of the VM.",
15730 "format" : "pve-vmid",
15731 "minimum" : 1,
15732 "type" : "integer"
15733 }
7aacca6f
DM
15734 }
15735 },
44660702
DM
15736 "permissions" : {
15737 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore, it is enough if the user has 'VM.Backup' permission and the VM already exists. You also need 'Datastore.AllocateSpace' permissions on the storage.",
15738 "user" : "all"
15739 },
15740 "protected" : 1,
15741 "proxyto" : "node",
15742 "returns" : {
15743 "type" : "string"
15744 }
15745 }
15746 },
15747 "leaf" : 0,
15748 "path" : "/nodes/{node}/lxc",
15749 "text" : "lxc"
15750 },
15751 {
15752 "children" : [
15753 {
56122987
DM
15754 "children" : [
15755 {
7aacca6f
DM
15756 "children" : [
15757 {
7aacca6f
DM
15758 "info" : {
15759 "POST" : {
44660702
DM
15760 "description" : "ceph osd in",
15761 "method" : "POST",
15762 "name" : "in",
15763 "parameters" : {
15764 "additionalProperties" : 0,
15765 "properties" : {
15766 "node" : {
15767 "description" : "The cluster node name.",
15768 "format" : "pve-node",
15769 "type" : "string"
15770 },
15771 "osdid" : {
15772 "description" : "OSD ID",
15773 "type" : "integer"
15774 }
15775 }
15776 },
56122987
DM
15777 "permissions" : {
15778 "check" : [
15779 "perm",
15780 "/",
15781 [
15782 "Sys.Modify"
15783 ]
15784 ]
7aacca6f 15785 },
44660702 15786 "protected" : 1,
7aacca6f
DM
15787 "proxyto" : "node",
15788 "returns" : {
15789 "type" : "null"
44660702 15790 }
56122987
DM
15791 }
15792 },
44660702 15793 "leaf" : 1,
7aacca6f 15794 "path" : "/nodes/{node}/ceph/osd/{osdid}/in",
44660702 15795 "text" : "in"
56122987
DM
15796 },
15797 {
56122987
DM
15798 "info" : {
15799 "POST" : {
44660702
DM
15800 "description" : "ceph osd out",
15801 "method" : "POST",
15802 "name" : "out",
15803 "parameters" : {
15804 "additionalProperties" : 0,
15805 "properties" : {
15806 "node" : {
15807 "description" : "The cluster node name.",
15808 "format" : "pve-node",
15809 "type" : "string"
15810 },
15811 "osdid" : {
15812 "description" : "OSD ID",
15813 "type" : "integer"
15814 }
15815 }
15816 },
56122987
DM
15817 "permissions" : {
15818 "check" : [
15819 "perm",
15820 "/",
15821 [
15822 "Sys.Modify"
15823 ]
15824 ]
15825 },
44660702 15826 "protected" : 1,
56122987 15827 "proxyto" : "node",
7aacca6f
DM
15828 "returns" : {
15829 "type" : "null"
44660702
DM
15830 }
15831 }
15832 },
15833 "leaf" : 1,
15834 "path" : "/nodes/{node}/ceph/osd/{osdid}/out",
15835 "text" : "out"
15836 }
15837 ],
15838 "info" : {
15839 "DELETE" : {
15840 "description" : "Destroy OSD",
15841 "method" : "DELETE",
15842 "name" : "destroyosd",
15843 "parameters" : {
15844 "additionalProperties" : 0,
15845 "properties" : {
15846 "cleanup" : {
15847 "default" : 0,
15848 "description" : "If set, we remove partition table entries.",
15849 "optional" : 1,
15850 "type" : "boolean"
7aacca6f 15851 },
44660702
DM
15852 "node" : {
15853 "description" : "The cluster node name.",
15854 "format" : "pve-node",
15855 "type" : "string"
56122987 15856 },
44660702
DM
15857 "osdid" : {
15858 "description" : "OSD ID",
15859 "type" : "integer"
15860 }
56122987
DM
15861 }
15862 },
44660702
DM
15863 "protected" : 1,
15864 "proxyto" : "node",
15865 "returns" : {
15866 "type" : "string"
15867 }
15868 }
15869 },
15870 "leaf" : 0,
15871 "path" : "/nodes/{node}/ceph/osd/{osdid}",
15872 "text" : "{osdid}"
15873 }
15874 ],
15875 "info" : {
15876 "GET" : {
15877 "description" : "Get Ceph osd list/tree.",
15878 "method" : "GET",
15879 "name" : "index",
15880 "parameters" : {
15881 "additionalProperties" : 0,
15882 "properties" : {
15883 "node" : {
15884 "description" : "The cluster node name.",
15885 "format" : "pve-node",
15886 "type" : "string"
15887 }
15888 }
15889 },
15890 "permissions" : {
15891 "check" : [
15892 "perm",
15893 "/",
15894 [
15895 "Sys.Audit",
15896 "Datastore.Audit"
15897 ],
15898 "any",
15899 1
15900 ]
15901 },
15902 "protected" : 1,
15903 "proxyto" : "node",
15904 "returns" : {
15905 "type" : "object"
15906 }
15907 },
15908 "POST" : {
15909 "description" : "Create OSD",
15910 "method" : "POST",
15911 "name" : "createosd",
15912 "parameters" : {
15913 "additionalProperties" : 0,
15914 "properties" : {
15915 "dev" : {
15916 "description" : "Block device name.",
15917 "type" : "string"
15918 },
15919 "fstype" : {
15920 "default" : "xfs",
15921 "description" : "File system type.",
15922 "enum" : [
15923 "xfs",
15924 "ext4",
15925 "btrfs"
15926 ],
15927 "optional" : 1,
15928 "type" : "string"
15929 },
15930 "journal_dev" : {
15931 "description" : "Block device name for journal.",
15932 "optional" : 1,
15933 "type" : "string"
15934 },
15935 "node" : {
15936 "description" : "The cluster node name.",
15937 "format" : "pve-node",
15938 "type" : "string"
15939 }
56122987 15940 }
44660702
DM
15941 },
15942 "protected" : 1,
15943 "proxyto" : "node",
15944 "returns" : {
15945 "type" : "string"
15946 }
56122987 15947 }
44660702 15948 },
7aacca6f 15949 "leaf" : 0,
44660702
DM
15950 "path" : "/nodes/{node}/ceph/osd",
15951 "text" : "osd"
7aacca6f
DM
15952 },
15953 {
56122987
DM
15954 "info" : {
15955 "GET" : {
7aacca6f 15956 "description" : "List local disks.",
44660702
DM
15957 "method" : "GET",
15958 "name" : "disks",
15959 "parameters" : {
15960 "additionalProperties" : 0,
15961 "properties" : {
15962 "node" : {
15963 "description" : "The cluster node name.",
15964 "format" : "pve-node",
15965 "type" : "string"
15966 },
15967 "type" : {
15968 "description" : "Only list specific types of disks.",
15969 "enum" : [
15970 "unused",
15971 "journal_disks"
15972 ],
15973 "optional" : 1,
15974 "type" : "string"
15975 }
15976 }
15977 },
56122987
DM
15978 "permissions" : {
15979 "check" : [
15980 "perm",
15981 "/",
15982 [
15983 "Sys.Audit",
15984 "Datastore.Audit"
15985 ],
15986 "any",
15987 1
15988 ]
7aacca6f 15989 },
44660702
DM
15990 "protected" : 1,
15991 "proxyto" : "node",
56122987 15992 "returns" : {
7aacca6f
DM
15993 "items" : {
15994 "properties" : {
44660702
DM
15995 "dev" : {
15996 "type" : "string"
15997 },
15998 "gpt" : {
15999 "type" : "boolean"
16000 },
16001 "model" : {
16002 "optional" : 1,
16003 "type" : "string"
7aacca6f
DM
16004 },
16005 "osdid" : {
16006 "type" : "integer"
16007 },
16008 "serial" : {
7aacca6f
DM
16009 "optional" : 1,
16010 "type" : "string"
16011 },
16012 "size" : {
16013 "type" : "integer"
16014 },
44660702
DM
16015 "used" : {
16016 "optional" : 1,
7aacca6f
DM
16017 "type" : "string"
16018 },
44660702
DM
16019 "vendor" : {
16020 "optional" : 1,
16021 "type" : "string"
7aacca6f
DM
16022 }
16023 },
16024 "type" : "object"
44660702
DM
16025 },
16026 "type" : "array"
16027 }
56122987 16028 }
44660702
DM
16029 },
16030 "leaf" : 1,
16031 "path" : "/nodes/{node}/ceph/disks",
16032 "text" : "disks"
56122987
DM
16033 },
16034 {
56122987
DM
16035 "info" : {
16036 "GET" : {
7aacca6f 16037 "description" : "Get Ceph configuration.",
44660702
DM
16038 "method" : "GET",
16039 "name" : "config",
56122987 16040 "parameters" : {
7aacca6f 16041 "additionalProperties" : 0,
56122987 16042 "properties" : {
56122987 16043 "node" : {
7aacca6f 16044 "description" : "The cluster node name.",
44660702 16045 "format" : "pve-node",
56122987
DM
16046 "type" : "string"
16047 }
7aacca6f 16048 }
56122987 16049 },
56122987
DM
16050 "permissions" : {
16051 "check" : [
16052 "perm",
16053 "/",
16054 [
16055 "Sys.Audit",
16056 "Datastore.Audit"
16057 ],
16058 "any",
16059 1
16060 ]
44660702
DM
16061 },
16062 "returns" : {
16063 "type" : "string"
7aacca6f
DM
16064 }
16065 }
44660702
DM
16066 },
16067 "leaf" : 1,
16068 "path" : "/nodes/{node}/ceph/config",
16069 "text" : "config"
7aacca6f
DM
16070 },
16071 {
7aacca6f
DM
16072 "children" : [
16073 {
7aacca6f
DM
16074 "info" : {
16075 "DELETE" : {
7aacca6f 16076 "description" : "Destroy Ceph monitor.",
44660702
DM
16077 "method" : "DELETE",
16078 "name" : "destroymon",
16079 "parameters" : {
16080 "additionalProperties" : 0,
16081 "properties" : {
16082 "monid" : {
16083 "description" : "Monitor ID",
16084 "type" : "integer"
16085 },
16086 "node" : {
16087 "description" : "The cluster node name.",
16088 "format" : "pve-node",
16089 "type" : "string"
16090 }
16091 }
16092 },
7aacca6f
DM
16093 "permissions" : {
16094 "check" : [
16095 "perm",
16096 "/",
16097 [
16098 "Sys.Modify"
16099 ]
16100 ]
16101 },
44660702
DM
16102 "protected" : 1,
16103 "proxyto" : "node",
7aacca6f
DM
16104 "returns" : {
16105 "type" : "string"
44660702 16106 }
7aacca6f 16107 }
44660702
DM
16108 },
16109 "leaf" : 1,
16110 "path" : "/nodes/{node}/ceph/mon/{monid}",
16111 "text" : "{monid}"
7aacca6f
DM
16112 }
16113 ],
16114 "info" : {
16115 "GET" : {
44660702 16116 "description" : "Get Ceph monitor list.",
7aacca6f 16117 "method" : "GET",
44660702 16118 "name" : "listmon",
7aacca6f
DM
16119 "parameters" : {
16120 "additionalProperties" : 0,
16121 "properties" : {
16122 "node" : {
7aacca6f 16123 "description" : "The cluster node name.",
44660702
DM
16124 "format" : "pve-node",
16125 "type" : "string"
7aacca6f
DM
16126 }
16127 }
16128 },
44660702
DM
16129 "permissions" : {
16130 "check" : [
16131 "perm",
16132 "/",
16133 [
16134 "Sys.Audit",
16135 "Datastore.Audit"
16136 ],
16137 "any",
16138 1
16139 ]
16140 },
7aacca6f 16141 "protected" : 1,
44660702 16142 "proxyto" : "node",
7aacca6f
DM
16143 "returns" : {
16144 "items" : {
16145 "properties" : {
44660702 16146 "addr" : {
7aacca6f 16147 "type" : "string"
56122987 16148 },
44660702 16149 "name" : {
56122987
DM
16150 "type" : "string"
16151 }
7aacca6f
DM
16152 },
16153 "type" : "object"
56122987 16154 },
7aacca6f
DM
16155 "links" : [
16156 {
16157 "href" : "{name}",
16158 "rel" : "child"
16159 }
16160 ],
56122987 16161 "type" : "array"
44660702 16162 }
7aacca6f
DM
16163 },
16164 "POST" : {
44660702
DM
16165 "description" : "Create Ceph Monitor",
16166 "method" : "POST",
16167 "name" : "createmon",
16168 "parameters" : {
16169 "additionalProperties" : 0,
16170 "properties" : {
16171 "node" : {
16172 "description" : "The cluster node name.",
16173 "format" : "pve-node",
16174 "type" : "string"
16175 }
16176 }
16177 },
7aacca6f
DM
16178 "permissions" : {
16179 "check" : [
16180 "perm",
16181 "/",
16182 [
16183 "Sys.Modify"
16184 ]
16185 ]
16186 },
44660702 16187 "protected" : 1,
7aacca6f 16188 "proxyto" : "node",
56122987
DM
16189 "returns" : {
16190 "type" : "string"
44660702 16191 }
56122987 16192 }
44660702
DM
16193 },
16194 "leaf" : 0,
16195 "path" : "/nodes/{node}/ceph/mon",
16196 "text" : "mon"
56122987
DM
16197 },
16198 {
16199 "info" : {
16200 "POST" : {
44660702
DM
16201 "description" : "Create initial ceph default configuration and setup symlinks.",
16202 "method" : "POST",
16203 "name" : "init",
16204 "parameters" : {
16205 "additionalProperties" : 0,
16206 "properties" : {
16207 "network" : {
16208 "description" : "Use specific network for all ceph related traffic",
16209 "format" : "CIDR",
16210 "maxLength" : 128,
16211 "optional" : 1,
16212 "type" : "string"
16213 },
16214 "node" : {
16215 "description" : "The cluster node name.",
16216 "format" : "pve-node",
16217 "type" : "string"
16218 },
16219 "pg_bits" : {
16220 "default" : 6,
16221 "description" : "Placement group bits, used to specify the default number of placement groups.\n\nNOTE: 'osd pool default pg num' does not work for default pools.",
16222 "maximum" : 14,
16223 "minimum" : 6,
16224 "optional" : 1,
16225 "type" : "integer"
16226 },
16227 "size" : {
16228 "default" : 2,
16229 "description" : "Number of replicas per object",
16230 "maximum" : 3,
16231 "minimum" : 1,
16232 "optional" : 1,
16233 "type" : "integer"
16234 }
16235 }
7aacca6f 16236 },
56122987
DM
16237 "permissions" : {
16238 "check" : [
16239 "perm",
16240 "/",
16241 [
16242 "Sys.Modify"
16243 ]
16244 ]
16245 },
7aacca6f 16246 "protected" : 1,
44660702
DM
16247 "proxyto" : "node",
16248 "returns" : {
16249 "type" : "null"
7aacca6f
DM
16250 }
16251 }
16252 },
7aacca6f 16253 "leaf" : 1,
44660702
DM
16254 "path" : "/nodes/{node}/ceph/init",
16255 "text" : "init"
7aacca6f
DM
16256 },
16257 {
7aacca6f
DM
16258 "info" : {
16259 "POST" : {
44660702 16260 "description" : "Stop ceph services.",
7aacca6f
DM
16261 "method" : "POST",
16262 "name" : "stop",
16263 "parameters" : {
44660702 16264 "additionalProperties" : 0,
7aacca6f
DM
16265 "properties" : {
16266 "node" : {
7aacca6f 16267 "description" : "The cluster node name.",
44660702 16268 "format" : "pve-node",
56122987 16269 "type" : "string"
7aacca6f
DM
16270 },
16271 "service" : {
7aacca6f 16272 "description" : "Ceph service name.",
44660702
DM
16273 "optional" : 1,
16274 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
16275 "type" : "string"
56122987 16276 }
44660702 16277 }
7aacca6f
DM
16278 },
16279 "permissions" : {
16280 "check" : [
16281 "perm",
16282 "/",
16283 [
16284 "Sys.Modify"
16285 ]
16286 ]
16287 },
44660702
DM
16288 "protected" : 1,
16289 "proxyto" : "node",
16290 "returns" : {
16291 "type" : "string"
16292 }
7aacca6f 16293 }
44660702
DM
16294 },
16295 "leaf" : 1,
16296 "path" : "/nodes/{node}/ceph/stop",
16297 "text" : "stop"
7aacca6f
DM
16298 },
16299 {
7aacca6f
DM
16300 "info" : {
16301 "POST" : {
7aacca6f 16302 "description" : "Start ceph services.",
44660702 16303 "method" : "POST",
7aacca6f 16304 "name" : "start",
56122987
DM
16305 "parameters" : {
16306 "additionalProperties" : 0,
16307 "properties" : {
16308 "node" : {
7aacca6f 16309 "description" : "The cluster node name.",
44660702 16310 "format" : "pve-node",
7aacca6f
DM
16311 "type" : "string"
16312 },
16313 "service" : {
16314 "description" : "Ceph service name.",
44660702 16315 "optional" : 1,
7aacca6f 16316 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
44660702 16317 "type" : "string"
7aacca6f
DM
16318 }
16319 }
16320 },
44660702
DM
16321 "permissions" : {
16322 "check" : [
16323 "perm",
16324 "/",
16325 [
16326 "Sys.Modify"
16327 ]
16328 ]
16329 },
7aacca6f 16330 "protected" : 1,
44660702
DM
16331 "proxyto" : "node",
16332 "returns" : {
16333 "type" : "string"
16334 }
7aacca6f 16335 }
44660702
DM
16336 },
16337 "leaf" : 1,
16338 "path" : "/nodes/{node}/ceph/start",
16339 "text" : "start"
7aacca6f
DM
16340 },
16341 {
7aacca6f
DM
16342 "info" : {
16343 "GET" : {
44660702
DM
16344 "description" : "Get ceph status.",
16345 "method" : "GET",
16346 "name" : "status",
7aacca6f
DM
16347 "parameters" : {
16348 "additionalProperties" : 0,
16349 "properties" : {
16350 "node" : {
7aacca6f 16351 "description" : "The cluster node name.",
44660702 16352 "format" : "pve-node",
7aacca6f 16353 "type" : "string"
56122987
DM
16354 }
16355 }
16356 },
16357 "permissions" : {
16358 "check" : [
16359 "perm",
16360 "/",
16361 [
16362 "Sys.Audit",
16363 "Datastore.Audit"
16364 ],
16365 "any",
16366 1
16367 ]
16368 },
44660702
DM
16369 "protected" : 1,
16370 "proxyto" : "node",
56122987 16371 "returns" : {
7aacca6f
DM
16372 "type" : "object"
16373 }
16374 }
16375 },
44660702 16376 "leaf" : 1,
7aacca6f 16377 "path" : "/nodes/{node}/ceph/status",
44660702 16378 "text" : "status"
7aacca6f
DM
16379 },
16380 {
44660702
DM
16381 "children" : [
16382 {
16383 "info" : {
16384 "DELETE" : {
16385 "description" : "Destroy pool",
16386 "method" : "DELETE",
16387 "name" : "destroypool",
16388 "parameters" : {
16389 "additionalProperties" : 0,
16390 "properties" : {
16391 "name" : {
16392 "description" : "The name of the pool. It must be unique.",
16393 "type" : "string"
16394 },
16395 "node" : {
16396 "description" : "The cluster node name.",
16397 "format" : "pve-node",
16398 "type" : "string"
16399 }
16400 }
16401 },
16402 "permissions" : {
16403 "check" : [
16404 "perm",
16405 "/",
16406 [
16407 "Sys.Modify"
16408 ]
16409 ]
16410 },
16411 "protected" : 1,
16412 "proxyto" : "node",
16413 "returns" : {
16414 "type" : "null"
16415 }
16416 }
16417 },
16418 "leaf" : 1,
16419 "path" : "/nodes/{node}/ceph/pools/{name}",
16420 "text" : "{name}"
16421 }
16422 ],
7aacca6f
DM
16423 "info" : {
16424 "GET" : {
44660702
DM
16425 "description" : "List all pools.",
16426 "method" : "GET",
16427 "name" : "lspools",
7aacca6f
DM
16428 "parameters" : {
16429 "additionalProperties" : 0,
16430 "properties" : {
16431 "node" : {
7aacca6f 16432 "description" : "The cluster node name.",
44660702
DM
16433 "format" : "pve-node",
16434 "type" : "string"
7aacca6f
DM
16435 }
16436 }
16437 },
7aacca6f
DM
16438 "permissions" : {
16439 "check" : [
16440 "perm",
16441 "/",
16442 [
16443 "Sys.Audit",
16444 "Datastore.Audit"
16445 ],
16446 "any",
16447 1
16448 ]
16449 },
44660702
DM
16450 "protected" : 1,
16451 "proxyto" : "node",
7aacca6f 16452 "returns" : {
56122987 16453 "items" : {
56122987 16454 "properties" : {
7aacca6f
DM
16455 "pool" : {
16456 "type" : "integer"
16457 },
44660702
DM
16458 "pool_name" : {
16459 "type" : "string"
16460 },
7aacca6f
DM
16461 "size" : {
16462 "type" : "integer"
56122987 16463 }
44660702
DM
16464 },
16465 "type" : "object"
7aacca6f 16466 },
44660702
DM
16467 "links" : [
16468 {
16469 "href" : "{pool_name}",
16470 "rel" : "child"
16471 }
16472 ],
7aacca6f
DM
16473 "type" : "array"
16474 }
16475 },
16476 "POST" : {
7aacca6f 16477 "description" : "Create POOL",
7aacca6f 16478 "method" : "POST",
7aacca6f
DM
16479 "name" : "createpool",
16480 "parameters" : {
16481 "additionalProperties" : 0,
16482 "properties" : {
7aacca6f 16483 "crush_ruleset" : {
7aacca6f 16484 "default" : 0,
44660702 16485 "description" : "The ruleset to use for mapping object placement in the cluster.",
7aacca6f 16486 "maximum" : 32768,
44660702 16487 "minimum" : 0,
7aacca6f 16488 "optional" : 1,
44660702 16489 "type" : "integer"
56122987 16490 },
44660702
DM
16491 "min_size" : {
16492 "default" : 1,
16493 "description" : "Minimum number of replicas per object",
16494 "maximum" : 3,
16495 "minimum" : 1,
16496 "optional" : 1,
16497 "type" : "integer"
7aacca6f 16498 },
44660702
DM
16499 "name" : {
16500 "description" : "The name of the pool. It must be unique.",
16501 "type" : "string"
16502 },
16503 "node" : {
16504 "description" : "The cluster node name.",
16505 "format" : "pve-node",
16506 "type" : "string"
16507 },
16508 "pg_num" : {
16509 "default" : 64,
16510 "description" : "Number of placement groups.",
16511 "maximum" : 32768,
16512 "minimum" : 8,
16513 "optional" : 1,
16514 "type" : "integer"
16515 },
16516 "size" : {
16517 "default" : 2,
16518 "description" : "Number of replicas per object",
16519 "maximum" : 3,
16520 "minimum" : 1,
16521 "optional" : 1,
16522 "type" : "integer"
56122987
DM
16523 }
16524 }
44660702
DM
16525 },
16526 "permissions" : {
16527 "check" : [
16528 "perm",
16529 "/",
16530 [
16531 "Sys.Modify"
16532 ]
16533 ]
16534 },
16535 "protected" : 1,
16536 "proxyto" : "node",
16537 "returns" : {
16538 "type" : "null"
7aacca6f 16539 }
56122987 16540 }
44660702 16541 },
56122987 16542 "leaf" : 0,
44660702
DM
16543 "path" : "/nodes/{node}/ceph/pools",
16544 "text" : "pools"
56122987
DM
16545 },
16546 {
56122987 16547 "info" : {
7aacca6f 16548 "GET" : {
44660702
DM
16549 "description" : "Get OSD crush map",
16550 "method" : "GET",
16551 "name" : "crush",
16552 "parameters" : {
16553 "additionalProperties" : 0,
16554 "properties" : {
16555 "node" : {
16556 "description" : "The cluster node name.",
16557 "format" : "pve-node",
16558 "type" : "string"
16559 }
16560 }
16561 },
7aacca6f
DM
16562 "permissions" : {
16563 "check" : [
16564 "perm",
16565 "/",
16566 [
16567 "Sys.Audit",
16568 "Datastore.Audit"
16569 ],
16570 "any",
16571 1
16572 ]
16573 },
44660702 16574 "protected" : 1,
7aacca6f 16575 "proxyto" : "node",
56122987 16576 "returns" : {
7aacca6f 16577 "type" : "string"
44660702 16578 }
56122987
DM
16579 }
16580 },
44660702
DM
16581 "leaf" : 1,
16582 "path" : "/nodes/{node}/ceph/crush",
7aacca6f 16583 "text" : "crush"
56122987
DM
16584 },
16585 {
56122987 16586 "info" : {
7aacca6f 16587 "GET" : {
44660702
DM
16588 "description" : "Read ceph log",
16589 "method" : "GET",
16590 "name" : "log",
16591 "parameters" : {
16592 "additionalProperties" : 0,
16593 "properties" : {
16594 "limit" : {
16595 "minimum" : 0,
16596 "optional" : 1,
16597 "type" : "integer"
7aacca6f 16598 },
44660702
DM
16599 "node" : {
16600 "description" : "The cluster node name.",
16601 "format" : "pve-node",
16602 "type" : "string"
16603 },
16604 "start" : {
16605 "minimum" : 0,
16606 "optional" : 1,
16607 "type" : "integer"
16608 }
7aacca6f 16609 }
56122987 16610 },
56122987
DM
16611 "permissions" : {
16612 "check" : [
16613 "perm",
7aacca6f 16614 "/nodes/{node}",
56122987 16615 [
7aacca6f 16616 "Sys.Syslog"
56122987
DM
16617 ]
16618 ]
16619 },
7aacca6f 16620 "protected" : 1,
44660702
DM
16621 "proxyto" : "node",
16622 "returns" : {
16623 "items" : {
16624 "properties" : {
16625 "n" : {
16626 "description" : "Line number",
16627 "type" : "integer"
16628 },
16629 "t" : {
16630 "description" : "Line text",
16631 "type" : "string"
16632 }
56122987 16633 },
44660702 16634 "type" : "object"
56122987 16635 },
44660702 16636 "type" : "array"
7aacca6f 16637 }
56122987
DM
16638 }
16639 },
16640 "leaf" : 1,
44660702
DM
16641 "path" : "/nodes/{node}/ceph/log",
16642 "text" : "log"
7aacca6f
DM
16643 }
16644 ],
44660702
DM
16645 "info" : {
16646 "GET" : {
16647 "description" : "Directory index.",
16648 "method" : "GET",
16649 "name" : "index",
16650 "parameters" : {
16651 "additionalProperties" : 0,
16652 "properties" : {
16653 "node" : {
16654 "description" : "The cluster node name.",
16655 "format" : "pve-node",
16656 "type" : "string"
16657 }
16658 }
16659 },
16660 "permissions" : {
16661 "check" : [
16662 "perm",
16663 "/",
16664 [
16665 "Sys.Audit",
16666 "Datastore.Audit"
16667 ],
16668 "any",
16669 1
16670 ]
16671 },
16672 "returns" : {
16673 "items" : {
16674 "properties" : {},
16675 "type" : "object"
16676 },
16677 "links" : [
16678 {
16679 "href" : "{name}",
16680 "rel" : "child"
16681 }
16682 ],
16683 "type" : "array"
16684 }
16685 }
16686 },
7aacca6f 16687 "leaf" : 0,
44660702
DM
16688 "path" : "/nodes/{node}/ceph",
16689 "text" : "ceph"
7aacca6f
DM
16690 },
16691 {
7aacca6f
DM
16692 "info" : {
16693 "POST" : {
7aacca6f 16694 "description" : "Create backup.",
44660702 16695 "method" : "POST",
7aacca6f
DM
16696 "name" : "vzdump",
16697 "parameters" : {
44660702 16698 "additionalProperties" : 0,
7aacca6f 16699 "properties" : {
44660702
DM
16700 "all" : {
16701 "default" : 0,
16702 "description" : "Backup all known guest systems on this host.",
7aacca6f 16703 "optional" : 1,
44660702 16704 "type" : "boolean"
56122987 16705 },
44660702 16706 "bwlimit" : {
7aacca6f 16707 "default" : 0,
44660702
DM
16708 "description" : "Limit I/O bandwidth (KBytes per second).",
16709 "minimum" : 0,
7aacca6f 16710 "optional" : 1,
44660702 16711 "type" : "integer"
56122987 16712 },
44660702
DM
16713 "compress" : {
16714 "default" : "0",
16715 "description" : "Compress dump file.",
16716 "enum" : [
16717 "0",
16718 "1",
16719 "gzip",
16720 "lzo"
16721 ],
7aacca6f 16722 "optional" : 1,
44660702 16723 "type" : "string"
56122987 16724 },
44660702
DM
16725 "dumpdir" : {
16726 "description" : "Store resulting files to specified directory.",
7aacca6f 16727 "optional" : 1,
44660702 16728 "type" : "string"
7aacca6f 16729 },
44660702
DM
16730 "exclude" : {
16731 "description" : "Exclude specified guest systems (assumes --all)",
16732 "format" : "pve-vmid-list",
7aacca6f 16733 "optional" : 1,
44660702 16734 "type" : "string"
7aacca6f 16735 },
44660702
DM
16736 "exclude-path" : {
16737 "description" : "Exclude certain files/directories (shell globs).",
16738 "format" : "string-alist",
7aacca6f 16739 "optional" : 1,
44660702 16740 "type" : "string"
7aacca6f 16741 },
44660702
DM
16742 "ionice" : {
16743 "default" : 7,
16744 "description" : "Set CFQ ionice priority.",
16745 "maximum" : 8,
16746 "minimum" : 0,
16747 "optional" : 1,
16748 "type" : "integer"
7aacca6f 16749 },
44660702
DM
16750 "lockwait" : {
16751 "default" : 180,
16752 "description" : "Maximal time to wait for the global lock (minutes).",
16753 "minimum" : 0,
7aacca6f 16754 "optional" : 1,
44660702 16755 "type" : "integer"
7aacca6f
DM
16756 },
16757 "mailnotification" : {
44660702 16758 "default" : "always",
7aacca6f
DM
16759 "description" : "Specify when to send an email",
16760 "enum" : [
16761 "always",
16762 "failure"
16763 ],
7aacca6f 16764 "optional" : 1,
44660702 16765 "type" : "string"
7aacca6f
DM
16766 },
16767 "mailto" : {
7aacca6f 16768 "description" : "Comma-separated list of email addresses that should receive email notifications.",
44660702 16769 "format" : "string-list",
7aacca6f 16770 "optional" : 1,
44660702 16771 "type" : "string"
56122987 16772 },
44660702
DM
16773 "maxfiles" : {
16774 "default" : 1,
16775 "description" : "Maximal number of backup files per guest system.",
16776 "minimum" : 1,
7aacca6f 16777 "optional" : 1,
44660702 16778 "type" : "integer"
56122987 16779 },
7aacca6f 16780 "mode" : {
44660702 16781 "default" : "snapshot",
7aacca6f
DM
16782 "description" : "Backup mode.",
16783 "enum" : [
16784 "snapshot",
16785 "suspend",
16786 "stop"
16787 ],
44660702
DM
16788 "optional" : 1,
16789 "type" : "string"
7aacca6f 16790 },
44660702
DM
16791 "node" : {
16792 "description" : "Only run if executed on this node.",
16793 "format" : "pve-node",
16794 "optional" : 1,
16795 "type" : "string"
16796 },
16797 "pigz" : {
16798 "default" : 0,
16799 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
16800 "optional" : 1,
16801 "type" : "integer"
16802 },
16803 "quiet" : {
16804 "default" : 0,
16805 "description" : "Be quiet.",
16806 "optional" : 1,
16807 "type" : "boolean"
16808 },
16809 "remove" : {
7aacca6f 16810 "default" : 1,
44660702 16811 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
7aacca6f 16812 "optional" : 1,
44660702 16813 "type" : "boolean"
7aacca6f 16814 },
44660702
DM
16815 "script" : {
16816 "description" : "Use specified hook script.",
16817 "optional" : 1,
16818 "type" : "string"
16819 },
16820 "size" : {
16821 "default" : 1024,
16822 "description" : "Unused, will be removed in a future release.",
16823 "minimum" : 500,
16824 "optional" : 1,
16825 "type" : "integer"
16826 },
16827 "stdexcludes" : {
16828 "default" : 1,
16829 "description" : "Exclude temporary files and logs.",
16830 "optional" : 1,
16831 "type" : "boolean"
16832 },
16833 "stdout" : {
16834 "description" : "Write tar to stdout, not to a file.",
7aacca6f 16835 "optional" : 1,
44660702
DM
16836 "type" : "boolean"
16837 },
16838 "stop" : {
7aacca6f 16839 "default" : 0,
44660702
DM
16840 "description" : "Stop runnig backup jobs on this host.",
16841 "optional" : 1,
16842 "type" : "boolean"
7aacca6f 16843 },
44660702
DM
16844 "stopwait" : {
16845 "default" : 10,
16846 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
7aacca6f
DM
16847 "minimum" : 0,
16848 "optional" : 1,
44660702 16849 "type" : "integer"
7aacca6f 16850 },
44660702
DM
16851 "storage" : {
16852 "description" : "Store resulting file to this storage.",
16853 "format" : "pve-storage-id",
7aacca6f 16854 "optional" : 1,
44660702
DM
16855 "type" : "string"
16856 },
16857 "tmpdir" : {
16858 "description" : "Store temporary files to specified directory.",
16859 "optional" : 1,
16860 "type" : "string"
7aacca6f
DM
16861 },
16862 "vmid" : {
7aacca6f 16863 "description" : "The ID of the guest system you want to backup.",
44660702 16864 "format" : "pve-vmid-list",
7aacca6f
DM
16865 "optional" : 1,
16866 "type" : "string"
16867 }
7aacca6f
DM
16868 }
16869 },
7aacca6f 16870 "permissions" : {
44660702
DM
16871 "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.",
16872 "user" : "all"
7aacca6f 16873 },
44660702 16874 "protected" : 1,
7aacca6f 16875 "proxyto" : "node",
7aacca6f 16876 "returns" : {
44660702 16877 "type" : "string"
7aacca6f
DM
16878 }
16879 }
16880 },
44660702
DM
16881 "leaf" : 1,
16882 "path" : "/nodes/{node}/vzdump",
16883 "text" : "vzdump"
16884 },
16885 {
7aacca6f
DM
16886 "children" : [
16887 {
7aacca6f
DM
16888 "children" : [
16889 {
7aacca6f
DM
16890 "info" : {
16891 "GET" : {
7aacca6f
DM
16892 "description" : "Read service properties",
16893 "method" : "GET",
16894 "name" : "service_state",
16895 "parameters" : {
44660702 16896 "additionalProperties" : 0,
7aacca6f
DM
16897 "properties" : {
16898 "node" : {
7aacca6f 16899 "description" : "The cluster node name.",
44660702
DM
16900 "format" : "pve-node",
16901 "type" : "string"
7aacca6f
DM
16902 },
16903 "service" : {
44660702 16904 "description" : "Service ID",
7aacca6f
DM
16905 "enum" : [
16906 "pveproxy",
16907 "pvedaemon",
16908 "spiceproxy",
16909 "pvestatd",
16910 "pve-cluster",
16911 "corosync",
16912 "pve-firewall",
16913 "pvefw-logger",
16914 "pve-ha-crm",
16915 "pve-ha-lrm",
16916 "sshd",
16917 "syslog",
16918 "cron",
16919 "postfix",
16920 "ksmtuned",
16921 "systemd-timesyncd"
16922 ],
7aacca6f
DM
16923 "type" : "string"
16924 }
44660702 16925 }
56122987 16926 },
7aacca6f
DM
16927 "permissions" : {
16928 "check" : [
16929 "perm",
16930 "/nodes/{node}",
16931 [
44660702 16932 "Sys.Audit"
7aacca6f
DM
16933 ]
16934 ]
56122987 16935 },
44660702 16936 "protected" : 1,
7aacca6f 16937 "proxyto" : "node",
44660702
DM
16938 "returns" : {
16939 "properties" : {},
16940 "type" : "object"
16941 }
16942 }
16943 },
16944 "leaf" : 1,
16945 "path" : "/nodes/{node}/services/{service}/state",
16946 "text" : "state"
16947 },
16948 {
16949 "info" : {
16950 "POST" : {
16951 "description" : "Start service.",
7aacca6f
DM
16952 "method" : "POST",
16953 "name" : "service_start",
16954 "parameters" : {
44660702 16955 "additionalProperties" : 0,
7aacca6f 16956 "properties" : {
44660702
DM
16957 "node" : {
16958 "description" : "The cluster node name.",
16959 "format" : "pve-node",
16960 "type" : "string"
16961 },
7aacca6f 16962 "service" : {
44660702 16963 "description" : "Service ID",
7aacca6f
DM
16964 "enum" : [
16965 "pveproxy",
16966 "pvedaemon",
16967 "spiceproxy",
16968 "pvestatd",
16969 "pve-cluster",
16970 "corosync",
16971 "pve-firewall",
16972 "pvefw-logger",
16973 "pve-ha-crm",
16974 "pve-ha-lrm",
16975 "sshd",
16976 "syslog",
16977 "cron",
16978 "postfix",
16979 "ksmtuned",
16980 "systemd-timesyncd"
16981 ],
7aacca6f
DM
16982 "type" : "string"
16983 }
44660702 16984 }
56122987 16985 },
56122987
DM
16986 "permissions" : {
16987 "check" : [
16988 "perm",
16989 "/nodes/{node}",
16990 [
7aacca6f 16991 "Sys.Modify"
56122987
DM
16992 ]
16993 ]
7aacca6f 16994 },
7aacca6f 16995 "protected" : 1,
44660702
DM
16996 "proxyto" : "node",
16997 "returns" : {
16998 "type" : "string"
16999 }
17000 }
17001 },
17002 "leaf" : 1,
17003 "path" : "/nodes/{node}/services/{service}/start",
17004 "text" : "start"
17005 },
17006 {
17007 "info" : {
17008 "POST" : {
17009 "description" : "Stop service.",
17010 "method" : "POST",
7aacca6f 17011 "name" : "service_stop",
56122987 17012 "parameters" : {
7aacca6f 17013 "additionalProperties" : 0,
56122987
DM
17014 "properties" : {
17015 "node" : {
44660702 17016 "description" : "The cluster node name.",
56122987 17017 "format" : "pve-node",
44660702 17018 "type" : "string"
56122987
DM
17019 },
17020 "service" : {
44660702 17021 "description" : "Service ID",
56122987
DM
17022 "enum" : [
17023 "pveproxy",
17024 "pvedaemon",
17025 "spiceproxy",
17026 "pvestatd",
17027 "pve-cluster",
17028 "corosync",
17029 "pve-firewall",
17030 "pvefw-logger",
17031 "pve-ha-crm",
17032 "pve-ha-lrm",
17033 "sshd",
17034 "syslog",
17035 "cron",
17036 "postfix",
17037 "ksmtuned",
17038 "systemd-timesyncd"
17039 ],
56122987
DM
17040 "type" : "string"
17041 }
7aacca6f 17042 }
44660702 17043 },
56122987
DM
17044 "permissions" : {
17045 "check" : [
17046 "perm",
17047 "/nodes/{node}",
17048 [
17049 "Sys.Modify"
17050 ]
17051 ]
17052 },
44660702
DM
17053 "protected" : 1,
17054 "proxyto" : "node",
7aacca6f
DM
17055 "returns" : {
17056 "type" : "string"
44660702
DM
17057 }
17058 }
17059 },
17060 "leaf" : 1,
17061 "path" : "/nodes/{node}/services/{service}/stop",
17062 "text" : "stop"
17063 },
17064 {
17065 "info" : {
17066 "POST" : {
17067 "description" : "Restart service.",
17068 "method" : "POST",
17069 "name" : "service_restart",
56122987
DM
17070 "parameters" : {
17071 "additionalProperties" : 0,
17072 "properties" : {
7aacca6f
DM
17073 "node" : {
17074 "description" : "The cluster node name.",
44660702
DM
17075 "format" : "pve-node",
17076 "type" : "string"
7aacca6f
DM
17077 },
17078 "service" : {
44660702 17079 "description" : "Service ID",
56122987
DM
17080 "enum" : [
17081 "pveproxy",
17082 "pvedaemon",
17083 "spiceproxy",
17084 "pvestatd",
17085 "pve-cluster",
17086 "corosync",
17087 "pve-firewall",
17088 "pvefw-logger",
17089 "pve-ha-crm",
17090 "pve-ha-lrm",
17091 "sshd",
17092 "syslog",
17093 "cron",
17094 "postfix",
17095 "ksmtuned",
17096 "systemd-timesyncd"
7aacca6f 17097 ],
7aacca6f 17098 "type" : "string"
56122987
DM
17099 }
17100 }
17101 },
44660702
DM
17102 "permissions" : {
17103 "check" : [
17104 "perm",
17105 "/nodes/{node}",
17106 [
17107 "Sys.Modify"
17108 ]
17109 ]
17110 },
17111 "protected" : 1,
17112 "proxyto" : "node",
17113 "returns" : {
17114 "type" : "string"
17115 }
56122987 17116 }
44660702
DM
17117 },
17118 "leaf" : 1,
17119 "path" : "/nodes/{node}/services/{service}/restart",
17120 "text" : "restart"
56122987
DM
17121 },
17122 {
56122987
DM
17123 "info" : {
17124 "POST" : {
44660702
DM
17125 "description" : "Reload service.",
17126 "method" : "POST",
7aacca6f 17127 "name" : "service_reload",
56122987
DM
17128 "parameters" : {
17129 "additionalProperties" : 0,
17130 "properties" : {
44660702
DM
17131 "node" : {
17132 "description" : "The cluster node name.",
17133 "format" : "pve-node",
17134 "type" : "string"
17135 },
56122987 17136 "service" : {
56122987
DM
17137 "description" : "Service ID",
17138 "enum" : [
17139 "pveproxy",
17140 "pvedaemon",
17141 "spiceproxy",
17142 "pvestatd",
17143 "pve-cluster",
17144 "corosync",
17145 "pve-firewall",
17146 "pvefw-logger",
17147 "pve-ha-crm",
17148 "pve-ha-lrm",
17149 "sshd",
17150 "syslog",
17151 "cron",
17152 "postfix",
17153 "ksmtuned",
17154 "systemd-timesyncd"
44660702
DM
17155 ],
17156 "type" : "string"
56122987
DM
17157 }
17158 }
17159 },
56122987
DM
17160 "permissions" : {
17161 "check" : [
17162 "perm",
17163 "/nodes/{node}",
17164 [
17165 "Sys.Modify"
17166 ]
17167 ]
17168 },
44660702 17169 "protected" : 1,
56122987 17170 "proxyto" : "node",
7aacca6f
DM
17171 "returns" : {
17172 "type" : "string"
56122987
DM
17173 }
17174 }
44660702
DM
17175 },
17176 "leaf" : 1,
17177 "path" : "/nodes/{node}/services/{service}/reload",
17178 "text" : "reload"
17179 }
17180 ],
17181 "info" : {
17182 "GET" : {
17183 "description" : "Directory index",
17184 "method" : "GET",
17185 "name" : "srvcmdidx",
17186 "parameters" : {
17187 "additionalProperties" : 0,
17188 "properties" : {
17189 "node" : {
17190 "description" : "The cluster node name.",
17191 "format" : "pve-node",
17192 "type" : "string"
17193 },
17194 "service" : {
17195 "description" : "Service ID",
17196 "enum" : [
17197 "pveproxy",
17198 "pvedaemon",
17199 "spiceproxy",
17200 "pvestatd",
17201 "pve-cluster",
17202 "corosync",
17203 "pve-firewall",
17204 "pvefw-logger",
17205 "pve-ha-crm",
17206 "pve-ha-lrm",
17207 "sshd",
17208 "syslog",
17209 "cron",
17210 "postfix",
17211 "ksmtuned",
17212 "systemd-timesyncd"
17213 ],
17214 "type" : "string"
17215 }
17216 }
17217 },
17218 "permissions" : {
17219 "check" : [
17220 "perm",
17221 "/nodes/{node}",
17222 [
17223 "Sys.Audit"
17224 ]
17225 ]
17226 },
17227 "returns" : {
17228 "items" : {
17229 "properties" : {
17230 "subdir" : {
17231 "type" : "string"
17232 }
17233 },
17234 "type" : "object"
17235 },
17236 "links" : [
17237 {
17238 "href" : "{subdir}",
17239 "rel" : "child"
17240 }
17241 ],
17242 "type" : "array"
17243 }
17244 }
17245 },
17246 "leaf" : 0,
17247 "path" : "/nodes/{node}/services/{service}",
17248 "text" : "{service}"
17249 }
17250 ],
17251 "info" : {
17252 "GET" : {
17253 "description" : "Service list.",
17254 "method" : "GET",
17255 "name" : "index",
17256 "parameters" : {
17257 "additionalProperties" : 0,
17258 "properties" : {
17259 "node" : {
17260 "description" : "The cluster node name.",
17261 "format" : "pve-node",
17262 "type" : "string"
17263 }
17264 }
17265 },
17266 "permissions" : {
17267 "check" : [
17268 "perm",
17269 "/nodes/{node}",
17270 [
17271 "Sys.Audit"
17272 ]
17273 ]
17274 },
17275 "protected" : 1,
17276 "proxyto" : "node",
17277 "returns" : {
17278 "items" : {
17279 "properties" : {},
17280 "type" : "object"
17281 },
17282 "links" : [
17283 {
17284 "href" : "{service}",
17285 "rel" : "child"
56122987 17286 }
44660702
DM
17287 ],
17288 "type" : "array"
17289 }
7aacca6f 17290 }
44660702 17291 },
7aacca6f 17292 "leaf" : 0,
44660702
DM
17293 "path" : "/nodes/{node}/services",
17294 "text" : "services"
7aacca6f
DM
17295 },
17296 {
7aacca6f
DM
17297 "info" : {
17298 "GET" : {
44660702
DM
17299 "description" : "Read subscription info.",
17300 "method" : "GET",
17301 "name" : "get",
7aacca6f 17302 "parameters" : {
44660702 17303 "additionalProperties" : 0,
7aacca6f
DM
17304 "properties" : {
17305 "node" : {
17306 "description" : "The cluster node name.",
44660702
DM
17307 "format" : "pve-node",
17308 "type" : "string"
7aacca6f 17309 }
44660702
DM
17310 }
17311 },
17312 "permissions" : {
17313 "user" : "all"
7aacca6f 17314 },
7aacca6f
DM
17315 "proxyto" : "node",
17316 "returns" : {
17317 "type" : "object"
44660702 17318 }
7aacca6f 17319 },
44660702
DM
17320 "POST" : {
17321 "description" : "Update subscription info.",
17322 "method" : "POST",
17323 "name" : "update",
7aacca6f
DM
17324 "parameters" : {
17325 "additionalProperties" : 0,
17326 "properties" : {
44660702
DM
17327 "force" : {
17328 "default" : 0,
17329 "description" : "Always connect to server, even if we have up to date info inside local cache.",
17330 "optional" : 1,
17331 "type" : "boolean"
17332 },
7aacca6f 17333 "node" : {
7aacca6f 17334 "description" : "The cluster node name.",
44660702 17335 "format" : "pve-node",
7aacca6f
DM
17336 "type" : "string"
17337 }
17338 }
17339 },
7aacca6f 17340 "protected" : 1,
7aacca6f 17341 "proxyto" : "node",
44660702
DM
17342 "returns" : {
17343 "type" : "null"
17344 }
17345 },
17346 "PUT" : {
17347 "description" : "Set subscription key.",
17348 "method" : "PUT",
17349 "name" : "set",
7aacca6f
DM
17350 "parameters" : {
17351 "additionalProperties" : 0,
17352 "properties" : {
44660702
DM
17353 "key" : {
17354 "description" : "Proxmox VE subscription key",
17355 "type" : "string"
7aacca6f
DM
17356 },
17357 "node" : {
7aacca6f 17358 "description" : "The cluster node name.",
44660702
DM
17359 "format" : "pve-node",
17360 "type" : "string"
7aacca6f
DM
17361 }
17362 }
17363 },
44660702
DM
17364 "protected" : 1,
17365 "proxyto" : "node",
7aacca6f
DM
17366 "returns" : {
17367 "type" : "null"
44660702 17368 }
7aacca6f
DM
17369 }
17370 },
44660702 17371 "leaf" : 1,
7aacca6f 17372 "path" : "/nodes/{node}/subscription",
44660702 17373 "text" : "subscription"
7aacca6f
DM
17374 },
17375 {
7aacca6f
DM
17376 "children" : [
17377 {
56122987 17378 "info" : {
7aacca6f 17379 "DELETE" : {
44660702
DM
17380 "description" : "Delete network device configuration",
17381 "method" : "DELETE",
17382 "name" : "delete_network",
17383 "parameters" : {
17384 "additionalProperties" : 0,
17385 "properties" : {
17386 "iface" : {
17387 "description" : "Network interface name.",
17388 "format" : "pve-iface",
17389 "maxLength" : 20,
17390 "minLength" : 2,
17391 "type" : "string"
17392 },
17393 "node" : {
17394 "description" : "The cluster node name.",
17395 "format" : "pve-node",
17396 "type" : "string"
17397 }
17398 }
7aacca6f
DM
17399 },
17400 "permissions" : {
17401 "check" : [
17402 "perm",
17403 "/nodes/{node}",
17404 [
17405 "Sys.Modify"
17406 ]
17407 ]
17408 },
44660702 17409 "protected" : 1,
7aacca6f 17410 "proxyto" : "node",
44660702
DM
17411 "returns" : {
17412 "type" : "null"
17413 }
17414 },
17415 "GET" : {
17416 "description" : "Read network device configuration",
17417 "method" : "GET",
17418 "name" : "network_config",
56122987 17419 "parameters" : {
44660702 17420 "additionalProperties" : 0,
56122987 17421 "properties" : {
7aacca6f 17422 "iface" : {
7aacca6f 17423 "description" : "Network interface name.",
44660702
DM
17424 "format" : "pve-iface",
17425 "maxLength" : 20,
7aacca6f
DM
17426 "minLength" : 2,
17427 "type" : "string"
44660702
DM
17428 },
17429 "node" : {
17430 "description" : "The cluster node name.",
17431 "format" : "pve-node",
17432 "type" : "string"
56122987 17433 }
44660702 17434 }
7aacca6f
DM
17435 },
17436 "permissions" : {
17437 "check" : [
17438 "perm",
17439 "/nodes/{node}",
17440 [
44660702 17441 "Sys.Audit"
7aacca6f
DM
17442 ]
17443 ]
17444 },
17445 "proxyto" : "node",
44660702
DM
17446 "returns" : {
17447 "properties" : {
17448 "method" : {
17449 "type" : "string"
17450 },
17451 "type" : {
17452 "type" : "string"
17453 }
17454 },
17455 "type" : "object"
17456 }
17457 },
17458 "PUT" : {
7aacca6f
DM
17459 "description" : "Update network device configuration",
17460 "method" : "PUT",
17461 "name" : "update_network",
17462 "parameters" : {
17463 "additionalProperties" : 0,
17464 "properties" : {
7aacca6f 17465 "address" : {
44660702 17466 "description" : "IP address.",
7aacca6f 17467 "format" : "ipv4",
44660702 17468 "optional" : 1,
7aacca6f 17469 "requires" : "netmask",
44660702 17470 "type" : "string"
7aacca6f 17471 },
44660702
DM
17472 "address6" : {
17473 "description" : "IP address.",
17474 "format" : "ipv6",
17475 "optional" : 1,
17476 "requires" : "netmask6",
17477 "type" : "string"
7aacca6f
DM
17478 },
17479 "autostart" : {
44660702 17480 "description" : "Automatically start interface on boot.",
7aacca6f 17481 "optional" : 1,
44660702 17482 "type" : "boolean"
7aacca6f 17483 },
44660702
DM
17484 "bond_mode" : {
17485 "description" : "Bonding mode.",
7aacca6f 17486 "enum" : [
44660702
DM
17487 "balance-rr",
17488 "active-backup",
17489 "balance-xor",
17490 "broadcast",
17491 "802.3ad",
17492 "balance-tlb",
17493 "balance-alb",
17494 "balance-slb",
17495 "lacp-balance-slb",
17496 "lacp-balance-tcp"
17497 ],
7aacca6f 17498 "optional" : 1,
44660702 17499 "type" : "string"
7aacca6f 17500 },
44660702
DM
17501 "bond_xmit_hash_policy" : {
17502 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17503 "enum" : [
17504 "layer2",
17505 "layer2+3",
17506 "layer3+4"
17507 ],
7aacca6f 17508 "optional" : 1,
44660702 17509 "type" : "string"
7aacca6f 17510 },
44660702
DM
17511 "bridge_ports" : {
17512 "description" : "Specify the iterfaces you want to add to your bridge.",
17513 "format" : "pve-iface-list",
7aacca6f 17514 "optional" : 1,
44660702 17515 "type" : "string"
7aacca6f 17516 },
44660702
DM
17517 "bridge_vlan_aware" : {
17518 "description" : "Enable bridge vlan support.",
7aacca6f 17519 "optional" : 1,
44660702 17520 "type" : "boolean"
7aacca6f
DM
17521 },
17522 "comments" : {
44660702 17523 "description" : "Comments",
7aacca6f 17524 "optional" : 1,
44660702 17525 "type" : "string"
7aacca6f 17526 },
44660702
DM
17527 "comments6" : {
17528 "description" : "Comments",
7aacca6f 17529 "optional" : 1,
44660702 17530 "type" : "string"
7aacca6f 17531 },
44660702
DM
17532 "delete" : {
17533 "description" : "A list of settings you want to delete.",
17534 "format" : "pve-configid-list",
7aacca6f
DM
17535 "optional" : 1,
17536 "type" : "string"
17537 },
44660702
DM
17538 "gateway" : {
17539 "description" : "Default gateway address.",
17540 "format" : "ipv4",
7aacca6f
DM
17541 "optional" : 1,
17542 "type" : "string"
17543 },
44660702
DM
17544 "gateway6" : {
17545 "description" : "Default ipv6 gateway address.",
17546 "format" : "ipv6",
7aacca6f 17547 "optional" : 1,
44660702 17548 "type" : "string"
7aacca6f
DM
17549 },
17550 "iface" : {
44660702 17551 "description" : "Network interface name.",
7aacca6f
DM
17552 "format" : "pve-iface",
17553 "maxLength" : 20,
17554 "minLength" : 2,
7aacca6f
DM
17555 "type" : "string"
17556 },
44660702
DM
17557 "netmask" : {
17558 "description" : "Network mask.",
17559 "format" : "ipv4mask",
7aacca6f 17560 "optional" : 1,
44660702
DM
17561 "requires" : "address",
17562 "type" : "string"
7aacca6f
DM
17563 },
17564 "netmask6" : {
44660702 17565 "description" : "Network mask.",
7aacca6f 17566 "maximum" : 128,
44660702 17567 "minimum" : 0,
7aacca6f
DM
17568 "optional" : 1,
17569 "requires" : "address6",
44660702
DM
17570 "type" : "integer"
17571 },
7aacca6f 17572 "node" : {
44660702 17573 "description" : "The cluster node name.",
7aacca6f 17574 "format" : "pve-node",
44660702 17575 "type" : "string"
7aacca6f 17576 },
44660702
DM
17577 "ovs_bonds" : {
17578 "description" : "Specify the interfaces used by the bonding device.",
17579 "format" : "pve-iface-list",
17580 "optional" : 1,
17581 "type" : "string"
17582 },
17583 "ovs_bridge" : {
17584 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17585 "format" : "pve-iface",
17586 "optional" : 1,
17587 "type" : "string"
17588 },
17589 "ovs_options" : {
17590 "description" : "OVS interface options.",
17591 "maxLength" : 1024,
17592 "optional" : 1,
17593 "type" : "string"
17594 },
17595 "ovs_ports" : {
17596 "description" : "Specify the iterfaces you want to add to your bridge.",
17597 "format" : "pve-iface-list",
17598 "optional" : 1,
17599 "type" : "string"
17600 },
17601 "ovs_tag" : {
17602 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17603 "maximum" : 4094,
17604 "minimum" : 1,
17605 "optional" : 1,
17606 "type" : "integer"
17607 },
17608 "slaves" : {
17609 "description" : "Specify the interfaces used by the bonding device.",
17610 "format" : "pve-iface-list",
17611 "optional" : 1,
17612 "type" : "string"
17613 },
17614 "type" : {
17615 "description" : "Network interface type",
17616 "enum" : [
17617 "bridge",
17618 "bond",
17619 "eth",
17620 "alias",
17621 "vlan",
17622 "OVSBridge",
17623 "OVSBond",
17624 "OVSPort",
17625 "OVSIntPort",
17626 "unknown"
17627 ],
17628 "type" : "string"
7aacca6f
DM
17629 }
17630 }
17631 },
7aacca6f
DM
17632 "permissions" : {
17633 "check" : [
17634 "perm",
17635 "/nodes/{node}",
17636 [
44660702 17637 "Sys.Modify"
7aacca6f
DM
17638 ]
17639 ]
17640 },
44660702
DM
17641 "protected" : 1,
17642 "proxyto" : "node",
7aacca6f 17643 "returns" : {
44660702
DM
17644 "type" : "null"
17645 }
7aacca6f
DM
17646 }
17647 },
7aacca6f 17648 "leaf" : 1,
44660702
DM
17649 "path" : "/nodes/{node}/network/{iface}",
17650 "text" : "{iface}"
7aacca6f
DM
17651 }
17652 ],
7aacca6f 17653 "info" : {
44660702
DM
17654 "DELETE" : {
17655 "description" : "Revert network configuration changes.",
17656 "method" : "DELETE",
17657 "name" : "revert_network_changes",
7aacca6f
DM
17658 "parameters" : {
17659 "additionalProperties" : 0,
17660 "properties" : {
7aacca6f 17661 "node" : {
7aacca6f 17662 "description" : "The cluster node name.",
44660702 17663 "format" : "pve-node",
7aacca6f
DM
17664 "type" : "string"
17665 }
17666 }
44660702 17667 },
7aacca6f
DM
17668 "permissions" : {
17669 "check" : [
17670 "perm",
17671 "/nodes/{node}",
17672 [
17673 "Sys.Modify"
17674 ]
17675 ]
17676 },
44660702
DM
17677 "protected" : 1,
17678 "proxyto" : "node",
7aacca6f
DM
17679 "returns" : {
17680 "type" : "null"
44660702 17681 }
7aacca6f 17682 },
44660702
DM
17683 "GET" : {
17684 "description" : "List available networks",
17685 "method" : "GET",
17686 "name" : "index",
7aacca6f 17687 "parameters" : {
44660702 17688 "additionalProperties" : 0,
7aacca6f 17689 "properties" : {
7aacca6f 17690 "node" : {
44660702
DM
17691 "description" : "The cluster node name.",
17692 "format" : "pve-node",
17693 "type" : "string"
7aacca6f
DM
17694 },
17695 "type" : {
44660702 17696 "description" : "Only list specific interface types.",
7aacca6f
DM
17697 "enum" : [
17698 "bridge",
17699 "bond",
17700 "eth",
17701 "alias",
17702 "vlan",
17703 "OVSBridge",
17704 "OVSBond",
17705 "OVSPort",
17706 "OVSIntPort",
44660702 17707 "any_bridge"
7aacca6f 17708 ],
7aacca6f 17709 "optional" : 1,
44660702
DM
17710 "type" : "string"
17711 }
17712 }
17713 },
17714 "permissions" : {
17715 "user" : "all"
17716 },
17717 "proxyto" : "node",
17718 "returns" : {
17719 "items" : {
17720 "properties" : {},
17721 "type" : "object"
17722 },
17723 "links" : [
17724 {
17725 "href" : "{iface}",
17726 "rel" : "child"
17727 }
17728 ],
17729 "type" : "array"
17730 }
17731 },
17732 "POST" : {
17733 "description" : "Create network device configuration",
17734 "method" : "POST",
17735 "name" : "create_network",
17736 "parameters" : {
17737 "additionalProperties" : 0,
17738 "properties" : {
7aacca6f 17739 "address" : {
44660702
DM
17740 "description" : "IP address.",
17741 "format" : "ipv4",
17742 "optional" : 1,
7aacca6f 17743 "requires" : "netmask",
44660702
DM
17744 "type" : "string"
17745 },
17746 "address6" : {
7aacca6f 17747 "description" : "IP address.",
44660702
DM
17748 "format" : "ipv6",
17749 "optional" : 1,
17750 "requires" : "netmask6",
17751 "type" : "string"
17752 },
17753 "autostart" : {
17754 "description" : "Automatically start interface on boot.",
7aacca6f 17755 "optional" : 1,
44660702 17756 "type" : "boolean"
7aacca6f
DM
17757 },
17758 "bond_mode" : {
17759 "description" : "Bonding mode.",
17760 "enum" : [
17761 "balance-rr",
17762 "active-backup",
17763 "balance-xor",
17764 "broadcast",
17765 "802.3ad",
17766 "balance-tlb",
17767 "balance-alb",
17768 "balance-slb",
17769 "lacp-balance-slb",
17770 "lacp-balance-tcp"
17771 ],
17772 "optional" : 1,
17773 "type" : "string"
17774 },
44660702
DM
17775 "bond_xmit_hash_policy" : {
17776 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17777 "enum" : [
17778 "layer2",
17779 "layer2+3",
17780 "layer3+4"
17781 ],
17782 "optional" : 1,
17783 "type" : "string"
17784 },
17785 "bridge_ports" : {
17786 "description" : "Specify the iterfaces you want to add to your bridge.",
7aacca6f 17787 "format" : "pve-iface-list",
7aacca6f 17788 "optional" : 1,
44660702 17789 "type" : "string"
7aacca6f 17790 },
44660702
DM
17791 "bridge_vlan_aware" : {
17792 "description" : "Enable bridge vlan support.",
7aacca6f 17793 "optional" : 1,
44660702 17794 "type" : "boolean"
7aacca6f 17795 },
44660702
DM
17796 "comments" : {
17797 "description" : "Comments",
7aacca6f 17798 "optional" : 1,
44660702
DM
17799 "type" : "string"
17800 },
17801 "comments6" : {
17802 "description" : "Comments",
17803 "optional" : 1,
17804 "type" : "string"
17805 },
17806 "gateway" : {
17807 "description" : "Default gateway address.",
17808 "format" : "ipv4",
17809 "optional" : 1,
17810 "type" : "string"
17811 },
17812 "gateway6" : {
17813 "description" : "Default ipv6 gateway address.",
17814 "format" : "ipv6",
17815 "optional" : 1,
17816 "type" : "string"
56122987 17817 },
7aacca6f 17818 "iface" : {
44660702 17819 "description" : "Network interface name.",
7aacca6f
DM
17820 "format" : "pve-iface",
17821 "maxLength" : 20,
44660702
DM
17822 "minLength" : 2,
17823 "type" : "string"
56122987 17824 },
44660702
DM
17825 "netmask" : {
17826 "description" : "Network mask.",
17827 "format" : "ipv4mask",
7aacca6f 17828 "optional" : 1,
44660702
DM
17829 "requires" : "address",
17830 "type" : "string"
7aacca6f 17831 },
44660702
DM
17832 "netmask6" : {
17833 "description" : "Network mask.",
17834 "maximum" : 128,
17835 "minimum" : 0,
7aacca6f 17836 "optional" : 1,
44660702
DM
17837 "requires" : "address6",
17838 "type" : "integer"
7aacca6f 17839 },
44660702
DM
17840 "node" : {
17841 "description" : "The cluster node name.",
17842 "format" : "pve-node",
17843 "type" : "string"
17844 },
17845 "ovs_bonds" : {
17846 "description" : "Specify the interfaces used by the bonding device.",
17847 "format" : "pve-iface-list",
7aacca6f
DM
17848 "optional" : 1,
17849 "type" : "string"
17850 },
44660702
DM
17851 "ovs_bridge" : {
17852 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17853 "format" : "pve-iface",
17854 "optional" : 1,
17855 "type" : "string"
17856 },
17857 "ovs_options" : {
17858 "description" : "OVS interface options.",
17859 "maxLength" : 1024,
17860 "optional" : 1,
17861 "type" : "string"
17862 },
17863 "ovs_ports" : {
17864 "description" : "Specify the iterfaces you want to add to your bridge.",
17865 "format" : "pve-iface-list",
17866 "optional" : 1,
17867 "type" : "string"
17868 },
17869 "ovs_tag" : {
17870 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17871 "maximum" : 4094,
17872 "minimum" : 1,
17873 "optional" : 1,
17874 "type" : "integer"
17875 },
17876 "slaves" : {
17877 "description" : "Specify the interfaces used by the bonding device.",
17878 "format" : "pve-iface-list",
7aacca6f 17879 "optional" : 1,
44660702
DM
17880 "type" : "string"
17881 },
17882 "type" : {
17883 "description" : "Network interface type",
7aacca6f 17884 "enum" : [
44660702
DM
17885 "bridge",
17886 "bond",
17887 "eth",
17888 "alias",
17889 "vlan",
17890 "OVSBridge",
17891 "OVSBond",
17892 "OVSPort",
17893 "OVSIntPort",
17894 "unknown"
7aacca6f 17895 ],
44660702 17896 "type" : "string"
56122987 17897 }
44660702 17898 }
56122987 17899 },
56122987
DM
17900 "permissions" : {
17901 "check" : [
17902 "perm",
17903 "/nodes/{node}",
17904 [
7aacca6f 17905 "Sys.Modify"
44660702
DM
17906 ]
17907 ]
7aacca6f 17908 },
44660702
DM
17909 "protected" : 1,
17910 "proxyto" : "node",
17911 "returns" : {
17912 "type" : "null"
17913 }
17914 }
17915 },
17916 "leaf" : 0,
17917 "path" : "/nodes/{node}/network",
17918 "text" : "network"
17919 },
17920 {
17921 "children" : [
17922 {
7aacca6f
DM
17923 "children" : [
17924 {
17925 "info" : {
17926 "GET" : {
44660702 17927 "description" : "Read task log.",
7aacca6f
DM
17928 "method" : "GET",
17929 "name" : "read_task_log",
17930 "parameters" : {
44660702 17931 "additionalProperties" : 0,
7aacca6f 17932 "properties" : {
44660702
DM
17933 "limit" : {
17934 "minimum" : 0,
7aacca6f 17935 "optional" : 1,
44660702 17936 "type" : "integer"
7aacca6f
DM
17937 },
17938 "node" : {
17939 "description" : "The cluster node name.",
44660702
DM
17940 "format" : "pve-node",
17941 "type" : "string"
7aacca6f 17942 },
44660702
DM
17943 "start" : {
17944 "minimum" : 0,
7aacca6f 17945 "optional" : 1,
44660702
DM
17946 "type" : "integer"
17947 },
17948 "upid" : {
17949 "type" : "string"
7aacca6f 17950 }
44660702
DM
17951 }
17952 },
17953 "permissions" : {
17954 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
17955 "user" : "all"
7aacca6f
DM
17956 },
17957 "protected" : 1,
44660702 17958 "proxyto" : "node",
7aacca6f 17959 "returns" : {
7aacca6f 17960 "items" : {
7aacca6f
DM
17961 "properties" : {
17962 "n" : {
44660702
DM
17963 "description" : "Line number",
17964 "type" : "integer"
7aacca6f
DM
17965 },
17966 "t" : {
44660702
DM
17967 "description" : "Line text",
17968 "type" : "string"
7aacca6f 17969 }
44660702
DM
17970 },
17971 "type" : "object"
17972 },
17973 "type" : "array"
17974 }
7aacca6f 17975 }
56122987 17976 },
7aacca6f 17977 "leaf" : 1,
44660702
DM
17978 "path" : "/nodes/{node}/tasks/{upid}/log",
17979 "text" : "log"
7aacca6f
DM
17980 },
17981 {
7aacca6f
DM
17982 "info" : {
17983 "GET" : {
44660702
DM
17984 "description" : "Read task status.",
17985 "method" : "GET",
7aacca6f
DM
17986 "name" : "read_task_status",
17987 "parameters" : {
17988 "additionalProperties" : 0,
17989 "properties" : {
17990 "node" : {
7aacca6f 17991 "description" : "The cluster node name.",
44660702 17992 "format" : "pve-node",
7aacca6f
DM
17993 "type" : "string"
17994 },
17995 "upid" : {
17996 "type" : "string"
17997 }
17998 }
17999 },
7aacca6f
DM
18000 "permissions" : {
18001 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
18002 "user" : "all"
56122987 18003 },
44660702 18004 "protected" : 1,
7aacca6f 18005 "proxyto" : "node",
7aacca6f
DM
18006 "returns" : {
18007 "properties" : {
18008 "pid" : {
18009 "type" : "integer"
18010 },
18011 "status" : {
7aacca6f
DM
18012 "enum" : [
18013 "running",
18014 "stopped"
44660702
DM
18015 ],
18016 "type" : "string"
7aacca6f
DM
18017 }
18018 },
18019 "type" : "object"
56122987 18020 }
7aacca6f 18021 }
44660702
DM
18022 },
18023 "leaf" : 1,
18024 "path" : "/nodes/{node}/tasks/{upid}/status",
18025 "text" : "status"
56122987 18026 }
7aacca6f 18027 ],
44660702
DM
18028 "info" : {
18029 "DELETE" : {
18030 "description" : "Stop a task.",
18031 "method" : "DELETE",
18032 "name" : "stop_task",
18033 "parameters" : {
18034 "additionalProperties" : 0,
18035 "properties" : {
18036 "node" : {
18037 "description" : "The cluster node name.",
18038 "format" : "pve-node",
18039 "type" : "string"
18040 },
18041 "upid" : {
18042 "type" : "string"
18043 }
7aacca6f 18044 }
44660702
DM
18045 },
18046 "permissions" : {
18047 "description" : "The user needs 'Sys.Modify' permissions on '/nodes/<node>' if the task does not belong to him.",
18048 "user" : "all"
18049 },
18050 "protected" : 1,
18051 "proxyto" : "node",
18052 "returns" : {
18053 "type" : "null"
7aacca6f 18054 }
56122987 18055 },
44660702
DM
18056 "GET" : {
18057 "description" : "",
18058 "method" : "GET",
18059 "name" : "upid_index",
18060 "parameters" : {
18061 "additionalProperties" : 0,
18062 "properties" : {
18063 "node" : {
18064 "description" : "The cluster node name.",
18065 "format" : "pve-node",
18066 "type" : "string"
18067 },
18068 "upid" : {
18069 "type" : "string"
18070 }
18071 }
18072 },
18073 "permissions" : {
18074 "user" : "all"
18075 },
18076 "returns" : {
18077 "items" : {
18078 "properties" : {},
18079 "type" : "object"
18080 },
18081 "links" : [
18082 {
18083 "href" : "{name}",
18084 "rel" : "child"
18085 }
18086 ],
18087 "type" : "array"
56122987 18088 }
44660702 18089 }
56122987 18090 },
44660702
DM
18091 "leaf" : 0,
18092 "path" : "/nodes/{node}/tasks/{upid}",
18093 "text" : "{upid}"
18094 }
18095 ],
18096 "info" : {
18097 "GET" : {
7aacca6f 18098 "description" : "Read task list for one node (finished tasks).",
44660702
DM
18099 "method" : "GET",
18100 "name" : "node_tasks",
56122987 18101 "parameters" : {
7aacca6f 18102 "additionalProperties" : 0,
56122987 18103 "properties" : {
44660702 18104 "errors" : {
56122987 18105 "optional" : 1,
44660702 18106 "type" : "boolean"
56122987 18107 },
44660702 18108 "limit" : {
56122987 18109 "minimum" : 0,
56122987 18110 "optional" : 1,
7aacca6f 18111 "type" : "integer"
56122987 18112 },
56122987
DM
18113 "node" : {
18114 "description" : "The cluster node name.",
44660702
DM
18115 "format" : "pve-node",
18116 "type" : "string"
56122987 18117 },
44660702 18118 "start" : {
7aacca6f 18119 "minimum" : 0,
44660702
DM
18120 "optional" : 1,
18121 "type" : "integer"
56122987 18122 },
7aacca6f 18123 "userfilter" : {
44660702
DM
18124 "optional" : 1,
18125 "type" : "string"
18126 },
18127 "vmid" : {
18128 "description" : "Only list tasks for this VM.",
18129 "format" : "pve-vmid",
18130 "minimum" : 1,
18131 "optional" : 1,
18132 "type" : "integer"
56122987
DM
18133 }
18134 }
18135 },
7aacca6f 18136 "permissions" : {
44660702 18137 "description" : "List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/<node> (the <node> the task runs on).",
7aacca6f
DM
18138 "user" : "all"
18139 },
44660702 18140 "proxyto" : "node",
56122987
DM
18141 "returns" : {
18142 "items" : {
18143 "properties" : {
44660702 18144 "upid" : {
56122987
DM
18145 "type" : "string"
18146 }
18147 },
18148 "type" : "object"
18149 },
56122987
DM
18150 "links" : [
18151 {
44660702
DM
18152 "href" : "{upid}",
18153 "rel" : "child"
56122987 18154 }
44660702
DM
18155 ],
18156 "type" : "array"
56122987
DM
18157 }
18158 }
18159 },
44660702
DM
18160 "leaf" : 0,
18161 "path" : "/nodes/{node}/tasks",
18162 "text" : "tasks"
18163 },
18164 {
56122987
DM
18165 "children" : [
18166 {
56122987
DM
18167 "info" : {
18168 "GET" : {
7aacca6f 18169 "description" : "Scan zfs pool list on local node.",
44660702
DM
18170 "method" : "GET",
18171 "name" : "zfsscan",
56122987 18172 "parameters" : {
44660702 18173 "additionalProperties" : 0,
56122987 18174 "properties" : {
56122987
DM
18175 "node" : {
18176 "description" : "The cluster node name.",
44660702
DM
18177 "format" : "pve-node",
18178 "type" : "string"
56122987 18179 }
44660702
DM
18180 }
18181 },
7aacca6f
DM
18182 "permissions" : {
18183 "check" : [
18184 "perm",
18185 "/storage",
18186 [
18187 "Datastore.Allocate"
18188 ]
18189 ]
18190 },
44660702
DM
18191 "protected" : 1,
18192 "proxyto" : "node",
56122987 18193 "returns" : {
56122987
DM
18194 "items" : {
18195 "properties" : {
44660702 18196 "pool" : {
56122987
DM
18197 "type" : "string"
18198 }
44660702
DM
18199 },
18200 "type" : "object"
18201 },
18202 "type" : "array"
18203 }
18204 }
18205 },
18206 "leaf" : 1,
18207 "path" : "/nodes/{node}/scan/zfs",
18208 "text" : "zfs"
18209 },
18210 {
18211 "info" : {
18212 "GET" : {
18213 "description" : "Scan remote NFS server.",
18214 "method" : "GET",
7aacca6f 18215 "name" : "nfsscan",
56122987 18216 "parameters" : {
44660702 18217 "additionalProperties" : 0,
56122987
DM
18218 "properties" : {
18219 "node" : {
7aacca6f 18220 "description" : "The cluster node name.",
44660702 18221 "format" : "pve-node",
7aacca6f
DM
18222 "type" : "string"
18223 },
18224 "server" : {
18225 "format" : "pve-storage-server",
18226 "type" : "string"
56122987 18227 }
44660702 18228 }
56122987 18229 },
56122987
DM
18230 "permissions" : {
18231 "check" : [
18232 "perm",
18233 "/storage",
18234 [
18235 "Datastore.Allocate"
18236 ]
18237 ]
18238 },
44660702 18239 "protected" : 1,
56122987 18240 "proxyto" : "node",
44660702
DM
18241 "returns" : {
18242 "items" : {
18243 "properties" : {
18244 "options" : {
18245 "type" : "string"
18246 },
18247 "path" : {
18248 "type" : "string"
18249 }
18250 },
18251 "type" : "object"
18252 },
18253 "type" : "array"
18254 }
18255 }
18256 },
18257 "leaf" : 1,
18258 "path" : "/nodes/{node}/scan/nfs",
18259 "text" : "nfs"
18260 },
18261 {
18262 "info" : {
18263 "GET" : {
18264 "description" : "Scan remote GlusterFS server.",
7aacca6f
DM
18265 "method" : "GET",
18266 "name" : "glusterfsscan",
56122987 18267 "parameters" : {
44660702 18268 "additionalProperties" : 0,
56122987 18269 "properties" : {
56122987 18270 "node" : {
44660702 18271 "description" : "The cluster node name.",
56122987 18272 "format" : "pve-node",
44660702 18273 "type" : "string"
7aacca6f
DM
18274 },
18275 "server" : {
18276 "format" : "pve-storage-server",
18277 "type" : "string"
56122987 18278 }
44660702
DM
18279 }
18280 },
18281 "permissions" : {
18282 "check" : [
18283 "perm",
18284 "/storage",
18285 [
18286 "Datastore.Allocate"
18287 ]
18288 ]
7aacca6f 18289 },
44660702
DM
18290 "protected" : 1,
18291 "proxyto" : "node",
18292 "returns" : {
18293 "items" : {
18294 "properties" : {
18295 "volname" : {
18296 "type" : "string"
18297 }
18298 },
18299 "type" : "object"
18300 },
18301 "type" : "array"
18302 }
56122987
DM
18303 }
18304 },
44660702
DM
18305 "leaf" : 1,
18306 "path" : "/nodes/{node}/scan/glusterfs",
7aacca6f 18307 "text" : "glusterfs"
56122987
DM
18308 },
18309 {
56122987
DM
18310 "info" : {
18311 "GET" : {
7aacca6f 18312 "description" : "Scan remote iSCSI server.",
44660702
DM
18313 "method" : "GET",
18314 "name" : "iscsiscan",
18315 "parameters" : {
18316 "additionalProperties" : 0,
18317 "properties" : {
18318 "node" : {
18319 "description" : "The cluster node name.",
18320 "format" : "pve-node",
18321 "type" : "string"
18322 },
18323 "portal" : {
18324 "format" : "pve-storage-portal-dns",
18325 "type" : "string"
18326 }
18327 }
18328 },
56122987
DM
18329 "permissions" : {
18330 "check" : [
18331 "perm",
18332 "/storage",
18333 [
18334 "Datastore.Allocate"
18335 ]
18336 ]
18337 },
44660702
DM
18338 "protected" : 1,
18339 "proxyto" : "node",
56122987 18340 "returns" : {
56122987
DM
18341 "items" : {
18342 "properties" : {
44660702 18343 "portal" : {
56122987
DM
18344 "type" : "string"
18345 },
44660702 18346 "target" : {
56122987
DM
18347 "type" : "string"
18348 }
18349 },
18350 "type" : "object"
56122987 18351 },
44660702
DM
18352 "type" : "array"
18353 }
56122987
DM
18354 }
18355 },
44660702 18356 "leaf" : 1,
7aacca6f 18357 "path" : "/nodes/{node}/scan/iscsi",
44660702 18358 "text" : "iscsi"
56122987
DM
18359 },
18360 {
56122987
DM
18361 "info" : {
18362 "GET" : {
44660702
DM
18363 "description" : "List local LVM volume groups.",
18364 "method" : "GET",
18365 "name" : "lvmscan",
18366 "parameters" : {
18367 "additionalProperties" : 0,
18368 "properties" : {
18369 "node" : {
18370 "description" : "The cluster node name.",
18371 "format" : "pve-node",
18372 "type" : "string"
56122987 18373 }
7aacca6f 18374 }
56122987 18375 },
56122987
DM
18376 "permissions" : {
18377 "check" : [
18378 "perm",
18379 "/storage",
18380 [
18381 "Datastore.Allocate"
18382 ]
18383 ]
18384 },
7aacca6f 18385 "protected" : 1,
44660702
DM
18386 "proxyto" : "node",
18387 "returns" : {
18388 "items" : {
18389 "properties" : {
18390 "vg" : {
18391 "type" : "string"
18392 }
18393 },
18394 "type" : "object"
18395 },
18396 "type" : "array"
7aacca6f 18397 }
56122987
DM
18398 }
18399 },
18400 "leaf" : 1,
44660702
DM
18401 "path" : "/nodes/{node}/scan/lvm",
18402 "text" : "lvm"
56122987
DM
18403 },
18404 {
56122987
DM
18405 "info" : {
18406 "GET" : {
44660702
DM
18407 "description" : "List local LVM Thin Pools.",
18408 "method" : "GET",
18409 "name" : "lvmthinscan",
56122987 18410 "parameters" : {
44660702 18411 "additionalProperties" : 0,
56122987
DM
18412 "properties" : {
18413 "node" : {
44660702 18414 "description" : "The cluster node name.",
56122987 18415 "format" : "pve-node",
44660702 18416 "type" : "string"
56122987
DM
18417 },
18418 "vg" : {
44660702 18419 "maxLength" : 100,
56122987 18420 "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+",
44660702 18421 "type" : "string"
56122987 18422 }
44660702 18423 }
56122987 18424 },
7aacca6f
DM
18425 "permissions" : {
18426 "check" : [
18427 "perm",
18428 "/storage",
18429 [
18430 "Datastore.Allocate"
18431 ]
18432 ]
18433 },
44660702 18434 "protected" : 1,
7aacca6f 18435 "proxyto" : "node",
56122987 18436 "returns" : {
56122987
DM
18437 "items" : {
18438 "properties" : {
18439 "lv" : {
18440 "type" : "string"
18441 }
18442 },
18443 "type" : "object"
44660702
DM
18444 },
18445 "type" : "array"
7aacca6f 18446 }
56122987
DM
18447 }
18448 },
7aacca6f 18449 "leaf" : 1,
44660702
DM
18450 "path" : "/nodes/{node}/scan/lvmthin",
18451 "text" : "lvmthin"
56122987
DM
18452 },
18453 {
56122987
DM
18454 "info" : {
18455 "GET" : {
44660702
DM
18456 "description" : "List local USB devices.",
18457 "method" : "GET",
18458 "name" : "usbscan",
18459 "parameters" : {
18460 "additionalProperties" : 0,
18461 "properties" : {
18462 "node" : {
18463 "description" : "The cluster node name.",
18464 "format" : "pve-node",
18465 "type" : "string"
18466 }
18467 }
18468 },
7aacca6f
DM
18469 "permissions" : {
18470 "check" : [
18471 "perm",
18472 "/",
18473 [
18474 "Sys.Modify"
18475 ]
18476 ]
18477 },
44660702 18478 "protected" : 1,
7aacca6f 18479 "proxyto" : "node",
56122987
DM
18480 "returns" : {
18481 "items" : {
18482 "properties" : {
44660702
DM
18483 "busnum" : {
18484 "type" : "integer"
56122987 18485 },
44660702
DM
18486 "class" : {
18487 "type" : "integer"
56122987 18488 },
7aacca6f 18489 "devnum" : {
56122987
DM
18490 "type" : "integer"
18491 },
44660702
DM
18492 "level" : {
18493 "type" : "integer"
18494 },
18495 "manufacturer" : {
18496 "optional" : 1,
7aacca6f
DM
18497 "type" : "string"
18498 },
44660702 18499 "port" : {
56122987
DM
18500 "type" : "integer"
18501 },
44660702
DM
18502 "prodid" : {
18503 "type" : "string"
56122987 18504 },
44660702
DM
18505 "product" : {
18506 "optional" : 1,
18507 "type" : "string"
18508 },
18509 "serial" : {
7aacca6f 18510 "optional" : 1,
56122987
DM
18511 "type" : "string"
18512 },
44660702 18513 "speed" : {
7aacca6f 18514 "type" : "string"
56122987 18515 },
44660702 18516 "usbpath" : {
56122987
DM
18517 "optional" : 1,
18518 "type" : "string"
18519 },
44660702
DM
18520 "vendid" : {
18521 "type" : "string"
56122987
DM
18522 }
18523 },
18524 "type" : "object"
7aacca6f
DM
18525 },
18526 "type" : "array"
44660702
DM
18527 }
18528 }
18529 },
18530 "leaf" : 1,
18531 "path" : "/nodes/{node}/scan/usb",
18532 "text" : "usb"
18533 }
18534 ],
18535 "info" : {
18536 "GET" : {
18537 "description" : "Index of available scan methods",
18538 "method" : "GET",
18539 "name" : "index",
18540 "parameters" : {
18541 "additionalProperties" : 0,
18542 "properties" : {
18543 "node" : {
18544 "description" : "The cluster node name.",
18545 "format" : "pve-node",
18546 "type" : "string"
18547 }
18548 }
18549 },
18550 "permissions" : {
18551 "user" : "all"
18552 },
18553 "returns" : {
18554 "items" : {
18555 "properties" : {
18556 "method" : {
18557 "type" : "string"
56122987
DM
18558 }
18559 },
44660702
DM
18560 "type" : "object"
18561 },
18562 "links" : [
18563 {
18564 "href" : "{method}",
18565 "rel" : "child"
18566 }
18567 ],
18568 "type" : "array"
56122987
DM
18569 }
18570 }
44660702
DM
18571 },
18572 "leaf" : 0,
18573 "path" : "/nodes/{node}/scan",
7aacca6f 18574 "text" : "scan"
56122987
DM
18575 },
18576 {
56122987
DM
18577 "children" : [
18578 {
56122987
DM
18579 "children" : [
18580 {
7aacca6f
DM
18581 "children" : [
18582 {
18583 "info" : {
44660702
DM
18584 "DELETE" : {
18585 "description" : "Delete volume",
18586 "method" : "DELETE",
18587 "name" : "delete",
7aacca6f
DM
18588 "parameters" : {
18589 "additionalProperties" : 0,
18590 "properties" : {
7aacca6f
DM
18591 "node" : {
18592 "description" : "The cluster node name.",
44660702
DM
18593 "format" : "pve-node",
18594 "type" : "string"
18595 },
18596 "storage" : {
18597 "description" : "The storage identifier.",
18598 "format" : "pve-storage-id",
18599 "optional" : 1,
18600 "type" : "string"
7aacca6f
DM
18601 },
18602 "volume" : {
18603 "description" : "Volume identifier",
18604 "type" : "string"
18605 }
18606 }
18607 },
44660702
DM
18608 "permissions" : {
18609 "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).",
18610 "user" : "all"
18611 },
18612 "protected" : 1,
18613 "proxyto" : "node",
18614 "returns" : {
18615 "type" : "null"
18616 }
7aacca6f 18617 },
44660702
DM
18618 "GET" : {
18619 "description" : "Get volume attributes",
18620 "method" : "GET",
18621 "name" : "info",
7aacca6f
DM
18622 "parameters" : {
18623 "additionalProperties" : 0,
18624 "properties" : {
7aacca6f
DM
18625 "node" : {
18626 "description" : "The cluster node name.",
44660702
DM
18627 "format" : "pve-node",
18628 "type" : "string"
7aacca6f
DM
18629 },
18630 "storage" : {
7aacca6f 18631 "description" : "The storage identifier.",
44660702 18632 "format" : "pve-storage-id",
7aacca6f
DM
18633 "optional" : 1,
18634 "type" : "string"
44660702
DM
18635 },
18636 "volume" : {
18637 "description" : "Volume identifier",
18638 "type" : "string"
7aacca6f
DM
18639 }
18640 }
18641 },
7aacca6f 18642 "permissions" : {
44660702 18643 "description" : "You need read access for the volume.",
7aacca6f
DM
18644 "user" : "all"
18645 },
44660702 18646 "protected" : 1,
7aacca6f 18647 "proxyto" : "node",
7aacca6f 18648 "returns" : {
44660702 18649 "type" : "object"
7aacca6f
DM
18650 }
18651 },
18652 "POST" : {
44660702
DM
18653 "description" : "Copy a volume. This is experimental code - do not use.",
18654 "method" : "POST",
18655 "name" : "copy",
7aacca6f
DM
18656 "parameters" : {
18657 "additionalProperties" : 0,
18658 "properties" : {
44660702
DM
18659 "node" : {
18660 "description" : "The cluster node name.",
18661 "format" : "pve-node",
18662 "type" : "string"
18663 },
18664 "storage" : {
18665 "description" : "The storage identifier.",
18666 "format" : "pve-storage-id",
18667 "optional" : 1,
18668 "type" : "string"
18669 },
7aacca6f 18670 "target" : {
44660702
DM
18671 "description" : "Target volume identifier",
18672 "type" : "string"
7aacca6f
DM
18673 },
18674 "target_node" : {
7aacca6f 18675 "description" : "Target node. Default is local node.",
44660702
DM
18676 "format" : "pve-node",
18677 "optional" : 1,
18678 "type" : "string"
7aacca6f
DM
18679 },
18680 "volume" : {
44660702
DM
18681 "description" : "Source volume identifier",
18682 "type" : "string"
7aacca6f
DM
18683 }
18684 }
18685 },
7aacca6f
DM
18686 "protected" : 1,
18687 "proxyto" : "node",
18688 "returns" : {
18689 "type" : "string"
44660702 18690 }
7aacca6f
DM
18691 }
18692 },
7aacca6f 18693 "leaf" : 1,
44660702
DM
18694 "path" : "/nodes/{node}/storage/{storage}/content/{volume}",
18695 "text" : "{volume}"
7aacca6f
DM
18696 }
18697 ],
56122987
DM
18698 "info" : {
18699 "GET" : {
44660702
DM
18700 "description" : "List storage content.",
18701 "method" : "GET",
18702 "name" : "index",
18703 "parameters" : {
18704 "additionalProperties" : 0,
18705 "properties" : {
18706 "content" : {
18707 "description" : "Only list content of this type.",
18708 "format" : "pve-storage-content",
18709 "optional" : 1,
18710 "type" : "string"
18711 },
18712 "node" : {
18713 "description" : "The cluster node name.",
18714 "format" : "pve-node",
18715 "type" : "string"
18716 },
18717 "storage" : {
18718 "description" : "The storage identifier.",
18719 "format" : "pve-storage-id",
18720 "type" : "string"
18721 },
18722 "vmid" : {
18723 "description" : "Only list images for this VM",
18724 "format" : "pve-vmid",
18725 "minimum" : 1,
18726 "optional" : 1,
18727 "type" : "integer"
18728 }
18729 }
18730 },
7aacca6f
DM
18731 "permissions" : {
18732 "check" : [
18733 "perm",
18734 "/storage/{storage}",
18735 [
18736 "Datastore.Audit",
18737 "Datastore.AllocateSpace"
18738 ],
18739 "any",
18740 1
18741 ]
18742 },
44660702 18743 "protected" : 1,
7aacca6f 18744 "proxyto" : "node",
56122987 18745 "returns" : {
44660702
DM
18746 "items" : {
18747 "properties" : {
18748 "volid" : {
18749 "type" : "string"
18750 }
18751 },
18752 "type" : "object"
18753 },
18754 "links" : [
18755 {
18756 "href" : "{volid}",
18757 "rel" : "child"
18758 }
18759 ],
18760 "type" : "array"
18761 }
18762 },
18763 "POST" : {
18764 "description" : "Allocate disk images.",
18765 "method" : "POST",
18766 "name" : "create",
56122987 18767 "parameters" : {
44660702 18768 "additionalProperties" : 0,
56122987 18769 "properties" : {
44660702
DM
18770 "filename" : {
18771 "description" : "The name of the file to create.",
18772 "type" : "string"
18773 },
18774 "format" : {
18775 "enum" : [
18776 "raw",
18777 "qcow2",
18778 "subvol"
18779 ],
18780 "optional" : 1,
18781 "requires" : "size",
18782 "type" : "string"
18783 },
18784 "node" : {
18785 "description" : "The cluster node name.",
18786 "format" : "pve-node",
18787 "type" : "string"
18788 },
18789 "size" : {
18790 "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)",
18791 "pattern" : "\\d+[MG]?",
18792 "type" : "string"
18793 },
56122987
DM
18794 "storage" : {
18795 "description" : "The storage identifier.",
44660702
DM
18796 "format" : "pve-storage-id",
18797 "type" : "string"
56122987 18798 },
44660702
DM
18799 "vmid" : {
18800 "description" : "Specify owner VM",
18801 "format" : "pve-vmid",
18802 "minimum" : 1,
18803 "type" : "integer"
18804 }
18805 }
18806 },
18807 "permissions" : {
18808 "check" : [
18809 "perm",
18810 "/storage/{storage}",
18811 [
18812 "Datastore.AllocateSpace"
18813 ]
18814 ]
18815 },
18816 "protected" : 1,
18817 "proxyto" : "node",
18818 "returns" : {
18819 "description" : "Volume identifier",
18820 "type" : "string"
18821 }
18822 }
18823 },
18824 "leaf" : 0,
18825 "path" : "/nodes/{node}/storage/{storage}/content",
18826 "text" : "content"
18827 },
18828 {
18829 "info" : {
18830 "GET" : {
18831 "description" : "Read storage status.",
18832 "method" : "GET",
18833 "name" : "read_status",
18834 "parameters" : {
18835 "additionalProperties" : 0,
18836 "properties" : {
56122987
DM
18837 "node" : {
18838 "description" : "The cluster node name.",
44660702
DM
18839 "format" : "pve-node",
18840 "type" : "string"
18841 },
18842 "storage" : {
18843 "description" : "The storage identifier.",
18844 "format" : "pve-storage-id",
18845 "type" : "string"
56122987 18846 }
44660702
DM
18847 }
18848 },
18849 "permissions" : {
18850 "check" : [
18851 "perm",
18852 "/storage/{storage}",
18853 [
18854 "Datastore.Audit",
18855 "Datastore.AllocateSpace"
18856 ],
18857 "any",
18858 1
18859 ]
56122987
DM
18860 },
18861 "protected" : 1,
44660702
DM
18862 "proxyto" : "node",
18863 "returns" : {
18864 "properties" : {},
18865 "type" : "object"
18866 }
56122987
DM
18867 }
18868 },
44660702
DM
18869 "leaf" : 1,
18870 "path" : "/nodes/{node}/storage/{storage}/status",
7aacca6f 18871 "text" : "status"
56122987
DM
18872 },
18873 {
56122987
DM
18874 "info" : {
18875 "GET" : {
44660702
DM
18876 "description" : "Read storage RRD statistics (returns PNG).",
18877 "method" : "GET",
18878 "name" : "rrd",
56122987 18879 "parameters" : {
44660702 18880 "additionalProperties" : 0,
56122987 18881 "properties" : {
44660702
DM
18882 "cf" : {
18883 "description" : "The RRD consolidation function",
18884 "enum" : [
18885 "AVERAGE",
18886 "MAX"
18887 ],
18888 "optional" : 1,
18889 "type" : "string"
18890 },
7aacca6f 18891 "ds" : {
7aacca6f 18892 "description" : "The list of datasources you want to display.",
44660702
DM
18893 "format" : "pve-configid-list",
18894 "type" : "string"
56122987 18895 },
7aacca6f
DM
18896 "node" : {
18897 "description" : "The cluster node name.",
44660702
DM
18898 "format" : "pve-node",
18899 "type" : "string"
56122987 18900 },
7aacca6f 18901 "storage" : {
7aacca6f 18902 "description" : "The storage identifier.",
44660702
DM
18903 "format" : "pve-storage-id",
18904 "type" : "string"
18905 },
18906 "timeframe" : {
18907 "description" : "Specify the time frame you are interested in.",
7aacca6f 18908 "enum" : [
44660702
DM
18909 "hour",
18910 "day",
18911 "week",
18912 "month",
18913 "year"
7aacca6f 18914 ],
44660702 18915 "type" : "string"
56122987 18916 }
44660702 18917 }
56122987
DM
18918 },
18919 "permissions" : {
18920 "check" : [
18921 "perm",
18922 "/storage/{storage}",
18923 [
18924 "Datastore.Audit",
18925 "Datastore.AllocateSpace"
18926 ],
18927 "any",
18928 1
18929 ]
18930 },
44660702
DM
18931 "protected" : 1,
18932 "proxyto" : "node",
7aacca6f
DM
18933 "returns" : {
18934 "properties" : {
18935 "filename" : {
18936 "type" : "string"
18937 }
18938 },
18939 "type" : "object"
18940 }
56122987
DM
18941 }
18942 },
18943 "leaf" : 1,
44660702
DM
18944 "path" : "/nodes/{node}/storage/{storage}/rrd",
18945 "text" : "rrd"
56122987
DM
18946 },
18947 {
56122987
DM
18948 "info" : {
18949 "GET" : {
44660702
DM
18950 "description" : "Read storage RRD statistics.",
18951 "method" : "GET",
18952 "name" : "rrddata",
56122987 18953 "parameters" : {
44660702 18954 "additionalProperties" : 0,
56122987 18955 "properties" : {
44660702
DM
18956 "cf" : {
18957 "description" : "The RRD consolidation function",
18958 "enum" : [
18959 "AVERAGE",
18960 "MAX"
18961 ],
18962 "optional" : 1,
18963 "type" : "string"
18964 },
7aacca6f 18965 "node" : {
7aacca6f 18966 "description" : "The cluster node name.",
44660702
DM
18967 "format" : "pve-node",
18968 "type" : "string"
18969 },
18970 "storage" : {
18971 "description" : "The storage identifier.",
18972 "format" : "pve-storage-id",
7aacca6f
DM
18973 "type" : "string"
18974 },
56122987 18975 "timeframe" : {
7aacca6f 18976 "description" : "Specify the time frame you are interested in.",
56122987
DM
18977 "enum" : [
18978 "hour",
18979 "day",
18980 "week",
18981 "month",
18982 "year"
56122987 18983 ],
44660702 18984 "type" : "string"
56122987 18985 }
44660702 18986 }
7aacca6f 18987 },
7aacca6f
DM
18988 "permissions" : {
18989 "check" : [
18990 "perm",
18991 "/storage/{storage}",
18992 [
18993 "Datastore.Audit",
18994 "Datastore.AllocateSpace"
18995 ],
18996 "any",
18997 1
18998 ]
18999 },
44660702
DM
19000 "protected" : 1,
19001 "proxyto" : "node",
7aacca6f
DM
19002 "returns" : {
19003 "items" : {
44660702
DM
19004 "properties" : {},
19005 "type" : "object"
7aacca6f
DM
19006 },
19007 "type" : "array"
56122987
DM
19008 }
19009 }
7aacca6f 19010 },
7aacca6f 19011 "leaf" : 1,
44660702
DM
19012 "path" : "/nodes/{node}/storage/{storage}/rrddata",
19013 "text" : "rrddata"
56122987
DM
19014 },
19015 {
56122987
DM
19016 "info" : {
19017 "POST" : {
7aacca6f 19018 "description" : "Upload templates and ISO images.",
44660702
DM
19019 "method" : "POST",
19020 "name" : "upload",
56122987 19021 "parameters" : {
7aacca6f 19022 "additionalProperties" : 0,
56122987 19023 "properties" : {
56122987 19024 "content" : {
7aacca6f 19025 "description" : "Content type.",
44660702
DM
19026 "format" : "pve-storage-content",
19027 "type" : "string"
56122987
DM
19028 },
19029 "filename" : {
44660702
DM
19030 "description" : "The name of the file to create.",
19031 "type" : "string"
56122987
DM
19032 },
19033 "node" : {
19034 "description" : "The cluster node name.",
44660702
DM
19035 "format" : "pve-node",
19036 "type" : "string"
19037 },
19038 "storage" : {
19039 "description" : "The storage identifier.",
19040 "format" : "pve-storage-id",
19041 "type" : "string"
19042 },
19043 "tmpfilename" : {
19044 "description" : "The source file name. This parameter is usually set by the REST handler. You can only overwrite it when connecting to the trustet port on localhost.",
19045 "optional" : 1,
19046 "type" : "string"
56122987 19047 }
7aacca6f 19048 }
56122987 19049 },
56122987
DM
19050 "permissions" : {
19051 "check" : [
19052 "perm",
19053 "/storage/{storage}",
19054 [
19055 "Datastore.AllocateTemplate"
19056 ]
19057 ]
44660702
DM
19058 },
19059 "protected" : 1,
19060 "returns" : {
19061 "type" : "string"
19062 }
19063 }
19064 },
19065 "leaf" : 1,
19066 "path" : "/nodes/{node}/storage/{storage}/upload",
19067 "text" : "upload"
19068 }
19069 ],
19070 "info" : {
19071 "GET" : {
19072 "description" : "",
19073 "method" : "GET",
19074 "name" : "diridx",
19075 "parameters" : {
19076 "additionalProperties" : 0,
19077 "properties" : {
19078 "node" : {
19079 "description" : "The cluster node name.",
19080 "format" : "pve-node",
19081 "type" : "string"
19082 },
19083 "storage" : {
19084 "description" : "The storage identifier.",
19085 "format" : "pve-storage-id",
19086 "type" : "string"
56122987
DM
19087 }
19088 }
44660702
DM
19089 },
19090 "permissions" : {
19091 "check" : [
19092 "perm",
19093 "/storage/{storage}",
19094 [
19095 "Datastore.Audit",
19096 "Datastore.AllocateSpace"
19097 ],
19098 "any",
19099 1
19100 ]
19101 },
19102 "returns" : {
19103 "items" : {
19104 "properties" : {
19105 "subdir" : {
19106 "type" : "string"
19107 }
19108 },
19109 "type" : "object"
19110 },
19111 "links" : [
19112 {
19113 "href" : "{subdir}",
19114 "rel" : "child"
19115 }
19116 ],
19117 "type" : "array"
56122987
DM
19118 }
19119 }
44660702
DM
19120 },
19121 "leaf" : 0,
19122 "path" : "/nodes/{node}/storage/{storage}",
19123 "text" : "{storage}"
56122987
DM
19124 }
19125 ],
56122987
DM
19126 "info" : {
19127 "GET" : {
44660702
DM
19128 "description" : "Get status for all datastores.",
19129 "method" : "GET",
19130 "name" : "index",
19131 "parameters" : {
19132 "additionalProperties" : 0,
19133 "properties" : {
19134 "content" : {
19135 "description" : "Only list stores which support this content type.",
19136 "format" : "pve-storage-content-list",
19137 "optional" : 1,
19138 "type" : "string"
19139 },
19140 "enabled" : {
19141 "default" : 0,
19142 "description" : "Only list stores which are enabled (not disabled in config).",
19143 "optional" : 1,
19144 "type" : "boolean"
19145 },
19146 "node" : {
19147 "description" : "The cluster node name.",
19148 "format" : "pve-node",
19149 "type" : "string"
19150 },
19151 "storage" : {
19152 "description" : "Only list status for specified storage",
19153 "format" : "pve-storage-id",
19154 "optional" : 1,
19155 "type" : "string"
19156 },
19157 "target" : {
19158 "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.",
19159 "format" : "pve-node",
19160 "optional" : 1,
19161 "type" : "string"
19162 }
19163 }
19164 },
7aacca6f
DM
19165 "permissions" : {
19166 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
19167 "user" : "all"
19168 },
44660702 19169 "protected" : 1,
7aacca6f 19170 "proxyto" : "node",
56122987
DM
19171 "returns" : {
19172 "items" : {
56122987
DM
19173 "properties" : {
19174 "storage" : {
19175 "type" : "string"
19176 }
44660702
DM
19177 },
19178 "type" : "object"
56122987 19179 },
56122987
DM
19180 "links" : [
19181 {
7aacca6f
DM
19182 "href" : "{storage}",
19183 "rel" : "child"
56122987 19184 }
44660702
DM
19185 ],
19186 "type" : "array"
19187 }
56122987 19188 }
44660702
DM
19189 },
19190 "leaf" : 0,
19191 "path" : "/nodes/{node}/storage",
19192 "text" : "storage"
56122987
DM
19193 },
19194 {
56122987
DM
19195 "children" : [
19196 {
19197 "info" : {
44660702
DM
19198 "GET" : {
19199 "description" : "List available updates.",
19200 "method" : "GET",
19201 "name" : "list_updates",
19202 "parameters" : {
19203 "additionalProperties" : 0,
19204 "properties" : {
19205 "node" : {
19206 "description" : "The cluster node name.",
19207 "format" : "pve-node",
19208 "type" : "string"
19209 }
19210 }
7aacca6f
DM
19211 },
19212 "permissions" : {
19213 "check" : [
19214 "perm",
19215 "/nodes/{node}",
19216 [
19217 "Sys.Modify"
19218 ]
19219 ]
19220 },
44660702 19221 "protected" : 1,
56122987 19222 "proxyto" : "node",
44660702
DM
19223 "returns" : {
19224 "items" : {
19225 "properties" : {},
19226 "type" : "object"
19227 },
19228 "type" : "array"
19229 }
19230 },
19231 "POST" : {
19232 "description" : "This is used to resynchronize the package index files from their sources (apt-get update).",
7aacca6f
DM
19233 "method" : "POST",
19234 "name" : "update_database",
56122987
DM
19235 "parameters" : {
19236 "additionalProperties" : 0,
19237 "properties" : {
44660702
DM
19238 "node" : {
19239 "description" : "The cluster node name.",
19240 "format" : "pve-node",
19241 "type" : "string"
19242 },
56122987 19243 "notify" : {
56122987 19244 "default" : 0,
44660702
DM
19245 "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').",
19246 "optional" : 1,
19247 "type" : "boolean"
56122987
DM
19248 },
19249 "quiet" : {
56122987 19250 "default" : 0,
44660702 19251 "description" : "Only produces output suitable for logging, omitting progress indicators.",
56122987 19252 "optional" : 1,
44660702 19253 "type" : "boolean"
56122987 19254 }
7aacca6f
DM
19255 }
19256 },
19257 "permissions" : {
19258 "check" : [
19259 "perm",
19260 "/nodes/{node}",
19261 [
19262 "Sys.Modify"
19263 ]
19264 ]
19265 },
44660702
DM
19266 "protected" : 1,
19267 "proxyto" : "node",
19268 "returns" : {
19269 "type" : "string"
19270 }
56122987
DM
19271 }
19272 },
7aacca6f 19273 "leaf" : 1,
44660702
DM
19274 "path" : "/nodes/{node}/apt/update",
19275 "text" : "update"
56122987
DM
19276 },
19277 {
56122987
DM
19278 "info" : {
19279 "GET" : {
44660702 19280 "description" : "Get package changelogs.",
56122987 19281 "method" : "GET",
7aacca6f 19282 "name" : "changelog",
56122987 19283 "parameters" : {
44660702 19284 "additionalProperties" : 0,
56122987
DM
19285 "properties" : {
19286 "name" : {
19287 "description" : "Package name.",
19288 "type" : "string"
19289 },
44660702
DM
19290 "node" : {
19291 "description" : "The cluster node name.",
19292 "format" : "pve-node",
19293 "type" : "string"
19294 },
56122987 19295 "version" : {
7aacca6f 19296 "description" : "Package version.",
44660702
DM
19297 "optional" : 1,
19298 "type" : "string"
56122987 19299 }
44660702 19300 }
56122987 19301 },
44660702
DM
19302 "permissions" : {
19303 "check" : [
19304 "perm",
19305 "/nodes/{node}",
19306 [
19307 "Sys.Modify"
19308 ]
19309 ]
19310 },
19311 "proxyto" : "node",
19312 "returns" : {
19313 "type" : "string"
19314 }
56122987
DM
19315 }
19316 },
44660702
DM
19317 "leaf" : 1,
19318 "path" : "/nodes/{node}/apt/changelog",
7aacca6f 19319 "text" : "changelog"
56122987
DM
19320 },
19321 {
56122987
DM
19322 "info" : {
19323 "GET" : {
44660702
DM
19324 "description" : "Get package information for important Proxmox packages.",
19325 "method" : "GET",
7aacca6f
DM
19326 "name" : "versions",
19327 "parameters" : {
44660702 19328 "additionalProperties" : 0,
7aacca6f
DM
19329 "properties" : {
19330 "node" : {
44660702 19331 "description" : "The cluster node name.",
7aacca6f 19332 "format" : "pve-node",
44660702 19333 "type" : "string"
7aacca6f 19334 }
44660702 19335 }
7aacca6f 19336 },
56122987
DM
19337 "permissions" : {
19338 "check" : [
19339 "perm",
19340 "/nodes/{node}",
19341 [
19342 "Sys.Audit"
19343 ]
19344 ]
19345 },
7aacca6f 19346 "proxyto" : "node",
56122987
DM
19347 "returns" : {
19348 "items" : {
7aacca6f
DM
19349 "properties" : {},
19350 "type" : "object"
44660702
DM
19351 },
19352 "type" : "array"
56122987
DM
19353 }
19354 }
19355 },
44660702 19356 "leaf" : 1,
7aacca6f 19357 "path" : "/nodes/{node}/apt/versions",
44660702 19358 "text" : "versions"
56122987
DM
19359 }
19360 ],
56122987
DM
19361 "info" : {
19362 "GET" : {
44660702 19363 "description" : "Directory index for apt (Advanced Package Tool).",
7aacca6f 19364 "method" : "GET",
44660702 19365 "name" : "index",
7aacca6f
DM
19366 "parameters" : {
19367 "additionalProperties" : 0,
19368 "properties" : {
19369 "node" : {
44660702 19370 "description" : "The cluster node name.",
7aacca6f 19371 "format" : "pve-node",
44660702 19372 "type" : "string"
7aacca6f
DM
19373 }
19374 }
19375 },
7aacca6f
DM
19376 "permissions" : {
19377 "user" : "all"
19378 },
44660702
DM
19379 "returns" : {
19380 "items" : {
19381 "properties" : {
19382 "id" : {
19383 "type" : "string"
19384 }
19385 },
19386 "type" : "object"
19387 },
19388 "links" : [
19389 {
19390 "href" : "{id}",
19391 "rel" : "child"
19392 }
19393 ],
19394 "type" : "array"
19395 }
56122987 19396 }
7aacca6f 19397 },
44660702 19398 "leaf" : 0,
7aacca6f 19399 "path" : "/nodes/{node}/apt",
44660702 19400 "text" : "apt"
56122987
DM
19401 },
19402 {
56122987
DM
19403 "children" : [
19404 {
19405 "children" : [
19406 {
56122987
DM
19407 "info" : {
19408 "DELETE" : {
44660702 19409 "description" : "Delete rule.",
7aacca6f 19410 "method" : "DELETE",
44660702 19411 "name" : "delete_rule",
56122987
DM
19412 "parameters" : {
19413 "additionalProperties" : 0,
19414 "properties" : {
56122987
DM
19415 "digest" : {
19416 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 19417 "maxLength" : 40,
56122987 19418 "optional" : 1,
56122987
DM
19419 "type" : "string"
19420 },
44660702
DM
19421 "node" : {
19422 "description" : "The cluster node name.",
19423 "format" : "pve-node",
19424 "type" : "string"
19425 },
7aacca6f 19426 "pos" : {
7aacca6f 19427 "description" : "Update rule at position <pos>.",
44660702
DM
19428 "minimum" : 0,
19429 "optional" : 1,
19430 "type" : "integer"
56122987
DM
19431 }
19432 }
19433 },
44660702
DM
19434 "permissions" : {
19435 "check" : [
19436 "perm",
19437 "/nodes/{node}",
19438 [
19439 "Sys.Modify"
19440 ]
19441 ]
19442 },
19443 "protected" : 1,
19444 "proxyto" : "node",
56122987
DM
19445 "returns" : {
19446 "type" : "null"
44660702
DM
19447 }
19448 },
19449 "GET" : {
19450 "description" : "Get single rule data.",
19451 "method" : "GET",
19452 "name" : "get_rule",
19453 "parameters" : {
19454 "additionalProperties" : 0,
19455 "properties" : {
19456 "node" : {
19457 "description" : "The cluster node name.",
19458 "format" : "pve-node",
19459 "type" : "string"
19460 },
19461 "pos" : {
19462 "description" : "Update rule at position <pos>.",
19463 "minimum" : 0,
19464 "optional" : 1,
19465 "type" : "integer"
19466 }
19467 }
56122987 19468 },
56122987
DM
19469 "permissions" : {
19470 "check" : [
19471 "perm",
19472 "/nodes/{node}",
19473 [
44660702 19474 "Sys.Audit"
56122987
DM
19475 ]
19476 ]
44660702
DM
19477 },
19478 "proxyto" : "node",
19479 "returns" : {
19480 "properties" : {
19481 "pos" : {
19482 "type" : "integer"
19483 }
19484 },
19485 "type" : "object"
7aacca6f 19486 }
56122987
DM
19487 },
19488 "PUT" : {
44660702
DM
19489 "description" : "Modify rule data.",
19490 "method" : "PUT",
56122987 19491 "name" : "update_rule",
56122987 19492 "parameters" : {
44660702 19493 "additionalProperties" : 0,
56122987 19494 "properties" : {
44660702
DM
19495 "action" : {
19496 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
19497 "maxLength" : 20,
19498 "minLength" : 2,
56122987 19499 "optional" : 1,
44660702
DM
19500 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19501 "type" : "string"
56122987 19502 },
7aacca6f 19503 "comment" : {
56122987 19504 "optional" : 1,
56122987
DM
19505 "type" : "string"
19506 },
44660702
DM
19507 "delete" : {
19508 "description" : "A list of settings you want to delete.",
19509 "format" : "pve-configid-list",
56122987 19510 "optional" : 1,
44660702 19511 "type" : "string"
56122987 19512 },
44660702
DM
19513 "dest" : {
19514 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
19515 "format" : "pve-fw-addr-spec",
56122987 19516 "optional" : 1,
44660702 19517 "type" : "string"
56122987 19518 },
44660702
DM
19519 "digest" : {
19520 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19521 "maxLength" : 40,
56122987 19522 "optional" : 1,
44660702 19523 "type" : "string"
56122987 19524 },
7aacca6f 19525 "dport" : {
7aacca6f 19526 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
44660702
DM
19527 "format" : "pve-fw-dport-spec",
19528 "optional" : 1,
19529 "type" : "string"
7aacca6f 19530 },
44660702
DM
19531 "enable" : {
19532 "minimum" : 0,
56122987 19533 "optional" : 1,
44660702 19534 "type" : "integer"
56122987 19535 },
7aacca6f 19536 "iface" : {
44660702 19537 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
7aacca6f 19538 "format" : "pve-iface",
44660702 19539 "maxLength" : 20,
56122987 19540 "minLength" : 2,
44660702
DM
19541 "optional" : 1,
19542 "type" : "string"
56122987 19543 },
44660702
DM
19544 "macro" : {
19545 "maxLength" : 128,
19546 "optional" : 1,
19547 "type" : "string"
19548 },
19549 "moveto" : {
19550 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
19551 "minimum" : 0,
7aacca6f 19552 "optional" : 1,
44660702
DM
19553 "type" : "integer"
19554 },
19555 "node" : {
19556 "description" : "The cluster node name.",
19557 "format" : "pve-node",
19558 "type" : "string"
56122987
DM
19559 },
19560 "pos" : {
44660702 19561 "description" : "Update rule at position <pos>.",
7aacca6f 19562 "minimum" : 0,
7aacca6f 19563 "optional" : 1,
44660702 19564 "type" : "integer"
7aacca6f 19565 },
44660702
DM
19566 "proto" : {
19567 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19568 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
19569 "optional" : 1,
19570 "type" : "string"
19571 },
44660702
DM
19572 "source" : {
19573 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
19574 "format" : "pve-fw-addr-spec",
56122987 19575 "optional" : 1,
44660702 19576 "type" : "string"
7aacca6f 19577 },
44660702
DM
19578 "sport" : {
19579 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
19580 "format" : "pve-fw-sport-spec",
19581 "optional" : 1,
19582 "type" : "string"
19583 },
19584 "type" : {
19585 "enum" : [
19586 "in",
19587 "out",
19588 "group"
19589 ],
19590 "optional" : 1,
19591 "type" : "string"
56122987 19592 }
44660702 19593 }
56122987 19594 },
56122987
DM
19595 "permissions" : {
19596 "check" : [
19597 "perm",
19598 "/nodes/{node}",
19599 [
19600 "Sys.Modify"
19601 ]
19602 ]
7aacca6f 19603 },
44660702 19604 "protected" : 1,
7aacca6f 19605 "proxyto" : "node",
7aacca6f
DM
19606 "returns" : {
19607 "type" : "null"
56122987
DM
19608 }
19609 }
7aacca6f 19610 },
44660702 19611 "leaf" : 1,
7aacca6f 19612 "path" : "/nodes/{node}/firewall/rules/{pos}",
44660702 19613 "text" : "{pos}"
56122987
DM
19614 }
19615 ],
56122987
DM
19616 "info" : {
19617 "GET" : {
44660702
DM
19618 "description" : "List rules.",
19619 "method" : "GET",
19620 "name" : "get_rules",
19621 "parameters" : {
19622 "additionalProperties" : 0,
19623 "properties" : {
19624 "node" : {
19625 "description" : "The cluster node name.",
19626 "format" : "pve-node",
19627 "type" : "string"
19628 }
19629 }
19630 },
19631 "permissions" : {
19632 "check" : [
19633 "perm",
19634 "/nodes/{node}",
19635 [
19636 "Sys.Audit"
19637 ]
19638 ]
19639 },
19640 "proxyto" : "node",
56122987 19641 "returns" : {
56122987
DM
19642 "items" : {
19643 "properties" : {
19644 "pos" : {
19645 "type" : "integer"
19646 }
44660702
DM
19647 },
19648 "type" : "object"
56122987 19649 },
7aacca6f
DM
19650 "links" : [
19651 {
19652 "href" : "{pos}",
19653 "rel" : "child"
19654 }
19655 ],
19656 "type" : "array"
44660702 19657 }
56122987
DM
19658 },
19659 "POST" : {
44660702 19660 "description" : "Create new rule.",
7aacca6f
DM
19661 "method" : "POST",
19662 "name" : "create_rule",
56122987 19663 "parameters" : {
44660702 19664 "additionalProperties" : 0,
56122987 19665 "properties" : {
7aacca6f 19666 "action" : {
7aacca6f 19667 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
44660702 19668 "maxLength" : 20,
7aacca6f
DM
19669 "minLength" : 2,
19670 "optional" : 0,
44660702
DM
19671 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19672 "type" : "string"
56122987 19673 },
44660702 19674 "comment" : {
56122987 19675 "optional" : 1,
44660702 19676 "type" : "string"
56122987 19677 },
44660702
DM
19678 "dest" : {
19679 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
19680 "format" : "pve-fw-addr-spec",
7aacca6f 19681 "optional" : 1,
44660702 19682 "type" : "string"
56122987 19683 },
44660702
DM
19684 "digest" : {
19685 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19686 "maxLength" : 40,
19687 "optional" : 1,
19688 "type" : "string"
56122987 19689 },
44660702
DM
19690 "dport" : {
19691 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
19692 "format" : "pve-fw-dport-spec",
7aacca6f
DM
19693 "optional" : 1,
19694 "type" : "string"
56122987 19695 },
44660702
DM
19696 "enable" : {
19697 "minimum" : 0,
19698 "optional" : 1,
19699 "type" : "integer"
19700 },
7aacca6f 19701 "iface" : {
44660702 19702 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
7aacca6f 19703 "format" : "pve-iface",
56122987 19704 "maxLength" : 20,
7aacca6f 19705 "minLength" : 2,
7aacca6f 19706 "optional" : 1,
56122987
DM
19707 "type" : "string"
19708 },
44660702
DM
19709 "macro" : {
19710 "maxLength" : 128,
7aacca6f
DM
19711 "optional" : 1,
19712 "type" : "string"
56122987 19713 },
44660702
DM
19714 "node" : {
19715 "description" : "The cluster node name.",
19716 "format" : "pve-node",
19717 "type" : "string"
19718 },
19719 "pos" : {
19720 "description" : "Update rule at position <pos>.",
19721 "minimum" : 0,
19722 "optional" : 1,
19723 "type" : "integer"
19724 },
19725 "proto" : {
19726 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19727 "format" : "pve-fw-protocol-spec",
56122987 19728 "optional" : 1,
44660702 19729 "type" : "string"
56122987 19730 },
7aacca6f 19731 "source" : {
7aacca6f 19732 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
44660702
DM
19733 "format" : "pve-fw-addr-spec",
19734 "optional" : 1,
19735 "type" : "string"
7aacca6f 19736 },
44660702
DM
19737 "sport" : {
19738 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
19739 "format" : "pve-fw-sport-spec",
7aacca6f 19740 "optional" : 1,
44660702
DM
19741 "type" : "string"
19742 },
19743 "type" : {
19744 "enum" : [
19745 "in",
19746 "out",
19747 "group"
19748 ],
19749 "optional" : 0,
19750 "type" : "string"
56122987 19751 }
44660702 19752 }
7aacca6f 19753 },
56122987
DM
19754 "permissions" : {
19755 "check" : [
19756 "perm",
19757 "/nodes/{node}",
19758 [
19759 "Sys.Modify"
19760 ]
19761 ]
19762 },
44660702
DM
19763 "protected" : 1,
19764 "proxyto" : "node",
19765 "returns" : {
19766 "type" : "null"
19767 }
56122987
DM
19768 }
19769 },
44660702 19770 "leaf" : 0,
7aacca6f 19771 "path" : "/nodes/{node}/firewall/rules",
44660702 19772 "text" : "rules"
56122987
DM
19773 },
19774 {
56122987 19775 "info" : {
44660702
DM
19776 "GET" : {
19777 "description" : "Get host firewall options.",
19778 "method" : "GET",
19779 "name" : "get_options",
56122987 19780 "parameters" : {
7aacca6f 19781 "additionalProperties" : 0,
56122987 19782 "properties" : {
44660702
DM
19783 "node" : {
19784 "description" : "The cluster node name.",
19785 "format" : "pve-node",
19786 "type" : "string"
19787 }
19788 }
19789 },
19790 "permissions" : {
19791 "check" : [
19792 "perm",
19793 "/nodes/{node}",
19794 [
19795 "Sys.Audit"
19796 ]
19797 ]
19798 },
19799 "proxyto" : "node",
19800 "returns" : {
19801 "properties" : {
19802 "enable" : {
19803 "description" : "Enable host firewall rules.",
7aacca6f 19804 "optional" : 1,
44660702 19805 "type" : "boolean"
7aacca6f 19806 },
44660702
DM
19807 "log_level_in" : {
19808 "description" : "Log level for incoming traffic.",
56122987
DM
19809 "enum" : [
19810 "emerg",
19811 "alert",
19812 "crit",
19813 "err",
19814 "warning",
19815 "notice",
19816 "info",
19817 "debug",
19818 "nolog"
19819 ],
56122987 19820 "optional" : 1,
44660702
DM
19821 "type" : "string"
19822 },
19823 "log_level_out" : {
19824 "description" : "Log level for outgoing traffic.",
56122987
DM
19825 "enum" : [
19826 "emerg",
19827 "alert",
19828 "crit",
19829 "err",
19830 "warning",
19831 "notice",
19832 "info",
19833 "debug",
19834 "nolog"
19835 ],
44660702
DM
19836 "optional" : 1,
19837 "type" : "string"
19838 },
19839 "ndp" : {
19840 "description" : "Enable NDP.",
19841 "optional" : 1,
19842 "type" : "boolean"
19843 },
19844 "nf_conntrack_max" : {
19845 "description" : "Maximum number of tracked connections.",
19846 "minimum" : 32768,
19847 "optional" : 1,
19848 "type" : "integer"
19849 },
19850 "nf_conntrack_tcp_timeout_established" : {
19851 "description" : "Conntrack established timeout.",
19852 "minimum" : 7875,
19853 "optional" : 1,
19854 "type" : "integer"
19855 },
19856 "nosmurfs" : {
19857 "description" : "Enable SMURFS filter.",
19858 "optional" : 1,
19859 "type" : "boolean"
56122987 19860 },
7aacca6f 19861 "smurf_log_level" : {
44660702 19862 "description" : "Log level for SMURFS filter.",
56122987
DM
19863 "enum" : [
19864 "emerg",
19865 "alert",
19866 "crit",
19867 "err",
19868 "warning",
19869 "notice",
19870 "info",
19871 "debug",
19872 "nolog"
7aacca6f 19873 ],
7aacca6f
DM
19874 "optional" : 1,
19875 "type" : "string"
56122987 19876 },
44660702
DM
19877 "tcp_flags_log_level" : {
19878 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
19879 "enum" : [
19880 "emerg",
19881 "alert",
19882 "crit",
19883 "err",
19884 "warning",
19885 "notice",
19886 "info",
19887 "debug",
19888 "nolog"
19889 ],
44660702
DM
19890 "optional" : 1,
19891 "type" : "string"
7aacca6f 19892 },
44660702
DM
19893 "tcpflags" : {
19894 "description" : "Filter illegal combinations of TCP flags.",
56122987 19895 "optional" : 1,
44660702 19896 "type" : "boolean"
56122987 19897 }
44660702
DM
19898 },
19899 "type" : "object"
7aacca6f 19900 }
56122987 19901 },
44660702
DM
19902 "PUT" : {
19903 "description" : "Set Firewall options.",
19904 "method" : "PUT",
19905 "name" : "set_options",
7aacca6f 19906 "parameters" : {
44660702 19907 "additionalProperties" : 0,
7aacca6f 19908 "properties" : {
44660702
DM
19909 "delete" : {
19910 "description" : "A list of settings you want to delete.",
19911 "format" : "pve-configid-list",
7aacca6f 19912 "optional" : 1,
44660702 19913 "type" : "string"
56122987 19914 },
44660702
DM
19915 "digest" : {
19916 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19917 "maxLength" : 40,
19918 "optional" : 1,
19919 "type" : "string"
56122987 19920 },
44660702
DM
19921 "enable" : {
19922 "description" : "Enable host firewall rules.",
7aacca6f 19923 "optional" : 1,
44660702
DM
19924 "type" : "boolean"
19925 },
19926 "log_level_in" : {
19927 "description" : "Log level for incoming traffic.",
56122987
DM
19928 "enum" : [
19929 "emerg",
19930 "alert",
19931 "crit",
19932 "err",
19933 "warning",
19934 "notice",
19935 "info",
19936 "debug",
19937 "nolog"
44660702 19938 ],
7aacca6f 19939 "optional" : 1,
44660702 19940 "type" : "string"
7aacca6f 19941 },
44660702
DM
19942 "log_level_out" : {
19943 "description" : "Log level for outgoing traffic.",
56122987
DM
19944 "enum" : [
19945 "emerg",
19946 "alert",
19947 "crit",
19948 "err",
19949 "warning",
19950 "notice",
19951 "info",
19952 "debug",
19953 "nolog"
19954 ],
19955 "optional" : 1,
7aacca6f 19956 "type" : "string"
56122987 19957 },
44660702
DM
19958 "ndp" : {
19959 "description" : "Enable NDP.",
7aacca6f 19960 "optional" : 1,
44660702
DM
19961 "type" : "boolean"
19962 },
19963 "nf_conntrack_max" : {
19964 "description" : "Maximum number of tracked connections.",
19965 "minimum" : 32768,
19966 "optional" : 1,
19967 "type" : "integer"
19968 },
19969 "nf_conntrack_tcp_timeout_established" : {
19970 "description" : "Conntrack established timeout.",
19971 "minimum" : 7875,
19972 "optional" : 1,
19973 "type" : "integer"
19974 },
19975 "node" : {
19976 "description" : "The cluster node name.",
19977 "format" : "pve-node",
19978 "type" : "string"
19979 },
19980 "nosmurfs" : {
19981 "description" : "Enable SMURFS filter.",
19982 "optional" : 1,
19983 "type" : "boolean"
19984 },
19985 "smurf_log_level" : {
19986 "description" : "Log level for SMURFS filter.",
56122987
DM
19987 "enum" : [
19988 "emerg",
19989 "alert",
19990 "crit",
19991 "err",
19992 "warning",
19993 "notice",
19994 "info",
19995 "debug",
19996 "nolog"
44660702
DM
19997 ],
19998 "optional" : 1,
19999 "type" : "string"
56122987 20000 },
44660702
DM
20001 "tcp_flags_log_level" : {
20002 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
20003 "enum" : [
20004 "emerg",
20005 "alert",
20006 "crit",
20007 "err",
20008 "warning",
20009 "notice",
20010 "info",
20011 "debug",
20012 "nolog"
20013 ],
44660702
DM
20014 "optional" : 1,
20015 "type" : "string"
7aacca6f 20016 },
44660702
DM
20017 "tcpflags" : {
20018 "description" : "Filter illegal combinations of TCP flags.",
56122987 20019 "optional" : 1,
7aacca6f 20020 "type" : "boolean"
56122987 20021 }
7aacca6f 20022 }
56122987 20023 },
44660702
DM
20024 "permissions" : {
20025 "check" : [
20026 "perm",
20027 "/nodes/{node}",
20028 [
20029 "Sys.Modify"
20030 ]
20031 ]
20032 },
20033 "protected" : 1,
20034 "proxyto" : "node",
20035 "returns" : {
20036 "type" : "null"
20037 }
7aacca6f
DM
20038 }
20039 },
44660702
DM
20040 "leaf" : 1,
20041 "path" : "/nodes/{node}/firewall/options",
7aacca6f
DM
20042 "text" : "options"
20043 },
20044 {
7aacca6f
DM
20045 "info" : {
20046 "GET" : {
44660702
DM
20047 "description" : "Read firewall log",
20048 "method" : "GET",
7aacca6f 20049 "name" : "log",
56122987 20050 "parameters" : {
44660702 20051 "additionalProperties" : 0,
56122987 20052 "properties" : {
7aacca6f 20053 "limit" : {
44660702 20054 "minimum" : 0,
7aacca6f 20055 "optional" : 1,
44660702 20056 "type" : "integer"
7aacca6f 20057 },
56122987 20058 "node" : {
7aacca6f 20059 "description" : "The cluster node name.",
44660702 20060 "format" : "pve-node",
7aacca6f 20061 "type" : "string"
44660702
DM
20062 },
20063 "start" : {
20064 "minimum" : 0,
20065 "optional" : 1,
20066 "type" : "integer"
56122987 20067 }
44660702 20068 }
7aacca6f 20069 },
56122987
DM
20070 "permissions" : {
20071 "check" : [
20072 "perm",
20073 "/nodes/{node}",
20074 [
20075 "Sys.Syslog"
20076 ]
20077 ]
20078 },
44660702
DM
20079 "protected" : 1,
20080 "proxyto" : "node",
56122987
DM
20081 "returns" : {
20082 "items" : {
56122987 20083 "properties" : {
56122987 20084 "n" : {
44660702
DM
20085 "description" : "Line number",
20086 "type" : "integer"
7aacca6f
DM
20087 },
20088 "t" : {
44660702
DM
20089 "description" : "Line text",
20090 "type" : "string"
56122987 20091 }
44660702
DM
20092 },
20093 "type" : "object"
56122987
DM
20094 },
20095 "type" : "array"
7aacca6f 20096 }
56122987
DM
20097 }
20098 },
44660702
DM
20099 "leaf" : 1,
20100 "path" : "/nodes/{node}/firewall/log",
7aacca6f 20101 "text" : "log"
56122987
DM
20102 }
20103 ],
20104 "info" : {
20105 "GET" : {
44660702
DM
20106 "description" : "Directory index.",
20107 "method" : "GET",
20108 "name" : "index",
56122987 20109 "parameters" : {
44660702 20110 "additionalProperties" : 0,
56122987
DM
20111 "properties" : {
20112 "node" : {
20113 "description" : "The cluster node name.",
44660702
DM
20114 "format" : "pve-node",
20115 "type" : "string"
56122987 20116 }
44660702 20117 }
56122987 20118 },
7aacca6f
DM
20119 "permissions" : {
20120 "user" : "all"
20121 },
56122987
DM
20122 "returns" : {
20123 "items" : {
20124 "properties" : {},
20125 "type" : "object"
20126 },
56122987
DM
20127 "links" : [
20128 {
44660702
DM
20129 "href" : "{name}",
20130 "rel" : "child"
56122987 20131 }
44660702
DM
20132 ],
20133 "type" : "array"
20134 }
56122987 20135 }
7aacca6f 20136 },
44660702 20137 "leaf" : 0,
7aacca6f 20138 "path" : "/nodes/{node}/firewall",
44660702 20139 "text" : "firewall"
56122987
DM
20140 },
20141 {
56122987
DM
20142 "info" : {
20143 "GET" : {
44660702
DM
20144 "description" : "API version details",
20145 "method" : "GET",
20146 "name" : "version",
56122987 20147 "parameters" : {
44660702 20148 "additionalProperties" : 0,
56122987
DM
20149 "properties" : {
20150 "node" : {
56122987 20151 "description" : "The cluster node name.",
44660702 20152 "format" : "pve-node",
7aacca6f 20153 "type" : "string"
56122987 20154 }
44660702 20155 }
56122987 20156 },
56122987 20157 "permissions" : {
7aacca6f 20158 "user" : "all"
56122987 20159 },
56122987 20160 "proxyto" : "node",
56122987 20161 "returns" : {
56122987 20162 "properties" : {
44660702 20163 "release" : {
56122987
DM
20164 "type" : "string"
20165 },
44660702 20166 "repoid" : {
7aacca6f
DM
20167 "type" : "string"
20168 },
20169 "version" : {
20170 "type" : "string"
20171 }
44660702
DM
20172 },
20173 "type" : "object"
7aacca6f 20174 }
56122987
DM
20175 }
20176 },
56122987 20177 "leaf" : 1,
44660702
DM
20178 "path" : "/nodes/{node}/version",
20179 "text" : "version"
56122987
DM
20180 },
20181 {
56122987
DM
20182 "info" : {
20183 "GET" : {
7aacca6f 20184 "description" : "Read node status",
44660702 20185 "method" : "GET",
7aacca6f 20186 "name" : "status",
56122987 20187 "parameters" : {
44660702 20188 "additionalProperties" : 0,
56122987
DM
20189 "properties" : {
20190 "node" : {
7aacca6f 20191 "description" : "The cluster node name.",
44660702
DM
20192 "format" : "pve-node",
20193 "type" : "string"
56122987 20194 }
44660702 20195 }
56122987 20196 },
56122987
DM
20197 "permissions" : {
20198 "check" : [
20199 "perm",
20200 "/nodes/{node}",
20201 [
20202 "Sys.Audit"
20203 ]
20204 ]
44660702
DM
20205 },
20206 "proxyto" : "node",
20207 "returns" : {
20208 "properties" : {},
20209 "type" : "object"
7aacca6f
DM
20210 }
20211 },
20212 "POST" : {
44660702
DM
20213 "description" : "Reboot or shutdown a node.",
20214 "method" : "POST",
7aacca6f 20215 "name" : "node_cmd",
56122987 20216 "parameters" : {
44660702 20217 "additionalProperties" : 0,
56122987 20218 "properties" : {
7aacca6f
DM
20219 "command" : {
20220 "description" : "Specify the command.",
56122987 20221 "enum" : [
7aacca6f
DM
20222 "reboot",
20223 "shutdown"
56122987
DM
20224 ],
20225 "type" : "string"
44660702
DM
20226 },
20227 "node" : {
20228 "description" : "The cluster node name.",
20229 "format" : "pve-node",
20230 "type" : "string"
56122987 20231 }
44660702 20232 }
7aacca6f 20233 },
7aacca6f
DM
20234 "permissions" : {
20235 "check" : [
20236 "perm",
20237 "/nodes/{node}",
20238 [
20239 "Sys.PowerMgmt"
20240 ]
20241 ]
20242 },
44660702 20243 "protected" : 1,
7aacca6f 20244 "proxyto" : "node",
7aacca6f
DM
20245 "returns" : {
20246 "type" : "null"
56122987
DM
20247 }
20248 }
20249 },
7aacca6f 20250 "leaf" : 1,
44660702
DM
20251 "path" : "/nodes/{node}/status",
20252 "text" : "status"
56122987
DM
20253 },
20254 {
56122987
DM
20255 "info" : {
20256 "GET" : {
44660702
DM
20257 "description" : "Read tap/vm network device interface counters",
20258 "method" : "GET",
20259 "name" : "netstat",
20260 "parameters" : {
20261 "additionalProperties" : 0,
20262 "properties" : {
20263 "node" : {
20264 "description" : "The cluster node name.",
20265 "format" : "pve-node",
20266 "type" : "string"
20267 }
56122987
DM
20268 }
20269 },
20270 "permissions" : {
20271 "check" : [
20272 "perm",
20273 "/nodes/{node}",
20274 [
7aacca6f 20275 "Sys.Audit"
56122987
DM
20276 ]
20277 ]
20278 },
7aacca6f 20279 "proxyto" : "node",
44660702
DM
20280 "returns" : {
20281 "items" : {
20282 "properties" : {},
20283 "type" : "object"
20284 },
20285 "type" : "array"
20286 }
7aacca6f
DM
20287 }
20288 },
44660702
DM
20289 "leaf" : 1,
20290 "path" : "/nodes/{node}/netstat",
7aacca6f
DM
20291 "text" : "netstat"
20292 },
20293 {
20294 "info" : {
20295 "POST" : {
7aacca6f 20296 "description" : "Execute multiple commands in order.",
7aacca6f 20297 "method" : "POST",
7aacca6f 20298 "name" : "execute",
56122987
DM
20299 "parameters" : {
20300 "additionalProperties" : 0,
20301 "properties" : {
7aacca6f
DM
20302 "commands" : {
20303 "description" : "JSON encoded array of commands.",
56122987
DM
20304 "type" : "string"
20305 },
20306 "node" : {
44660702 20307 "description" : "The cluster node name.",
56122987 20308 "format" : "pve-node",
44660702 20309 "type" : "string"
56122987
DM
20310 }
20311 }
44660702
DM
20312 },
20313 "permissions" : {
20314 "check" : [
20315 "perm",
20316 "/nodes/{node}",
20317 [
20318 "Sys.Audit"
20319 ]
20320 ]
20321 },
20322 "protected" : 1,
20323 "proxyto" : "node",
20324 "returns" : {
20325 "properties" : {},
20326 "type" : "array"
56122987
DM
20327 }
20328 }
20329 },
56122987 20330 "leaf" : 1,
44660702
DM
20331 "path" : "/nodes/{node}/execute",
20332 "text" : "execute"
56122987
DM
20333 },
20334 {
20335 "info" : {
7aacca6f 20336 "GET" : {
44660702
DM
20337 "description" : "Read node RRD statistics (returns PNG)",
20338 "method" : "GET",
7aacca6f 20339 "name" : "rrd",
56122987 20340 "parameters" : {
7aacca6f 20341 "additionalProperties" : 0,
56122987 20342 "properties" : {
44660702
DM
20343 "cf" : {
20344 "description" : "The RRD consolidation function",
20345 "enum" : [
20346 "AVERAGE",
20347 "MAX"
20348 ],
20349 "optional" : 1,
20350 "type" : "string"
20351 },
7aacca6f 20352 "ds" : {
7aacca6f 20353 "description" : "The list of datasources you want to display.",
44660702
DM
20354 "format" : "pve-configid-list",
20355 "type" : "string"
20356 },
20357 "node" : {
20358 "description" : "The cluster node name.",
20359 "format" : "pve-node",
20360 "type" : "string"
7aacca6f
DM
20361 },
20362 "timeframe" : {
20363 "description" : "Specify the time frame you are interested in.",
20364 "enum" : [
20365 "hour",
20366 "day",
20367 "week",
20368 "month",
20369 "year"
20370 ],
20371 "type" : "string"
56122987 20372 }
7aacca6f 20373 }
56122987 20374 },
56122987 20375 "permissions" : {
56122987
DM
20376 "check" : [
20377 "perm",
20378 "/nodes/{node}",
20379 [
7aacca6f 20380 "Sys.Audit"
56122987
DM
20381 ]
20382 ]
20383 },
7aacca6f 20384 "protected" : 1,
56122987 20385 "returns" : {
56122987 20386 "properties" : {
7aacca6f 20387 "filename" : {
56122987
DM
20388 "type" : "string"
20389 }
44660702
DM
20390 },
20391 "type" : "object"
20392 }
56122987
DM
20393 }
20394 },
44660702 20395 "leaf" : 1,
7aacca6f 20396 "path" : "/nodes/{node}/rrd",
44660702 20397 "text" : "rrd"
56122987
DM
20398 },
20399 {
20400 "info" : {
7aacca6f 20401 "GET" : {
44660702
DM
20402 "description" : "Read node RRD statistics",
20403 "method" : "GET",
7aacca6f 20404 "name" : "rrddata",
56122987 20405 "parameters" : {
44660702 20406 "additionalProperties" : 0,
56122987 20407 "properties" : {
7aacca6f 20408 "cf" : {
7aacca6f
DM
20409 "description" : "The RRD consolidation function",
20410 "enum" : [
20411 "AVERAGE",
20412 "MAX"
44660702
DM
20413 ],
20414 "optional" : 1,
20415 "type" : "string"
56122987
DM
20416 },
20417 "node" : {
44660702 20418 "description" : "The cluster node name.",
56122987 20419 "format" : "pve-node",
44660702 20420 "type" : "string"
56122987 20421 },
7aacca6f 20422 "timeframe" : {
7aacca6f
DM
20423 "description" : "Specify the time frame you are interested in.",
20424 "enum" : [
20425 "hour",
20426 "day",
20427 "week",
20428 "month",
20429 "year"
44660702
DM
20430 ],
20431 "type" : "string"
56122987 20432 }
56122987
DM
20433 }
20434 },
56122987
DM
20435 "permissions" : {
20436 "check" : [
20437 "perm",
20438 "/nodes/{node}",
20439 [
44660702 20440 "Sys.Audit"
56122987
DM
20441 ]
20442 ]
7aacca6f 20443 },
44660702 20444 "protected" : 1,
56122987 20445 "returns" : {
7aacca6f 20446 "items" : {
44660702 20447 "properties" : {},
7aacca6f
DM
20448 "type" : "object"
20449 },
20450 "type" : "array"
44660702
DM
20451 }
20452 }
20453 },
20454 "leaf" : 1,
20455 "path" : "/nodes/{node}/rrddata",
20456 "text" : "rrddata"
20457 },
20458 {
20459 "info" : {
20460 "GET" : {
20461 "description" : "Read system log",
20462 "method" : "GET",
20463 "name" : "syslog",
56122987 20464 "parameters" : {
44660702 20465 "additionalProperties" : 0,
56122987 20466 "properties" : {
44660702
DM
20467 "limit" : {
20468 "minimum" : 0,
7aacca6f 20469 "optional" : 1,
44660702 20470 "type" : "integer"
7aacca6f 20471 },
56122987 20472 "node" : {
7aacca6f 20473 "description" : "The cluster node name.",
44660702
DM
20474 "format" : "pve-node",
20475 "type" : "string"
56122987 20476 },
44660702
DM
20477 "since" : {
20478 "description" : "Display all log since this date-time string.",
20479 "optional" : 1,
20480 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
20481 "type" : "string"
20482 },
20483 "start" : {
7aacca6f
DM
20484 "minimum" : 0,
20485 "optional" : 1,
20486 "type" : "integer"
20487 },
20488 "until" : {
20489 "description" : "Display all log until this date-time string.",
7aacca6f 20490 "optional" : 1,
44660702 20491 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
56122987
DM
20492 "type" : "string"
20493 }
44660702 20494 }
56122987 20495 },
44660702
DM
20496 "permissions" : {
20497 "check" : [
20498 "perm",
20499 "/nodes/{node}",
20500 [
20501 "Sys.Syslog"
20502 ]
20503 ]
20504 },
20505 "protected" : 1,
20506 "proxyto" : "node",
20507 "returns" : {
20508 "items" : {
20509 "properties" : {
20510 "n" : {
20511 "description" : "Line number",
20512 "type" : "integer"
20513 },
20514 "t" : {
20515 "description" : "Line text",
20516 "type" : "string"
20517 }
20518 },
20519 "type" : "object"
20520 },
20521 "type" : "array"
20522 }
56122987
DM
20523 }
20524 },
44660702
DM
20525 "leaf" : 1,
20526 "path" : "/nodes/{node}/syslog",
7aacca6f 20527 "text" : "syslog"
56122987
DM
20528 },
20529 {
56122987
DM
20530 "info" : {
20531 "POST" : {
44660702
DM
20532 "description" : "Creates a VNC Shell proxy.",
20533 "method" : "POST",
20534 "name" : "vncshell",
20535 "parameters" : {
20536 "additionalProperties" : 0,
56122987 20537 "properties" : {
44660702
DM
20538 "node" : {
20539 "description" : "The cluster node name.",
20540 "format" : "pve-node",
7aacca6f
DM
20541 "type" : "string"
20542 },
44660702
DM
20543 "upgrade" : {
20544 "default" : 0,
20545 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20546 "optional" : 1,
20547 "type" : "boolean"
7aacca6f 20548 },
44660702
DM
20549 "websocket" : {
20550 "description" : "use websocket instead of standard vnc.",
20551 "optional" : 1,
20552 "type" : "boolean"
56122987 20553 }
44660702 20554 }
56122987 20555 },
56122987
DM
20556 "permissions" : {
20557 "check" : [
20558 "perm",
7aacca6f 20559 "/nodes/{node}",
56122987 20560 [
7aacca6f 20561 "Sys.Console"
56122987 20562 ]
44660702
DM
20563 ],
20564 "description" : "Restricted to users on realm 'pam'"
56122987 20565 },
44660702
DM
20566 "protected" : 1,
20567 "returns" : {
20568 "additionalProperties" : 0,
56122987 20569 "properties" : {
44660702
DM
20570 "cert" : {
20571 "type" : "string"
7aacca6f 20572 },
44660702
DM
20573 "port" : {
20574 "type" : "integer"
7aacca6f 20575 },
44660702
DM
20576 "ticket" : {
20577 "type" : "string"
20578 },
20579 "upid" : {
20580 "type" : "string"
20581 },
20582 "user" : {
20583 "type" : "string"
56122987 20584 }
44660702
DM
20585 }
20586 }
56122987
DM
20587 }
20588 },
7aacca6f 20589 "leaf" : 1,
44660702
DM
20590 "path" : "/nodes/{node}/vncshell",
20591 "text" : "vncshell"
56122987
DM
20592 },
20593 {
20594 "info" : {
20595 "GET" : {
7aacca6f 20596 "description" : "Opens a weksocket for VNC traffic.",
44660702
DM
20597 "method" : "GET",
20598 "name" : "vncwebsocket",
56122987 20599 "parameters" : {
44660702 20600 "additionalProperties" : 0,
56122987
DM
20601 "properties" : {
20602 "node" : {
20603 "description" : "The cluster node name.",
44660702 20604 "format" : "pve-node",
7aacca6f
DM
20605 "type" : "string"
20606 },
20607 "port" : {
7aacca6f
DM
20608 "description" : "Port number returned by previous vncproxy call.",
20609 "maximum" : 5999,
44660702 20610 "minimum" : 5900,
7aacca6f 20611 "type" : "integer"
44660702
DM
20612 },
20613 "vncticket" : {
20614 "description" : "Ticket from previous call to vncproxy.",
20615 "maxLength" : 512,
20616 "type" : "string"
56122987 20617 }
44660702 20618 }
56122987 20619 },
56122987
DM
20620 "permissions" : {
20621 "check" : [
20622 "perm",
20623 "/nodes/{node}",
20624 [
7aacca6f 20625 "Sys.Console"
56122987 20626 ]
44660702
DM
20627 ],
20628 "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket)."
20629 },
20630 "returns" : {
20631 "properties" : {
20632 "port" : {
20633 "type" : "string"
20634 }
20635 },
20636 "type" : "object"
7aacca6f 20637 }
56122987
DM
20638 }
20639 },
44660702 20640 "leaf" : 1,
7aacca6f 20641 "path" : "/nodes/{node}/vncwebsocket",
44660702 20642 "text" : "vncwebsocket"
56122987
DM
20643 },
20644 {
20645 "info" : {
20646 "POST" : {
44660702 20647 "description" : "Creates a SPICE shell.",
7aacca6f 20648 "method" : "POST",
44660702 20649 "name" : "spiceshell",
56122987 20650 "parameters" : {
7aacca6f 20651 "additionalProperties" : 0,
56122987 20652 "properties" : {
7aacca6f 20653 "node" : {
44660702 20654 "description" : "The cluster node name.",
56122987 20655 "format" : "pve-node",
7aacca6f
DM
20656 "type" : "string"
20657 },
44660702
DM
20658 "proxy" : {
20659 "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).",
20660 "format" : "address",
20661 "optional" : 1,
7aacca6f
DM
20662 "type" : "string"
20663 },
44660702
DM
20664 "upgrade" : {
20665 "default" : 0,
20666 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20667 "optional" : 1,
20668 "type" : "boolean"
56122987 20669 }
7aacca6f 20670 }
56122987 20671 },
56122987
DM
20672 "permissions" : {
20673 "check" : [
20674 "perm",
7aacca6f 20675 "/nodes/{node}",
56122987 20676 [
7aacca6f 20677 "Sys.Console"
56122987 20678 ]
7aacca6f
DM
20679 ],
20680 "description" : "Restricted to users on realm 'pam'"
44660702
DM
20681 },
20682 "protected" : 1,
20683 "proxyto" : "node",
20684 "returns" : {
20685 "additionalProperties" : 1,
20686 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
20687 "properties" : {
20688 "host" : {
20689 "type" : "string"
20690 },
20691 "password" : {
20692 "type" : "string"
20693 },
20694 "proxy" : {
20695 "type" : "string"
20696 },
20697 "tls-port" : {
20698 "type" : "integer"
20699 },
20700 "type" : {
20701 "type" : "string"
20702 }
20703 }
7aacca6f 20704 }
56122987
DM
20705 }
20706 },
56122987 20707 "leaf" : 1,
44660702
DM
20708 "path" : "/nodes/{node}/spiceshell",
20709 "text" : "spiceshell"
56122987
DM
20710 },
20711 {
56122987 20712 "info" : {
7aacca6f 20713 "GET" : {
44660702 20714 "description" : "Read DNS settings.",
7aacca6f 20715 "method" : "GET",
44660702
DM
20716 "name" : "dns",
20717 "parameters" : {
7aacca6f
DM
20718 "additionalProperties" : 0,
20719 "properties" : {
44660702
DM
20720 "node" : {
20721 "description" : "The cluster node name.",
20722 "format" : "pve-node",
20723 "type" : "string"
7aacca6f
DM
20724 }
20725 }
20726 },
7aacca6f
DM
20727 "permissions" : {
20728 "check" : [
20729 "perm",
20730 "/nodes/{node}",
20731 [
20732 "Sys.Audit"
20733 ]
20734 ]
20735 },
44660702
DM
20736 "proxyto" : "node",
20737 "returns" : {
56122987
DM
20738 "additionalProperties" : 0,
20739 "properties" : {
44660702
DM
20740 "dns1" : {
20741 "description" : "First name server IP address.",
20742 "optional" : 1,
20743 "type" : "string"
20744 },
20745 "dns2" : {
20746 "description" : "Second name server IP address.",
20747 "optional" : 1,
20748 "type" : "string"
20749 },
20750 "dns3" : {
20751 "description" : "Third name server IP address.",
20752 "optional" : 1,
20753 "type" : "string"
20754 },
20755 "search" : {
20756 "description" : "Search domain for host-name lookup.",
20757 "optional" : 1,
20758 "type" : "string"
7aacca6f 20759 }
44660702
DM
20760 },
20761 "type" : "object"
20762 }
7aacca6f
DM
20763 },
20764 "PUT" : {
44660702
DM
20765 "description" : "Write DNS settings.",
20766 "method" : "PUT",
7aacca6f
DM
20767 "name" : "update_dns",
20768 "parameters" : {
20769 "additionalProperties" : 0,
20770 "properties" : {
44660702
DM
20771 "dns1" : {
20772 "description" : "First name server IP address.",
20773 "format" : "ip",
20774 "optional" : 1,
7aacca6f
DM
20775 "type" : "string"
20776 },
44660702
DM
20777 "dns2" : {
20778 "description" : "Second name server IP address.",
20779 "format" : "ip",
7aacca6f 20780 "optional" : 1,
44660702 20781 "type" : "string"
7aacca6f 20782 },
44660702
DM
20783 "dns3" : {
20784 "description" : "Third name server IP address.",
20785 "format" : "ip",
7aacca6f 20786 "optional" : 1,
44660702 20787 "type" : "string"
7aacca6f
DM
20788 },
20789 "node" : {
44660702 20790 "description" : "The cluster node name.",
56122987 20791 "format" : "pve-node",
44660702 20792 "type" : "string"
7aacca6f 20793 },
44660702
DM
20794 "search" : {
20795 "description" : "Search domain for host-name lookup.",
20796 "type" : "string"
56122987
DM
20797 }
20798 }
20799 },
20800 "permissions" : {
20801 "check" : [
20802 "perm",
7aacca6f 20803 "/nodes/{node}",
56122987 20804 [
7aacca6f 20805 "Sys.Modify"
56122987
DM
20806 ]
20807 ]
20808 },
44660702 20809 "protected" : 1,
7aacca6f 20810 "proxyto" : "node",
56122987 20811 "returns" : {
7aacca6f
DM
20812 "type" : "null"
20813 }
56122987 20814 }
44660702
DM
20815 },
20816 "leaf" : 1,
20817 "path" : "/nodes/{node}/dns",
20818 "text" : "dns"
56122987
DM
20819 },
20820 {
20821 "info" : {
7aacca6f 20822 "GET" : {
7aacca6f 20823 "description" : "Read server time and time zone settings.",
44660702
DM
20824 "method" : "GET",
20825 "name" : "time",
56122987 20826 "parameters" : {
44660702 20827 "additionalProperties" : 0,
56122987
DM
20828 "properties" : {
20829 "node" : {
44660702 20830 "description" : "The cluster node name.",
56122987 20831 "format" : "pve-node",
44660702 20832 "type" : "string"
56122987 20833 }
44660702 20834 }
56122987
DM
20835 },
20836 "permissions" : {
20837 "check" : [
20838 "perm",
7aacca6f 20839 "/nodes/{node}",
56122987 20840 [
7aacca6f 20841 "Sys.Audit"
56122987
DM
20842 ]
20843 ]
44660702
DM
20844 },
20845 "proxyto" : "node",
20846 "returns" : {
20847 "additionalProperties" : 0,
20848 "properties" : {
20849 "localtime" : {
20850 "description" : "Seconds since 1970-01-01 00:00:00 (local time)",
20851 "minimum" : 1297163644,
20852 "type" : "integer"
20853 },
20854 "time" : {
20855 "description" : "Seconds since 1970-01-01 00:00:00 UTC.",
20856 "minimum" : 1297163644,
20857 "type" : "integer"
20858 },
20859 "timezone" : {
20860 "description" : "Time zone",
20861 "type" : "string"
20862 }
20863 },
20864 "type" : "object"
7aacca6f
DM
20865 }
20866 },
20867 "PUT" : {
7aacca6f 20868 "description" : "Set time zone.",
44660702
DM
20869 "method" : "PUT",
20870 "name" : "set_timezone",
20871 "parameters" : {
20872 "additionalProperties" : 0,
20873 "properties" : {
20874 "node" : {
20875 "description" : "The cluster node name.",
20876 "format" : "pve-node",
20877 "type" : "string"
20878 },
20879 "timezone" : {
20880 "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.",
20881 "type" : "string"
20882 }
20883 }
20884 },
7aacca6f
DM
20885 "permissions" : {
20886 "check" : [
20887 "perm",
20888 "/nodes/{node}",
20889 [
20890 "Sys.Modify"
20891 ]
20892 ]
56122987 20893 },
7aacca6f 20894 "protected" : 1,
44660702
DM
20895 "proxyto" : "node",
20896 "returns" : {
20897 "type" : "null"
20898 }
7aacca6f
DM
20899 }
20900 },
7aacca6f 20901 "leaf" : 1,
44660702
DM
20902 "path" : "/nodes/{node}/time",
20903 "text" : "time"
7aacca6f
DM
20904 },
20905 {
20906 "info" : {
44660702
DM
20907 "GET" : {
20908 "description" : "Get list of appliances.",
20909 "method" : "GET",
20910 "name" : "aplinfo",
7aacca6f
DM
20911 "parameters" : {
20912 "additionalProperties" : 0,
20913 "properties" : {
7aacca6f 20914 "node" : {
44660702 20915 "description" : "The cluster node name.",
7aacca6f 20916 "format" : "pve-node",
44660702 20917 "type" : "string"
7aacca6f
DM
20918 }
20919 }
56122987 20920 },
7aacca6f 20921 "permissions" : {
44660702 20922 "user" : "all"
56122987 20923 },
44660702 20924 "proxyto" : "node",
7aacca6f
DM
20925 "returns" : {
20926 "items" : {
44660702
DM
20927 "properties" : {},
20928 "type" : "object"
7aacca6f
DM
20929 },
20930 "type" : "array"
44660702
DM
20931 }
20932 },
20933 "POST" : {
20934 "description" : "Download appliance templates.",
20935 "method" : "POST",
20936 "name" : "apl_download",
7aacca6f
DM
20937 "parameters" : {
20938 "additionalProperties" : 0,
20939 "properties" : {
20940 "node" : {
7aacca6f 20941 "description" : "The cluster node name.",
44660702
DM
20942 "format" : "pve-node",
20943 "type" : "string"
20944 },
20945 "storage" : {
20946 "description" : "Only list status for specified storage",
20947 "format" : "pve-storage-id",
20948 "type" : "string"
20949 },
20950 "template" : {
20951 "description" : "The template wich will downloaded",
20952 "maxLength" : 255,
7aacca6f
DM
20953 "type" : "string"
20954 }
20955 }
56122987 20956 },
7aacca6f 20957 "permissions" : {
44660702
DM
20958 "check" : [
20959 "perm",
20960 "/storage/{storage}",
20961 [
20962 "Datastore.AllocateTemplate"
20963 ]
20964 ]
20965 },
20966 "protected" : 1,
20967 "proxyto" : "node",
20968 "returns" : {
20969 "type" : "string"
7aacca6f
DM
20970 }
20971 }
20972 },
7aacca6f 20973 "leaf" : 1,
44660702
DM
20974 "path" : "/nodes/{node}/aplinfo",
20975 "text" : "aplinfo"
7aacca6f
DM
20976 },
20977 {
20978 "info" : {
20979 "GET" : {
44660702
DM
20980 "description" : "Gather various systems information about a node",
20981 "method" : "GET",
20982 "name" : "report",
7aacca6f 20983 "parameters" : {
44660702 20984 "additionalProperties" : 0,
7aacca6f
DM
20985 "properties" : {
20986 "node" : {
7aacca6f 20987 "description" : "The cluster node name.",
44660702 20988 "format" : "pve-node",
7aacca6f
DM
20989 "type" : "string"
20990 }
44660702 20991 }
56122987 20992 },
7aacca6f
DM
20993 "permissions" : {
20994 "check" : [
20995 "perm",
20996 "/nodes/{node}",
20997 [
20998 "Sys.Audit"
20999 ]
21000 ]
56122987 21001 },
44660702 21002 "protected" : 1,
7aacca6f
DM
21003 "proxyto" : "node",
21004 "returns" : {
56122987 21005 "type" : "string"
7aacca6f
DM
21006 }
21007 }
21008 },
7aacca6f 21009 "leaf" : 1,
44660702
DM
21010 "path" : "/nodes/{node}/report",
21011 "text" : "report"
7aacca6f
DM
21012 },
21013 {
7aacca6f
DM
21014 "info" : {
21015 "POST" : {
44660702 21016 "description" : "Start all VMs and containers (when onboot=1).",
7aacca6f 21017 "method" : "POST",
44660702 21018 "name" : "startall",
7aacca6f 21019 "parameters" : {
44660702 21020 "additionalProperties" : 0,
7aacca6f
DM
21021 "properties" : {
21022 "force" : {
44660702 21023 "description" : "force if onboot=0.",
7aacca6f 21024 "optional" : 1,
44660702 21025 "type" : "boolean"
7aacca6f
DM
21026 },
21027 "node" : {
7aacca6f 21028 "description" : "The cluster node name.",
44660702
DM
21029 "format" : "pve-node",
21030 "type" : "string"
7aacca6f 21031 }
44660702 21032 }
56122987 21033 },
7aacca6f
DM
21034 "permissions" : {
21035 "check" : [
21036 "perm",
21037 "/",
21038 [
21039 "VM.PowerMgmt"
21040 ]
21041 ]
44660702
DM
21042 },
21043 "protected" : 1,
21044 "proxyto" : "node",
21045 "returns" : {
21046 "type" : "string"
7aacca6f
DM
21047 }
21048 }
21049 },
44660702 21050 "leaf" : 1,
7aacca6f 21051 "path" : "/nodes/{node}/startall",
44660702 21052 "text" : "startall"
7aacca6f
DM
21053 },
21054 {
7aacca6f
DM
21055 "info" : {
21056 "POST" : {
21057 "description" : "Stop all VMs and Containers.",
44660702
DM
21058 "method" : "POST",
21059 "name" : "stopall",
7aacca6f 21060 "parameters" : {
44660702 21061 "additionalProperties" : 0,
7aacca6f
DM
21062 "properties" : {
21063 "node" : {
44660702 21064 "description" : "The cluster node name.",
7aacca6f 21065 "format" : "pve-node",
44660702 21066 "type" : "string"
7aacca6f 21067 }
44660702 21068 }
56122987 21069 },
7aacca6f
DM
21070 "permissions" : {
21071 "check" : [
21072 "perm",
21073 "/",
21074 [
44660702 21075 "VM.PowerMgmt"
7aacca6f
DM
21076 ]
21077 ]
56122987 21078 },
44660702 21079 "protected" : 1,
7aacca6f 21080 "proxyto" : "node",
44660702
DM
21081 "returns" : {
21082 "type" : "string"
21083 }
21084 }
56122987 21085 },
44660702
DM
21086 "leaf" : 1,
21087 "path" : "/nodes/{node}/stopall",
21088 "text" : "stopall"
21089 },
21090 {
21091 "info" : {
21092 "POST" : {
21093 "description" : "Migrate all VMs and Containers.",
21094 "method" : "POST",
21095 "name" : "migrateall",
21096 "parameters" : {
21097 "additionalProperties" : 0,
21098 "properties" : {
21099 "maxworkers" : {
21100 "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!",
21101 "minimum" : 1,
21102 "optional" : 1,
21103 "type" : "integer"
21104 },
21105 "node" : {
21106 "description" : "The cluster node name.",
21107 "format" : "pve-node",
21108 "type" : "string"
21109 },
21110 "target" : {
21111 "description" : "Target node.",
21112 "format" : "pve-node",
21113 "type" : "string"
21114 }
21115 }
21116 },
21117 "permissions" : {
21118 "check" : [
21119 "perm",
21120 "/",
21121 [
21122 "VM.Migrate"
21123 ]
21124 ]
21125 },
21126 "protected" : 1,
21127 "proxyto" : "node",
21128 "returns" : {
21129 "type" : "string"
21130 }
21131 }
56122987 21132 },
44660702
DM
21133 "leaf" : 1,
21134 "path" : "/nodes/{node}/migrateall",
21135 "text" : "migrateall"
21136 }
21137 ],
21138 "info" : {
21139 "GET" : {
21140 "description" : "Node index.",
21141 "method" : "GET",
21142 "name" : "index",
21143 "parameters" : {
21144 "additionalProperties" : 0,
21145 "properties" : {
21146 "node" : {
21147 "description" : "The cluster node name.",
21148 "format" : "pve-node",
21149 "type" : "string"
21150 }
21151 }
56122987 21152 },
44660702
DM
21153 "permissions" : {
21154 "user" : "all"
56122987 21155 },
44660702
DM
21156 "returns" : {
21157 "items" : {
21158 "properties" : {},
21159 "type" : "object"
21160 },
21161 "links" : [
21162 {
21163 "href" : "{name}",
21164 "rel" : "child"
21165 }
56122987 21166 ],
44660702 21167 "type" : "array"
7aacca6f
DM
21168 }
21169 }
21170 },
44660702
DM
21171 "leaf" : 0,
21172 "path" : "/nodes/{node}",
21173 "text" : "{node}"
21174 }
21175 ],
21176 "info" : {
7aacca6f 21177 "GET" : {
44660702 21178 "description" : "Cluster node index.",
7aacca6f 21179 "method" : "GET",
44660702 21180 "name" : "index",
7aacca6f 21181 "parameters" : {
7aacca6f
DM
21182 "additionalProperties" : 0
21183 },
21184 "permissions" : {
7aacca6f
DM
21185 "user" : "all"
21186 },
44660702
DM
21187 "returns" : {
21188 "items" : {
21189 "properties" : {},
21190 "type" : "object"
21191 },
21192 "links" : [
21193 {
21194 "href" : "{node}",
21195 "rel" : "child"
21196 }
21197 ],
21198 "type" : "array"
21199 }
7aacca6f
DM
21200 }
21201 },
44660702
DM
21202 "leaf" : 0,
21203 "path" : "/nodes",
21204 "text" : "nodes"
21205 },
21206 {
7aacca6f
DM
21207 "children" : [
21208 {
7aacca6f 21209 "info" : {
44660702
DM
21210 "DELETE" : {
21211 "description" : "Delete storage configuration.",
21212 "method" : "DELETE",
21213 "name" : "delete",
7aacca6f
DM
21214 "parameters" : {
21215 "additionalProperties" : 0,
21216 "properties" : {
21217 "storage" : {
7aacca6f 21218 "description" : "The storage identifier.",
44660702 21219 "format" : "pve-storage-id",
7aacca6f
DM
21220 "type" : "string"
21221 }
21222 }
56122987 21223 },
7aacca6f
DM
21224 "permissions" : {
21225 "check" : [
21226 "perm",
21227 "/storage",
21228 [
21229 "Datastore.Allocate"
21230 ]
21231 ]
56122987 21232 },
44660702
DM
21233 "protected" : 1,
21234 "returns" : {
21235 "type" : "null"
21236 }
21237 },
21238 "GET" : {
21239 "description" : "Read storage configuration.",
21240 "method" : "GET",
21241 "name" : "read",
7aacca6f
DM
21242 "parameters" : {
21243 "additionalProperties" : 0,
21244 "properties" : {
21245 "storage" : {
44660702 21246 "description" : "The storage identifier.",
7aacca6f 21247 "format" : "pve-storage-id",
44660702 21248 "type" : "string"
7aacca6f
DM
21249 }
21250 }
21251 },
44660702
DM
21252 "permissions" : {
21253 "check" : [
21254 "perm",
21255 "/storage/{storage}",
21256 [
21257 "Datastore.Allocate"
21258 ]
21259 ]
21260 },
21261 "returns" : {}
7aacca6f
DM
21262 },
21263 "PUT" : {
44660702
DM
21264 "description" : "Update storage configuration.",
21265 "method" : "PUT",
21266 "name" : "update",
21267 "parameters" : {
21268 "additionalProperties" : 0,
21269 "properties" : {
21270 "blocksize" : {
21271 "description" : "block size",
7aacca6f 21272 "optional" : 1,
44660702 21273 "type" : "string"
7aacca6f 21274 },
44660702
DM
21275 "comstar_hg" : {
21276 "description" : "host group for comstar views",
21277 "optional" : 1,
21278 "type" : "string"
7aacca6f 21279 },
44660702
DM
21280 "comstar_tg" : {
21281 "description" : "target group for comstar views",
7aacca6f 21282 "optional" : 1,
44660702 21283 "type" : "string"
7aacca6f 21284 },
44660702
DM
21285 "content" : {
21286 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21287 "format" : "pve-storage-content-list",
7aacca6f 21288 "optional" : 1,
44660702 21289 "type" : "string"
7aacca6f 21290 },
44660702
DM
21291 "delete" : {
21292 "description" : "A list of settings you want to delete.",
21293 "format" : "pve-configid-list",
21294 "maxLength" : 4096,
7aacca6f 21295 "optional" : 1,
44660702 21296 "type" : "string"
7aacca6f
DM
21297 },
21298 "digest" : {
44660702 21299 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 21300 "maxLength" : 40,
7aacca6f 21301 "optional" : 1,
7aacca6f
DM
21302 "type" : "string"
21303 },
44660702
DM
21304 "disable" : {
21305 "description" : "Flag to disable the storage.",
21306 "optional" : 1,
21307 "type" : "boolean"
7aacca6f
DM
21308 },
21309 "format" : {
21310 "description" : "Default image format.",
44660702 21311 "format" : "pve-storage-format",
7aacca6f 21312 "optional" : 1,
44660702 21313 "type" : "string"
7aacca6f 21314 },
44660702
DM
21315 "krbd" : {
21316 "description" : "Access rbd through krbd kernel module.",
7aacca6f 21317 "optional" : 1,
44660702 21318 "type" : "boolean"
7aacca6f 21319 },
44660702
DM
21320 "maxfiles" : {
21321 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21322 "minimum" : 0,
21323 "optional" : 1,
21324 "type" : "integer"
7aacca6f
DM
21325 },
21326 "nodes" : {
44660702 21327 "description" : "List of cluster node names.",
7aacca6f
DM
21328 "format" : "pve-node-list",
21329 "optional" : 1,
44660702 21330 "type" : "string"
7aacca6f 21331 },
44660702
DM
21332 "nowritecache" : {
21333 "description" : "disable write caching on the target",
7aacca6f 21334 "optional" : 1,
44660702 21335 "type" : "boolean"
7aacca6f
DM
21336 },
21337 "options" : {
7aacca6f 21338 "description" : "NFS mount options (see 'man nfs')",
44660702
DM
21339 "format" : "pve-storage-options",
21340 "optional" : 1,
21341 "type" : "string"
21342 },
21343 "pool" : {
21344 "description" : "Pool.",
21345 "optional" : 1,
21346 "type" : "string"
21347 },
21348 "redundancy" : {
21349 "default" : 2,
21350 "description" : "The redundancy count specifies the number of nodes to which the resource should be deployed. It must be at least 1 and at most the number of nodes in the cluster.",
21351 "maximum" : 16,
21352 "minimum" : 1,
21353 "optional" : 1,
21354 "type" : "integer"
21355 },
21356 "saferemove" : {
21357 "description" : "Zero-out data when removing LVs.",
21358 "optional" : 1,
21359 "type" : "boolean"
7aacca6f
DM
21360 },
21361 "saferemove_throughput" : {
44660702 21362 "description" : "Wipe throughput (cstream -t parameter value).",
7aacca6f 21363 "optional" : 1,
44660702 21364 "type" : "string"
7aacca6f 21365 },
44660702
DM
21366 "server" : {
21367 "description" : "Server IP or DNS name.",
21368 "format" : "pve-storage-server",
7aacca6f 21369 "optional" : 1,
44660702 21370 "type" : "string"
7aacca6f 21371 },
44660702
DM
21372 "server2" : {
21373 "description" : "Backup volfile server IP or DNS name.",
21374 "format" : "pve-storage-server",
7aacca6f 21375 "optional" : 1,
44660702
DM
21376 "requires" : "server",
21377 "type" : "string"
21378 },
21379 "shared" : {
21380 "description" : "Mark storage as shared.",
21381 "optional" : 1,
21382 "type" : "boolean"
21383 },
21384 "sparse" : {
21385 "description" : "use sparse volumes",
21386 "optional" : 1,
21387 "type" : "boolean"
21388 },
21389 "storage" : {
21390 "description" : "The storage identifier.",
21391 "format" : "pve-storage-id",
21392 "type" : "string"
21393 },
21394 "transport" : {
21395 "description" : "Gluster transport: tcp or rdma",
21396 "enum" : [
21397 "tcp",
21398 "rdma",
21399 "unix"
21400 ],
21401 "optional" : 1,
21402 "type" : "string"
7aacca6f
DM
21403 },
21404 "username" : {
21405 "description" : "RBD Id.",
44660702
DM
21406 "optional" : 1,
21407 "type" : "string"
7aacca6f 21408 }
44660702
DM
21409 },
21410 "type" : "object"
21411 },
21412 "permissions" : {
21413 "check" : [
21414 "perm",
21415 "/storage",
21416 [
21417 "Datastore.Allocate"
21418 ]
21419 ]
21420 },
21421 "protected" : 1,
21422 "returns" : {
21423 "type" : "null"
21424 }
21425 }
21426 },
21427 "leaf" : 1,
21428 "path" : "/storage/{storage}",
21429 "text" : "{storage}"
21430 }
21431 ],
21432 "info" : {
21433 "GET" : {
21434 "description" : "Storage index.",
21435 "method" : "GET",
21436 "name" : "index",
21437 "parameters" : {
21438 "additionalProperties" : 0,
21439 "properties" : {
21440 "type" : {
21441 "description" : "Only list storage of specific type",
21442 "enum" : [
21443 "dir",
21444 "drbd",
21445 "glusterfs",
21446 "iscsi",
21447 "iscsidirect",
21448 "lvm",
21449 "lvmthin",
21450 "nfs",
21451 "rbd",
21452 "sheepdog",
21453 "zfs",
21454 "zfspool"
21455 ],
21456 "optional" : 1,
21457 "type" : "string"
21458 }
21459 }
21460 },
21461 "permissions" : {
21462 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
21463 "user" : "all"
21464 },
21465 "returns" : {
21466 "items" : {
21467 "properties" : {
21468 "storage" : {
21469 "type" : "string"
7aacca6f 21470 }
56122987 21471 },
44660702
DM
21472 "type" : "object"
21473 },
21474 "links" : [
21475 {
21476 "href" : "{storage}",
21477 "rel" : "child"
21478 }
21479 ],
21480 "type" : "array"
21481 }
21482 },
21483 "POST" : {
21484 "description" : "Create a new storage.",
21485 "method" : "POST",
21486 "name" : "create",
21487 "parameters" : {
21488 "additionalProperties" : 0,
21489 "properties" : {
21490 "authsupported" : {
21491 "description" : "Authsupported.",
21492 "optional" : 1,
21493 "type" : "string"
21494 },
21495 "base" : {
21496 "description" : "Base volume. This volume is automatically activated.",
21497 "format" : "pve-volume-id",
21498 "optional" : 1,
21499 "type" : "string"
21500 },
21501 "blocksize" : {
21502 "description" : "block size",
21503 "optional" : 1,
21504 "type" : "string"
21505 },
21506 "comstar_hg" : {
21507 "description" : "host group for comstar views",
21508 "optional" : 1,
21509 "type" : "string"
21510 },
21511 "comstar_tg" : {
21512 "description" : "target group for comstar views",
21513 "optional" : 1,
21514 "type" : "string"
21515 },
21516 "content" : {
21517 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21518 "format" : "pve-storage-content-list",
21519 "optional" : 1,
21520 "type" : "string"
21521 },
21522 "disable" : {
21523 "description" : "Flag to disable the storage.",
21524 "optional" : 1,
21525 "type" : "boolean"
21526 },
21527 "export" : {
21528 "description" : "NFS export path.",
21529 "format" : "pve-storage-path",
21530 "optional" : 1,
21531 "type" : "string"
21532 },
21533 "format" : {
21534 "description" : "Default image format.",
21535 "format" : "pve-storage-format",
21536 "optional" : 1,
21537 "type" : "string"
21538 },
21539 "iscsiprovider" : {
21540 "description" : "iscsi provider",
21541 "optional" : 1,
21542 "type" : "string"
21543 },
21544 "krbd" : {
21545 "description" : "Access rbd through krbd kernel module.",
21546 "optional" : 1,
21547 "type" : "boolean"
56122987 21548 },
44660702
DM
21549 "maxfiles" : {
21550 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21551 "minimum" : 0,
21552 "optional" : 1,
21553 "type" : "integer"
7aacca6f 21554 },
44660702
DM
21555 "monhost" : {
21556 "description" : "Monitors daemon ips.",
21557 "optional" : 1,
21558 "type" : "string"
7aacca6f 21559 },
44660702
DM
21560 "nodes" : {
21561 "description" : "List of cluster node names.",
21562 "format" : "pve-node-list",
21563 "optional" : 1,
21564 "type" : "string"
7aacca6f 21565 },
44660702
DM
21566 "nowritecache" : {
21567 "description" : "disable write caching on the target",
21568 "optional" : 1,
21569 "type" : "boolean"
21570 },
21571 "options" : {
21572 "description" : "NFS mount options (see 'man nfs')",
21573 "format" : "pve-storage-options",
21574 "optional" : 1,
21575 "type" : "string"
21576 },
21577 "path" : {
21578 "description" : "File system path.",
21579 "format" : "pve-storage-path",
21580 "optional" : 1,
21581 "type" : "string"
21582 },
21583 "pool" : {
21584 "description" : "Pool.",
21585 "optional" : 1,
21586 "type" : "string"
21587 },
21588 "portal" : {
21589 "description" : "iSCSI portal (IP or DNS name with optional port).",
21590 "format" : "pve-storage-portal-dns",
21591 "optional" : 1,
21592 "type" : "string"
21593 },
21594 "redundancy" : {
21595 "default" : 2,
21596 "description" : "The redundancy count specifies the number of nodes to which the resource should be deployed. It must be at least 1 and at most the number of nodes in the cluster.",
21597 "maximum" : 16,
21598 "minimum" : 1,
21599 "optional" : 1,
21600 "type" : "integer"
21601 },
21602 "saferemove" : {
21603 "description" : "Zero-out data when removing LVs.",
21604 "optional" : 1,
21605 "type" : "boolean"
21606 },
21607 "saferemove_throughput" : {
21608 "description" : "Wipe throughput (cstream -t parameter value).",
21609 "optional" : 1,
21610 "type" : "string"
21611 },
21612 "server" : {
21613 "description" : "Server IP or DNS name.",
21614 "format" : "pve-storage-server",
21615 "optional" : 1,
21616 "type" : "string"
21617 },
21618 "server2" : {
21619 "description" : "Backup volfile server IP or DNS name.",
21620 "format" : "pve-storage-server",
21621 "optional" : 1,
21622 "requires" : "server",
21623 "type" : "string"
21624 },
21625 "shared" : {
21626 "description" : "Mark storage as shared.",
21627 "optional" : 1,
21628 "type" : "boolean"
21629 },
21630 "sparse" : {
21631 "description" : "use sparse volumes",
21632 "optional" : 1,
21633 "type" : "boolean"
21634 },
21635 "storage" : {
21636 "description" : "The storage identifier.",
21637 "format" : "pve-storage-id",
21638 "type" : "string"
21639 },
21640 "target" : {
21641 "description" : "iSCSI target.",
21642 "optional" : 1,
21643 "type" : "string"
21644 },
21645 "thinpool" : {
21646 "description" : "LVM thin pool LV name.",
21647 "format" : "pve-storage-vgname",
21648 "optional" : 1,
21649 "type" : "string"
21650 },
21651 "transport" : {
21652 "description" : "Gluster transport: tcp or rdma",
21653 "enum" : [
21654 "tcp",
21655 "rdma",
21656 "unix"
7aacca6f 21657 ],
44660702
DM
21658 "optional" : 1,
21659 "type" : "string"
56122987 21660 },
44660702
DM
21661 "type" : {
21662 "description" : "Storage type.",
21663 "enum" : [
21664 "dir",
21665 "drbd",
21666 "glusterfs",
21667 "iscsi",
21668 "iscsidirect",
21669 "lvm",
21670 "lvmthin",
21671 "nfs",
21672 "rbd",
21673 "sheepdog",
21674 "zfs",
21675 "zfspool"
21676 ],
21677 "type" : "string"
56122987 21678 },
44660702
DM
21679 "username" : {
21680 "description" : "RBD Id.",
21681 "optional" : 1,
21682 "type" : "string"
7aacca6f 21683 },
44660702
DM
21684 "vgname" : {
21685 "description" : "Volume group name.",
21686 "format" : "pve-storage-vgname",
21687 "optional" : 1,
21688 "type" : "string"
21689 },
21690 "volume" : {
21691 "description" : "Glusterfs Volume.",
21692 "optional" : 1,
21693 "type" : "string"
21694 }
21695 },
21696 "type" : "object"
21697 },
21698 "permissions" : {
21699 "check" : [
21700 "perm",
21701 "/storage",
21702 [
21703 "Datastore.Allocate"
21704 ]
21705 ]
56122987 21706 },
44660702
DM
21707 "protected" : 1,
21708 "returns" : {
21709 "type" : "null"
21710 }
21711 }
21712 },
21713 "leaf" : 0,
21714 "path" : "/storage",
21715 "text" : "storage"
21716 },
21717 {
21718 "children" : [
21719 {
56122987
DM
21720 "children" : [
21721 {
56122987 21722 "info" : {
44660702
DM
21723 "DELETE" : {
21724 "description" : "Delete user.",
21725 "method" : "DELETE",
21726 "name" : "delete_user",
56122987 21727 "parameters" : {
7aacca6f 21728 "additionalProperties" : 0,
56122987 21729 "properties" : {
56122987 21730 "userid" : {
56122987
DM
21731 "description" : "User ID",
21732 "format" : "pve-userid",
44660702 21733 "maxLength" : 64,
56122987
DM
21734 "type" : "string"
21735 }
7aacca6f 21736 }
56122987 21737 },
56122987
DM
21738 "permissions" : {
21739 "check" : [
44660702 21740 "and",
56122987 21741 [
44660702
DM
21742 "userid-param",
21743 "Realm.AllocateUser"
56122987 21744 ],
44660702
DM
21745 [
21746 "userid-group",
21747 [
21748 "User.Modify"
21749 ]
21750 ]
56122987 21751 ]
7aacca6f 21752 },
44660702 21753 "protected" : 1,
56122987
DM
21754 "returns" : {
21755 "type" : "null"
44660702 21756 }
7aacca6f 21757 },
44660702
DM
21758 "GET" : {
21759 "description" : "Get user configuration.",
21760 "method" : "GET",
21761 "name" : "read_user",
56122987
DM
21762 "parameters" : {
21763 "additionalProperties" : 0,
21764 "properties" : {
21765 "userid" : {
44660702 21766 "description" : "User ID",
56122987 21767 "format" : "pve-userid",
44660702
DM
21768 "maxLength" : 64,
21769 "type" : "string"
56122987
DM
21770 }
21771 }
21772 },
56122987
DM
21773 "permissions" : {
21774 "check" : [
44660702 21775 "userid-group",
56122987 21776 [
44660702
DM
21777 "User.Modify",
21778 "Sys.Audit"
56122987
DM
21779 ]
21780 ]
21781 },
56122987 21782 "returns" : {
7aacca6f 21783 "additionalProperties" : 0,
56122987 21784 "properties" : {
44660702
DM
21785 "comment" : {
21786 "optional" : 1,
21787 "type" : "string"
56122987 21788 },
44660702
DM
21789 "email" : {
21790 "optional" : 1,
21791 "type" : "string"
7aacca6f
DM
21792 },
21793 "enable" : {
21794 "type" : "boolean"
21795 },
44660702
DM
21796 "expire" : {
21797 "optional" : 1,
21798 "type" : "integer"
21799 },
21800 "firstname" : {
56122987
DM
21801 "optional" : 1,
21802 "type" : "string"
21803 },
44660702
DM
21804 "groups" : {
21805 "type" : "array"
56122987 21806 },
44660702
DM
21807 "keys" : {
21808 "optional" : 1,
21809 "type" : "string"
7aacca6f 21810 },
44660702
DM
21811 "lastname" : {
21812 "optional" : 1,
21813 "type" : "string"
56122987 21814 }
7aacca6f 21815 }
44660702
DM
21816 }
21817 },
21818 "PUT" : {
21819 "description" : "Update user configuration.",
21820 "method" : "PUT",
21821 "name" : "update_user",
56122987 21822 "parameters" : {
44660702 21823 "additionalProperties" : 0,
56122987 21824 "properties" : {
44660702
DM
21825 "append" : {
21826 "optional" : 1,
21827 "requires" : "groups",
21828 "type" : "boolean"
21829 },
21830 "comment" : {
21831 "optional" : 1,
21832 "type" : "string"
21833 },
21834 "email" : {
21835 "format" : "email-opt",
21836 "optional" : 1,
21837 "type" : "string"
21838 },
21839 "enable" : {
21840 "description" : "Enable/disable the account.",
21841 "optional" : 1,
21842 "type" : "boolean"
21843 },
21844 "expire" : {
21845 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
21846 "minimum" : 0,
21847 "optional" : 1,
21848 "type" : "integer"
21849 },
21850 "firstname" : {
21851 "optional" : 1,
21852 "type" : "string"
21853 },
21854 "groups" : {
21855 "format" : "pve-groupid-list",
21856 "optional" : 1,
21857 "type" : "string"
21858 },
21859 "keys" : {
21860 "description" : "Keys for two factor auth (yubico).",
21861 "optional" : 1,
21862 "type" : "string"
21863 },
21864 "lastname" : {
21865 "optional" : 1,
21866 "type" : "string"
21867 },
56122987 21868 "userid" : {
56122987
DM
21869 "description" : "User ID",
21870 "format" : "pve-userid",
44660702
DM
21871 "maxLength" : 64,
21872 "type" : "string"
56122987 21873 }
44660702 21874 }
56122987 21875 },
56122987
DM
21876 "permissions" : {
21877 "check" : [
21878 "userid-group",
21879 [
44660702
DM
21880 "User.Modify"
21881 ],
21882 "groups_param",
21883 1
56122987
DM
21884 ]
21885 },
44660702
DM
21886 "protected" : 1,
21887 "returns" : {
21888 "type" : "null"
21889 }
56122987
DM
21890 }
21891 },
44660702
DM
21892 "leaf" : 1,
21893 "path" : "/access/users/{userid}",
7aacca6f 21894 "text" : "{userid}"
56122987 21895 }
7aacca6f 21896 ],
56122987 21897 "info" : {
7aacca6f 21898 "GET" : {
44660702
DM
21899 "description" : "User index.",
21900 "method" : "GET",
7aacca6f 21901 "name" : "index",
56122987 21902 "parameters" : {
44660702
DM
21903 "additionalProperties" : 0,
21904 "properties" : {
21905 "enabled" : {
21906 "description" : "Optional filter for enable property.",
21907 "optional" : 1,
21908 "type" : "boolean"
21909 }
21910 }
21911 },
21912 "permissions" : {
21913 "description" : "The returned list is restricted to users where you have 'User.Modify' or 'Sys.Audit' permissions on '/access/groups' or on a group the user belongs too. But it always includes the current (authenticated) user.",
21914 "user" : "all"
56122987 21915 },
7aacca6f 21916 "returns" : {
7aacca6f
DM
21917 "items" : {
21918 "properties" : {
44660702 21919 "userid" : {
7aacca6f
DM
21920 "type" : "string"
21921 }
21922 },
21923 "type" : "object"
21924 },
44660702
DM
21925 "links" : [
21926 {
21927 "href" : "{userid}",
21928 "rel" : "child"
21929 }
21930 ],
7aacca6f
DM
21931 "type" : "array"
21932 }
21933 },
21934 "POST" : {
44660702 21935 "description" : "Create new user.",
7aacca6f 21936 "method" : "POST",
44660702 21937 "name" : "create_user",
56122987 21938 "parameters" : {
7aacca6f
DM
21939 "additionalProperties" : 0,
21940 "properties" : {
44660702
DM
21941 "comment" : {
21942 "optional" : 1,
7aacca6f
DM
21943 "type" : "string"
21944 },
44660702
DM
21945 "email" : {
21946 "format" : "email-opt",
21947 "optional" : 1,
21948 "type" : "string"
21949 },
21950 "enable" : {
21951 "default" : 1,
21952 "description" : "Enable the account (default). You can set this to '0' to disable the accout",
21953 "optional" : 1,
21954 "type" : "boolean"
21955 },
21956 "expire" : {
21957 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
21958 "minimum" : 0,
21959 "optional" : 1,
21960 "type" : "integer"
21961 },
21962 "firstname" : {
21963 "optional" : 1,
21964 "type" : "string"
21965 },
21966 "groups" : {
21967 "format" : "pve-groupid-list",
21968 "optional" : 1,
21969 "type" : "string"
21970 },
21971 "keys" : {
21972 "description" : "Keys for two factor auth (yubico).",
21973 "optional" : 1,
21974 "type" : "string"
21975 },
21976 "lastname" : {
7aacca6f
DM
21977 "optional" : 1,
21978 "type" : "string"
44660702
DM
21979 },
21980 "password" : {
21981 "description" : "Initial password.",
21982 "maxLength" : 64,
21983 "minLength" : 5,
21984 "optional" : 1,
21985 "type" : "string"
21986 },
21987 "userid" : {
21988 "description" : "User ID",
21989 "format" : "pve-userid",
21990 "maxLength" : 64,
21991 "type" : "string"
56122987 21992 }
7aacca6f 21993 }
56122987 21994 },
44660702
DM
21995 "permissions" : {
21996 "check" : [
21997 "and",
21998 [
21999 "userid-param",
22000 "Realm.AllocateUser"
22001 ],
22002 [
22003 "userid-group",
22004 [
22005 "User.Modify"
22006 ],
22007 "groups_param",
22008 1
22009 ]
22010 ],
22011 "description" : "You need 'Realm.AllocateUser' on '/access/realm/<realm>' on the realm of user <userid>, and 'User.Modify' permissions to '/access/groups/<group>' for any group specified (or 'User.Modify' on '/access/groups' if you pass no groups."
22012 },
22013 "protected" : 1,
22014 "returns" : {
22015 "type" : "null"
22016 }
56122987
DM
22017 }
22018 },
44660702
DM
22019 "leaf" : 0,
22020 "path" : "/access/users",
22021 "text" : "users"
22022 },
22023 {
56122987
DM
22024 "children" : [
22025 {
56122987
DM
22026 "info" : {
22027 "DELETE" : {
44660702
DM
22028 "description" : "Delete group.",
22029 "method" : "DELETE",
22030 "name" : "delete_group",
22031 "parameters" : {
22032 "additionalProperties" : 0,
22033 "properties" : {
22034 "groupid" : {
22035 "format" : "pve-groupid",
22036 "type" : "string"
22037 }
22038 }
22039 },
7aacca6f
DM
22040 "permissions" : {
22041 "check" : [
22042 "perm",
22043 "/access/groups",
22044 [
22045 "Group.Allocate"
22046 ]
22047 ]
22048 },
7aacca6f 22049 "protected" : 1,
7aacca6f
DM
22050 "returns" : {
22051 "type" : "null"
44660702 22052 }
7aacca6f 22053 },
44660702
DM
22054 "GET" : {
22055 "description" : "Get group configuration.",
22056 "method" : "GET",
22057 "name" : "read_group",
22058 "parameters" : {
22059 "additionalProperties" : 0,
22060 "properties" : {
22061 "groupid" : {
22062 "format" : "pve-groupid",
22063 "type" : "string"
22064 }
22065 }
56122987 22066 },
7aacca6f
DM
22067 "permissions" : {
22068 "check" : [
22069 "perm",
22070 "/access/groups",
22071 [
44660702 22072 "Sys.Audit",
7aacca6f 22073 "Group.Allocate"
44660702
DM
22074 ],
22075 "any",
22076 1
7aacca6f
DM
22077 ]
22078 },
7aacca6f 22079 "returns" : {
44660702 22080 "additionalProperties" : 0,
7aacca6f
DM
22081 "properties" : {
22082 "comment" : {
44660702
DM
22083 "optional" : 1,
22084 "type" : "string"
7aacca6f
DM
22085 },
22086 "members" : {
22087 "items" : {
22088 "type" : "string"
22089 },
22090 "type" : "array"
22091 }
22092 },
44660702
DM
22093 "type" : "object"
22094 }
22095 },
22096 "PUT" : {
22097 "description" : "Update group data.",
22098 "method" : "PUT",
22099 "name" : "update_group",
56122987 22100 "parameters" : {
44660702 22101 "additionalProperties" : 0,
56122987 22102 "properties" : {
44660702
DM
22103 "comment" : {
22104 "optional" : 1,
22105 "type" : "string"
22106 },
56122987
DM
22107 "groupid" : {
22108 "format" : "pve-groupid",
22109 "type" : "string"
22110 }
44660702 22111 }
56122987 22112 },
56122987
DM
22113 "permissions" : {
22114 "check" : [
22115 "perm",
22116 "/access/groups",
22117 [
22118 "Group.Allocate"
44660702 22119 ]
56122987
DM
22120 ]
22121 },
44660702
DM
22122 "protected" : 1,
22123 "returns" : {
22124 "type" : "null"
22125 }
7aacca6f
DM
22126 }
22127 },
7aacca6f 22128 "leaf" : 1,
44660702
DM
22129 "path" : "/access/groups/{groupid}",
22130 "text" : "{groupid}"
22131 }
22132 ],
22133 "info" : {
22134 "GET" : {
22135 "description" : "Group index.",
22136 "method" : "GET",
22137 "name" : "index",
22138 "parameters" : {
22139 "additionalProperties" : 0
22140 },
22141 "permissions" : {
22142 "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/<group>.",
22143 "user" : "all"
22144 },
22145 "returns" : {
22146 "items" : {
22147 "properties" : {
22148 "groupid" : {
22149 "type" : "string"
22150 }
22151 },
22152 "type" : "object"
22153 },
22154 "links" : [
22155 {
22156 "href" : "{groupid}",
22157 "rel" : "child"
22158 }
22159 ],
22160 "type" : "array"
22161 }
22162 },
22163 "POST" : {
22164 "description" : "Create new group.",
22165 "method" : "POST",
22166 "name" : "create_group",
22167 "parameters" : {
22168 "additionalProperties" : 0,
22169 "properties" : {
22170 "comment" : {
22171 "optional" : 1,
22172 "type" : "string"
22173 },
22174 "groupid" : {
22175 "format" : "pve-groupid",
22176 "type" : "string"
22177 }
22178 }
22179 },
22180 "permissions" : {
22181 "check" : [
22182 "perm",
22183 "/access/groups",
22184 [
22185 "Group.Allocate"
22186 ]
22187 ]
22188 },
22189 "protected" : 1,
22190 "returns" : {
22191 "type" : "null"
22192 }
7aacca6f 22193 }
44660702 22194 },
7aacca6f 22195 "leaf" : 0,
44660702
DM
22196 "path" : "/access/groups",
22197 "text" : "groups"
7aacca6f
DM
22198 },
22199 {
22200 "children" : [
22201 {
7aacca6f 22202 "info" : {
7aacca6f 22203 "DELETE" : {
7aacca6f 22204 "description" : "Delete role.",
44660702 22205 "method" : "DELETE",
7aacca6f 22206 "name" : "delete_role",
56122987
DM
22207 "parameters" : {
22208 "additionalProperties" : 0,
22209 "properties" : {
7aacca6f
DM
22210 "roleid" : {
22211 "format" : "pve-roleid",
22212 "type" : "string"
56122987
DM
22213 }
22214 }
22215 },
56122987
DM
22216 "permissions" : {
22217 "check" : [
22218 "perm",
7aacca6f 22219 "/access",
56122987 22220 [
7aacca6f
DM
22221 "Sys.Modify"
22222 ]
56122987 22223 ]
44660702
DM
22224 },
22225 "protected" : 1,
22226 "returns" : {
22227 "type" : "null"
56122987
DM
22228 }
22229 },
44660702
DM
22230 "GET" : {
22231 "description" : "Get role configuration.",
22232 "method" : "GET",
22233 "name" : "read_role",
22234 "parameters" : {
22235 "additionalProperties" : 0,
22236 "properties" : {
22237 "roleid" : {
22238 "format" : "pve-roleid",
22239 "type" : "string"
22240 }
22241 }
22242 },
7aacca6f 22243 "permissions" : {
44660702 22244 "user" : "all"
56122987 22245 },
44660702
DM
22246 "returns" : {}
22247 },
22248 "PUT" : {
22249 "description" : "Create new role.",
22250 "method" : "PUT",
22251 "name" : "update_role",
56122987
DM
22252 "parameters" : {
22253 "additionalProperties" : 0,
22254 "properties" : {
7aacca6f 22255 "append" : {
44660702 22256 "optional" : 1,
7aacca6f 22257 "requires" : "privs",
44660702 22258 "type" : "boolean"
7aacca6f
DM
22259 },
22260 "privs" : {
22261 "format" : "pve-priv-list",
56122987 22262 "type" : "string"
44660702
DM
22263 },
22264 "roleid" : {
22265 "format" : "pve-roleid",
22266 "type" : "string"
56122987
DM
22267 }
22268 }
22269 },
44660702
DM
22270 "permissions" : {
22271 "check" : [
22272 "perm",
22273 "/access",
22274 [
22275 "Sys.Modify"
22276 ]
22277 ]
22278 },
56122987 22279 "protected" : 1,
7aacca6f
DM
22280 "returns" : {
22281 "type" : "null"
56122987
DM
22282 }
22283 }
22284 },
44660702 22285 "leaf" : 1,
7aacca6f 22286 "path" : "/access/roles/{roleid}",
44660702 22287 "text" : "{roleid}"
56122987
DM
22288 }
22289 ],
56122987 22290 "info" : {
7aacca6f
DM
22291 "GET" : {
22292 "description" : "Role index.",
44660702 22293 "method" : "GET",
7aacca6f 22294 "name" : "index",
56122987 22295 "parameters" : {
56122987
DM
22296 "additionalProperties" : 0
22297 },
7aacca6f
DM
22298 "permissions" : {
22299 "user" : "all"
22300 },
56122987 22301 "returns" : {
7aacca6f 22302 "items" : {
7aacca6f
DM
22303 "properties" : {
22304 "roleid" : {
22305 "type" : "string"
22306 }
44660702
DM
22307 },
22308 "type" : "object"
22309 },
22310 "links" : [
22311 {
22312 "href" : "{roleid}",
22313 "rel" : "child"
7aacca6f 22314 }
44660702
DM
22315 ],
22316 "type" : "array"
22317 }
7aacca6f
DM
22318 },
22319 "POST" : {
22320 "description" : "Create new role.",
44660702
DM
22321 "method" : "POST",
22322 "name" : "create_role",
7aacca6f
DM
22323 "parameters" : {
22324 "additionalProperties" : 0,
22325 "properties" : {
7aacca6f
DM
22326 "privs" : {
22327 "format" : "pve-priv-list",
22328 "optional" : 1,
22329 "type" : "string"
44660702
DM
22330 },
22331 "roleid" : {
22332 "format" : "pve-roleid",
22333 "type" : "string"
7aacca6f
DM
22334 }
22335 }
22336 },
44660702
DM
22337 "permissions" : {
22338 "check" : [
22339 "perm",
22340 "/access",
22341 [
22342 "Sys.Modify"
22343 ]
22344 ]
22345 },
22346 "protected" : 1,
7aacca6f
DM
22347 "returns" : {
22348 "type" : "null"
22349 }
22350 }
22351 },
44660702 22352 "leaf" : 0,
7aacca6f 22353 "path" : "/access/roles",
44660702 22354 "text" : "roles"
7aacca6f
DM
22355 },
22356 {
22357 "info" : {
56122987 22358 "GET" : {
44660702
DM
22359 "description" : "Get Access Control List (ACLs).",
22360 "method" : "GET",
22361 "name" : "read_acl",
7aacca6f
DM
22362 "parameters" : {
22363 "additionalProperties" : 0
22364 },
44660702
DM
22365 "permissions" : {
22366 "description" : "The returned list is restricted to objects where you have rights to modify permissions.",
22367 "user" : "all"
22368 },
56122987 22369 "returns" : {
56122987 22370 "items" : {
44660702 22371 "additionalProperties" : 0,
56122987 22372 "properties" : {
7aacca6f
DM
22373 "path" : {
22374 "type" : "string"
22375 },
44660702
DM
22376 "propagate" : {
22377 "type" : "boolean"
22378 },
22379 "roleid" : {
22380 "type" : "string"
22381 },
7aacca6f
DM
22382 "type" : {
22383 "enum" : [
22384 "user",
22385 "group"
22386 ],
22387 "type" : "string"
22388 },
7aacca6f
DM
22389 "ugid" : {
22390 "type" : "string"
56122987 22391 }
7aacca6f 22392 },
44660702 22393 "type" : "object"
7aacca6f
DM
22394 },
22395 "type" : "array"
44660702 22396 }
7aacca6f
DM
22397 },
22398 "PUT" : {
44660702
DM
22399 "description" : "Update Access Control List (add or remove permissions).",
22400 "method" : "PUT",
7aacca6f
DM
22401 "name" : "update_acl",
22402 "parameters" : {
22403 "additionalProperties" : 0,
22404 "properties" : {
22405 "delete" : {
44660702 22406 "description" : "Remove permissions (instead of adding it).",
7aacca6f 22407 "optional" : 1,
44660702 22408 "type" : "boolean"
7aacca6f 22409 },
44660702
DM
22410 "groups" : {
22411 "description" : "List of groups.",
22412 "format" : "pve-groupid-list",
7aacca6f 22413 "optional" : 1,
44660702 22414 "type" : "string"
7aacca6f
DM
22415 },
22416 "path" : {
22417 "description" : "Access control path",
22418 "type" : "string"
22419 },
7aacca6f 22420 "propagate" : {
44660702 22421 "default" : 1,
7aacca6f 22422 "description" : "Allow to propagate (inherit) permissions.",
7aacca6f 22423 "optional" : 1,
44660702 22424 "type" : "boolean"
7aacca6f 22425 },
44660702
DM
22426 "roles" : {
22427 "description" : "List of roles.",
22428 "format" : "pve-roleid-list",
22429 "type" : "string"
22430 },
22431 "users" : {
22432 "description" : "List of users.",
22433 "format" : "pve-userid-list",
7aacca6f 22434 "optional" : 1,
44660702 22435 "type" : "string"
56122987
DM
22436 }
22437 }
22438 },
56122987 22439 "permissions" : {
7aacca6f
DM
22440 "check" : [
22441 "perm-modify",
22442 "{path}"
22443 ]
22444 },
7aacca6f
DM
22445 "protected" : 1,
22446 "returns" : {
22447 "type" : "null"
44660702 22448 }
56122987
DM
22449 }
22450 },
7aacca6f 22451 "leaf" : 1,
44660702
DM
22452 "path" : "/access/acl",
22453 "text" : "acl"
7aacca6f
DM
22454 },
22455 {
56122987
DM
22456 "children" : [
22457 {
56122987 22458 "info" : {
44660702
DM
22459 "DELETE" : {
22460 "description" : "Delete an authentication server.",
22461 "method" : "DELETE",
22462 "name" : "delete",
22463 "parameters" : {
22464 "additionalProperties" : 0,
22465 "properties" : {
22466 "realm" : {
22467 "description" : "Authentication domain ID",
22468 "format" : "pve-realm",
22469 "maxLength" : 32,
22470 "type" : "string"
56122987 22471 }
44660702 22472 }
56122987 22473 },
56122987
DM
22474 "permissions" : {
22475 "check" : [
22476 "perm",
7aacca6f 22477 "/access/realm",
56122987 22478 [
7aacca6f 22479 "Realm.Allocate"
56122987
DM
22480 ]
22481 ]
22482 },
7aacca6f 22483 "protected" : 1,
7aacca6f
DM
22484 "returns" : {
22485 "type" : "null"
44660702 22486 }
7aacca6f 22487 },
44660702
DM
22488 "GET" : {
22489 "description" : "Get auth server configuration.",
22490 "method" : "GET",
22491 "name" : "read",
56122987 22492 "parameters" : {
44660702 22493 "additionalProperties" : 0,
56122987 22494 "properties" : {
7aacca6f 22495 "realm" : {
44660702 22496 "description" : "Authentication domain ID",
7aacca6f
DM
22497 "format" : "pve-realm",
22498 "maxLength" : 32,
44660702 22499 "type" : "string"
56122987 22500 }
44660702 22501 }
7aacca6f 22502 },
7aacca6f
DM
22503 "permissions" : {
22504 "check" : [
22505 "perm",
22506 "/access/realm",
22507 [
44660702
DM
22508 "Realm.Allocate",
22509 "Sys.Audit"
22510 ],
22511 "any",
22512 1
7aacca6f 22513 ]
44660702
DM
22514 },
22515 "returns" : {}
7aacca6f 22516 },
44660702
DM
22517 "PUT" : {
22518 "description" : "Update authentication server settings.",
22519 "method" : "PUT",
22520 "name" : "update",
7aacca6f 22521 "parameters" : {
44660702 22522 "additionalProperties" : 0,
7aacca6f 22523 "properties" : {
44660702
DM
22524 "base_dn" : {
22525 "description" : "LDAP base domain name",
22526 "maxLength" : 256,
22527 "optional" : 1,
22528 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
22529 "type" : "string"
22530 },
22531 "comment" : {
22532 "description" : "Description.",
22533 "maxLength" : 4096,
22534 "optional" : 1,
22535 "type" : "string"
22536 },
22537 "default" : {
22538 "description" : "Use this as default realm",
22539 "optional" : 1,
22540 "type" : "boolean"
22541 },
22542 "delete" : {
22543 "description" : "A list of settings you want to delete.",
22544 "format" : "pve-configid-list",
22545 "maxLength" : 4096,
22546 "optional" : 1,
22547 "type" : "string"
22548 },
22549 "digest" : {
22550 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
22551 "maxLength" : 40,
22552 "optional" : 1,
22553 "type" : "string"
22554 },
22555 "domain" : {
22556 "description" : "AD domain name",
22557 "maxLength" : 256,
22558 "optional" : 1,
22559 "pattern" : "\\S+",
22560 "type" : "string"
22561 },
22562 "port" : {
22563 "description" : "Server port.",
22564 "maximum" : 65535,
22565 "minimum" : 1,
22566 "optional" : 1,
22567 "type" : "integer"
22568 },
7aacca6f 22569 "realm" : {
7aacca6f
DM
22570 "description" : "Authentication domain ID",
22571 "format" : "pve-realm",
44660702
DM
22572 "maxLength" : 32,
22573 "type" : "string"
22574 },
22575 "secure" : {
22576 "description" : "Use secure LDAPS protocol.",
22577 "optional" : 1,
22578 "type" : "boolean"
22579 },
22580 "server1" : {
22581 "description" : "Server IP address (or DNS name)",
22582 "format" : "address",
22583 "maxLength" : 256,
22584 "optional" : 1,
22585 "type" : "string"
22586 },
22587 "server2" : {
22588 "description" : "Fallback Server IP address (or DNS name)",
22589 "format" : "address",
22590 "maxLength" : 256,
22591 "optional" : 1,
22592 "type" : "string"
22593 },
22594 "tfa" : {
22595 "description" : "Use Two-factor authentication.",
22596 "format" : "pve-tfa-config",
22597 "maxLength" : 128,
22598 "optional" : 1,
22599 "type" : "string"
22600 },
22601 "user_attr" : {
22602 "description" : "LDAP user attribute name",
22603 "maxLength" : 256,
22604 "optional" : 1,
22605 "pattern" : "\\S{2,}",
22606 "type" : "string"
7aacca6f 22607 }
56122987 22608 },
44660702 22609 "type" : "object"
56122987 22610 },
7aacca6f
DM
22611 "permissions" : {
22612 "check" : [
22613 "perm",
22614 "/access/realm",
22615 [
44660702
DM
22616 "Realm.Allocate"
22617 ]
7aacca6f
DM
22618 ]
22619 },
44660702
DM
22620 "protected" : 1,
22621 "returns" : {
22622 "type" : "null"
22623 }
56122987 22624 }
44660702
DM
22625 },
22626 "leaf" : 1,
22627 "path" : "/access/domains/{realm}",
22628 "text" : "{realm}"
56122987 22629 }
7aacca6f 22630 ],
56122987
DM
22631 "info" : {
22632 "GET" : {
44660702
DM
22633 "description" : "Authentication domain index.",
22634 "method" : "GET",
22635 "name" : "index",
22636 "parameters" : {
22637 "additionalProperties" : 0
22638 },
22639 "permissions" : {
22640 "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated).",
22641 "user" : "world"
22642 },
56122987 22643 "returns" : {
56122987
DM
22644 "items" : {
22645 "properties" : {
7aacca6f
DM
22646 "comment" : {
22647 "optional" : 1,
22648 "type" : "string"
22649 },
56122987
DM
22650 "realm" : {
22651 "type" : "string"
22652 },
22653 "tfa" : {
7aacca6f 22654 "description" : "Two-factor authentication provider.",
56122987
DM
22655 "enum" : [
22656 "yubico",
22657 "oath"
22658 ],
44660702
DM
22659 "optional" : 1,
22660 "type" : "string"
56122987
DM
22661 }
22662 },
22663 "type" : "object"
44660702
DM
22664 },
22665 "links" : [
22666 {
22667 "href" : "{realm}",
22668 "rel" : "child"
22669 }
22670 ],
22671 "type" : "array"
22672 }
56122987
DM
22673 },
22674 "POST" : {
7aacca6f 22675 "description" : "Add an authentication server.",
44660702 22676 "method" : "POST",
7aacca6f 22677 "name" : "create",
56122987 22678 "parameters" : {
44660702 22679 "additionalProperties" : 0,
56122987 22680 "properties" : {
44660702
DM
22681 "base_dn" : {
22682 "description" : "LDAP base domain name",
56122987 22683 "maxLength" : 256,
44660702
DM
22684 "optional" : 1,
22685 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
7aacca6f 22686 "type" : "string"
56122987 22687 },
44660702
DM
22688 "comment" : {
22689 "description" : "Description.",
22690 "maxLength" : 4096,
56122987 22691 "optional" : 1,
44660702 22692 "type" : "string"
56122987 22693 },
44660702
DM
22694 "default" : {
22695 "description" : "Use this as default realm",
7aacca6f 22696 "optional" : 1,
44660702 22697 "type" : "boolean"
56122987 22698 },
44660702
DM
22699 "domain" : {
22700 "description" : "AD domain name",
22701 "maxLength" : 256,
7aacca6f 22702 "optional" : 1,
44660702
DM
22703 "pattern" : "\\S+",
22704 "type" : "string"
56122987 22705 },
7aacca6f 22706 "port" : {
44660702 22707 "description" : "Server port.",
7aacca6f 22708 "maximum" : 65535,
44660702 22709 "minimum" : 1,
7aacca6f 22710 "optional" : 1,
44660702 22711 "type" : "integer"
56122987 22712 },
44660702
DM
22713 "realm" : {
22714 "description" : "Authentication domain ID",
22715 "format" : "pve-realm",
22716 "maxLength" : 32,
22717 "type" : "string"
22718 },
22719 "secure" : {
22720 "description" : "Use secure LDAPS protocol.",
7aacca6f 22721 "optional" : 1,
44660702 22722 "type" : "boolean"
56122987 22723 },
44660702
DM
22724 "server1" : {
22725 "description" : "Server IP address (or DNS name)",
22726 "format" : "address",
22727 "maxLength" : 256,
22728 "optional" : 1,
22729 "type" : "string"
56122987 22730 },
44660702
DM
22731 "server2" : {
22732 "description" : "Fallback Server IP address (or DNS name)",
22733 "format" : "address",
7aacca6f 22734 "maxLength" : 256,
7aacca6f 22735 "optional" : 1,
44660702 22736 "type" : "string"
7aacca6f 22737 },
44660702
DM
22738 "tfa" : {
22739 "description" : "Use Two-factor authentication.",
22740 "format" : "pve-tfa-config",
22741 "maxLength" : 128,
22742 "optional" : 1,
22743 "type" : "string"
22744 },
22745 "type" : {
22746 "description" : "Realm type.",
22747 "enum" : [
22748 "ad",
22749 "ldap",
22750 "pam",
22751 "pve"
22752 ],
22753 "type" : "string"
22754 },
22755 "user_attr" : {
22756 "description" : "LDAP user attribute name",
7aacca6f 22757 "maxLength" : 256,
7aacca6f 22758 "optional" : 1,
44660702
DM
22759 "pattern" : "\\S{2,}",
22760 "type" : "string"
7aacca6f
DM
22761 }
22762 },
7aacca6f 22763 "type" : "object"
56122987 22764 },
7aacca6f
DM
22765 "permissions" : {
22766 "check" : [
22767 "perm",
22768 "/access/realm",
22769 [
22770 "Realm.Allocate"
22771 ]
22772 ]
44660702
DM
22773 },
22774 "protected" : 1,
22775 "returns" : {
22776 "type" : "null"
7aacca6f 22777 }
56122987 22778 }
7aacca6f 22779 },
44660702 22780 "leaf" : 0,
56122987 22781 "path" : "/access/domains",
44660702 22782 "text" : "domains"
56122987
DM
22783 },
22784 {
56122987 22785 "info" : {
44660702
DM
22786 "GET" : {
22787 "description" : "Dummy. Useful for formaters which want to priovde a login page.",
22788 "method" : "GET",
22789 "name" : "get_ticket",
22790 "parameters" : {
22791 "additionalProperties" : 0
22792 },
22793 "permissions" : {
22794 "user" : "world"
22795 },
22796 "returns" : {
22797 "type" : "null"
22798 }
22799 },
56122987 22800 "POST" : {
44660702 22801 "description" : "Create or verify authentication ticket.",
56122987 22802 "method" : "POST",
44660702
DM
22803 "name" : "create_ticket",
22804 "parameters" : {
22805 "additionalProperties" : 0,
56122987 22806 "properties" : {
44660702
DM
22807 "otp" : {
22808 "description" : "One-time password for Two-factor authentication.",
7aacca6f
DM
22809 "optional" : 1,
22810 "type" : "string"
56122987 22811 },
7aacca6f
DM
22812 "password" : {
22813 "description" : "The secret password. This can also be a valid ticket.",
22814 "type" : "string"
22815 },
44660702
DM
22816 "path" : {
22817 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
7aacca6f 22818 "maxLength" : 64,
56122987 22819 "optional" : 1,
56122987 22820 "requires" : "privs",
44660702
DM
22821 "type" : "string"
22822 },
22823 "privs" : {
7aacca6f 22824 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
44660702
DM
22825 "format" : "pve-priv-list",
22826 "maxLength" : 64,
56122987 22827 "optional" : 1,
44660702
DM
22828 "requires" : "path",
22829 "type" : "string"
56122987
DM
22830 },
22831 "realm" : {
56122987 22832 "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<relam>.",
44660702 22833 "format" : "pve-realm",
7aacca6f 22834 "maxLength" : 32,
44660702
DM
22835 "optional" : 1,
22836 "type" : "string"
56122987
DM
22837 },
22838 "username" : {
22839 "description" : "User name",
44660702
DM
22840 "maxLength" : 64,
22841 "type" : "string"
56122987 22842 }
44660702 22843 }
7aacca6f 22844 },
56122987 22845 "permissions" : {
44660702 22846 "description" : "You need to pass valid credientials.",
56122987
DM
22847 "user" : "world"
22848 },
44660702 22849 "protected" : 1,
7aacca6f 22850 "returns" : {
56122987 22851 "properties" : {
44660702
DM
22852 "CSRFPreventionToken" : {
22853 "optional" : 1,
22854 "type" : "string"
56122987 22855 },
44660702
DM
22856 "ticket" : {
22857 "optional" : 1,
22858 "type" : "string"
22859 },
22860 "username" : {
56122987
DM
22861 "type" : "string"
22862 }
22863 },
44660702 22864 "type" : "object"
7aacca6f 22865 }
7aacca6f
DM
22866 }
22867 },
44660702
DM
22868 "leaf" : 1,
22869 "path" : "/access/ticket",
22870 "text" : "ticket"
7aacca6f 22871 },
56122987 22872 {
56122987 22873 "info" : {
7aacca6f 22874 "PUT" : {
44660702 22875 "description" : "Change user password.",
7aacca6f 22876 "method" : "PUT",
44660702 22877 "name" : "change_passsword",
56122987
DM
22878 "parameters" : {
22879 "additionalProperties" : 0,
22880 "properties" : {
44660702
DM
22881 "password" : {
22882 "description" : "The new password.",
22883 "maxLength" : 64,
22884 "minLength" : 5,
22885 "type" : "string"
7aacca6f 22886 },
44660702
DM
22887 "userid" : {
22888 "description" : "User ID",
22889 "format" : "pve-userid",
22890 "maxLength" : 64,
7aacca6f 22891 "type" : "string"
56122987 22892 }
7aacca6f 22893 }
56122987
DM
22894 },
22895 "permissions" : {
22896 "check" : [
44660702 22897 "or",
56122987 22898 [
44660702
DM
22899 "userid-param",
22900 "self"
22901 ],
22902 [
22903 "and",
22904 [
22905 "userid-param",
22906 "Realm.AllocateUser"
22907 ],
22908 [
22909 "userid-group",
22910 [
22911 "User.Modify"
22912 ]
22913 ]
56122987 22914 ]
7aacca6f 22915 ],
44660702 22916 "description" : "Each user is allowed to change his own password. A user can change the password of another user if he has 'Realm.AllocateUser' (on the realm of user <userid>) and 'User.Modify' permission on /access/groups/<group> on a group where user <userid> is member of."
56122987 22917 },
44660702 22918 "protected" : 1,
7aacca6f
DM
22919 "returns" : {
22920 "type" : "null"
44660702
DM
22921 }
22922 }
22923 },
22924 "leaf" : 1,
22925 "path" : "/access/password",
22926 "text" : "password"
22927 }
22928 ],
22929 "info" : {
22930 "GET" : {
22931 "description" : "Directory index.",
22932 "method" : "GET",
22933 "name" : "index",
22934 "parameters" : {
22935 "additionalProperties" : 0
22936 },
22937 "permissions" : {
22938 "user" : "all"
22939 },
22940 "returns" : {
22941 "items" : {
22942 "properties" : {
22943 "subdir" : {
22944 "type" : "string"
22945 }
7aacca6f 22946 },
44660702
DM
22947 "type" : "object"
22948 },
22949 "links" : [
22950 {
22951 "href" : "{subdir}",
22952 "rel" : "child"
22953 }
22954 ],
22955 "type" : "array"
22956 }
22957 }
22958 },
22959 "leaf" : 0,
22960 "path" : "/access",
22961 "text" : "access"
22962 },
22963 {
22964 "children" : [
22965 {
22966 "info" : {
22967 "DELETE" : {
7aacca6f 22968 "description" : "Delete pool.",
44660702
DM
22969 "method" : "DELETE",
22970 "name" : "delete_pool",
7aacca6f
DM
22971 "parameters" : {
22972 "additionalProperties" : 0,
22973 "properties" : {
22974 "poolid" : {
22975 "format" : "pve-poolid",
22976 "type" : "string"
22977 }
22978 }
22979 },
56122987
DM
22980 "permissions" : {
22981 "check" : [
22982 "perm",
22983 "/pool/{poolid}",
22984 [
22985 "Pool.Allocate"
22986 ]
44660702
DM
22987 ],
22988 "description" : "You can only delete empty pools (no members)."
22989 },
22990 "protected" : 1,
22991 "returns" : {
22992 "type" : "null"
7aacca6f
DM
22993 }
22994 },
22995 "GET" : {
22996 "description" : "Get pool configuration.",
44660702 22997 "method" : "GET",
7aacca6f 22998 "name" : "read_pool",
56122987 22999 "parameters" : {
44660702 23000 "additionalProperties" : 0,
56122987
DM
23001 "properties" : {
23002 "poolid" : {
44660702
DM
23003 "format" : "pve-poolid",
23004 "type" : "string"
56122987 23005 }
44660702 23006 }
56122987 23007 },
56122987 23008 "permissions" : {
56122987
DM
23009 "check" : [
23010 "perm",
23011 "/pool/{poolid}",
23012 [
23013 "Pool.Allocate"
23014 ]
23015 ]
23016 },
7aacca6f 23017 "returns" : {
44660702 23018 "additionalProperties" : 0,
56122987 23019 "properties" : {
44660702
DM
23020 "comment" : {
23021 "optional" : 1,
23022 "type" : "string"
23023 },
7aacca6f 23024 "members" : {
7aacca6f
DM
23025 "items" : {
23026 "additionalProperties" : 1,
7aacca6f 23027 "properties" : {
7aacca6f
DM
23028 "id" : {
23029 "type" : "string"
23030 },
23031 "node" : {
23032 "type" : "string"
23033 },
44660702
DM
23034 "storage" : {
23035 "optional" : 1,
23036 "type" : "string"
23037 },
7aacca6f 23038 "type" : {
7aacca6f
DM
23039 "enum" : [
23040 "qemu",
23041 "lxc",
23042 "openvz",
23043 "storage"
44660702
DM
23044 ],
23045 "type" : "string"
23046 },
23047 "vmid" : {
23048 "optional" : 1,
23049 "type" : "integer"
7aacca6f 23050 }
44660702
DM
23051 },
23052 "type" : "object"
23053 },
23054 "type" : "array"
23055 }
23056 },
23057 "type" : "object"
23058 }
23059 },
23060 "PUT" : {
23061 "description" : "Update pool data.",
23062 "method" : "PUT",
23063 "name" : "update_pool",
23064 "parameters" : {
23065 "additionalProperties" : 0,
23066 "properties" : {
56122987
DM
23067 "comment" : {
23068 "optional" : 1,
23069 "type" : "string"
44660702
DM
23070 },
23071 "delete" : {
23072 "description" : "Remove vms/storage (instead of adding it).",
23073 "optional" : 1,
23074 "type" : "boolean"
23075 },
23076 "poolid" : {
23077 "format" : "pve-poolid",
23078 "type" : "string"
23079 },
23080 "storage" : {
23081 "description" : "List of storage IDs.",
23082 "format" : "pve-storage-id-list",
23083 "optional" : 1,
23084 "type" : "string"
23085 },
23086 "vms" : {
23087 "description" : "List of virtual machines.",
23088 "format" : "pve-vmid-list",
23089 "optional" : 1,
23090 "type" : "string"
56122987 23091 }
44660702
DM
23092 }
23093 },
23094 "permissions" : {
23095 "check" : [
23096 "perm",
23097 "/pool/{poolid}",
23098 [
23099 "Pool.Allocate"
23100 ]
23101 ],
23102 "description" : "You also need the right to modify permissions on any object you add/delete."
23103 },
23104 "protected" : 1,
23105 "returns" : {
23106 "type" : "null"
56122987
DM
23107 }
23108 }
23109 },
44660702
DM
23110 "leaf" : 1,
23111 "path" : "/pools/{poolid}",
7aacca6f 23112 "text" : "{poolid}"
56122987 23113 }
7aacca6f 23114 ],
56122987
DM
23115 "info" : {
23116 "GET" : {
44660702
DM
23117 "description" : "Pool index.",
23118 "method" : "GET",
23119 "name" : "index",
23120 "parameters" : {
23121 "additionalProperties" : 0
23122 },
23123 "permissions" : {
23124 "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/<pool>.",
23125 "user" : "all"
23126 },
56122987 23127 "returns" : {
44660702
DM
23128 "items" : {
23129 "properties" : {
23130 "poolid" : {
23131 "type" : "string"
23132 }
56122987 23133 },
44660702
DM
23134 "type" : "object"
23135 },
23136 "links" : [
23137 {
23138 "href" : "{poolid}",
23139 "rel" : "child"
23140 }
23141 ],
23142 "type" : "array"
23143 }
23144 },
23145 "POST" : {
23146 "description" : "Create new pool.",
23147 "method" : "POST",
23148 "name" : "create_pool",
23149 "parameters" : {
23150 "additionalProperties" : 0,
23151 "properties" : {
23152 "comment" : {
23153 "optional" : 1,
56122987 23154 "type" : "string"
7aacca6f 23155 },
44660702
DM
23156 "poolid" : {
23157 "format" : "pve-poolid",
7aacca6f 23158 "type" : "string"
56122987
DM
23159 }
23160 }
23161 },
56122987 23162 "permissions" : {
44660702
DM
23163 "check" : [
23164 "perm",
23165 "/pool/{poolid}",
23166 [
23167 "Pool.Allocate"
23168 ]
23169 ]
56122987 23170 },
44660702
DM
23171 "protected" : 1,
23172 "returns" : {
23173 "type" : "null"
23174 }
23175 }
23176 },
23177 "leaf" : 0,
23178 "path" : "/pools",
23179 "text" : "pools"
23180 },
23181 {
23182 "info" : {
23183 "GET" : {
23184 "description" : "API version details. The result also includes the global datacenter confguration.",
23185 "method" : "GET",
23186 "name" : "version",
7aacca6f
DM
23187 "parameters" : {
23188 "additionalProperties" : 0
23189 },
44660702
DM
23190 "permissions" : {
23191 "user" : "all"
23192 },
23193 "returns" : {
23194 "properties" : {
23195 "release" : {
23196 "type" : "string"
23197 },
23198 "repoid" : {
23199 "type" : "string"
23200 },
23201 "version" : {
23202 "type" : "string"
23203 }
23204 },
23205 "type" : "object"
23206 }
56122987
DM
23207 }
23208 },
44660702
DM
23209 "leaf" : 1,
23210 "path" : "/version",
56122987
DM
23211 "text" : "version"
23212 }
23213]
23214;
23215