]> git.proxmox.com Git - pve-docs.git/blame - api-viewer/apidata.js
include attributes.txt, so that we can compile individual files
[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
DM
5061 "args" : {
5062 "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n",
5063 "optional" : 1,
5064 "type" : "string"
7aacca6f 5065 },
44660702
DM
5066 "autostart" : {
5067 "default" : 0,
5068 "description" : "Automatic restart after crash (currently ignored).",
56122987 5069 "optional" : 1,
44660702 5070 "type" : "boolean"
56122987 5071 },
44660702
DM
5072 "background_delay" : {
5073 "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.",
5074 "maximum" : 30,
5075 "minimum" : 1,
7aacca6f 5076 "optional" : 1,
44660702 5077 "type" : "integer"
56122987 5078 },
44660702
DM
5079 "balloon" : {
5080 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
5081 "minimum" : 0,
7aacca6f 5082 "optional" : 1,
44660702 5083 "type" : "integer"
7aacca6f 5084 },
44660702
DM
5085 "bios" : {
5086 "default" : "seabios",
5087 "description" : "Select BIOS implementation.",
5088 "enum" : [
5089 "seabios",
5090 "ovmf"
5091 ],
56122987 5092 "optional" : 1,
44660702 5093 "type" : "string"
7aacca6f 5094 },
44660702
DM
5095 "boot" : {
5096 "default" : "cdn",
5097 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
5098 "optional" : 1,
5099 "pattern" : "[acdn]{1,4}",
5100 "type" : "string"
5101 },
5102 "bootdisk" : {
5103 "description" : "Enable booting from specified disk.",
5104 "format" : "pve-qm-bootdisk",
5105 "optional" : 1,
5106 "pattern" : "(ide|sata|scsi|virtio)\\d+",
5107 "type" : "string"
5108 },
5109 "cdrom" : {
5110 "description" : "This is an alias for option -ide2",
5111 "format" : "pve-qm-drive",
5112 "optional" : 1,
7aacca6f 5113 "type" : "string",
44660702
DM
5114 "typetext" : "volume"
5115 },
5116 "cores" : {
5117 "default" : 1,
5118 "description" : "The number of cores per socket.",
5119 "minimum" : 1,
7aacca6f 5120 "optional" : 1,
44660702 5121 "type" : "integer"
7aacca6f 5122 },
44660702
DM
5123 "cpu" : {
5124 "description" : "Emulated CPU type.",
56122987 5125 "format" : {
44660702
DM
5126 "cputype" : {
5127 "default" : "kvm64",
7aacca6f 5128 "default_key" : 1,
44660702 5129 "description" : "Emulated CPU type.",
56122987 5130 "enum" : [
44660702
DM
5131 "486",
5132 "athlon",
5133 "pentium",
5134 "pentium2",
5135 "pentium3",
5136 "coreduo",
5137 "core2duo",
5138 "kvm32",
5139 "kvm64",
5140 "qemu32",
5141 "qemu64",
5142 "phenom",
5143 "Conroe",
5144 "Penryn",
5145 "Nehalem",
5146 "Westmere",
5147 "SandyBridge",
5148 "IvyBridge",
5149 "Haswell",
5150 "Haswell-noTSX",
5151 "Broadwell",
5152 "Broadwell-noTSX",
5153 "Opteron_G1",
5154 "Opteron_G2",
5155 "Opteron_G3",
5156 "Opteron_G4",
5157 "Opteron_G5",
5158 "host"
56122987 5159 ],
44660702 5160 "format_description" : "cputype",
56122987
DM
5161 "type" : "string"
5162 },
44660702
DM
5163 "hidden" : {
5164 "default" : 0,
5165 "description" : "Do not identify as a KVM virtual machine.",
56122987 5166 "optional" : 1,
44660702
DM
5167 "type" : "boolean"
5168 }
5169 },
5170 "optional" : 1,
5171 "type" : "string"
5172 },
5173 "cpulimit" : {
5174 "default" : 0,
5175 "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.",
5176 "maximum" : 128,
5177 "minimum" : 0,
5178 "optional" : 1,
5179 "type" : "number"
5180 },
5181 "cpuunits" : {
5182 "default" : 1000,
5183 "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.",
5184 "maximum" : 500000,
5185 "minimum" : 0,
5186 "optional" : 1,
5187 "type" : "integer"
5188 },
5189 "delete" : {
5190 "description" : "A list of settings you want to delete.",
5191 "format" : "pve-configid-list",
5192 "optional" : 1,
5193 "type" : "string"
5194 },
5195 "description" : {
5196 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
5197 "optional" : 1,
5198 "type" : "string"
5199 },
5200 "digest" : {
5201 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
5202 "maxLength" : 40,
5203 "optional" : 1,
5204 "type" : "string"
5205 },
5206 "force" : {
5207 "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.",
5208 "optional" : 1,
5209 "requires" : "delete",
5210 "type" : "boolean"
5211 },
5212 "freeze" : {
5213 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
5214 "optional" : 1,
5215 "type" : "boolean"
5216 },
5217 "hostpci[n]" : {
5218 "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\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\nExperimental: user reported problems with this option.\n",
5219 "format" : "pve-qm-hostpci",
5220 "optional" : 1,
5221 "type" : "string"
5222 },
5223 "hotplug" : {
5224 "default" : "network,disk,usb",
5225 "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'.",
5226 "format" : "pve-hotplug-features",
5227 "optional" : 1,
5228 "type" : "string"
5229 },
5230 "ide[n]" : {
5231 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
5232 "format" : {
5233 "aio" : {
5234 "description" : "AIO type to use.",
5235 "enum" : [
5236 "native",
5237 "threads"
56122987 5238 ],
44660702 5239 "format_description" : "native|threads",
56122987 5240 "optional" : 1,
44660702 5241 "type" : "string"
56122987 5242 },
44660702
DM
5243 "backup" : {
5244 "description" : "Whether the drive should be included when making backups.",
5245 "format_description" : "on|off",
56122987 5246 "optional" : 1,
44660702 5247 "type" : "boolean"
56122987 5248 },
7aacca6f
DM
5249 "bps" : {
5250 "description" : "Maximum r/w speed speed in bytes per second.",
44660702
DM
5251 "format_description" : "bps",
5252 "optional" : 1,
5253 "type" : "integer"
5254 },
5255 "bps_rd" : {
5256 "description" : "Maximum read speed speed in bytes per second.",
5257 "format_description" : "bps",
56122987 5258 "optional" : 1,
44660702 5259 "type" : "integer"
56122987 5260 },
44660702
DM
5261 "bps_wr" : {
5262 "description" : "Maximum write speed speed in bytes per second.",
5263 "format_description" : "bps",
5264 "optional" : 1,
5265 "type" : "integer"
5266 },
5267 "cache" : {
5268 "description" : "The drive's cache mode",
5269 "enum" : [
5270 "none",
5271 "writethrough",
5272 "writeback",
5273 "unsafe",
5274 "directsync"
5275 ],
5276 "format_description" : "none|writethrough|writeback|unsafe|directsync",
5277 "optional" : 1,
5278 "type" : "string"
5279 },
5280 "cyls" : {
5281 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
5282 "format_description" : "count",
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 ],
5297 "format_description" : "ignore|on",
56122987 5298 "optional" : 1,
44660702
DM
5299 "type" : "string"
5300 },
5301 "file" : {
5302 "default_key" : 1,
5303 "description" : "The drive's backing volume.",
5304 "format" : "pve-volume-id-or-qm-path",
5305 "format_description" : "volume",
5306 "type" : "string"
56122987 5307 },
7aacca6f 5308 "format" : {
7aacca6f 5309 "description" : "The drive's backing file's data format.",
56122987 5310 "enum" : [
7aacca6f
DM
5311 "raw",
5312 "cow",
5313 "qcow",
5314 "qed",
5315 "qcow2",
5316 "vmdk",
5317 "cloop"
56122987 5318 ],
44660702 5319 "format_description" : "drive format",
56122987 5320 "optional" : 1,
56122987
DM
5321 "type" : "string"
5322 },
44660702
DM
5323 "heads" : {
5324 "description" : "Force the drive's physical geometry to have a specific head count.",
5325 "format_description" : "count",
5326 "optional" : 1,
5327 "type" : "integer"
7aacca6f 5328 },
44660702
DM
5329 "iops" : {
5330 "description" : "Maximum r/w I/O speed in operations per second.",
5331 "format_description" : "iops",
56122987 5332 "optional" : 1,
44660702 5333 "type" : "integer"
56122987 5334 },
44660702
DM
5335 "iops_max" : {
5336 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5337 "format_description" : "iops",
56122987 5338 "optional" : 1,
44660702 5339 "type" : "integer"
56122987 5340 },
44660702
DM
5341 "iops_rd" : {
5342 "description" : "Maximum read I/O speed in operations per second.",
5343 "format_description" : "iops",
5344 "optional" : 1,
5345 "type" : "integer"
5346 },
5347 "iops_rd_max" : {
5348 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 5349 "format_description" : "iops",
44660702
DM
5350 "optional" : 1,
5351 "type" : "integer"
5352 },
5353 "iops_wr" : {
7aacca6f 5354 "description" : "Maximum write I/O speed in operations per second.",
44660702 5355 "format_description" : "iops",
56122987 5356 "optional" : 1,
7aacca6f 5357 "type" : "integer"
56122987 5358 },
44660702
DM
5359 "iops_wr_max" : {
5360 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
5361 "format_description" : "iops",
7aacca6f 5362 "optional" : 1,
44660702 5363 "type" : "integer"
56122987 5364 },
44660702
DM
5365 "mbps" : {
5366 "description" : "Maximum r/w speed speed in megabytes per second.",
5367 "format_description" : "mbps",
5368 "optional" : 1,
5369 "type" : "number"
5370 },
5371 "mbps_max" : {
5372 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5373 "format_description" : "mbps",
5374 "optional" : 1,
5375 "type" : "number"
5376 },
5377 "mbps_rd" : {
5378 "description" : "Maximum read speed speed in megabytes per second.",
5379 "format_description" : "mbps",
5380 "optional" : 1,
5381 "type" : "number"
5382 },
5383 "mbps_rd_max" : {
5384 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5385 "format_description" : "mbps",
5386 "optional" : 1,
5387 "type" : "number"
5388 },
5389 "mbps_wr" : {
5390 "description" : "Maximum write speed speed in megabytes per second.",
5391 "format_description" : "mbps",
5392 "optional" : 1,
5393 "type" : "number"
5394 },
5395 "mbps_wr_max" : {
5396 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5397 "format_description" : "mbps",
56122987 5398 "optional" : 1,
44660702 5399 "type" : "number"
56122987 5400 },
7aacca6f 5401 "media" : {
7aacca6f 5402 "default" : "disk",
7aacca6f
DM
5403 "description" : "The drive's media type.",
5404 "enum" : [
5405 "cdrom",
5406 "disk"
44660702
DM
5407 ],
5408 "format_description" : "cdrom|disk",
5409 "optional" : 1,
5410 "type" : "string"
56122987 5411 },
44660702
DM
5412 "model" : {
5413 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
5414 "format" : "urlencoded",
5415 "format_description" : "model",
5416 "maxLength" : 120,
56122987 5417 "optional" : 1,
44660702 5418 "type" : "string"
56122987 5419 },
44660702
DM
5420 "rerror" : {
5421 "description" : "Read error action.",
5422 "enum" : [
5423 "ignore",
5424 "report",
5425 "stop"
5426 ],
5427 "format_description" : "ignore|report|stop",
56122987 5428 "optional" : 1,
44660702
DM
5429 "type" : "string"
5430 },
5431 "secs" : {
5432 "description" : "Force the drive's physical geometry to have a specific sector count.",
5433 "format_description" : "count",
5434 "optional" : 1,
5435 "type" : "integer"
5436 },
5437 "serial" : {
5438 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5439 "format" : "urlencoded",
5440 "format_description" : "serial",
5441 "maxLength" : 60,
5442 "optional" : 1,
5443 "type" : "string"
5444 },
5445 "size" : {
5446 "description" : "Disk size. This is purely informational and has no effect.",
5447 "format" : "disk-size",
5448 "optional" : 1,
5449 "type" : "string"
5450 },
5451 "snapshot" : {
5452 "description" : "Whether the drive should be included when making snapshots.",
5453 "format_description" : "on|off",
5454 "optional" : 1,
5455 "type" : "boolean"
5456 },
5457 "trans" : {
5458 "description" : "Force disk geometry bios translation mode.",
5459 "enum" : [
5460 "none",
5461 "lba",
5462 "auto"
5463 ],
5464 "format_description" : "none|lba|auto",
5465 "optional" : 1,
5466 "type" : "string"
5467 },
5468 "volume" : {
5469 "alias" : "file"
5470 },
5471 "werror" : {
5472 "description" : "Write error action.",
5473 "enum" : [
5474 "enospc",
5475 "ignore",
5476 "report",
5477 "stop"
5478 ],
5479 "format_description" : "enospc|ignore|report|stop",
5480 "optional" : 1,
5481 "type" : "string"
56122987
DM
5482 }
5483 },
44660702
DM
5484 "optional" : 1,
5485 "type" : "string"
56122987 5486 },
44660702
DM
5487 "keyboard" : {
5488 "default" : "en-us",
5489 "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.",
5490 "enum" : [
5491 "de",
5492 "de-ch",
5493 "da",
5494 "en-gb",
5495 "en-us",
5496 "es",
5497 "fi",
5498 "fr",
5499 "fr-be",
5500 "fr-ca",
5501 "fr-ch",
5502 "hu",
5503 "is",
5504 "it",
5505 "ja",
5506 "lt",
5507 "mk",
5508 "nl",
5509 "no",
5510 "pl",
5511 "pt",
5512 "pt-br",
5513 "sv",
5514 "sl",
5515 "tr"
5516 ],
56122987 5517 "optional" : 1,
44660702
DM
5518 "type" : "string"
5519 },
5520 "kvm" : {
7aacca6f 5521 "default" : 1,
44660702
DM
5522 "description" : "Enable/disable KVM hardware virtualization.",
5523 "optional" : 1,
5524 "type" : "boolean"
56122987 5525 },
44660702
DM
5526 "localtime" : {
5527 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 5528 "optional" : 1,
44660702 5529 "type" : "boolean"
56122987 5530 },
44660702
DM
5531 "lock" : {
5532 "description" : "Lock/unlock the VM.",
5533 "enum" : [
5534 "migrate",
5535 "backup",
5536 "snapshot",
5537 "rollback"
5538 ],
7aacca6f 5539 "optional" : 1,
44660702
DM
5540 "type" : "string"
5541 },
5542 "machine" : {
5543 "description" : "Specific the Qemu machine type.",
5544 "maxLength" : 40,
5545 "optional" : 1,
5546 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
5547 "type" : "string"
5548 },
5549 "memory" : {
5550 "default" : 512,
5551 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
5552 "minimum" : 16,
5553 "optional" : 1,
5554 "type" : "integer"
5555 },
5556 "migrate_downtime" : {
5557 "default" : 0.1,
5558 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
5559 "minimum" : 0,
5560 "optional" : 1,
5561 "type" : "number"
5562 },
5563 "migrate_speed" : {
5564 "default" : 0,
5565 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
5566 "minimum" : 0,
5567 "optional" : 1,
5568 "type" : "integer"
5569 },
5570 "name" : {
5571 "description" : "Set a name for the VM. Only used on the configuration web interface.",
5572 "format" : "dns-name",
5573 "optional" : 1,
5574 "type" : "string"
5575 },
5576 "net[n]" : {
5577 "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n",
5578 "format" : "pve-qm-net",
5579 "optional" : 1,
5580 "type" : "string"
5581 },
5582 "node" : {
5583 "description" : "The cluster node name.",
5584 "format" : "pve-node",
5585 "type" : "string"
5586 },
5587 "numa" : {
5588 "default" : 0,
5589 "description" : "Enable/disable NUMA.",
5590 "optional" : 1,
5591 "type" : "boolean"
5592 },
5593 "numa[n]" : {
7aacca6f 5594 "description" : "numa topology",
56122987 5595 "format" : {
7aacca6f 5596 "cpus" : {
7aacca6f 5597 "description" : "CPUs accessing this numa node.",
44660702
DM
5598 "format_description" : "id[-id];...",
5599 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5600 "type" : "string"
7aacca6f
DM
5601 },
5602 "hostnodes" : {
44660702
DM
5603 "description" : "host numa nodes to use",
5604 "format_description" : "id[-id];...",
7aacca6f 5605 "optional" : 1,
7aacca6f 5606 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
44660702 5607 "type" : "string"
7aacca6f 5608 },
44660702
DM
5609 "memory" : {
5610 "description" : "Amount of memory this numa node provides.",
5611 "format_description" : "mb",
7aacca6f 5612 "optional" : 1,
44660702
DM
5613 "type" : "number"
5614 },
5615 "policy" : {
7aacca6f
DM
5616 "description" : "numa allocation policy.",
5617 "enum" : [
5618 "preferred",
5619 "bind",
5620 "interleave"
5621 ],
44660702
DM
5622 "format_description" : "preferred|bind|interleave",
5623 "optional" : 1,
5624 "type" : "string"
56122987 5625 }
44660702 5626 },
56122987 5627 "optional" : 1,
44660702 5628 "type" : "string"
56122987 5629 },
44660702 5630 "onboot" : {
7aacca6f 5631 "default" : 0,
44660702
DM
5632 "description" : "Specifies whether a VM will be started during system bootup.",
5633 "optional" : 1,
5634 "type" : "boolean"
7aacca6f
DM
5635 },
5636 "ostype" : {
44660702 5637 "description" : "Used to enable special optimization/features for specific\noperating systems:\n\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\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n",
7aacca6f
DM
5638 "enum" : [
5639 "other",
5640 "wxp",
5641 "w2k",
5642 "w2k3",
5643 "w2k8",
5644 "wvista",
5645 "win7",
5646 "win8",
5647 "l24",
5648 "l26",
5649 "solaris"
5650 ],
7aacca6f 5651 "optional" : 1,
56122987
DM
5652 "type" : "string"
5653 },
44660702
DM
5654 "parallel[n]" : {
5655 "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\nExperimental: user reported problems with this option.\n",
7aacca6f 5656 "optional" : 1,
44660702
DM
5657 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
5658 "type" : "string"
7aacca6f
DM
5659 },
5660 "protection" : {
5661 "default" : 0,
44660702 5662 "description" : "Sets the protection flag of the VM. This will prevent the remove operation.",
7aacca6f 5663 "optional" : 1,
44660702 5664 "type" : "boolean"
7aacca6f 5665 },
44660702
DM
5666 "reboot" : {
5667 "default" : 1,
5668 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 5669 "optional" : 1,
44660702 5670 "type" : "boolean"
7aacca6f 5671 },
44660702
DM
5672 "revert" : {
5673 "description" : "Revert a pending change.",
5674 "format" : "pve-configid-list",
7aacca6f 5675 "optional" : 1,
44660702
DM
5676 "type" : "string"
5677 },
5678 "sata[n]" : {
5679 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 5680 "format" : {
44660702
DM
5681 "aio" : {
5682 "description" : "AIO type to use.",
7aacca6f 5683 "enum" : [
44660702
DM
5684 "native",
5685 "threads"
7aacca6f 5686 ],
44660702
DM
5687 "format_description" : "native|threads",
5688 "optional" : 1,
5689 "type" : "string"
7aacca6f 5690 },
44660702
DM
5691 "backup" : {
5692 "description" : "Whether the drive should be included when making backups.",
5693 "format_description" : "on|off",
56122987 5694 "optional" : 1,
7aacca6f 5695 "type" : "boolean"
44660702
DM
5696 },
5697 "bps" : {
5698 "description" : "Maximum r/w speed speed in bytes per second.",
5699 "format_description" : "bps",
7aacca6f 5700 "optional" : 1,
44660702 5701 "type" : "integer"
56122987 5702 },
44660702
DM
5703 "bps_rd" : {
5704 "description" : "Maximum read speed speed in bytes per second.",
5705 "format_description" : "bps",
56122987 5706 "optional" : 1,
44660702 5707 "type" : "integer"
56122987 5708 },
44660702
DM
5709 "bps_wr" : {
5710 "description" : "Maximum write speed speed in bytes per second.",
5711 "format_description" : "bps",
56122987 5712 "optional" : 1,
44660702 5713 "type" : "integer"
56122987
DM
5714 },
5715 "cache" : {
44660702 5716 "description" : "The drive's cache mode",
56122987
DM
5717 "enum" : [
5718 "none",
5719 "writethrough",
5720 "writeback",
5721 "unsafe",
5722 "directsync"
5723 ],
44660702 5724 "format_description" : "none|writethrough|writeback|unsafe|directsync",
56122987 5725 "optional" : 1,
44660702 5726 "type" : "string"
56122987 5727 },
44660702
DM
5728 "cyls" : {
5729 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
5730 "format_description" : "count",
7aacca6f 5731 "optional" : 1,
44660702 5732 "type" : "integer"
7aacca6f
DM
5733 },
5734 "detect_zeroes" : {
5735 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 5736 "optional" : 1,
44660702 5737 "type" : "boolean"
56122987 5738 },
44660702
DM
5739 "discard" : {
5740 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5741 "enum" : [
5742 "ignore",
5743 "on"
5744 ],
5745 "format_description" : "ignore|on",
56122987 5746 "optional" : 1,
44660702 5747 "type" : "string"
7aacca6f 5748 },
44660702
DM
5749 "file" : {
5750 "default_key" : 1,
5751 "description" : "The drive's backing volume.",
5752 "format" : "pve-volume-id-or-qm-path",
5753 "format_description" : "volume",
5754 "type" : "string"
56122987 5755 },
7aacca6f 5756 "format" : {
44660702 5757 "description" : "The drive's backing file's data format.",
7aacca6f
DM
5758 "enum" : [
5759 "raw",
5760 "cow",
5761 "qcow",
5762 "qed",
5763 "qcow2",
5764 "vmdk",
5765 "cloop"
5766 ],
44660702 5767 "format_description" : "drive format",
7aacca6f 5768 "optional" : 1,
44660702 5769 "type" : "string"
56122987 5770 },
7aacca6f 5771 "heads" : {
7aacca6f 5772 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702 5773 "format_description" : "count",
56122987 5774 "optional" : 1,
7aacca6f 5775 "type" : "integer"
56122987 5776 },
44660702
DM
5777 "iops" : {
5778 "description" : "Maximum r/w I/O speed in operations per second.",
5779 "format_description" : "iops",
56122987 5780 "optional" : 1,
44660702 5781 "type" : "integer"
56122987 5782 },
44660702
DM
5783 "iops_max" : {
5784 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5785 "format_description" : "iops",
56122987 5786 "optional" : 1,
44660702 5787 "type" : "integer"
56122987 5788 },
44660702
DM
5789 "iops_rd" : {
5790 "description" : "Maximum read I/O speed in operations per second.",
5791 "format_description" : "iops",
7aacca6f 5792 "optional" : 1,
44660702 5793 "type" : "integer"
56122987 5794 },
44660702
DM
5795 "iops_rd_max" : {
5796 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
5797 "format_description" : "iops",
56122987 5798 "optional" : 1,
44660702 5799 "type" : "integer"
7aacca6f 5800 },
44660702
DM
5801 "iops_wr" : {
5802 "description" : "Maximum write I/O speed in operations per second.",
5803 "format_description" : "iops",
56122987 5804 "optional" : 1,
44660702 5805 "type" : "integer"
56122987
DM
5806 },
5807 "iops_wr_max" : {
5808 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
44660702 5809 "format_description" : "iops",
56122987 5810 "optional" : 1,
44660702 5811 "type" : "integer"
56122987 5812 },
44660702
DM
5813 "mbps" : {
5814 "description" : "Maximum r/w speed speed in megabytes per second.",
5815 "format_description" : "mbps",
56122987 5816 "optional" : 1,
44660702 5817 "type" : "number"
56122987 5818 },
44660702
DM
5819 "mbps_max" : {
5820 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5821 "format_description" : "mbps",
5822 "optional" : 1,
5823 "type" : "number"
56122987 5824 },
44660702
DM
5825 "mbps_rd" : {
5826 "description" : "Maximum read speed speed in megabytes per second.",
5827 "format_description" : "mbps",
56122987 5828 "optional" : 1,
44660702 5829 "type" : "number"
56122987 5830 },
44660702
DM
5831 "mbps_rd_max" : {
5832 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5833 "format_description" : "mbps",
56122987 5834 "optional" : 1,
44660702 5835 "type" : "number"
56122987 5836 },
44660702
DM
5837 "mbps_wr" : {
5838 "description" : "Maximum write speed speed in megabytes per second.",
56122987 5839 "format_description" : "mbps",
44660702
DM
5840 "optional" : 1,
5841 "type" : "number"
56122987 5842 },
44660702
DM
5843 "mbps_wr_max" : {
5844 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5845 "format_description" : "mbps",
5846 "optional" : 1,
5847 "type" : "number"
7aacca6f 5848 },
44660702
DM
5849 "media" : {
5850 "default" : "disk",
5851 "description" : "The drive's media type.",
5852 "enum" : [
5853 "cdrom",
5854 "disk"
5855 ],
5856 "format_description" : "cdrom|disk",
56122987 5857 "optional" : 1,
44660702
DM
5858 "type" : "string"
5859 },
5860 "rerror" : {
5861 "description" : "Read error action.",
7aacca6f 5862 "enum" : [
44660702
DM
5863 "ignore",
5864 "report",
5865 "stop"
5866 ],
5867 "format_description" : "ignore|report|stop",
7aacca6f 5868 "optional" : 1,
44660702 5869 "type" : "string"
56122987 5870 },
44660702
DM
5871 "secs" : {
5872 "description" : "Force the drive's physical geometry to have a specific sector count.",
5873 "format_description" : "count",
56122987 5874 "optional" : 1,
44660702 5875 "type" : "integer"
56122987 5876 },
44660702
DM
5877 "serial" : {
5878 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5879 "format" : "urlencoded",
5880 "format_description" : "serial",
5881 "maxLength" : 60,
56122987 5882 "optional" : 1,
44660702 5883 "type" : "string"
56122987 5884 },
44660702
DM
5885 "size" : {
5886 "description" : "Disk size. This is purely informational and has no effect.",
5887 "format" : "disk-size",
5888 "optional" : 1,
5889 "type" : "string"
5890 },
5891 "snapshot" : {
5892 "description" : "Whether the drive should be included when making snapshots.",
5893 "format_description" : "on|off",
56122987 5894 "optional" : 1,
44660702
DM
5895 "type" : "boolean"
5896 },
5897 "trans" : {
5898 "description" : "Force disk geometry bios translation mode.",
56122987 5899 "enum" : [
7aacca6f
DM
5900 "none",
5901 "lba",
5902 "auto"
56122987 5903 ],
44660702
DM
5904 "format_description" : "none|lba|auto",
5905 "optional" : 1,
5906 "type" : "string"
56122987 5907 },
7aacca6f
DM
5908 "volume" : {
5909 "alias" : "file"
56122987 5910 },
44660702
DM
5911 "werror" : {
5912 "description" : "Write error action.",
5913 "enum" : [
5914 "enospc",
5915 "ignore",
5916 "report",
5917 "stop"
5918 ],
5919 "format_description" : "enospc|ignore|report|stop",
7aacca6f 5920 "optional" : 1,
44660702
DM
5921 "type" : "string"
5922 }
5923 },
5924 "optional" : 1,
5925 "type" : "string"
5926 },
5927 "scsi[n]" : {
5928 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
5929 "format" : {
56122987 5930 "aio" : {
56122987
DM
5931 "description" : "AIO type to use.",
5932 "enum" : [
5933 "native",
5934 "threads"
5935 ],
44660702 5936 "format_description" : "native|threads",
7aacca6f 5937 "optional" : 1,
44660702 5938 "type" : "string"
56122987 5939 },
44660702
DM
5940 "backup" : {
5941 "description" : "Whether the drive should be included when making backups.",
5942 "format_description" : "on|off",
56122987 5943 "optional" : 1,
44660702 5944 "type" : "boolean"
56122987 5945 },
44660702
DM
5946 "bps" : {
5947 "description" : "Maximum r/w speed speed in bytes per second.",
5948 "format_description" : "bps",
56122987 5949 "optional" : 1,
44660702 5950 "type" : "integer"
56122987 5951 },
44660702
DM
5952 "bps_rd" : {
5953 "description" : "Maximum read speed speed in bytes per second.",
5954 "format_description" : "bps",
56122987 5955 "optional" : 1,
44660702 5956 "type" : "integer"
56122987 5957 },
7aacca6f 5958 "bps_wr" : {
44660702 5959 "description" : "Maximum write speed speed in bytes per second.",
7aacca6f 5960 "format_description" : "bps",
56122987 5961 "optional" : 1,
44660702 5962 "type" : "integer"
56122987 5963 },
44660702
DM
5964 "cache" : {
5965 "description" : "The drive's cache mode",
7aacca6f 5966 "enum" : [
44660702
DM
5967 "none",
5968 "writethrough",
5969 "writeback",
5970 "unsafe",
5971 "directsync"
7aacca6f 5972 ],
44660702 5973 "format_description" : "none|writethrough|writeback|unsafe|directsync",
56122987 5974 "optional" : 1,
44660702 5975 "type" : "string"
56122987 5976 },
44660702
DM
5977 "cyls" : {
5978 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 5979 "format_description" : "count",
7aacca6f 5980 "optional" : 1,
44660702 5981 "type" : "integer"
56122987 5982 },
44660702
DM
5983 "detect_zeroes" : {
5984 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 5985 "optional" : 1,
44660702 5986 "type" : "boolean"
56122987 5987 },
44660702
DM
5988 "discard" : {
5989 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5990 "enum" : [
5991 "ignore",
5992 "on"
5993 ],
5994 "format_description" : "ignore|on",
7aacca6f 5995 "optional" : 1,
44660702 5996 "type" : "string"
56122987 5997 },
44660702
DM
5998 "file" : {
5999 "default_key" : 1,
6000 "description" : "The drive's backing volume.",
6001 "format" : "pve-volume-id-or-qm-path",
6002 "format_description" : "volume",
6003 "type" : "string"
56122987 6004 },
7aacca6f 6005 "format" : {
44660702 6006 "description" : "The drive's backing file's data format.",
56122987 6007 "enum" : [
7aacca6f
DM
6008 "raw",
6009 "cow",
6010 "qcow",
6011 "qed",
6012 "qcow2",
6013 "vmdk",
6014 "cloop"
6015 ],
44660702
DM
6016 "format_description" : "drive format",
6017 "optional" : 1,
6018 "type" : "string"
56122987 6019 },
44660702
DM
6020 "heads" : {
6021 "description" : "Force the drive's physical geometry to have a specific head count.",
7aacca6f 6022 "format_description" : "count",
56122987 6023 "optional" : 1,
7aacca6f 6024 "type" : "integer"
56122987 6025 },
44660702
DM
6026 "iops" : {
6027 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6028 "format_description" : "iops",
44660702
DM
6029 "optional" : 1,
6030 "type" : "integer"
7aacca6f 6031 },
44660702
DM
6032 "iops_max" : {
6033 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6034 "format_description" : "iops",
56122987 6035 "optional" : 1,
44660702 6036 "type" : "integer"
7aacca6f 6037 },
44660702
DM
6038 "iops_rd" : {
6039 "description" : "Maximum read I/O speed in operations per second.",
6040 "format_description" : "iops",
7aacca6f 6041 "optional" : 1,
44660702 6042 "type" : "integer"
56122987 6043 },
44660702
DM
6044 "iops_rd_max" : {
6045 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6046 "format_description" : "iops",
6047 "optional" : 1,
6048 "type" : "integer"
6049 },
6050 "iops_wr" : {
6051 "description" : "Maximum write I/O speed in operations per second.",
6052 "format_description" : "iops",
56122987 6053 "optional" : 1,
44660702
DM
6054 "type" : "integer"
6055 },
6056 "iops_wr_max" : {
6057 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6058 "format_description" : "iops",
6059 "optional" : 1,
6060 "type" : "integer"
56122987 6061 },
7aacca6f 6062 "iothread" : {
7aacca6f 6063 "description" : "Whether to use iothreads for this drive",
44660702 6064 "format_description" : "off|on",
56122987 6065 "optional" : 1,
56122987
DM
6066 "type" : "boolean"
6067 },
44660702
DM
6068 "mbps" : {
6069 "description" : "Maximum r/w speed speed in megabytes per second.",
6070 "format_description" : "mbps",
6071 "optional" : 1,
6072 "type" : "number"
6073 },
6074 "mbps_max" : {
6075 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6076 "format_description" : "mbps",
6077 "optional" : 1,
6078 "type" : "number"
6079 },
6080 "mbps_rd" : {
6081 "description" : "Maximum read speed speed in megabytes per second.",
6082 "format_description" : "mbps",
6083 "optional" : 1,
6084 "type" : "number"
6085 },
6086 "mbps_rd_max" : {
6087 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6088 "format_description" : "mbps",
6089 "optional" : 1,
6090 "type" : "number"
6091 },
6092 "mbps_wr" : {
6093 "description" : "Maximum write speed speed in megabytes per second.",
6094 "format_description" : "mbps",
6095 "optional" : 1,
6096 "type" : "number"
6097 },
6098 "mbps_wr_max" : {
6099 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6100 "format_description" : "mbps",
6101 "optional" : 1,
6102 "type" : "number"
6103 },
7aacca6f 6104 "media" : {
44660702
DM
6105 "default" : "disk",
6106 "description" : "The drive's media type.",
7aacca6f
DM
6107 "enum" : [
6108 "cdrom",
6109 "disk"
6110 ],
44660702 6111 "format_description" : "cdrom|disk",
56122987 6112 "optional" : 1,
44660702
DM
6113 "type" : "string"
6114 },
6115 "queues" : {
6116 "description" : "Number of queues.",
6117 "format_description" : "nbqueues",
6118 "minimum" : 2,
6119 "optional" : 1,
6120 "type" : "integer"
6121 },
6122 "secs" : {
6123 "description" : "Force the drive's physical geometry to have a specific sector count.",
6124 "format_description" : "count",
6125 "optional" : 1,
6126 "type" : "integer"
6127 },
6128 "serial" : {
6129 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6130 "format" : "urlencoded",
6131 "format_description" : "serial",
6132 "maxLength" : 60,
6133 "optional" : 1,
6134 "type" : "string"
6135 },
6136 "size" : {
6137 "description" : "Disk size. This is purely informational and has no effect.",
6138 "format" : "disk-size",
6139 "optional" : 1,
6140 "type" : "string"
56122987 6141 },
7aacca6f
DM
6142 "snapshot" : {
6143 "description" : "Whether the drive should be included when making snapshots.",
44660702 6144 "format_description" : "on|off",
7aacca6f 6145 "optional" : 1,
44660702 6146 "type" : "boolean"
7aacca6f 6147 },
44660702
DM
6148 "trans" : {
6149 "description" : "Force disk geometry bios translation mode.",
6150 "enum" : [
6151 "none",
6152 "lba",
6153 "auto"
6154 ],
6155 "format_description" : "none|lba|auto",
6156 "optional" : 1,
6157 "type" : "string"
6158 },
6159 "volume" : {
6160 "alias" : "file"
6161 },
6162 "werror" : {
6163 "description" : "Write error action.",
6164 "enum" : [
6165 "enospc",
6166 "ignore",
6167 "report",
6168 "stop"
6169 ],
6170 "format_description" : "enospc|ignore|report|stop",
56122987 6171 "optional" : 1,
44660702 6172 "type" : "string"
56122987 6173 }
44660702 6174 },
7aacca6f 6175 "optional" : 1,
44660702
DM
6176 "type" : "string"
6177 },
6178 "scsihw" : {
6179 "default" : "lsi",
6180 "description" : "scsi controller model",
7aacca6f 6181 "enum" : [
44660702
DM
6182 "lsi",
6183 "lsi53c810",
6184 "virtio-scsi-pci",
6185 "virtio-scsi-single",
6186 "megasas",
6187 "pvscsi"
7aacca6f 6188 ],
44660702
DM
6189 "optional" : 1,
6190 "type" : "string"
56122987 6191 },
44660702
DM
6192 "serial[n]" : {
6193 "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host 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\nExperimental: user reported problems with this option.\n",
7aacca6f 6194 "optional" : 1,
44660702
DM
6195 "pattern" : "(/dev/.+|socket)",
6196 "type" : "string"
7aacca6f 6197 },
44660702
DM
6198 "shares" : {
6199 "default" : 1000,
6200 "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",
6201 "maximum" : 50000,
6202 "minimum" : 0,
56122987 6203 "optional" : 1,
44660702 6204 "type" : "integer"
56122987 6205 },
44660702
DM
6206 "skiplock" : {
6207 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 6208 "optional" : 1,
44660702 6209 "type" : "boolean"
56122987 6210 },
44660702
DM
6211 "smbios1" : {
6212 "description" : "Specify SMBIOS type 1 fields.",
6213 "format" : "pve-qm-smbios1",
6214 "maxLength" : 256,
56122987 6215 "optional" : 1,
44660702 6216 "type" : "string"
56122987 6217 },
44660702
DM
6218 "smp" : {
6219 "default" : 1,
6220 "description" : "The number of CPUs. Please use option -sockets instead.",
7aacca6f 6221 "minimum" : 1,
7aacca6f 6222 "optional" : 1,
44660702 6223 "type" : "integer"
7aacca6f 6224 },
44660702
DM
6225 "sockets" : {
6226 "default" : 1,
6227 "description" : "The number of CPU sockets.",
6228 "minimum" : 1,
7aacca6f 6229 "optional" : 1,
44660702 6230 "type" : "integer"
56122987 6231 },
44660702
DM
6232 "startdate" : {
6233 "default" : "now",
6234 "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 6235 "optional" : 1,
44660702 6236 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 6237 "type" : "string",
44660702 6238 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
56122987 6239 },
7aacca6f 6240 "startup" : {
7aacca6f 6241 "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 6242 "format" : "pve-startup-order",
56122987 6243 "optional" : 1,
44660702
DM
6244 "type" : "string",
6245 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
56122987 6246 },
44660702 6247 "tablet" : {
7aacca6f 6248 "default" : 1,
44660702 6249 "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 6250 "optional" : 1,
44660702 6251 "type" : "boolean"
56122987 6252 },
44660702
DM
6253 "tdf" : {
6254 "default" : 0,
6255 "description" : "Enable/disable time drift fix.",
7aacca6f 6256 "optional" : 1,
44660702 6257 "type" : "boolean"
7aacca6f 6258 },
44660702
DM
6259 "template" : {
6260 "default" : 0,
6261 "description" : "Enable/disable Template.",
7aacca6f 6262 "optional" : 1,
44660702 6263 "type" : "boolean"
7aacca6f 6264 },
44660702
DM
6265 "unused[n]" : {
6266 "description" : "Reference to unused volumes.",
6267 "format" : "pve-volume-id",
7aacca6f 6268 "optional" : 1,
44660702 6269 "type" : "string"
7aacca6f 6270 },
44660702
DM
6271 "usb[n]" : {
6272 "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. 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\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n",
6273 "format" : {
6274 "host" : {
6275 "default_key" : 1,
6276 "description" : "The Host USB device or port or the value spice",
6277 "format" : "pve-qm-usb-device",
6278 "format_description" : "HOSTUSBDEVICE|spice",
6279 "type" : "string"
6280 },
6281 "usb3" : {
6282 "description" : "Specifies whether if given host option is a USB3 device or port",
6283 "format_description" : "yes|no",
6284 "optional" : 1,
6285 "type" : "boolean"
6286 }
6287 },
7aacca6f 6288 "optional" : 1,
44660702 6289 "type" : "string"
56122987 6290 },
44660702
DM
6291 "vcpus" : {
6292 "default" : 0,
6293 "description" : "Number of hotplugged vcpus.",
6294 "minimum" : 1,
56122987 6295 "optional" : 1,
44660702 6296 "type" : "integer"
56122987 6297 },
44660702
DM
6298 "vga" : {
6299 "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.",
6300 "enum" : [
6301 "std",
6302 "cirrus",
6303 "vmware",
6304 "qxl",
6305 "serial0",
6306 "serial1",
6307 "serial2",
6308 "serial3",
6309 "qxl2",
6310 "qxl3",
6311 "qxl4"
6312 ],
56122987 6313 "optional" : 1,
44660702 6314 "type" : "string"
56122987 6315 },
44660702
DM
6316 "virtio[n]" : {
6317 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
56122987 6318 "format" : {
44660702
DM
6319 "aio" : {
6320 "description" : "AIO type to use.",
56122987 6321 "enum" : [
44660702
DM
6322 "native",
6323 "threads"
56122987 6324 ],
44660702 6325 "format_description" : "native|threads",
56122987
DM
6326 "optional" : 1,
6327 "type" : "string"
6328 },
44660702
DM
6329 "backup" : {
6330 "description" : "Whether the drive should be included when making backups.",
6331 "format_description" : "on|off",
6332 "optional" : 1,
6333 "type" : "boolean"
7aacca6f 6334 },
44660702
DM
6335 "bps" : {
6336 "description" : "Maximum r/w speed speed in bytes per second.",
6337 "format_description" : "bps",
6338 "optional" : 1,
6339 "type" : "integer"
56122987 6340 },
44660702
DM
6341 "bps_rd" : {
6342 "description" : "Maximum read speed speed in bytes per second.",
6343 "format_description" : "bps",
56122987 6344 "optional" : 1,
44660702 6345 "type" : "integer"
56122987 6346 },
44660702
DM
6347 "bps_wr" : {
6348 "description" : "Maximum write speed speed in bytes per second.",
6349 "format_description" : "bps",
56122987 6350 "optional" : 1,
44660702
DM
6351 "type" : "integer"
6352 },
6353 "cache" : {
6354 "description" : "The drive's cache mode",
56122987 6355 "enum" : [
44660702
DM
6356 "none",
6357 "writethrough",
6358 "writeback",
6359 "unsafe",
6360 "directsync"
56122987 6361 ],
44660702 6362 "format_description" : "none|writethrough|writeback|unsafe|directsync",
56122987 6363 "optional" : 1,
44660702 6364 "type" : "string"
56122987 6365 },
44660702
DM
6366 "cyls" : {
6367 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
6368 "format_description" : "count",
56122987 6369 "optional" : 1,
44660702 6370 "type" : "integer"
7aacca6f 6371 },
44660702
DM
6372 "detect_zeroes" : {
6373 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6374 "optional" : 1,
6375 "type" : "boolean"
7aacca6f 6376 },
44660702
DM
6377 "discard" : {
6378 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6379 "enum" : [
6380 "ignore",
6381 "on"
6382 ],
6383 "format_description" : "ignore|on",
56122987 6384 "optional" : 1,
44660702 6385 "type" : "string"
56122987
DM
6386 },
6387 "file" : {
7aacca6f 6388 "default_key" : 1,
44660702 6389 "description" : "The drive's backing volume.",
7aacca6f 6390 "format" : "pve-volume-id-or-qm-path",
44660702
DM
6391 "format_description" : "volume",
6392 "type" : "string"
7aacca6f
DM
6393 },
6394 "format" : {
7aacca6f
DM
6395 "description" : "The drive's backing file's data format.",
6396 "enum" : [
6397 "raw",
6398 "cow",
6399 "qcow",
6400 "qed",
6401 "qcow2",
6402 "vmdk",
6403 "cloop"
56122987 6404 ],
44660702 6405 "format_description" : "drive format",
56122987 6406 "optional" : 1,
56122987
DM
6407 "type" : "string"
6408 },
44660702
DM
6409 "heads" : {
6410 "description" : "Force the drive's physical geometry to have a specific head count.",
6411 "format_description" : "count",
56122987 6412 "optional" : 1,
44660702 6413 "type" : "integer"
56122987 6414 },
44660702
DM
6415 "iops" : {
6416 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6417 "format_description" : "iops",
56122987 6418 "optional" : 1,
44660702 6419 "type" : "integer"
56122987 6420 },
44660702
DM
6421 "iops_max" : {
6422 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6423 "format_description" : "iops",
56122987 6424 "optional" : 1,
56122987
DM
6425 "type" : "integer"
6426 },
44660702
DM
6427 "iops_rd" : {
6428 "description" : "Maximum read I/O speed in operations per second.",
6429 "format_description" : "iops",
56122987 6430 "optional" : 1,
44660702 6431 "type" : "integer"
56122987 6432 },
44660702
DM
6433 "iops_rd_max" : {
6434 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6435 "format_description" : "iops",
7aacca6f 6436 "optional" : 1,
44660702 6437 "type" : "integer"
56122987 6438 },
44660702
DM
6439 "iops_wr" : {
6440 "description" : "Maximum write I/O speed in operations per second.",
6441 "format_description" : "iops",
7aacca6f 6442 "optional" : 1,
44660702 6443 "type" : "integer"
56122987 6444 },
44660702
DM
6445 "iops_wr_max" : {
6446 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6447 "format_description" : "iops",
56122987
DM
6448 "optional" : 1,
6449 "type" : "integer"
6450 },
44660702
DM
6451 "iothread" : {
6452 "description" : "Whether to use iothreads for this drive",
6453 "format_description" : "off|on",
6454 "optional" : 1,
6455 "type" : "boolean"
6456 },
6457 "mbps" : {
6458 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 6459 "format_description" : "mbps",
44660702
DM
6460 "optional" : 1,
6461 "type" : "number"
6462 },
6463 "mbps_max" : {
7aacca6f 6464 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702
DM
6465 "format_description" : "mbps",
6466 "optional" : 1,
6467 "type" : "number"
7aacca6f 6468 },
44660702
DM
6469 "mbps_rd" : {
6470 "description" : "Maximum read speed speed in megabytes per second.",
6471 "format_description" : "mbps",
56122987 6472 "optional" : 1,
44660702 6473 "type" : "number"
56122987 6474 },
44660702
DM
6475 "mbps_rd_max" : {
6476 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6477 "format_description" : "mbps",
7aacca6f 6478 "optional" : 1,
44660702 6479 "type" : "number"
56122987 6480 },
44660702
DM
6481 "mbps_wr" : {
6482 "description" : "Maximum write speed speed in megabytes per second.",
6483 "format_description" : "mbps",
56122987 6484 "optional" : 1,
44660702 6485 "type" : "number"
56122987 6486 },
44660702
DM
6487 "mbps_wr_max" : {
6488 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6489 "format_description" : "mbps",
56122987 6490 "optional" : 1,
44660702 6491 "type" : "number"
56122987
DM
6492 },
6493 "media" : {
7aacca6f 6494 "default" : "disk",
44660702 6495 "description" : "The drive's media type.",
56122987
DM
6496 "enum" : [
6497 "cdrom",
6498 "disk"
6499 ],
44660702
DM
6500 "format_description" : "cdrom|disk",
6501 "optional" : 1,
6502 "type" : "string"
56122987 6503 },
7aacca6f 6504 "rerror" : {
44660702 6505 "description" : "Read error action.",
56122987 6506 "enum" : [
7aacca6f
DM
6507 "ignore",
6508 "report",
6509 "stop"
56122987 6510 ],
44660702 6511 "format_description" : "ignore|report|stop",
56122987 6512 "optional" : 1,
44660702 6513 "type" : "string"
56122987 6514 },
44660702
DM
6515 "secs" : {
6516 "description" : "Force the drive's physical geometry to have a specific sector count.",
6517 "format_description" : "count",
6518 "optional" : 1,
6519 "type" : "integer"
6520 },
6521 "serial" : {
6522 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6523 "format" : "urlencoded",
6524 "format_description" : "serial",
6525 "maxLength" : 60,
56122987 6526 "optional" : 1,
7aacca6f 6527 "type" : "string"
56122987 6528 },
44660702
DM
6529 "size" : {
6530 "description" : "Disk size. This is purely informational and has no effect.",
6531 "format" : "disk-size",
56122987 6532 "optional" : 1,
44660702 6533 "type" : "string"
56122987 6534 },
44660702
DM
6535 "snapshot" : {
6536 "description" : "Whether the drive should be included when making snapshots.",
6537 "format_description" : "on|off",
56122987 6538 "optional" : 1,
44660702 6539 "type" : "boolean"
56122987 6540 },
44660702
DM
6541 "trans" : {
6542 "description" : "Force disk geometry bios translation mode.",
6543 "enum" : [
6544 "none",
6545 "lba",
6546 "auto"
6547 ],
6548 "format_description" : "none|lba|auto",
6549 "optional" : 1,
6550 "type" : "string"
6551 },
6552 "volume" : {
6553 "alias" : "file"
6554 },
6555 "werror" : {
6556 "description" : "Write error action.",
6557 "enum" : [
6558 "enospc",
6559 "ignore",
6560 "report",
6561 "stop"
6562 ],
6563 "format_description" : "enospc|ignore|report|stop",
56122987 6564 "optional" : 1,
44660702 6565 "type" : "string"
56122987 6566 }
44660702 6567 },
56122987 6568 "optional" : 1,
44660702 6569 "type" : "string"
56122987 6570 },
7aacca6f
DM
6571 "vmid" : {
6572 "description" : "The (unique) ID of the VM.",
7aacca6f 6573 "format" : "pve-vmid",
44660702
DM
6574 "minimum" : 1,
6575 "type" : "integer"
56122987 6576 },
44660702
DM
6577 "watchdog" : {
6578 "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)",
6579 "format" : "pve-qm-watchdog",
56122987 6580 "optional" : 1,
44660702 6581 "type" : "string"
56122987 6582 }
44660702 6583 }
56122987 6584 },
7aacca6f
DM
6585 "permissions" : {
6586 "check" : [
6587 "perm",
6588 "/vms/{vmid}",
6589 [
44660702
DM
6590 "VM.Config.Disk",
6591 "VM.Config.CDROM",
6592 "VM.Config.CPU",
6593 "VM.Config.Memory",
6594 "VM.Config.Network",
6595 "VM.Config.HWType",
6596 "VM.Config.Options"
6597 ],
6598 "any",
6599 1
7aacca6f 6600 ]
56122987 6601 },
44660702 6602 "protected" : 1,
7aacca6f 6603 "proxyto" : "node",
44660702
DM
6604 "returns" : {
6605 "optional" : 1,
6606 "type" : "string"
6607 }
56122987 6608 },
7aacca6f 6609 "PUT" : {
44660702
DM
6610 "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.",
6611 "method" : "PUT",
6612 "name" : "update_vm",
56122987 6613 "parameters" : {
7aacca6f 6614 "additionalProperties" : 0,
56122987 6615 "properties" : {
44660702
DM
6616 "acpi" : {
6617 "default" : 1,
6618 "description" : "Enable/disable ACPI.",
7aacca6f 6619 "optional" : 1,
44660702 6620 "type" : "boolean"
7aacca6f 6621 },
44660702
DM
6622 "agent" : {
6623 "default" : 0,
6624 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 6625 "optional" : 1,
44660702 6626 "type" : "boolean"
56122987 6627 },
44660702
DM
6628 "args" : {
6629 "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n",
7aacca6f
DM
6630 "optional" : 1,
6631 "type" : "string"
6632 },
44660702
DM
6633 "autostart" : {
6634 "default" : 0,
6635 "description" : "Automatic restart after crash (currently ignored).",
7aacca6f
DM
6636 "optional" : 1,
6637 "type" : "boolean"
6638 },
44660702
DM
6639 "balloon" : {
6640 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
6641 "minimum" : 0,
6642 "optional" : 1,
6643 "type" : "integer"
6644 },
6645 "bios" : {
6646 "default" : "seabios",
6647 "description" : "Select BIOS implementation.",
7aacca6f 6648 "enum" : [
44660702
DM
6649 "seabios",
6650 "ovmf"
7aacca6f 6651 ],
56122987 6652 "optional" : 1,
7aacca6f
DM
6653 "type" : "string"
6654 },
44660702
DM
6655 "boot" : {
6656 "default" : "cdn",
6657 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
7aacca6f 6658 "optional" : 1,
44660702
DM
6659 "pattern" : "[acdn]{1,4}",
6660 "type" : "string"
56122987 6661 },
44660702
DM
6662 "bootdisk" : {
6663 "description" : "Enable booting from specified disk.",
6664 "format" : "pve-qm-bootdisk",
6665 "optional" : 1,
6666 "pattern" : "(ide|sata|scsi|virtio)\\d+",
6667 "type" : "string"
6668 },
6669 "cdrom" : {
6670 "description" : "This is an alias for option -ide2",
6671 "format" : "pve-qm-drive",
56122987 6672 "optional" : 1,
7aacca6f 6673 "type" : "string",
44660702
DM
6674 "typetext" : "volume"
6675 },
6676 "cores" : {
6677 "default" : 1,
6678 "description" : "The number of cores per socket.",
6679 "minimum" : 1,
6680 "optional" : 1,
6681 "type" : "integer"
6682 },
6683 "cpu" : {
6684 "description" : "Emulated CPU type.",
6685 "format" : {
6686 "cputype" : {
6687 "default" : "kvm64",
6688 "default_key" : 1,
6689 "description" : "Emulated CPU type.",
6690 "enum" : [
6691 "486",
6692 "athlon",
6693 "pentium",
6694 "pentium2",
6695 "pentium3",
6696 "coreduo",
6697 "core2duo",
6698 "kvm32",
6699 "kvm64",
6700 "qemu32",
6701 "qemu64",
6702 "phenom",
6703 "Conroe",
6704 "Penryn",
6705 "Nehalem",
6706 "Westmere",
6707 "SandyBridge",
6708 "IvyBridge",
6709 "Haswell",
6710 "Haswell-noTSX",
6711 "Broadwell",
6712 "Broadwell-noTSX",
6713 "Opteron_G1",
6714 "Opteron_G2",
6715 "Opteron_G3",
6716 "Opteron_G4",
6717 "Opteron_G5",
6718 "host"
6719 ],
6720 "format_description" : "cputype",
6721 "type" : "string"
6722 },
6723 "hidden" : {
6724 "default" : 0,
6725 "description" : "Do not identify as a KVM virtual machine.",
6726 "optional" : 1,
6727 "type" : "boolean"
6728 }
6729 },
6730 "optional" : 1,
6731 "type" : "string"
6732 },
6733 "cpulimit" : {
6734 "default" : 0,
6735 "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.",
6736 "maximum" : 128,
6737 "minimum" : 0,
6738 "optional" : 1,
6739 "type" : "number"
6740 },
6741 "cpuunits" : {
6742 "default" : 1000,
6743 "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.",
6744 "maximum" : 500000,
6745 "minimum" : 0,
6746 "optional" : 1,
6747 "type" : "integer"
6748 },
6749 "delete" : {
6750 "description" : "A list of settings you want to delete.",
6751 "format" : "pve-configid-list",
6752 "optional" : 1,
6753 "type" : "string"
6754 },
6755 "description" : {
6756 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
6757 "optional" : 1,
6758 "type" : "string"
6759 },
6760 "digest" : {
6761 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
6762 "maxLength" : 40,
6763 "optional" : 1,
6764 "type" : "string"
6765 },
6766 "force" : {
6767 "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.",
6768 "optional" : 1,
6769 "requires" : "delete",
6770 "type" : "boolean"
6771 },
6772 "freeze" : {
6773 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
6774 "optional" : 1,
6775 "type" : "boolean"
6776 },
6777 "hostpci[n]" : {
6778 "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\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\nExperimental: user reported problems with this option.\n",
6779 "format" : "pve-qm-hostpci",
6780 "optional" : 1,
6781 "type" : "string"
56122987 6782 },
7aacca6f 6783 "hotplug" : {
7aacca6f 6784 "default" : "network,disk,usb",
44660702
DM
6785 "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'.",
6786 "format" : "pve-hotplug-features",
56122987 6787 "optional" : 1,
56122987
DM
6788 "type" : "string"
6789 },
6790 "ide[n]" : {
7aacca6f 6791 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 6792 "format" : {
44660702
DM
6793 "aio" : {
6794 "description" : "AIO type to use.",
6795 "enum" : [
6796 "native",
6797 "threads"
6798 ],
6799 "format_description" : "native|threads",
56122987 6800 "optional" : 1,
44660702 6801 "type" : "string"
56122987 6802 },
44660702
DM
6803 "backup" : {
6804 "description" : "Whether the drive should be included when making backups.",
6805 "format_description" : "on|off",
6806 "optional" : 1,
6807 "type" : "boolean"
6808 },
6809 "bps" : {
6810 "description" : "Maximum r/w speed speed in bytes per second.",
6811 "format_description" : "bps",
56122987 6812 "optional" : 1,
44660702 6813 "type" : "integer"
56122987 6814 },
44660702
DM
6815 "bps_rd" : {
6816 "description" : "Maximum read speed speed in bytes per second.",
6817 "format_description" : "bps",
56122987 6818 "optional" : 1,
44660702 6819 "type" : "integer"
56122987 6820 },
7aacca6f 6821 "bps_wr" : {
7aacca6f 6822 "description" : "Maximum write speed speed in bytes per second.",
44660702
DM
6823 "format_description" : "bps",
6824 "optional" : 1,
6825 "type" : "integer"
7aacca6f 6826 },
44660702
DM
6827 "cache" : {
6828 "description" : "The drive's cache mode",
6829 "enum" : [
6830 "none",
6831 "writethrough",
6832 "writeback",
6833 "unsafe",
6834 "directsync"
6835 ],
6836 "format_description" : "none|writethrough|writeback|unsafe|directsync",
56122987 6837 "optional" : 1,
44660702
DM
6838 "type" : "string"
6839 },
6840 "cyls" : {
6841 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
6842 "format_description" : "count",
6843 "optional" : 1,
6844 "type" : "integer"
6845 },
6846 "detect_zeroes" : {
6847 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6848 "optional" : 1,
6849 "type" : "boolean"
56122987 6850 },
7aacca6f 6851 "discard" : {
7aacca6f 6852 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 6853 "enum" : [
7aacca6f
DM
6854 "ignore",
6855 "on"
56122987 6856 ],
44660702 6857 "format_description" : "ignore|on",
56122987 6858 "optional" : 1,
44660702 6859 "type" : "string"
7aacca6f 6860 },
44660702
DM
6861 "file" : {
6862 "default_key" : 1,
6863 "description" : "The drive's backing volume.",
6864 "format" : "pve-volume-id-or-qm-path",
6865 "format_description" : "volume",
6866 "type" : "string"
7aacca6f
DM
6867 },
6868 "format" : {
44660702 6869 "description" : "The drive's backing file's data format.",
7aacca6f
DM
6870 "enum" : [
6871 "raw",
6872 "cow",
6873 "qcow",
6874 "qed",
6875 "qcow2",
6876 "vmdk",
6877 "cloop"
6878 ],
44660702 6879 "format_description" : "drive format",
7aacca6f 6880 "optional" : 1,
44660702 6881 "type" : "string"
56122987 6882 },
7aacca6f 6883 "heads" : {
44660702 6884 "description" : "Force the drive's physical geometry to have a specific head count.",
7aacca6f 6885 "format_description" : "count",
56122987 6886 "optional" : 1,
44660702 6887 "type" : "integer"
7aacca6f 6888 },
44660702
DM
6889 "iops" : {
6890 "description" : "Maximum r/w I/O speed in operations per second.",
6891 "format_description" : "iops",
7aacca6f 6892 "optional" : 1,
44660702 6893 "type" : "integer"
56122987 6894 },
44660702
DM
6895 "iops_max" : {
6896 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6897 "format_description" : "iops",
56122987 6898 "optional" : 1,
44660702 6899 "type" : "integer"
56122987 6900 },
44660702
DM
6901 "iops_rd" : {
6902 "description" : "Maximum read I/O speed in operations per second.",
6903 "format_description" : "iops",
56122987 6904 "optional" : 1,
44660702 6905 "type" : "integer"
7aacca6f 6906 },
44660702
DM
6907 "iops_rd_max" : {
6908 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6909 "format_description" : "iops",
7aacca6f 6910 "optional" : 1,
44660702 6911 "type" : "integer"
7aacca6f 6912 },
44660702
DM
6913 "iops_wr" : {
6914 "description" : "Maximum write I/O speed in operations per second.",
6915 "format_description" : "iops",
7aacca6f 6916 "optional" : 1,
44660702 6917 "type" : "integer"
56122987 6918 },
44660702
DM
6919 "iops_wr_max" : {
6920 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6921 "format_description" : "iops",
7aacca6f 6922 "optional" : 1,
44660702 6923 "type" : "integer"
7aacca6f
DM
6924 },
6925 "mbps" : {
44660702 6926 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 6927 "format_description" : "mbps",
7aacca6f 6928 "optional" : 1,
44660702 6929 "type" : "number"
7aacca6f 6930 },
44660702
DM
6931 "mbps_max" : {
6932 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6933 "format_description" : "mbps",
7aacca6f 6934 "optional" : 1,
44660702 6935 "type" : "number"
7aacca6f 6936 },
44660702
DM
6937 "mbps_rd" : {
6938 "description" : "Maximum read speed speed in megabytes per second.",
6939 "format_description" : "mbps",
7aacca6f 6940 "optional" : 1,
44660702 6941 "type" : "number"
7aacca6f 6942 },
44660702
DM
6943 "mbps_rd_max" : {
6944 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6945 "format_description" : "mbps",
6946 "optional" : 1,
6947 "type" : "number"
7aacca6f 6948 },
44660702
DM
6949 "mbps_wr" : {
6950 "description" : "Maximum write speed speed in megabytes per second.",
6951 "format_description" : "mbps",
7aacca6f 6952 "optional" : 1,
44660702
DM
6953 "type" : "number"
6954 },
6955 "mbps_wr_max" : {
6956 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6957 "format_description" : "mbps",
6958 "optional" : 1,
6959 "type" : "number"
6960 },
6961 "media" : {
6962 "default" : "disk",
6963 "description" : "The drive's media type.",
56122987 6964 "enum" : [
44660702
DM
6965 "cdrom",
6966 "disk"
56122987 6967 ],
44660702
DM
6968 "format_description" : "cdrom|disk",
6969 "optional" : 1,
6970 "type" : "string"
56122987 6971 },
7aacca6f 6972 "model" : {
44660702 6973 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
56122987 6974 "format" : "urlencoded",
7aacca6f 6975 "format_description" : "model",
44660702 6976 "maxLength" : 120,
56122987 6977 "optional" : 1,
44660702 6978 "type" : "string"
56122987 6979 },
44660702
DM
6980 "rerror" : {
6981 "description" : "Read error action.",
6982 "enum" : [
6983 "ignore",
6984 "report",
6985 "stop"
6986 ],
6987 "format_description" : "ignore|report|stop",
56122987 6988 "optional" : 1,
44660702 6989 "type" : "string"
56122987 6990 },
44660702
DM
6991 "secs" : {
6992 "description" : "Force the drive's physical geometry to have a specific sector count.",
6993 "format_description" : "count",
6994 "optional" : 1,
6995 "type" : "integer"
56122987 6996 },
44660702
DM
6997 "serial" : {
6998 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6999 "format" : "urlencoded",
7000 "format_description" : "serial",
7001 "maxLength" : 60,
56122987 7002 "optional" : 1,
44660702 7003 "type" : "string"
56122987 7004 },
44660702
DM
7005 "size" : {
7006 "description" : "Disk size. This is purely informational and has no effect.",
7007 "format" : "disk-size",
56122987 7008 "optional" : 1,
44660702 7009 "type" : "string"
56122987 7010 },
44660702
DM
7011 "snapshot" : {
7012 "description" : "Whether the drive should be included when making snapshots.",
7aacca6f 7013 "format_description" : "on|off",
56122987 7014 "optional" : 1,
44660702 7015 "type" : "boolean"
56122987 7016 },
44660702
DM
7017 "trans" : {
7018 "description" : "Force disk geometry bios translation mode.",
7019 "enum" : [
7020 "none",
7021 "lba",
7022 "auto"
7023 ],
7024 "format_description" : "none|lba|auto",
56122987 7025 "optional" : 1,
44660702
DM
7026 "type" : "string"
7027 },
7028 "volume" : {
7029 "alias" : "file"
56122987 7030 },
7aacca6f 7031 "werror" : {
44660702 7032 "description" : "Write error action.",
7aacca6f
DM
7033 "enum" : [
7034 "enospc",
7035 "ignore",
7036 "report",
7037 "stop"
7038 ],
44660702 7039 "format_description" : "enospc|ignore|report|stop",
56122987 7040 "optional" : 1,
44660702 7041 "type" : "string"
7aacca6f 7042 }
44660702
DM
7043 },
7044 "optional" : 1,
7045 "type" : "string"
7aacca6f 7046 },
44660702
DM
7047 "keyboard" : {
7048 "default" : "en-us",
7049 "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.",
7050 "enum" : [
7051 "de",
7052 "de-ch",
7053 "da",
7054 "en-gb",
7055 "en-us",
7056 "es",
7057 "fi",
7058 "fr",
7059 "fr-be",
7060 "fr-ca",
7061 "fr-ch",
7062 "hu",
7063 "is",
7064 "it",
7065 "ja",
7066 "lt",
7067 "mk",
7068 "nl",
7069 "no",
7070 "pl",
7071 "pt",
7072 "pt-br",
7073 "sv",
7074 "sl",
7075 "tr"
7076 ],
7aacca6f 7077 "optional" : 1,
44660702 7078 "type" : "string"
7aacca6f 7079 },
44660702 7080 "kvm" : {
7aacca6f 7081 "default" : 1,
44660702 7082 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 7083 "optional" : 1,
44660702 7084 "type" : "boolean"
7aacca6f 7085 },
44660702
DM
7086 "localtime" : {
7087 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
7aacca6f 7088 "optional" : 1,
44660702 7089 "type" : "boolean"
7aacca6f 7090 },
44660702
DM
7091 "lock" : {
7092 "description" : "Lock/unlock the VM.",
7093 "enum" : [
7094 "migrate",
7095 "backup",
7096 "snapshot",
7097 "rollback"
7098 ],
7aacca6f 7099 "optional" : 1,
44660702 7100 "type" : "string"
7aacca6f 7101 },
44660702
DM
7102 "machine" : {
7103 "description" : "Specific the Qemu machine type.",
7104 "maxLength" : 40,
7aacca6f 7105 "optional" : 1,
44660702
DM
7106 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
7107 "type" : "string"
7aacca6f 7108 },
44660702
DM
7109 "memory" : {
7110 "default" : 512,
7111 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
7112 "minimum" : 16,
7aacca6f 7113 "optional" : 1,
44660702 7114 "type" : "integer"
7aacca6f 7115 },
44660702
DM
7116 "migrate_downtime" : {
7117 "default" : 0.1,
7118 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
7119 "minimum" : 0,
7aacca6f 7120 "optional" : 1,
44660702 7121 "type" : "number"
7aacca6f 7122 },
44660702 7123 "migrate_speed" : {
7aacca6f 7124 "default" : 0,
44660702
DM
7125 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
7126 "minimum" : 0,
7127 "optional" : 1,
7128 "type" : "integer"
7aacca6f 7129 },
44660702
DM
7130 "name" : {
7131 "description" : "Set a name for the VM. Only used on the configuration web interface.",
7132 "format" : "dns-name",
7aacca6f 7133 "optional" : 1,
44660702 7134 "type" : "string"
7aacca6f 7135 },
44660702
DM
7136 "net[n]" : {
7137 "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n",
7138 "format" : "pve-qm-net",
7aacca6f 7139 "optional" : 1,
44660702 7140 "type" : "string"
7aacca6f 7141 },
44660702
DM
7142 "node" : {
7143 "description" : "The cluster node name.",
7144 "format" : "pve-node",
7145 "type" : "string"
7146 },
7147 "numa" : {
7148 "default" : 0,
7149 "description" : "Enable/disable NUMA.",
7aacca6f
DM
7150 "optional" : 1,
7151 "type" : "boolean"
7152 },
44660702
DM
7153 "numa[n]" : {
7154 "description" : "numa topology",
7155 "format" : {
7156 "cpus" : {
7157 "description" : "CPUs accessing this numa node.",
7158 "format_description" : "id[-id];...",
7159 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7160 "type" : "string"
7161 },
7162 "hostnodes" : {
7163 "description" : "host numa nodes to use",
7164 "format_description" : "id[-id];...",
7165 "optional" : 1,
7166 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7167 "type" : "string"
7168 },
7169 "memory" : {
7170 "description" : "Amount of memory this numa node provides.",
7171 "format_description" : "mb",
7172 "optional" : 1,
7173 "type" : "number"
7174 },
7175 "policy" : {
7176 "description" : "numa allocation policy.",
7177 "enum" : [
7178 "preferred",
7179 "bind",
7180 "interleave"
7181 ],
7182 "format_description" : "preferred|bind|interleave",
7183 "optional" : 1,
7184 "type" : "string"
7185 }
7186 },
7aacca6f 7187 "optional" : 1,
44660702 7188 "type" : "string"
7aacca6f 7189 },
44660702
DM
7190 "onboot" : {
7191 "default" : 0,
7192 "description" : "Specifies whether a VM will be started during system bootup.",
7aacca6f 7193 "optional" : 1,
44660702 7194 "type" : "boolean"
7aacca6f 7195 },
44660702
DM
7196 "ostype" : {
7197 "description" : "Used to enable special optimization/features for specific\noperating systems:\n\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\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n",
7198 "enum" : [
7199 "other",
7200 "wxp",
7201 "w2k",
7202 "w2k3",
7203 "w2k8",
7204 "wvista",
7205 "win7",
7206 "win8",
7207 "l24",
7208 "l26",
7209 "solaris"
7210 ],
7aacca6f
DM
7211 "optional" : 1,
7212 "type" : "string"
7213 },
44660702
DM
7214 "parallel[n]" : {
7215 "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\nExperimental: user reported problems with this option.\n",
7aacca6f 7216 "optional" : 1,
44660702
DM
7217 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
7218 "type" : "string"
7aacca6f 7219 },
44660702
DM
7220 "protection" : {
7221 "default" : 0,
7222 "description" : "Sets the protection flag of the VM. This will prevent the remove operation.",
7aacca6f 7223 "optional" : 1,
44660702 7224 "type" : "boolean"
7aacca6f 7225 },
44660702
DM
7226 "reboot" : {
7227 "default" : 1,
7228 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 7229 "optional" : 1,
44660702 7230 "type" : "boolean"
7aacca6f 7231 },
44660702
DM
7232 "revert" : {
7233 "description" : "Revert a pending change.",
7234 "format" : "pve-configid-list",
7aacca6f 7235 "optional" : 1,
44660702 7236 "type" : "string"
7aacca6f 7237 },
44660702
DM
7238 "sata[n]" : {
7239 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
7aacca6f 7240 "format" : {
44660702
DM
7241 "aio" : {
7242 "description" : "AIO type to use.",
7243 "enum" : [
7244 "native",
7245 "threads"
7246 ],
7247 "format_description" : "native|threads",
7248 "optional" : 1,
7249 "type" : "string"
7250 },
7251 "backup" : {
7252 "description" : "Whether the drive should be included when making backups.",
7253 "format_description" : "on|off",
7254 "optional" : 1,
7255 "type" : "boolean"
7256 },
7257 "bps" : {
7258 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 7259 "format_description" : "bps",
7aacca6f
DM
7260 "optional" : 1,
7261 "type" : "integer"
56122987 7262 },
44660702
DM
7263 "bps_rd" : {
7264 "description" : "Maximum read speed speed in bytes per second.",
7265 "format_description" : "bps",
7aacca6f 7266 "optional" : 1,
44660702 7267 "type" : "integer"
7aacca6f 7268 },
44660702
DM
7269 "bps_wr" : {
7270 "description" : "Maximum write speed speed in bytes per second.",
7271 "format_description" : "bps",
7aacca6f 7272 "optional" : 1,
44660702 7273 "type" : "integer"
7aacca6f 7274 },
44660702
DM
7275 "cache" : {
7276 "description" : "The drive's cache mode",
7277 "enum" : [
7278 "none",
7279 "writethrough",
7280 "writeback",
7281 "unsafe",
7282 "directsync"
7283 ],
7284 "format_description" : "none|writethrough|writeback|unsafe|directsync",
7aacca6f 7285 "optional" : 1,
44660702 7286 "type" : "string"
7aacca6f 7287 },
44660702
DM
7288 "cyls" : {
7289 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7290 "format_description" : "count",
7aacca6f 7291 "optional" : 1,
44660702 7292 "type" : "integer"
7aacca6f 7293 },
44660702
DM
7294 "detect_zeroes" : {
7295 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7aacca6f 7296 "optional" : 1,
44660702 7297 "type" : "boolean"
7aacca6f 7298 },
44660702
DM
7299 "discard" : {
7300 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7301 "enum" : [
7302 "ignore",
7303 "on"
7304 ],
7305 "format_description" : "ignore|on",
7aacca6f 7306 "optional" : 1,
44660702
DM
7307 "type" : "string"
7308 },
7309 "file" : {
7310 "default_key" : 1,
7311 "description" : "The drive's backing volume.",
7312 "format" : "pve-volume-id-or-qm-path",
7313 "format_description" : "volume",
7314 "type" : "string"
7aacca6f
DM
7315 },
7316 "format" : {
7aacca6f 7317 "description" : "The drive's backing file's data format.",
56122987
DM
7318 "enum" : [
7319 "raw",
7320 "cow",
7321 "qcow",
7322 "qed",
7323 "qcow2",
7324 "vmdk",
7325 "cloop"
7326 ],
44660702 7327 "format_description" : "drive format",
56122987 7328 "optional" : 1,
7aacca6f 7329 "type" : "string"
56122987 7330 },
7aacca6f 7331 "heads" : {
7aacca6f 7332 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
7333 "format_description" : "count",
7334 "optional" : 1,
7335 "type" : "integer"
56122987 7336 },
44660702
DM
7337 "iops" : {
7338 "description" : "Maximum r/w I/O speed in operations per second.",
7339 "format_description" : "iops",
56122987 7340 "optional" : 1,
44660702 7341 "type" : "integer"
7aacca6f 7342 },
44660702
DM
7343 "iops_max" : {
7344 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7345 "format_description" : "iops",
7aacca6f 7346 "optional" : 1,
44660702 7347 "type" : "integer"
56122987 7348 },
44660702
DM
7349 "iops_rd" : {
7350 "description" : "Maximum read I/O speed in operations per second.",
7351 "format_description" : "iops",
56122987 7352 "optional" : 1,
44660702 7353 "type" : "integer"
7aacca6f 7354 },
44660702
DM
7355 "iops_rd_max" : {
7356 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7357 "format_description" : "iops",
56122987 7358 "optional" : 1,
44660702 7359 "type" : "integer"
56122987 7360 },
44660702
DM
7361 "iops_wr" : {
7362 "description" : "Maximum write I/O speed in operations per second.",
7363 "format_description" : "iops",
7364 "optional" : 1,
7365 "type" : "integer"
56122987 7366 },
44660702
DM
7367 "iops_wr_max" : {
7368 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7369 "format_description" : "iops",
7370 "optional" : 1,
7371 "type" : "integer"
7372 },
7373 "mbps" : {
7374 "description" : "Maximum r/w speed speed in megabytes per second.",
7375 "format_description" : "mbps",
7376 "optional" : 1,
7377 "type" : "number"
7378 },
7379 "mbps_max" : {
7380 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7381 "format_description" : "mbps",
7382 "optional" : 1,
7383 "type" : "number"
7384 },
7385 "mbps_rd" : {
7386 "description" : "Maximum read speed speed in megabytes per second.",
7387 "format_description" : "mbps",
7388 "optional" : 1,
7389 "type" : "number"
7390 },
7391 "mbps_rd_max" : {
7392 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7393 "format_description" : "mbps",
7394 "optional" : 1,
7395 "type" : "number"
7396 },
7397 "mbps_wr" : {
7398 "description" : "Maximum write speed speed in megabytes per second.",
7399 "format_description" : "mbps",
7400 "optional" : 1,
7401 "type" : "number"
7402 },
7403 "mbps_wr_max" : {
7404 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7405 "format_description" : "mbps",
7406 "optional" : 1,
7407 "type" : "number"
7408 },
7409 "media" : {
7410 "default" : "disk",
7411 "description" : "The drive's media type.",
7412 "enum" : [
7413 "cdrom",
7414 "disk"
7415 ],
7416 "format_description" : "cdrom|disk",
56122987 7417 "optional" : 1,
44660702
DM
7418 "type" : "string"
7419 },
7420 "rerror" : {
7aacca6f
DM
7421 "description" : "Read error action.",
7422 "enum" : [
7423 "ignore",
7424 "report",
7425 "stop"
44660702
DM
7426 ],
7427 "format_description" : "ignore|report|stop",
56122987 7428 "optional" : 1,
44660702 7429 "type" : "string"
56122987 7430 },
7aacca6f 7431 "secs" : {
44660702 7432 "description" : "Force the drive's physical geometry to have a specific sector count.",
7aacca6f 7433 "format_description" : "count",
56122987 7434 "optional" : 1,
44660702 7435 "type" : "integer"
56122987 7436 },
44660702
DM
7437 "serial" : {
7438 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7439 "format" : "urlencoded",
7440 "format_description" : "serial",
7441 "maxLength" : 60,
56122987 7442 "optional" : 1,
44660702 7443 "type" : "string"
56122987 7444 },
44660702
DM
7445 "size" : {
7446 "description" : "Disk size. This is purely informational and has no effect.",
7447 "format" : "disk-size",
56122987 7448 "optional" : 1,
44660702 7449 "type" : "string"
56122987
DM
7450 },
7451 "snapshot" : {
7aacca6f 7452 "description" : "Whether the drive should be included when making snapshots.",
44660702 7453 "format_description" : "on|off",
56122987 7454 "optional" : 1,
44660702 7455 "type" : "boolean"
56122987 7456 },
56122987 7457 "trans" : {
7aacca6f 7458 "description" : "Force disk geometry bios translation mode.",
56122987
DM
7459 "enum" : [
7460 "none",
7461 "lba",
7462 "auto"
7463 ],
44660702 7464 "format_description" : "none|lba|auto",
56122987 7465 "optional" : 1,
44660702 7466 "type" : "string"
56122987 7467 },
44660702
DM
7468 "volume" : {
7469 "alias" : "file"
56122987 7470 },
7aacca6f 7471 "werror" : {
44660702 7472 "description" : "Write error action.",
56122987 7473 "enum" : [
7aacca6f 7474 "enospc",
56122987 7475 "ignore",
7aacca6f
DM
7476 "report",
7477 "stop"
7478 ],
44660702 7479 "format_description" : "enospc|ignore|report|stop",
7aacca6f 7480 "optional" : 1,
44660702
DM
7481 "type" : "string"
7482 }
7483 },
7484 "optional" : 1,
7485 "type" : "string"
7486 },
7487 "scsi[n]" : {
7488 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
7489 "format" : {
7490 "aio" : {
7aacca6f 7491 "description" : "AIO type to use.",
56122987
DM
7492 "enum" : [
7493 "native",
7494 "threads"
44660702
DM
7495 ],
7496 "format_description" : "native|threads",
56122987 7497 "optional" : 1,
44660702 7498 "type" : "string"
56122987 7499 },
7aacca6f 7500 "backup" : {
7aacca6f 7501 "description" : "Whether the drive should be included when making backups.",
44660702 7502 "format_description" : "on|off",
7aacca6f 7503 "optional" : 1,
44660702 7504 "type" : "boolean"
56122987 7505 },
44660702
DM
7506 "bps" : {
7507 "description" : "Maximum r/w speed speed in bytes per second.",
7508 "format_description" : "bps",
7aacca6f 7509 "optional" : 1,
44660702 7510 "type" : "integer"
7aacca6f 7511 },
44660702
DM
7512 "bps_rd" : {
7513 "description" : "Maximum read speed speed in bytes per second.",
7514 "format_description" : "bps",
56122987 7515 "optional" : 1,
44660702 7516 "type" : "integer"
56122987 7517 },
44660702
DM
7518 "bps_wr" : {
7519 "description" : "Maximum write speed speed in bytes per second.",
7520 "format_description" : "bps",
56122987 7521 "optional" : 1,
44660702 7522 "type" : "integer"
56122987 7523 },
44660702
DM
7524 "cache" : {
7525 "description" : "The drive's cache mode",
7526 "enum" : [
7527 "none",
7528 "writethrough",
7529 "writeback",
7530 "unsafe",
7531 "directsync"
7532 ],
7533 "format_description" : "none|writethrough|writeback|unsafe|directsync",
56122987 7534 "optional" : 1,
44660702
DM
7535 "type" : "string"
7536 },
7537 "cyls" : {
7538 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7539 "format_description" : "count",
7540 "optional" : 1,
7541 "type" : "integer"
7542 },
7543 "detect_zeroes" : {
7544 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7545 "optional" : 1,
7546 "type" : "boolean"
7547 },
7548 "discard" : {
7549 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7550 "enum" : [
7551 "ignore",
7552 "on"
7553 ],
7554 "format_description" : "ignore|on",
7555 "optional" : 1,
7556 "type" : "string"
7557 },
7558 "file" : {
7559 "default_key" : 1,
7560 "description" : "The drive's backing volume.",
7561 "format" : "pve-volume-id-or-qm-path",
7562 "format_description" : "volume",
7563 "type" : "string"
56122987 7564 },
7aacca6f 7565 "format" : {
44660702 7566 "description" : "The drive's backing file's data format.",
7aacca6f
DM
7567 "enum" : [
7568 "raw",
7569 "cow",
7570 "qcow",
7571 "qed",
7572 "qcow2",
7573 "vmdk",
7574 "cloop"
7575 ],
44660702 7576 "format_description" : "drive format",
56122987 7577 "optional" : 1,
44660702 7578 "type" : "string"
56122987 7579 },
44660702
DM
7580 "heads" : {
7581 "description" : "Force the drive's physical geometry to have a specific head count.",
7582 "format_description" : "count",
56122987 7583 "optional" : 1,
44660702 7584 "type" : "integer"
56122987 7585 },
44660702
DM
7586 "iops" : {
7587 "description" : "Maximum r/w I/O speed in operations per second.",
7588 "format_description" : "iops",
7aacca6f 7589 "optional" : 1,
44660702 7590 "type" : "integer"
56122987 7591 },
44660702
DM
7592 "iops_max" : {
7593 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7aacca6f 7594 "format_description" : "iops",
7aacca6f 7595 "optional" : 1,
44660702 7596 "type" : "integer"
56122987 7597 },
44660702
DM
7598 "iops_rd" : {
7599 "description" : "Maximum read I/O speed in operations per second.",
7600 "format_description" : "iops",
56122987 7601 "optional" : 1,
44660702 7602 "type" : "integer"
56122987 7603 },
44660702
DM
7604 "iops_rd_max" : {
7605 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7606 "format_description" : "iops",
56122987 7607 "optional" : 1,
44660702 7608 "type" : "integer"
56122987 7609 },
44660702
DM
7610 "iops_wr" : {
7611 "description" : "Maximum write I/O speed in operations per second.",
7612 "format_description" : "iops",
56122987 7613 "optional" : 1,
44660702 7614 "type" : "integer"
56122987 7615 },
44660702
DM
7616 "iops_wr_max" : {
7617 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7aacca6f 7618 "format_description" : "iops",
44660702
DM
7619 "optional" : 1,
7620 "type" : "integer"
7aacca6f
DM
7621 },
7622 "iothread" : {
44660702 7623 "description" : "Whether to use iothreads for this drive",
7aacca6f 7624 "format_description" : "off|on",
56122987 7625 "optional" : 1,
44660702 7626 "type" : "boolean"
56122987 7627 },
44660702
DM
7628 "mbps" : {
7629 "description" : "Maximum r/w speed speed in megabytes per second.",
7630 "format_description" : "mbps",
56122987 7631 "optional" : 1,
44660702 7632 "type" : "number"
56122987 7633 },
44660702
DM
7634 "mbps_max" : {
7635 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7636 "format_description" : "mbps",
56122987 7637 "optional" : 1,
44660702 7638 "type" : "number"
56122987 7639 },
44660702
DM
7640 "mbps_rd" : {
7641 "description" : "Maximum read speed speed in megabytes per second.",
7642 "format_description" : "mbps",
7aacca6f 7643 "optional" : 1,
44660702 7644 "type" : "number"
56122987 7645 },
44660702
DM
7646 "mbps_rd_max" : {
7647 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7648 "format_description" : "mbps",
7aacca6f 7649 "optional" : 1,
44660702 7650 "type" : "number"
7aacca6f 7651 },
44660702
DM
7652 "mbps_wr" : {
7653 "description" : "Maximum write speed speed in megabytes per second.",
7654 "format_description" : "mbps",
56122987 7655 "optional" : 1,
44660702 7656 "type" : "number"
56122987 7657 },
44660702
DM
7658 "mbps_wr_max" : {
7659 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7660 "format_description" : "mbps",
56122987 7661 "optional" : 1,
44660702
DM
7662 "type" : "number"
7663 },
7664 "media" : {
7665 "default" : "disk",
7666 "description" : "The drive's media type.",
7aacca6f 7667 "enum" : [
44660702
DM
7668 "cdrom",
7669 "disk"
7aacca6f 7670 ],
44660702 7671 "format_description" : "cdrom|disk",
56122987 7672 "optional" : 1,
44660702 7673 "type" : "string"
56122987 7674 },
7aacca6f 7675 "queues" : {
44660702 7676 "description" : "Number of queues.",
7aacca6f
DM
7677 "format_description" : "nbqueues",
7678 "minimum" : 2,
7aacca6f
DM
7679 "optional" : 1,
7680 "type" : "integer"
56122987 7681 },
44660702
DM
7682 "secs" : {
7683 "description" : "Force the drive's physical geometry to have a specific sector count.",
7684 "format_description" : "count",
56122987 7685 "optional" : 1,
44660702 7686 "type" : "integer"
56122987 7687 },
44660702
DM
7688 "serial" : {
7689 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7690 "format" : "urlencoded",
7691 "format_description" : "serial",
7692 "maxLength" : 60,
56122987 7693 "optional" : 1,
44660702 7694 "type" : "string"
56122987 7695 },
44660702
DM
7696 "size" : {
7697 "description" : "Disk size. This is purely informational and has no effect.",
7698 "format" : "disk-size",
7699 "optional" : 1,
7700 "type" : "string"
7701 },
7702 "snapshot" : {
7703 "description" : "Whether the drive should be included when making snapshots.",
7704 "format_description" : "on|off",
56122987 7705 "optional" : 1,
44660702
DM
7706 "type" : "boolean"
7707 },
7708 "trans" : {
7709 "description" : "Force disk geometry bios translation mode.",
56122987 7710 "enum" : [
44660702
DM
7711 "none",
7712 "lba",
7713 "auto"
56122987 7714 ],
44660702
DM
7715 "format_description" : "none|lba|auto",
7716 "optional" : 1,
7717 "type" : "string"
7718 },
7719 "volume" : {
7720 "alias" : "file"
56122987 7721 },
7aacca6f 7722 "werror" : {
7aacca6f
DM
7723 "description" : "Write error action.",
7724 "enum" : [
7725 "enospc",
7726 "ignore",
7727 "report",
7728 "stop"
44660702
DM
7729 ],
7730 "format_description" : "enospc|ignore|report|stop",
56122987 7731 "optional" : 1,
7aacca6f 7732 "type" : "string"
56122987 7733 }
44660702 7734 },
56122987 7735 "optional" : 1,
44660702 7736 "type" : "string"
56122987
DM
7737 },
7738 "scsihw" : {
44660702 7739 "default" : "lsi",
7aacca6f 7740 "description" : "scsi controller model",
56122987
DM
7741 "enum" : [
7742 "lsi",
7743 "lsi53c810",
7744 "virtio-scsi-pci",
7745 "virtio-scsi-single",
7746 "megasas",
7747 "pvscsi"
7748 ],
7749 "optional" : 1,
56122987
DM
7750 "type" : "string"
7751 },
44660702
DM
7752 "serial[n]" : {
7753 "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host 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\nExperimental: user reported problems with this option.\n",
56122987 7754 "optional" : 1,
44660702
DM
7755 "pattern" : "(/dev/.+|socket)",
7756 "type" : "string"
56122987 7757 },
44660702
DM
7758 "shares" : {
7759 "default" : 1000,
7760 "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",
7761 "maximum" : 50000,
7762 "minimum" : 0,
7aacca6f 7763 "optional" : 1,
44660702 7764 "type" : "integer"
56122987 7765 },
7aacca6f
DM
7766 "skiplock" : {
7767 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
7768 "optional" : 1,
7769 "type" : "boolean"
56122987 7770 },
44660702
DM
7771 "smbios1" : {
7772 "description" : "Specify SMBIOS type 1 fields.",
7773 "format" : "pve-qm-smbios1",
7774 "maxLength" : 256,
56122987 7775 "optional" : 1,
44660702 7776 "type" : "string"
56122987 7777 },
44660702
DM
7778 "smp" : {
7779 "default" : 1,
7780 "description" : "The number of CPUs. Please use option -sockets instead.",
7781 "minimum" : 1,
56122987 7782 "optional" : 1,
44660702 7783 "type" : "integer"
56122987 7784 },
44660702
DM
7785 "sockets" : {
7786 "default" : 1,
7787 "description" : "The number of CPU sockets.",
7788 "minimum" : 1,
56122987 7789 "optional" : 1,
44660702 7790 "type" : "integer"
56122987 7791 },
44660702
DM
7792 "startdate" : {
7793 "default" : "now",
7794 "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'.",
7795 "optional" : 1,
7796 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 7797 "type" : "string",
44660702
DM
7798 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
7799 },
7800 "startup" : {
7801 "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.",
7802 "format" : "pve-startup-order",
7aacca6f 7803 "optional" : 1,
44660702
DM
7804 "type" : "string",
7805 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 7806 },
44660702
DM
7807 "tablet" : {
7808 "default" : 1,
7809 "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 7810 "optional" : 1,
44660702 7811 "type" : "boolean"
7aacca6f 7812 },
44660702
DM
7813 "tdf" : {
7814 "default" : 0,
7815 "description" : "Enable/disable time drift fix.",
7aacca6f 7816 "optional" : 1,
44660702 7817 "type" : "boolean"
7aacca6f 7818 },
44660702
DM
7819 "template" : {
7820 "default" : 0,
7821 "description" : "Enable/disable Template.",
7aacca6f 7822 "optional" : 1,
44660702 7823 "type" : "boolean"
7aacca6f 7824 },
44660702
DM
7825 "unused[n]" : {
7826 "description" : "Reference to unused volumes.",
7827 "format" : "pve-volume-id",
7aacca6f
DM
7828 "optional" : 1,
7829 "type" : "string"
7830 },
44660702
DM
7831 "usb[n]" : {
7832 "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. 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\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n",
56122987 7833 "format" : {
44660702
DM
7834 "host" : {
7835 "default_key" : 1,
7836 "description" : "The Host USB device or port or the value spice",
7837 "format" : "pve-qm-usb-device",
7838 "format_description" : "HOSTUSBDEVICE|spice",
7839 "type" : "string"
7aacca6f 7840 },
44660702
DM
7841 "usb3" : {
7842 "description" : "Specifies whether if given host option is a USB3 device or port",
7843 "format_description" : "yes|no",
7aacca6f 7844 "optional" : 1,
44660702 7845 "type" : "boolean"
7aacca6f 7846 }
44660702 7847 },
7aacca6f 7848 "optional" : 1,
44660702 7849 "type" : "string"
7aacca6f 7850 },
44660702 7851 "vcpus" : {
7aacca6f 7852 "default" : 0,
44660702
DM
7853 "description" : "Number of hotplugged vcpus.",
7854 "minimum" : 1,
7aacca6f 7855 "optional" : 1,
44660702 7856 "type" : "integer"
7aacca6f 7857 },
44660702
DM
7858 "vga" : {
7859 "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.",
7860 "enum" : [
7861 "std",
7862 "cirrus",
7863 "vmware",
7864 "qxl",
7865 "serial0",
7866 "serial1",
7867 "serial2",
7868 "serial3",
7869 "qxl2",
7870 "qxl3",
7871 "qxl4"
7872 ],
7aacca6f 7873 "optional" : 1,
44660702 7874 "type" : "string"
7aacca6f 7875 },
44660702
DM
7876 "virtio[n]" : {
7877 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
7aacca6f 7878 "format" : {
7aacca6f 7879 "aio" : {
7aacca6f 7880 "description" : "AIO type to use.",
56122987 7881 "enum" : [
7aacca6f
DM
7882 "native",
7883 "threads"
7aacca6f 7884 ],
44660702
DM
7885 "format_description" : "native|threads",
7886 "optional" : 1,
7887 "type" : "string"
56122987 7888 },
44660702
DM
7889 "backup" : {
7890 "description" : "Whether the drive should be included when making backups.",
7891 "format_description" : "on|off",
56122987 7892 "optional" : 1,
44660702 7893 "type" : "boolean"
7aacca6f 7894 },
44660702
DM
7895 "bps" : {
7896 "description" : "Maximum r/w speed speed in bytes per second.",
7897 "format_description" : "bps",
7aacca6f 7898 "optional" : 1,
44660702 7899 "type" : "integer"
56122987
DM
7900 },
7901 "bps_rd" : {
7aacca6f 7902 "description" : "Maximum read speed speed in bytes per second.",
44660702 7903 "format_description" : "bps",
56122987 7904 "optional" : 1,
7aacca6f 7905 "type" : "integer"
56122987 7906 },
44660702
DM
7907 "bps_wr" : {
7908 "description" : "Maximum write speed speed in bytes per second.",
7909 "format_description" : "bps",
56122987 7910 "optional" : 1,
7aacca6f 7911 "type" : "integer"
56122987 7912 },
7aacca6f 7913 "cache" : {
44660702 7914 "description" : "The drive's cache mode",
7aacca6f
DM
7915 "enum" : [
7916 "none",
7917 "writethrough",
7918 "writeback",
7919 "unsafe",
7920 "directsync"
7921 ],
44660702 7922 "format_description" : "none|writethrough|writeback|unsafe|directsync",
56122987 7923 "optional" : 1,
44660702 7924 "type" : "string"
7aacca6f 7925 },
44660702
DM
7926 "cyls" : {
7927 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7928 "format_description" : "count",
7929 "optional" : 1,
7930 "type" : "integer"
7931 },
7932 "detect_zeroes" : {
7933 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7934 "optional" : 1,
7935 "type" : "boolean"
7936 },
7937 "discard" : {
7938 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 7939 "enum" : [
44660702
DM
7940 "ignore",
7941 "on"
56122987 7942 ],
44660702 7943 "format_description" : "ignore|on",
56122987 7944 "optional" : 1,
44660702 7945 "type" : "string"
56122987 7946 },
44660702
DM
7947 "file" : {
7948 "default_key" : 1,
7949 "description" : "The drive's backing volume.",
7950 "format" : "pve-volume-id-or-qm-path",
7951 "format_description" : "volume",
7952 "type" : "string"
7953 },
7954 "format" : {
7955 "description" : "The drive's backing file's data format.",
7956 "enum" : [
7957 "raw",
7958 "cow",
7959 "qcow",
7960 "qed",
7961 "qcow2",
7962 "vmdk",
7963 "cloop"
7964 ],
7965 "format_description" : "drive format",
56122987 7966 "optional" : 1,
44660702 7967 "type" : "string"
56122987 7968 },
44660702
DM
7969 "heads" : {
7970 "description" : "Force the drive's physical geometry to have a specific head count.",
7971 "format_description" : "count",
7972 "optional" : 1,
7973 "type" : "integer"
7974 },
7975 "iops" : {
7976 "description" : "Maximum r/w I/O speed in operations per second.",
7977 "format_description" : "iops",
56122987 7978 "optional" : 1,
44660702
DM
7979 "type" : "integer"
7980 },
7981 "iops_max" : {
7aacca6f 7982 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
44660702
DM
7983 "format_description" : "iops",
7984 "optional" : 1,
7985 "type" : "integer"
56122987 7986 },
7aacca6f 7987 "iops_rd" : {
44660702 7988 "description" : "Maximum read I/O speed in operations per second.",
7aacca6f 7989 "format_description" : "iops",
7aacca6f 7990 "optional" : 1,
44660702 7991 "type" : "integer"
56122987 7992 },
44660702
DM
7993 "iops_rd_max" : {
7994 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7995 "format_description" : "iops",
7996 "optional" : 1,
7997 "type" : "integer"
7998 },
7999 "iops_wr" : {
8000 "description" : "Maximum write I/O speed in operations per second.",
8001 "format_description" : "iops",
8002 "optional" : 1,
8003 "type" : "integer"
8004 },
8005 "iops_wr_max" : {
8006 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
8007 "format_description" : "iops",
8008 "optional" : 1,
8009 "type" : "integer"
8010 },
8011 "iothread" : {
8012 "description" : "Whether to use iothreads for this drive",
8013 "format_description" : "off|on",
8014 "optional" : 1,
8015 "type" : "boolean"
8016 },
8017 "mbps" : {
8018 "description" : "Maximum r/w speed speed in megabytes per second.",
8019 "format_description" : "mbps",
7aacca6f 8020 "optional" : 1,
44660702 8021 "type" : "number"
7aacca6f
DM
8022 },
8023 "mbps_max" : {
8024 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 8025 "format_description" : "mbps",
56122987 8026 "optional" : 1,
44660702 8027 "type" : "number"
56122987 8028 },
44660702
DM
8029 "mbps_rd" : {
8030 "description" : "Maximum read speed speed in megabytes per second.",
8031 "format_description" : "mbps",
56122987 8032 "optional" : 1,
44660702 8033 "type" : "number"
56122987 8034 },
44660702
DM
8035 "mbps_rd_max" : {
8036 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
8037 "format_description" : "mbps",
8038 "optional" : 1,
8039 "type" : "number"
8040 },
8041 "mbps_wr" : {
8042 "description" : "Maximum write speed speed in megabytes per second.",
8043 "format_description" : "mbps",
8044 "optional" : 1,
8045 "type" : "number"
8046 },
8047 "mbps_wr_max" : {
8048 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
8049 "format_description" : "mbps",
8050 "optional" : 1,
8051 "type" : "number"
8052 },
8053 "media" : {
8054 "default" : "disk",
8055 "description" : "The drive's media type.",
56122987 8056 "enum" : [
44660702
DM
8057 "cdrom",
8058 "disk"
56122987 8059 ],
44660702 8060 "format_description" : "cdrom|disk",
56122987 8061 "optional" : 1,
44660702 8062 "type" : "string"
56122987 8063 },
44660702
DM
8064 "rerror" : {
8065 "description" : "Read error action.",
8066 "enum" : [
8067 "ignore",
8068 "report",
8069 "stop"
8070 ],
8071 "format_description" : "ignore|report|stop",
56122987 8072 "optional" : 1,
44660702 8073 "type" : "string"
56122987 8074 },
44660702
DM
8075 "secs" : {
8076 "description" : "Force the drive's physical geometry to have a specific sector count.",
8077 "format_description" : "count",
56122987 8078 "optional" : 1,
44660702 8079 "type" : "integer"
56122987 8080 },
7aacca6f
DM
8081 "serial" : {
8082 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7aacca6f 8083 "format" : "urlencoded",
44660702 8084 "format_description" : "serial",
7aacca6f 8085 "maxLength" : 60,
44660702
DM
8086 "optional" : 1,
8087 "type" : "string"
56122987 8088 },
44660702
DM
8089 "size" : {
8090 "description" : "Disk size. This is purely informational and has no effect.",
8091 "format" : "disk-size",
8092 "optional" : 1,
8093 "type" : "string"
56122987 8094 },
44660702
DM
8095 "snapshot" : {
8096 "description" : "Whether the drive should be included when making snapshots.",
8097 "format_description" : "on|off",
56122987 8098 "optional" : 1,
44660702 8099 "type" : "boolean"
56122987 8100 },
44660702
DM
8101 "trans" : {
8102 "description" : "Force disk geometry bios translation mode.",
8103 "enum" : [
8104 "none",
8105 "lba",
8106 "auto"
8107 ],
8108 "format_description" : "none|lba|auto",
7aacca6f 8109 "optional" : 1,
44660702 8110 "type" : "string"
7aacca6f 8111 },
44660702
DM
8112 "volume" : {
8113 "alias" : "file"
8114 },
8115 "werror" : {
8116 "description" : "Write error action.",
8117 "enum" : [
8118 "enospc",
8119 "ignore",
8120 "report",
8121 "stop"
8122 ],
8123 "format_description" : "enospc|ignore|report|stop",
7aacca6f 8124 "optional" : 1,
44660702 8125 "type" : "string"
56122987
DM
8126 }
8127 },
7aacca6f 8128 "optional" : 1,
44660702 8129 "type" : "string"
7aacca6f 8130 },
44660702
DM
8131 "vmid" : {
8132 "description" : "The (unique) ID of the VM.",
8133 "format" : "pve-vmid",
8134 "minimum" : 1,
8135 "type" : "integer"
56122987 8136 },
44660702
DM
8137 "watchdog" : {
8138 "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)",
8139 "format" : "pve-qm-watchdog",
56122987 8140 "optional" : 1,
44660702 8141 "type" : "string"
56122987 8142 }
7aacca6f 8143 }
56122987 8144 },
56122987
DM
8145 "permissions" : {
8146 "check" : [
8147 "perm",
8148 "/vms/{vmid}",
8149 [
8150 "VM.Config.Disk",
8151 "VM.Config.CDROM",
8152 "VM.Config.CPU",
8153 "VM.Config.Memory",
8154 "VM.Config.Network",
8155 "VM.Config.HWType",
8156 "VM.Config.Options"
8157 ],
8158 "any",
8159 1
8160 ]
8161 },
44660702 8162 "protected" : 1,
7aacca6f 8163 "proxyto" : "node",
56122987 8164 "returns" : {
7aacca6f
DM
8165 "type" : "null"
8166 }
8167 }
8168 },
44660702
DM
8169 "leaf" : 1,
8170 "path" : "/nodes/{node}/qemu/{vmid}/config",
7aacca6f
DM
8171 "text" : "config"
8172 },
8173 {
8174 "info" : {
56122987 8175 "GET" : {
44660702 8176 "description" : "Get virtual machine configuration, including pending changes.",
56122987 8177 "method" : "GET",
44660702 8178 "name" : "vm_pending",
7aacca6f 8179 "parameters" : {
44660702 8180 "additionalProperties" : 0,
7aacca6f
DM
8181 "properties" : {
8182 "node" : {
7aacca6f 8183 "description" : "The cluster node name.",
44660702 8184 "format" : "pve-node",
7aacca6f
DM
8185 "type" : "string"
8186 },
8187 "vmid" : {
44660702 8188 "description" : "The (unique) ID of the VM.",
7aacca6f 8189 "format" : "pve-vmid",
44660702
DM
8190 "minimum" : 1,
8191 "type" : "integer"
7aacca6f 8192 }
44660702 8193 }
7aacca6f 8194 },
56122987
DM
8195 "permissions" : {
8196 "check" : [
8197 "perm",
8198 "/vms/{vmid}",
8199 [
8200 "VM.Audit"
8201 ]
8202 ]
8203 },
7aacca6f 8204 "proxyto" : "node",
44660702
DM
8205 "returns" : {
8206 "items" : {
8207 "properties" : {
8208 "delete" : {
8209 "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.",
8210 "maximum" : 2,
8211 "minimum" : 0,
8212 "optional" : 1,
8213 "type" : "integer"
8214 },
8215 "key" : {
8216 "description" : "Configuration option name.",
8217 "type" : "string"
8218 },
8219 "pending" : {
8220 "description" : "Pending value.",
8221 "optional" : 1,
8222 "type" : "string"
8223 },
8224 "value" : {
8225 "description" : "Current value.",
8226 "optional" : 1,
8227 "type" : "string"
8228 }
8229 },
8230 "type" : "object"
8231 },
8232 "type" : "array"
8233 }
56122987
DM
8234 }
8235 },
7aacca6f 8236 "leaf" : 1,
44660702
DM
8237 "path" : "/nodes/{node}/qemu/{vmid}/pending",
8238 "text" : "pending"
56122987
DM
8239 },
8240 {
56122987
DM
8241 "info" : {
8242 "PUT" : {
7aacca6f 8243 "description" : "Unlink/delete disk images.",
7aacca6f 8244 "method" : "PUT",
7aacca6f 8245 "name" : "unlink",
56122987 8246 "parameters" : {
44660702 8247 "additionalProperties" : 0,
56122987 8248 "properties" : {
7aacca6f 8249 "force" : {
44660702 8250 "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 8251 "optional" : 1,
44660702 8252 "type" : "boolean"
7aacca6f 8253 },
56122987
DM
8254 "idlist" : {
8255 "description" : "A list of disk IDs you want to delete.",
44660702
DM
8256 "format" : "pve-configid-list",
8257 "type" : "string"
8258 },
8259 "node" : {
8260 "description" : "The cluster node name.",
8261 "format" : "pve-node",
8262 "type" : "string"
56122987
DM
8263 },
8264 "vmid" : {
7aacca6f 8265 "description" : "The (unique) ID of the VM.",
44660702 8266 "format" : "pve-vmid",
7aacca6f 8267 "minimum" : 1,
44660702 8268 "type" : "integer"
56122987 8269 }
44660702
DM
8270 }
8271 },
8272 "permissions" : {
8273 "check" : [
8274 "perm",
8275 "/vms/{vmid}",
8276 [
8277 "VM.Config.Disk"
8278 ]
8279 ]
8280 },
8281 "protected" : 1,
8282 "proxyto" : "node",
8283 "returns" : {
8284 "type" : "null"
7aacca6f 8285 }
56122987 8286 }
7aacca6f 8287 },
44660702 8288 "leaf" : 1,
7aacca6f 8289 "path" : "/nodes/{node}/qemu/{vmid}/unlink",
44660702 8290 "text" : "unlink"
56122987
DM
8291 },
8292 {
56122987
DM
8293 "info" : {
8294 "POST" : {
7aacca6f 8295 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
8296 "method" : "POST",
8297 "name" : "vncproxy",
56122987 8298 "parameters" : {
44660702 8299 "additionalProperties" : 0,
56122987 8300 "properties" : {
44660702
DM
8301 "node" : {
8302 "description" : "The cluster node name.",
8303 "format" : "pve-node",
8304 "type" : "string"
8305 },
56122987 8306 "vmid" : {
7aacca6f 8307 "description" : "The (unique) ID of the VM.",
44660702 8308 "format" : "pve-vmid",
56122987 8309 "minimum" : 1,
44660702 8310 "type" : "integer"
7aacca6f
DM
8311 },
8312 "websocket" : {
8313 "description" : "starts websockify instead of vncproxy",
44660702
DM
8314 "optional" : 1,
8315 "type" : "boolean"
56122987 8316 }
44660702 8317 }
56122987 8318 },
44660702
DM
8319 "permissions" : {
8320 "check" : [
8321 "perm",
8322 "/vms/{vmid}",
8323 [
8324 "VM.Console"
8325 ]
8326 ]
8327 },
8328 "protected" : 1,
56122987 8329 "returns" : {
7aacca6f 8330 "additionalProperties" : 0,
56122987 8331 "properties" : {
7aacca6f 8332 "cert" : {
56122987
DM
8333 "type" : "string"
8334 },
56122987
DM
8335 "port" : {
8336 "type" : "integer"
8337 },
7aacca6f
DM
8338 "ticket" : {
8339 "type" : "string"
8340 },
44660702
DM
8341 "upid" : {
8342 "type" : "string"
8343 },
7aacca6f 8344 "user" : {
56122987
DM
8345 "type" : "string"
8346 }
7aacca6f 8347 }
56122987
DM
8348 }
8349 }
8350 },
44660702
DM
8351 "leaf" : 1,
8352 "path" : "/nodes/{node}/qemu/{vmid}/vncproxy",
7aacca6f 8353 "text" : "vncproxy"
56122987
DM
8354 },
8355 {
56122987
DM
8356 "info" : {
8357 "GET" : {
44660702
DM
8358 "description" : "Opens a weksocket for VNC traffic.",
8359 "method" : "GET",
8360 "name" : "vncwebsocket",
56122987 8361 "parameters" : {
44660702 8362 "additionalProperties" : 0,
56122987 8363 "properties" : {
7aacca6f 8364 "node" : {
7aacca6f 8365 "description" : "The cluster node name.",
44660702 8366 "format" : "pve-node",
7aacca6f
DM
8367 "type" : "string"
8368 },
44660702
DM
8369 "port" : {
8370 "description" : "Port number returned by previous vncproxy call.",
8371 "maximum" : 5999,
8372 "minimum" : 5900,
8373 "type" : "integer"
56122987 8374 },
7aacca6f 8375 "vmid" : {
44660702 8376 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8377 "format" : "pve-vmid",
8378 "minimum" : 1,
44660702
DM
8379 "type" : "integer"
8380 },
8381 "vncticket" : {
8382 "description" : "Ticket from previous call to vncproxy.",
8383 "maxLength" : 512,
8384 "type" : "string"
56122987 8385 }
44660702
DM
8386 }
8387 },
8388 "permissions" : {
8389 "check" : [
8390 "perm",
8391 "/vms/{vmid}",
8392 [
8393 "VM.Console"
8394 ]
8395 ],
8396 "description" : "You also need to pass a valid ticket (vncticket)."
56122987 8397 },
7aacca6f
DM
8398 "returns" : {
8399 "properties" : {
8400 "port" : {
8401 "type" : "string"
8402 }
8403 },
8404 "type" : "object"
8405 }
56122987
DM
8406 }
8407 },
7aacca6f 8408 "leaf" : 1,
44660702
DM
8409 "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket",
8410 "text" : "vncwebsocket"
56122987
DM
8411 },
8412 {
8413 "info" : {
8414 "POST" : {
44660702
DM
8415 "description" : "Returns a SPICE configuration to connect to the VM.",
8416 "method" : "POST",
7aacca6f
DM
8417 "name" : "spiceproxy",
8418 "parameters" : {
44660702 8419 "additionalProperties" : 0,
56122987 8420 "properties" : {
44660702
DM
8421 "node" : {
8422 "description" : "The cluster node name.",
8423 "format" : "pve-node",
8424 "type" : "string"
8425 },
7aacca6f 8426 "proxy" : {
44660702 8427 "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 8428 "format" : "address",
7aacca6f 8429 "optional" : 1,
44660702 8430 "type" : "string"
56122987 8431 },
7aacca6f 8432 "vmid" : {
44660702 8433 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8434 "format" : "pve-vmid",
8435 "minimum" : 1,
44660702 8436 "type" : "integer"
56122987 8437 }
44660702 8438 }
56122987 8439 },
56122987
DM
8440 "permissions" : {
8441 "check" : [
8442 "perm",
8443 "/vms/{vmid}",
8444 [
8445 "VM.Console"
8446 ]
8447 ]
8448 },
44660702
DM
8449 "protected" : 1,
8450 "proxyto" : "node",
7aacca6f 8451 "returns" : {
44660702
DM
8452 "additionalProperties" : 1,
8453 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 8454 "properties" : {
44660702 8455 "host" : {
7aacca6f
DM
8456 "type" : "string"
8457 },
7aacca6f
DM
8458 "password" : {
8459 "type" : "string"
8460 },
44660702 8461 "proxy" : {
7aacca6f
DM
8462 "type" : "string"
8463 },
44660702
DM
8464 "tls-port" : {
8465 "type" : "integer"
8466 },
8467 "type" : {
7aacca6f
DM
8468 "type" : "string"
8469 }
44660702 8470 }
7aacca6f
DM
8471 }
8472 }
8473 },
44660702
DM
8474 "leaf" : 1,
8475 "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy",
7aacca6f
DM
8476 "text" : "spiceproxy"
8477 },
8478 {
56122987
DM
8479 "children" : [
8480 {
56122987
DM
8481 "info" : {
8482 "GET" : {
44660702
DM
8483 "description" : "Get virtual machine status.",
8484 "method" : "GET",
8485 "name" : "vm_status",
56122987 8486 "parameters" : {
44660702 8487 "additionalProperties" : 0,
56122987 8488 "properties" : {
44660702
DM
8489 "node" : {
8490 "description" : "The cluster node name.",
8491 "format" : "pve-node",
8492 "type" : "string"
8493 },
56122987 8494 "vmid" : {
44660702 8495 "description" : "The (unique) ID of the VM.",
7aacca6f 8496 "format" : "pve-vmid",
56122987 8497 "minimum" : 1,
7aacca6f 8498 "type" : "integer"
56122987 8499 }
44660702 8500 }
56122987
DM
8501 },
8502 "permissions" : {
8503 "check" : [
8504 "perm",
8505 "/vms/{vmid}",
8506 [
8507 "VM.Audit"
8508 ]
8509 ]
8510 },
44660702 8511 "protected" : 1,
7aacca6f 8512 "proxyto" : "node",
56122987
DM
8513 "returns" : {
8514 "type" : "object"
7aacca6f 8515 }
56122987 8516 }
7aacca6f 8517 },
7aacca6f 8518 "leaf" : 1,
44660702
DM
8519 "path" : "/nodes/{node}/qemu/{vmid}/status/current",
8520 "text" : "current"
56122987
DM
8521 },
8522 {
56122987
DM
8523 "info" : {
8524 "POST" : {
44660702 8525 "description" : "Start virtual machine.",
56122987 8526 "method" : "POST",
44660702 8527 "name" : "vm_start",
56122987 8528 "parameters" : {
44660702 8529 "additionalProperties" : 0,
56122987 8530 "properties" : {
44660702
DM
8531 "machine" : {
8532 "description" : "Specific the Qemu machine type.",
8533 "maxLength" : 40,
8534 "optional" : 1,
8535 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
8536 "type" : "string"
8537 },
8538 "migratedfrom" : {
8539 "description" : "The cluster node name.",
8540 "format" : "pve-node",
56122987 8541 "optional" : 1,
44660702 8542 "type" : "string"
56122987 8543 },
7aacca6f 8544 "node" : {
7aacca6f 8545 "description" : "The cluster node name.",
44660702
DM
8546 "format" : "pve-node",
8547 "type" : "string"
7aacca6f 8548 },
44660702
DM
8549 "skiplock" : {
8550 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8551 "optional" : 1,
44660702 8552 "type" : "boolean"
56122987 8553 },
44660702
DM
8554 "stateuri" : {
8555 "description" : "Some command save/restore state from this location.",
8556 "maxLength" : 128,
56122987 8557 "optional" : 1,
44660702 8558 "type" : "string"
56122987
DM
8559 },
8560 "vmid" : {
7aacca6f 8561 "description" : "The (unique) ID of the VM.",
44660702
DM
8562 "format" : "pve-vmid",
8563 "minimum" : 1,
7aacca6f 8564 "type" : "integer"
56122987 8565 }
44660702 8566 }
7aacca6f 8567 },
56122987
DM
8568 "permissions" : {
8569 "check" : [
8570 "perm",
8571 "/vms/{vmid}",
8572 [
8573 "VM.PowerMgmt"
8574 ]
8575 ]
44660702
DM
8576 },
8577 "protected" : 1,
8578 "proxyto" : "node",
8579 "returns" : {
8580 "type" : "string"
56122987
DM
8581 }
8582 }
44660702
DM
8583 },
8584 "leaf" : 1,
8585 "path" : "/nodes/{node}/qemu/{vmid}/status/start",
8586 "text" : "start"
56122987
DM
8587 },
8588 {
56122987
DM
8589 "info" : {
8590 "POST" : {
7aacca6f 8591 "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
8592 "method" : "POST",
8593 "name" : "vm_stop",
56122987 8594 "parameters" : {
44660702 8595 "additionalProperties" : 0,
56122987 8596 "properties" : {
44660702
DM
8597 "keepActive" : {
8598 "default" : 0,
8599 "description" : "Do not decativate storage volumes.",
56122987 8600 "optional" : 1,
44660702 8601 "type" : "boolean"
56122987
DM
8602 },
8603 "migratedfrom" : {
56122987 8604 "description" : "The cluster node name.",
44660702 8605 "format" : "pve-node",
7aacca6f 8606 "optional" : 1,
44660702 8607 "type" : "string"
7aacca6f 8608 },
44660702
DM
8609 "node" : {
8610 "description" : "The cluster node name.",
8611 "format" : "pve-node",
8612 "type" : "string"
56122987
DM
8613 },
8614 "skiplock" : {
8615 "description" : "Ignore locks - only root is allowed to use this option.",
8616 "optional" : 1,
8617 "type" : "boolean"
8618 },
44660702
DM
8619 "timeout" : {
8620 "description" : "Wait maximal timeout seconds.",
8621 "minimum" : 0,
56122987 8622 "optional" : 1,
44660702 8623 "type" : "integer"
7aacca6f 8624 },
44660702
DM
8625 "vmid" : {
8626 "description" : "The (unique) ID of the VM.",
8627 "format" : "pve-vmid",
8628 "minimum" : 1,
8629 "type" : "integer"
56122987 8630 }
44660702 8631 }
56122987 8632 },
56122987
DM
8633 "permissions" : {
8634 "check" : [
8635 "perm",
8636 "/vms/{vmid}",
8637 [
8638 "VM.PowerMgmt"
8639 ]
8640 ]
8641 },
44660702
DM
8642 "protected" : 1,
8643 "proxyto" : "node",
7aacca6f
DM
8644 "returns" : {
8645 "type" : "string"
44660702
DM
8646 }
8647 }
8648 },
8649 "leaf" : 1,
8650 "path" : "/nodes/{node}/qemu/{vmid}/status/stop",
8651 "text" : "stop"
8652 },
8653 {
8654 "info" : {
8655 "POST" : {
8656 "description" : "Reset virtual machine.",
8657 "method" : "POST",
8658 "name" : "vm_reset",
56122987 8659 "parameters" : {
7aacca6f 8660 "additionalProperties" : 0,
56122987 8661 "properties" : {
56122987
DM
8662 "node" : {
8663 "description" : "The cluster node name.",
44660702
DM
8664 "format" : "pve-node",
8665 "type" : "string"
56122987
DM
8666 },
8667 "skiplock" : {
44660702 8668 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8669 "optional" : 1,
44660702 8670 "type" : "boolean"
7aacca6f
DM
8671 },
8672 "vmid" : {
44660702 8673 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8674 "format" : "pve-vmid",
8675 "minimum" : 1,
44660702 8676 "type" : "integer"
56122987 8677 }
7aacca6f 8678 }
56122987 8679 },
7aacca6f
DM
8680 "permissions" : {
8681 "check" : [
8682 "perm",
8683 "/vms/{vmid}",
8684 [
8685 "VM.PowerMgmt"
8686 ]
8687 ]
8688 },
44660702 8689 "protected" : 1,
7aacca6f 8690 "proxyto" : "node",
56122987
DM
8691 "returns" : {
8692 "type" : "string"
44660702
DM
8693 }
8694 }
8695 },
8696 "leaf" : 1,
8697 "path" : "/nodes/{node}/qemu/{vmid}/status/reset",
8698 "text" : "reset"
8699 },
8700 {
8701 "info" : {
8702 "POST" : {
8703 "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.",
8704 "method" : "POST",
56122987 8705 "name" : "vm_shutdown",
56122987 8706 "parameters" : {
7aacca6f 8707 "additionalProperties" : 0,
56122987 8708 "properties" : {
56122987 8709 "forceStop" : {
56122987 8710 "default" : 0,
44660702 8711 "description" : "Make sure the VM stops.",
7aacca6f 8712 "optional" : 1,
44660702 8713 "type" : "boolean"
56122987
DM
8714 },
8715 "keepActive" : {
7aacca6f 8716 "default" : 0,
44660702
DM
8717 "description" : "Do not decativate storage volumes.",
8718 "optional" : 1,
8719 "type" : "boolean"
8720 },
8721 "node" : {
8722 "description" : "The cluster node name.",
8723 "format" : "pve-node",
8724 "type" : "string"
8725 },
8726 "skiplock" : {
8727 "description" : "Ignore locks - only root is allowed to use this option.",
8728 "optional" : 1,
8729 "type" : "boolean"
56122987 8730 },
7aacca6f 8731 "timeout" : {
7aacca6f 8732 "description" : "Wait maximal timeout seconds.",
44660702 8733 "minimum" : 0,
7aacca6f
DM
8734 "optional" : 1,
8735 "type" : "integer"
8736 },
56122987 8737 "vmid" : {
7aacca6f 8738 "description" : "The (unique) ID of the VM.",
44660702
DM
8739 "format" : "pve-vmid",
8740 "minimum" : 1,
7aacca6f 8741 "type" : "integer"
56122987 8742 }
7aacca6f 8743 }
56122987 8744 },
44660702
DM
8745 "permissions" : {
8746 "check" : [
8747 "perm",
8748 "/vms/{vmid}",
8749 [
8750 "VM.PowerMgmt"
8751 ]
8752 ]
8753 },
7aacca6f 8754 "protected" : 1,
44660702
DM
8755 "proxyto" : "node",
8756 "returns" : {
8757 "type" : "string"
8758 }
56122987
DM
8759 }
8760 },
44660702 8761 "leaf" : 1,
7aacca6f 8762 "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown",
44660702 8763 "text" : "shutdown"
56122987
DM
8764 },
8765 {
56122987
DM
8766 "info" : {
8767 "POST" : {
44660702 8768 "description" : "Suspend virtual machine.",
56122987 8769 "method" : "POST",
44660702 8770 "name" : "vm_suspend",
7aacca6f 8771 "parameters" : {
44660702 8772 "additionalProperties" : 0,
7aacca6f
DM
8773 "properties" : {
8774 "node" : {
7aacca6f 8775 "description" : "The cluster node name.",
44660702
DM
8776 "format" : "pve-node",
8777 "type" : "string"
7aacca6f
DM
8778 },
8779 "skiplock" : {
8780 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
8781 "optional" : 1,
8782 "type" : "boolean"
8783 },
8784 "vmid" : {
8785 "description" : "The (unique) ID of the VM.",
8786 "format" : "pve-vmid",
8787 "minimum" : 1,
8788 "type" : "integer"
8789 }
8790 }
56122987
DM
8791 },
8792 "permissions" : {
8793 "check" : [
8794 "perm",
8795 "/vms/{vmid}",
8796 [
8797 "VM.PowerMgmt"
8798 ]
8799 ]
8800 },
44660702
DM
8801 "protected" : 1,
8802 "proxyto" : "node",
8803 "returns" : {
8804 "type" : "string"
8805 }
56122987
DM
8806 }
8807 },
44660702 8808 "leaf" : 1,
7aacca6f 8809 "path" : "/nodes/{node}/qemu/{vmid}/status/suspend",
44660702 8810 "text" : "suspend"
56122987
DM
8811 },
8812 {
56122987
DM
8813 "info" : {
8814 "POST" : {
44660702
DM
8815 "description" : "Resume virtual machine.",
8816 "method" : "POST",
7aacca6f 8817 "name" : "vm_resume",
56122987
DM
8818 "parameters" : {
8819 "additionalProperties" : 0,
8820 "properties" : {
44660702
DM
8821 "nocheck" : {
8822 "optional" : 1,
8823 "type" : "boolean"
8824 },
7aacca6f 8825 "node" : {
44660702 8826 "description" : "The cluster node name.",
7aacca6f 8827 "format" : "pve-node",
44660702 8828 "type" : "string"
56122987
DM
8829 },
8830 "skiplock" : {
56122987 8831 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
8832 "optional" : 1,
8833 "type" : "boolean"
56122987 8834 },
7aacca6f 8835 "vmid" : {
7aacca6f
DM
8836 "description" : "The (unique) ID of the VM.",
8837 "format" : "pve-vmid",
44660702
DM
8838 "minimum" : 1,
8839 "type" : "integer"
56122987
DM
8840 }
8841 }
8842 },
8843 "permissions" : {
8844 "check" : [
8845 "perm",
8846 "/vms/{vmid}",
8847 [
8848 "VM.PowerMgmt"
8849 ]
8850 ]
8851 },
44660702
DM
8852 "protected" : 1,
8853 "proxyto" : "node",
56122987
DM
8854 "returns" : {
8855 "type" : "string"
7aacca6f 8856 }
56122987
DM
8857 }
8858 },
44660702
DM
8859 "leaf" : 1,
8860 "path" : "/nodes/{node}/qemu/{vmid}/status/resume",
7aacca6f 8861 "text" : "resume"
56122987
DM
8862 }
8863 ],
8864 "info" : {
44660702
DM
8865 "GET" : {
8866 "description" : "Directory index",
8867 "method" : "GET",
8868 "name" : "vmcmdidx",
56122987 8869 "parameters" : {
44660702 8870 "additionalProperties" : 0,
56122987 8871 "properties" : {
44660702
DM
8872 "node" : {
8873 "description" : "The cluster node name.",
8874 "format" : "pve-node",
7aacca6f
DM
8875 "type" : "string"
8876 },
56122987 8877 "vmid" : {
7aacca6f 8878 "description" : "The (unique) ID of the VM.",
44660702
DM
8879 "format" : "pve-vmid",
8880 "minimum" : 1,
7aacca6f 8881 "type" : "integer"
56122987 8882 }
44660702 8883 }
56122987 8884 },
44660702
DM
8885 "permissions" : {
8886 "user" : "all"
8887 },
8888 "proxyto" : "node",
8889 "returns" : {
8890 "items" : {
8891 "properties" : {
8892 "subdir" : {
8893 "type" : "string"
8894 }
8895 },
8896 "type" : "object"
8897 },
8898 "links" : [
8899 {
8900 "href" : "{subdir}",
8901 "rel" : "child"
8902 }
8903 ],
8904 "type" : "array"
8905 }
56122987 8906 }
7aacca6f 8907 },
44660702
DM
8908 "leaf" : 0,
8909 "path" : "/nodes/{node}/qemu/{vmid}/status",
8910 "text" : "status"
56122987
DM
8911 },
8912 {
56122987 8913 "info" : {
44660702
DM
8914 "PUT" : {
8915 "description" : "Send key event to virtual machine.",
8916 "method" : "PUT",
8917 "name" : "vm_sendkey",
8918 "parameters" : {
8919 "additionalProperties" : 0,
56122987 8920 "properties" : {
44660702
DM
8921 "key" : {
8922 "description" : "The key (qemu monitor encoding).",
8923 "type" : "string"
8924 },
8925 "node" : {
8926 "description" : "The cluster node name.",
8927 "format" : "pve-node",
8928 "type" : "string"
8929 },
8930 "skiplock" : {
8931 "description" : "Ignore locks - only root is allowed to use this option.",
8932 "optional" : 1,
56122987 8933 "type" : "boolean"
7aacca6f 8934 },
44660702
DM
8935 "vmid" : {
8936 "description" : "The (unique) ID of the VM.",
8937 "format" : "pve-vmid",
8938 "minimum" : 1,
8939 "type" : "integer"
56122987 8940 }
7aacca6f 8941 }
56122987 8942 },
56122987
DM
8943 "permissions" : {
8944 "check" : [
8945 "perm",
8946 "/vms/{vmid}",
8947 [
44660702 8948 "VM.Console"
56122987
DM
8949 ]
8950 ]
8951 },
7aacca6f 8952 "protected" : 1,
44660702
DM
8953 "proxyto" : "node",
8954 "returns" : {
8955 "type" : "null"
8956 }
8957 }
8958 },
8959 "leaf" : 1,
8960 "path" : "/nodes/{node}/qemu/{vmid}/sendkey",
8961 "text" : "sendkey"
8962 },
8963 {
8964 "info" : {
8965 "GET" : {
8966 "description" : "Check if feature for virtual machine is available.",
8967 "method" : "GET",
7aacca6f 8968 "name" : "vm_feature",
56122987 8969 "parameters" : {
44660702 8970 "additionalProperties" : 0,
56122987 8971 "properties" : {
56122987 8972 "feature" : {
44660702 8973 "description" : "Feature to check.",
56122987
DM
8974 "enum" : [
8975 "snapshot",
8976 "clone",
8977 "copy"
8978 ],
44660702
DM
8979 "type" : "string"
8980 },
8981 "node" : {
8982 "description" : "The cluster node name.",
8983 "format" : "pve-node",
7aacca6f 8984 "type" : "string"
56122987
DM
8985 },
8986 "snapname" : {
56122987 8987 "description" : "The name of the snapshot.",
44660702
DM
8988 "format" : "pve-configid",
8989 "maxLength" : 40,
7aacca6f
DM
8990 "optional" : 1,
8991 "type" : "string"
8992 },
44660702
DM
8993 "vmid" : {
8994 "description" : "The (unique) ID of the VM.",
8995 "format" : "pve-vmid",
8996 "minimum" : 1,
8997 "type" : "integer"
8998 }
8999 }
9000 },
9001 "permissions" : {
9002 "check" : [
9003 "perm",
9004 "/vms/{vmid}",
9005 [
9006 "VM.Audit"
9007 ]
9008 ]
9009 },
9010 "protected" : 1,
9011 "proxyto" : "node",
9012 "returns" : {
9013 "properties" : {
9014 "hasFeature" : {
9015 "type" : "boolean"
9016 },
9017 "nodes" : {
9018 "items" : {
9019 "type" : "string"
9020 },
9021 "type" : "array"
56122987
DM
9022 }
9023 },
44660702 9024 "type" : "object"
56122987
DM
9025 }
9026 }
9027 },
7aacca6f 9028 "leaf" : 1,
44660702
DM
9029 "path" : "/nodes/{node}/qemu/{vmid}/feature",
9030 "text" : "feature"
56122987
DM
9031 },
9032 {
56122987
DM
9033 "info" : {
9034 "POST" : {
44660702 9035 "description" : "Create a copy of virtual machine/template.",
56122987 9036 "method" : "POST",
7aacca6f 9037 "name" : "clone_vm",
56122987
DM
9038 "parameters" : {
9039 "additionalProperties" : 0,
9040 "properties" : {
44660702
DM
9041 "description" : {
9042 "description" : "Description for the new VM.",
56122987 9043 "optional" : 1,
7aacca6f 9044 "type" : "string"
56122987 9045 },
44660702
DM
9046 "format" : {
9047 "description" : "Target format for file storage.",
9048 "enum" : [
9049 "raw",
9050 "qcow2",
9051 "vmdk"
9052 ],
9053 "optional" : 1,
9054 "requires" : "full",
56122987
DM
9055 "type" : "string"
9056 },
44660702
DM
9057 "full" : {
9058 "default" : 0,
9059 "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 9060 "optional" : 1,
44660702
DM
9061 "type" : "boolean"
9062 },
9063 "name" : {
56122987 9064 "description" : "Set a name for the new VM.",
44660702
DM
9065 "format" : "dns-name",
9066 "optional" : 1,
9067 "type" : "string"
9068 },
9069 "newid" : {
9070 "description" : "VMID for the clone.",
9071 "format" : "pve-vmid",
9072 "minimum" : 1,
9073 "type" : "integer"
9074 },
9075 "node" : {
9076 "description" : "The cluster node name.",
9077 "format" : "pve-node",
9078 "type" : "string"
7aacca6f
DM
9079 },
9080 "pool" : {
9081 "description" : "Add the new VM to the specified pool.",
44660702 9082 "format" : "pve-poolid",
56122987 9083 "optional" : 1,
44660702 9084 "type" : "string"
56122987 9085 },
44660702
DM
9086 "snapname" : {
9087 "description" : "The name of the snapshot.",
9088 "format" : "pve-configid",
9089 "maxLength" : 40,
7aacca6f
DM
9090 "optional" : 1,
9091 "type" : "string"
56122987 9092 },
44660702
DM
9093 "storage" : {
9094 "description" : "Target storage for full clone.",
9095 "format" : "pve-storage-id",
7aacca6f 9096 "optional" : 1,
44660702
DM
9097 "requires" : "full",
9098 "type" : "string"
56122987 9099 },
44660702
DM
9100 "target" : {
9101 "description" : "Target node. Only allowed if the original VM is on shared storage.",
9102 "format" : "pve-node",
56122987 9103 "optional" : 1,
56122987 9104 "type" : "string"
44660702
DM
9105 },
9106 "vmid" : {
9107 "description" : "The (unique) ID of the VM.",
9108 "format" : "pve-vmid",
9109 "minimum" : 1,
9110 "type" : "integer"
56122987
DM
9111 }
9112 }
9113 },
56122987
DM
9114 "permissions" : {
9115 "check" : [
9116 "and",
9117 [
9118 "perm",
9119 "/vms/{vmid}",
9120 [
9121 "VM.Clone"
9122 ]
9123 ],
9124 [
9125 "or",
9126 [
9127 "perm",
9128 "/vms/{newid}",
9129 [
9130 "VM.Allocate"
9131 ]
9132 ],
9133 [
9134 "perm",
9135 "/pool/{pool}",
9136 [
9137 "VM.Allocate"
9138 ],
9139 "require_param",
9140 "pool"
9141 ]
9142 ]
44660702
DM
9143 ],
9144 "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."
9145 },
9146 "protected" : 1,
9147 "proxyto" : "node",
9148 "returns" : {
9149 "type" : "string"
56122987
DM
9150 }
9151 }
9152 },
44660702
DM
9153 "leaf" : 1,
9154 "path" : "/nodes/{node}/qemu/{vmid}/clone",
56122987
DM
9155 "text" : "clone"
9156 },
9157 {
56122987
DM
9158 "info" : {
9159 "POST" : {
7aacca6f 9160 "description" : "Move volume to different storage.",
44660702
DM
9161 "method" : "POST",
9162 "name" : "move_vm_disk",
56122987
DM
9163 "parameters" : {
9164 "additionalProperties" : 0,
9165 "properties" : {
9166 "delete" : {
44660702 9167 "default" : 0,
56122987 9168 "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.",
7aacca6f 9169 "optional" : 1,
44660702 9170 "type" : "boolean"
56122987 9171 },
44660702
DM
9172 "digest" : {
9173 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9174 "maxLength" : 40,
9175 "optional" : 1,
9176 "type" : "string"
56122987 9177 },
56122987 9178 "disk" : {
56122987
DM
9179 "description" : "The disk you want to move.",
9180 "enum" : [
9181 "ide0",
9182 "ide1",
9183 "ide2",
9184 "ide3",
9185 "scsi0",
9186 "scsi1",
9187 "scsi2",
9188 "scsi3",
9189 "scsi4",
9190 "scsi5",
9191 "scsi6",
9192 "scsi7",
9193 "scsi8",
9194 "scsi9",
9195 "scsi10",
9196 "scsi11",
9197 "scsi12",
9198 "scsi13",
9199 "virtio0",
9200 "virtio1",
9201 "virtio2",
9202 "virtio3",
9203 "virtio4",
9204 "virtio5",
9205 "virtio6",
9206 "virtio7",
9207 "virtio8",
9208 "virtio9",
9209 "virtio10",
9210 "virtio11",
9211 "virtio12",
9212 "virtio13",
9213 "virtio14",
9214 "virtio15",
9215 "sata0",
9216 "sata1",
9217 "sata2",
9218 "sata3",
9219 "sata4",
9220 "sata5"
44660702
DM
9221 ],
9222 "type" : "string"
7aacca6f
DM
9223 },
9224 "format" : {
9225 "description" : "Target Format.",
9226 "enum" : [
9227 "raw",
9228 "qcow2",
9229 "vmdk"
9230 ],
9231 "optional" : 1,
9232 "type" : "string"
44660702
DM
9233 },
9234 "node" : {
9235 "description" : "The cluster node name.",
9236 "format" : "pve-node",
9237 "type" : "string"
9238 },
9239 "storage" : {
9240 "description" : "Target storage.",
9241 "format" : "pve-storage-id",
9242 "type" : "string"
9243 },
9244 "vmid" : {
9245 "description" : "The (unique) ID of the VM.",
9246 "format" : "pve-vmid",
9247 "minimum" : 1,
9248 "type" : "integer"
56122987
DM
9249 }
9250 }
9251 },
44660702
DM
9252 "permissions" : {
9253 "check" : [
9254 "and",
9255 [
9256 "perm",
9257 "/vms/{vmid}",
9258 [
9259 "VM.Config.Disk"
9260 ]
9261 ],
9262 [
9263 "perm",
9264 "/storage/{storage}",
9265 [
9266 "Datastore.AllocateSpace"
9267 ]
9268 ]
9269 ],
9270 "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage."
9271 },
9272 "protected" : 1,
9273 "proxyto" : "node",
9274 "returns" : {
9275 "description" : "the task ID.",
9276 "type" : "string"
9277 }
56122987 9278 }
7aacca6f 9279 },
44660702 9280 "leaf" : 1,
7aacca6f 9281 "path" : "/nodes/{node}/qemu/{vmid}/move_disk",
44660702 9282 "text" : "move_disk"
56122987
DM
9283 },
9284 {
56122987
DM
9285 "info" : {
9286 "POST" : {
7aacca6f 9287 "description" : "Migrate virtual machine. Creates a new migration task.",
44660702 9288 "method" : "POST",
7aacca6f 9289 "name" : "migrate_vm",
56122987 9290 "parameters" : {
44660702 9291 "additionalProperties" : 0,
56122987 9292 "properties" : {
44660702
DM
9293 "force" : {
9294 "description" : "Allow to migrate VMs which use local devices. Only root may use this option.",
9295 "optional" : 1,
9296 "type" : "boolean"
9297 },
7aacca6f 9298 "node" : {
44660702 9299 "description" : "The cluster node name.",
7aacca6f 9300 "format" : "pve-node",
44660702 9301 "type" : "string"
56122987
DM
9302 },
9303 "online" : {
44660702 9304 "description" : "Use online/live migration.",
56122987 9305 "optional" : 1,
44660702 9306 "type" : "boolean"
56122987 9307 },
44660702
DM
9308 "target" : {
9309 "description" : "Target node.",
9310 "format" : "pve-node",
9311 "type" : "string"
56122987 9312 },
7aacca6f 9313 "vmid" : {
7aacca6f 9314 "description" : "The (unique) ID of the VM.",
44660702 9315 "format" : "pve-vmid",
7aacca6f 9316 "minimum" : 1,
44660702 9317 "type" : "integer"
56122987 9318 }
44660702
DM
9319 }
9320 },
9321 "permissions" : {
9322 "check" : [
9323 "perm",
9324 "/vms/{vmid}",
9325 [
9326 "VM.Migrate"
9327 ]
9328 ]
56122987
DM
9329 },
9330 "protected" : 1,
44660702
DM
9331 "proxyto" : "node",
9332 "returns" : {
9333 "description" : "the task ID.",
9334 "type" : "string"
9335 }
56122987 9336 }
7aacca6f 9337 },
44660702
DM
9338 "leaf" : 1,
9339 "path" : "/nodes/{node}/qemu/{vmid}/migrate",
7aacca6f 9340 "text" : "migrate"
56122987
DM
9341 },
9342 {
9343 "info" : {
9344 "POST" : {
44660702 9345 "description" : "Execute Qemu monitor commands.",
56122987 9346 "method" : "POST",
44660702 9347 "name" : "monitor",
56122987 9348 "parameters" : {
7aacca6f 9349 "additionalProperties" : 0,
56122987 9350 "properties" : {
44660702
DM
9351 "command" : {
9352 "description" : "The monitor command.",
9353 "type" : "string"
9354 },
56122987 9355 "node" : {
44660702 9356 "description" : "The cluster node name.",
7aacca6f 9357 "format" : "pve-node",
44660702 9358 "type" : "string"
56122987
DM
9359 },
9360 "vmid" : {
44660702 9361 "description" : "The (unique) ID of the VM.",
56122987 9362 "format" : "pve-vmid",
7aacca6f 9363 "minimum" : 1,
44660702 9364 "type" : "integer"
56122987 9365 }
7aacca6f 9366 }
56122987 9367 },
56122987
DM
9368 "permissions" : {
9369 "check" : [
9370 "perm",
9371 "/vms/{vmid}",
9372 [
9373 "VM.Monitor"
9374 ]
9375 ]
7aacca6f 9376 },
44660702
DM
9377 "protected" : 1,
9378 "proxyto" : "node",
9379 "returns" : {
9380 "type" : "string"
9381 }
56122987 9382 }
44660702
DM
9383 },
9384 "leaf" : 1,
9385 "path" : "/nodes/{node}/qemu/{vmid}/monitor",
9386 "text" : "monitor"
56122987
DM
9387 },
9388 {
56122987
DM
9389 "info" : {
9390 "PUT" : {
44660702
DM
9391 "description" : "Extend volume size.",
9392 "method" : "PUT",
9393 "name" : "resize_vm",
56122987 9394 "parameters" : {
44660702 9395 "additionalProperties" : 0,
56122987 9396 "properties" : {
44660702
DM
9397 "digest" : {
9398 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9399 "maxLength" : 40,
9400 "optional" : 1,
56122987
DM
9401 "type" : "string"
9402 },
56122987
DM
9403 "disk" : {
9404 "description" : "The disk you want to resize.",
9405 "enum" : [
9406 "ide0",
9407 "ide1",
9408 "ide2",
9409 "ide3",
9410 "scsi0",
9411 "scsi1",
9412 "scsi2",
9413 "scsi3",
9414 "scsi4",
9415 "scsi5",
9416 "scsi6",
9417 "scsi7",
9418 "scsi8",
9419 "scsi9",
9420 "scsi10",
9421 "scsi11",
9422 "scsi12",
9423 "scsi13",
9424 "virtio0",
9425 "virtio1",
9426 "virtio2",
9427 "virtio3",
9428 "virtio4",
9429 "virtio5",
9430 "virtio6",
9431 "virtio7",
9432 "virtio8",
9433 "virtio9",
9434 "virtio10",
9435 "virtio11",
9436 "virtio12",
9437 "virtio13",
9438 "virtio14",
9439 "virtio15",
9440 "sata0",
9441 "sata1",
9442 "sata2",
9443 "sata3",
9444 "sata4",
9445 "sata5"
44660702
DM
9446 ],
9447 "type" : "string"
56122987 9448 },
44660702
DM
9449 "node" : {
9450 "description" : "The cluster node name.",
9451 "format" : "pve-node",
9452 "type" : "string"
7aacca6f 9453 },
44660702
DM
9454 "size" : {
9455 "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.",
9456 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
9457 "type" : "string"
56122987
DM
9458 },
9459 "skiplock" : {
9460 "description" : "Ignore locks - only root is allowed to use this option.",
9461 "optional" : 1,
9462 "type" : "boolean"
56122987
DM
9463 },
9464 "vmid" : {
7aacca6f 9465 "description" : "The (unique) ID of the VM.",
56122987 9466 "format" : "pve-vmid",
44660702
DM
9467 "minimum" : 1,
9468 "type" : "integer"
56122987
DM
9469 }
9470 }
9471 },
9472 "permissions" : {
9473 "check" : [
9474 "perm",
9475 "/vms/{vmid}",
9476 [
44660702 9477 "VM.Config.Disk"
56122987
DM
9478 ]
9479 ]
9480 },
7aacca6f 9481 "protected" : 1,
7aacca6f 9482 "proxyto" : "node",
44660702
DM
9483 "returns" : {
9484 "type" : "null"
9485 }
7aacca6f
DM
9486 }
9487 },
44660702
DM
9488 "leaf" : 1,
9489 "path" : "/nodes/{node}/qemu/{vmid}/resize",
9490 "text" : "resize"
9491 },
9492 {
56122987
DM
9493 "children" : [
9494 {
9495 "children" : [
9496 {
56122987 9497 "info" : {
44660702
DM
9498 "GET" : {
9499 "description" : "Get snapshot configuration",
9500 "method" : "GET",
9501 "name" : "get_snapshot_config",
56122987 9502 "parameters" : {
44660702 9503 "additionalProperties" : 0,
56122987 9504 "properties" : {
56122987 9505 "node" : {
44660702 9506 "description" : "The cluster node name.",
56122987 9507 "format" : "pve-node",
44660702 9508 "type" : "string"
7aacca6f
DM
9509 },
9510 "snapname" : {
44660702 9511 "description" : "The name of the snapshot.",
7aacca6f 9512 "format" : "pve-configid",
44660702
DM
9513 "maxLength" : 40,
9514 "type" : "string"
7aacca6f
DM
9515 },
9516 "vmid" : {
44660702 9517 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
9518 "format" : "pve-vmid",
9519 "minimum" : 1,
44660702 9520 "type" : "integer"
56122987 9521 }
44660702 9522 }
56122987
DM
9523 },
9524 "permissions" : {
9525 "check" : [
9526 "perm",
9527 "/vms/{vmid}",
9528 [
9529 "VM.Snapshot"
9530 ]
9531 ]
9532 },
44660702 9533 "proxyto" : "node",
56122987 9534 "returns" : {
44660702 9535 "type" : "object"
7aacca6f
DM
9536 }
9537 },
44660702
DM
9538 "PUT" : {
9539 "description" : "Update snapshot metadata.",
9540 "method" : "PUT",
9541 "name" : "update_snapshot_config",
56122987 9542 "parameters" : {
44660702 9543 "additionalProperties" : 0,
56122987 9544 "properties" : {
44660702
DM
9545 "description" : {
9546 "description" : "A textual description or comment.",
9547 "optional" : 1,
9548 "type" : "string"
9549 },
56122987 9550 "node" : {
7aacca6f 9551 "description" : "The cluster node name.",
44660702
DM
9552 "format" : "pve-node",
9553 "type" : "string"
56122987 9554 },
56122987
DM
9555 "snapname" : {
9556 "description" : "The name of the snapshot.",
44660702 9557 "format" : "pve-configid",
7aacca6f 9558 "maxLength" : 40,
44660702 9559 "type" : "string"
7aacca6f
DM
9560 },
9561 "vmid" : {
9562 "description" : "The (unique) ID of the VM.",
44660702 9563 "format" : "pve-vmid",
7aacca6f 9564 "minimum" : 1,
44660702 9565 "type" : "integer"
56122987 9566 }
44660702 9567 }
56122987 9568 },
7aacca6f
DM
9569 "permissions" : {
9570 "check" : [
9571 "perm",
9572 "/vms/{vmid}",
9573 [
9574 "VM.Snapshot"
9575 ]
9576 ]
44660702
DM
9577 },
9578 "protected" : 1,
9579 "proxyto" : "node",
9580 "returns" : {
9581 "type" : "null"
7aacca6f 9582 }
56122987
DM
9583 }
9584 },
44660702 9585 "leaf" : 1,
7aacca6f 9586 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config",
44660702 9587 "text" : "config"
56122987
DM
9588 },
9589 {
56122987
DM
9590 "info" : {
9591 "POST" : {
44660702 9592 "description" : "Rollback VM state to specified snapshot.",
7aacca6f 9593 "method" : "POST",
44660702 9594 "name" : "rollback",
56122987
DM
9595 "parameters" : {
9596 "additionalProperties" : 0,
9597 "properties" : {
44660702
DM
9598 "node" : {
9599 "description" : "The cluster node name.",
9600 "format" : "pve-node",
9601 "type" : "string"
9602 },
56122987 9603 "snapname" : {
44660702 9604 "description" : "The name of the snapshot.",
56122987
DM
9605 "format" : "pve-configid",
9606 "maxLength" : 40,
7aacca6f
DM
9607 "type" : "string"
9608 },
56122987 9609 "vmid" : {
7aacca6f 9610 "description" : "The (unique) ID of the VM.",
44660702 9611 "format" : "pve-vmid",
56122987 9612 "minimum" : 1,
44660702 9613 "type" : "integer"
56122987
DM
9614 }
9615 }
9616 },
7aacca6f 9617 "permissions" : {
56122987
DM
9618 "check" : [
9619 "perm",
9620 "/vms/{vmid}",
9621 [
9622 "VM.Snapshot"
9623 ]
9624 ]
9625 },
44660702 9626 "protected" : 1,
7aacca6f 9627 "proxyto" : "node",
44660702
DM
9628 "returns" : {
9629 "description" : "the task ID.",
9630 "type" : "string"
9631 }
56122987
DM
9632 }
9633 },
44660702
DM
9634 "leaf" : 1,
9635 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback",
7aacca6f 9636 "text" : "rollback"
56122987 9637 }
44660702
DM
9638 ],
9639 "info" : {
9640 "DELETE" : {
9641 "description" : "Delete a VM snapshot.",
9642 "method" : "DELETE",
9643 "name" : "delsnapshot",
9644 "parameters" : {
9645 "additionalProperties" : 0,
9646 "properties" : {
9647 "force" : {
9648 "description" : "For removal from config file, even if removing disk snapshots fails.",
9649 "optional" : 1,
9650 "type" : "boolean"
9651 },
9652 "node" : {
9653 "description" : "The cluster node name.",
9654 "format" : "pve-node",
9655 "type" : "string"
9656 },
9657 "snapname" : {
9658 "description" : "The name of the snapshot.",
9659 "format" : "pve-configid",
9660 "maxLength" : 40,
9661 "type" : "string"
9662 },
9663 "vmid" : {
9664 "description" : "The (unique) ID of the VM.",
9665 "format" : "pve-vmid",
9666 "minimum" : 1,
9667 "type" : "integer"
9668 }
9669 }
9670 },
9671 "permissions" : {
9672 "check" : [
9673 "perm",
9674 "/vms/{vmid}",
9675 [
9676 "VM.Snapshot"
9677 ]
9678 ]
9679 },
9680 "protected" : 1,
9681 "proxyto" : "node",
9682 "returns" : {
9683 "description" : "the task ID.",
9684 "type" : "string"
9685 }
9686 },
9687 "GET" : {
9688 "description" : "",
9689 "method" : "GET",
9690 "name" : "snapshot_cmd_idx",
9691 "parameters" : {
9692 "additionalProperties" : 0,
9693 "properties" : {
9694 "node" : {
9695 "description" : "The cluster node name.",
9696 "format" : "pve-node",
9697 "type" : "string"
9698 },
9699 "snapname" : {
9700 "description" : "The name of the snapshot.",
9701 "format" : "pve-configid",
9702 "maxLength" : 40,
9703 "type" : "string"
9704 },
9705 "vmid" : {
9706 "description" : "The (unique) ID of the VM.",
9707 "format" : "pve-vmid",
9708 "minimum" : 1,
9709 "type" : "integer"
9710 }
9711 }
9712 },
9713 "permissions" : {
9714 "user" : "all"
9715 },
9716 "returns" : {
9717 "items" : {
9718 "properties" : {},
9719 "type" : "object"
9720 },
9721 "links" : [
9722 {
9723 "href" : "{cmd}",
9724 "rel" : "child"
9725 }
9726 ],
9727 "type" : "array"
9728 }
9729 }
9730 },
9731 "leaf" : 0,
9732 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}",
9733 "text" : "{snapname}"
56122987
DM
9734 }
9735 ],
44660702
DM
9736 "info" : {
9737 "GET" : {
9738 "description" : "List all snapshots.",
9739 "method" : "GET",
9740 "name" : "snapshot_list",
9741 "parameters" : {
9742 "additionalProperties" : 0,
9743 "properties" : {
9744 "node" : {
9745 "description" : "The cluster node name.",
9746 "format" : "pve-node",
9747 "type" : "string"
9748 },
9749 "vmid" : {
9750 "description" : "The (unique) ID of the VM.",
9751 "format" : "pve-vmid",
9752 "minimum" : 1,
9753 "type" : "integer"
9754 }
9755 }
9756 },
9757 "permissions" : {
9758 "check" : [
9759 "perm",
9760 "/vms/{vmid}",
9761 [
9762 "VM.Audit"
9763 ]
9764 ]
9765 },
9766 "protected" : 1,
9767 "proxyto" : "node",
9768 "returns" : {
9769 "items" : {
9770 "properties" : {},
9771 "type" : "object"
9772 },
9773 "links" : [
9774 {
9775 "href" : "{name}",
9776 "rel" : "child"
9777 }
9778 ],
9779 "type" : "array"
9780 }
9781 },
9782 "POST" : {
9783 "description" : "Snapshot a VM.",
9784 "method" : "POST",
9785 "name" : "snapshot",
9786 "parameters" : {
9787 "additionalProperties" : 0,
9788 "properties" : {
9789 "description" : {
9790 "description" : "A textual description or comment.",
9791 "optional" : 1,
9792 "type" : "string"
9793 },
9794 "node" : {
9795 "description" : "The cluster node name.",
9796 "format" : "pve-node",
9797 "type" : "string"
9798 },
9799 "snapname" : {
9800 "description" : "The name of the snapshot.",
9801 "format" : "pve-configid",
9802 "maxLength" : 40,
9803 "type" : "string"
9804 },
9805 "vmid" : {
9806 "description" : "The (unique) ID of the VM.",
9807 "format" : "pve-vmid",
9808 "minimum" : 1,
9809 "type" : "integer"
9810 },
9811 "vmstate" : {
9812 "description" : "Save the vmstate",
9813 "optional" : 1,
9814 "type" : "boolean"
9815 }
9816 }
9817 },
9818 "permissions" : {
9819 "check" : [
9820 "perm",
9821 "/vms/{vmid}",
9822 [
9823 "VM.Snapshot"
9824 ]
9825 ]
9826 },
9827 "protected" : 1,
9828 "proxyto" : "node",
9829 "returns" : {
9830 "description" : "the task ID.",
9831 "type" : "string"
9832 }
9833 }
9834 },
9835 "leaf" : 0,
9836 "path" : "/nodes/{node}/qemu/{vmid}/snapshot",
7aacca6f 9837 "text" : "snapshot"
56122987
DM
9838 },
9839 {
56122987
DM
9840 "info" : {
9841 "POST" : {
44660702
DM
9842 "description" : "Create a Template.",
9843 "method" : "POST",
56122987 9844 "name" : "template",
56122987 9845 "parameters" : {
7aacca6f 9846 "additionalProperties" : 0,
56122987 9847 "properties" : {
56122987 9848 "disk" : {
56122987
DM
9849 "description" : "If you want to convert only 1 disk to base image.",
9850 "enum" : [
9851 "ide0",
9852 "ide1",
9853 "ide2",
9854 "ide3",
9855 "scsi0",
9856 "scsi1",
9857 "scsi2",
9858 "scsi3",
9859 "scsi4",
9860 "scsi5",
9861 "scsi6",
9862 "scsi7",
9863 "scsi8",
9864 "scsi9",
9865 "scsi10",
9866 "scsi11",
9867 "scsi12",
9868 "scsi13",
9869 "virtio0",
9870 "virtio1",
9871 "virtio2",
9872 "virtio3",
9873 "virtio4",
9874 "virtio5",
9875 "virtio6",
9876 "virtio7",
9877 "virtio8",
9878 "virtio9",
9879 "virtio10",
9880 "virtio11",
9881 "virtio12",
9882 "virtio13",
9883 "virtio14",
9884 "virtio15",
9885 "sata0",
9886 "sata1",
9887 "sata2",
9888 "sata3",
9889 "sata4",
9890 "sata5"
9891 ],
7aacca6f 9892 "optional" : 1,
56122987
DM
9893 "type" : "string"
9894 },
44660702
DM
9895 "node" : {
9896 "description" : "The cluster node name.",
9897 "format" : "pve-node",
9898 "type" : "string"
9899 },
9900 "vmid" : {
9901 "description" : "The (unique) ID of the VM.",
7aacca6f 9902 "format" : "pve-vmid",
44660702
DM
9903 "minimum" : 1,
9904 "type" : "integer"
56122987 9905 }
7aacca6f 9906 }
56122987 9907 },
7aacca6f
DM
9908 "permissions" : {
9909 "check" : [
9910 "perm",
9911 "/vms/{vmid}",
9912 [
9913 "VM.Allocate"
9914 ]
9915 ],
9916 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
9917 },
44660702 9918 "protected" : 1,
7aacca6f 9919 "proxyto" : "node",
7aacca6f
DM
9920 "returns" : {
9921 "type" : "null"
9922 }
56122987
DM
9923 }
9924 },
44660702 9925 "leaf" : 1,
7aacca6f 9926 "path" : "/nodes/{node}/qemu/{vmid}/template",
44660702 9927 "text" : "template"
56122987
DM
9928 }
9929 ],
7aacca6f 9930 "info" : {
44660702
DM
9931 "DELETE" : {
9932 "description" : "Destroy the vm (also delete all used/owned volumes).",
9933 "method" : "DELETE",
9934 "name" : "destroy_vm",
7aacca6f 9935 "parameters" : {
44660702 9936 "additionalProperties" : 0,
7aacca6f
DM
9937 "properties" : {
9938 "node" : {
44660702 9939 "description" : "The cluster node name.",
7aacca6f 9940 "format" : "pve-node",
44660702
DM
9941 "type" : "string"
9942 },
9943 "skiplock" : {
9944 "description" : "Ignore locks - only root is allowed to use this option.",
9945 "optional" : 1,
9946 "type" : "boolean"
7aacca6f
DM
9947 },
9948 "vmid" : {
44660702 9949 "description" : "The (unique) ID of the VM.",
7aacca6f 9950 "format" : "pve-vmid",
44660702
DM
9951 "minimum" : 1,
9952 "type" : "integer"
7aacca6f 9953 }
44660702 9954 }
7aacca6f 9955 },
7aacca6f
DM
9956 "permissions" : {
9957 "check" : [
9958 "perm",
9959 "/vms/{vmid}",
9960 [
9961 "VM.Allocate"
9962 ]
9963 ]
9964 },
44660702
DM
9965 "protected" : 1,
9966 "proxyto" : "node",
7aacca6f
DM
9967 "returns" : {
9968 "type" : "string"
44660702
DM
9969 }
9970 },
9971 "GET" : {
9972 "description" : "Directory index",
9973 "method" : "GET",
9974 "name" : "vmdiridx",
7aacca6f 9975 "parameters" : {
44660702 9976 "additionalProperties" : 0,
7aacca6f 9977 "properties" : {
7aacca6f 9978 "node" : {
7aacca6f 9979 "description" : "The cluster node name.",
44660702
DM
9980 "format" : "pve-node",
9981 "type" : "string"
9982 },
9983 "vmid" : {
9984 "description" : "The (unique) ID of the VM.",
9985 "format" : "pve-vmid",
9986 "minimum" : 1,
9987 "type" : "integer"
7aacca6f 9988 }
44660702 9989 }
7aacca6f 9990 },
44660702
DM
9991 "permissions" : {
9992 "user" : "all"
9993 },
9994 "proxyto" : "node",
9995 "returns" : {
9996 "items" : {
9997 "properties" : {
9998 "subdir" : {
9999 "type" : "string"
10000 }
10001 },
10002 "type" : "object"
10003 },
10004 "links" : [
10005 {
10006 "href" : "{subdir}",
10007 "rel" : "child"
10008 }
10009 ],
10010 "type" : "array"
10011 }
7aacca6f 10012 }
44660702
DM
10013 },
10014 "leaf" : 0,
10015 "path" : "/nodes/{node}/qemu/{vmid}",
10016 "text" : "{vmid}"
56122987
DM
10017 }
10018 ],
10019 "info" : {
44660702
DM
10020 "GET" : {
10021 "description" : "Virtual machine index (per node).",
10022 "method" : "GET",
10023 "name" : "vmlist",
56122987 10024 "parameters" : {
44660702 10025 "additionalProperties" : 0,
56122987 10026 "properties" : {
44660702
DM
10027 "full" : {
10028 "description" : "Determine the full status of active VMs.",
56122987 10029 "optional" : 1,
44660702 10030 "type" : "boolean"
56122987 10031 },
44660702
DM
10032 "node" : {
10033 "description" : "The cluster node name.",
10034 "format" : "pve-node",
7aacca6f 10035 "type" : "string"
44660702
DM
10036 }
10037 }
10038 },
10039 "permissions" : {
10040 "description" : "Only list VMs where you have VM.Audit permissons on /vms/<vmid>.",
10041 "user" : "all"
10042 },
10043 "protected" : 1,
10044 "proxyto" : "node",
10045 "returns" : {
10046 "items" : {
10047 "properties" : {},
10048 "type" : "object"
10049 },
10050 "links" : [
10051 {
10052 "href" : "{vmid}",
10053 "rel" : "child"
10054 }
10055 ],
10056 "type" : "array"
10057 }
10058 },
10059 "POST" : {
10060 "description" : "Create or restore a virtual machine.",
10061 "method" : "POST",
10062 "name" : "create_vm",
10063 "parameters" : {
10064 "additionalProperties" : 0,
10065 "properties" : {
7aacca6f 10066 "acpi" : {
7aacca6f 10067 "default" : 1,
44660702 10068 "description" : "Enable/disable ACPI.",
56122987 10069 "optional" : 1,
7aacca6f 10070 "type" : "boolean"
56122987 10071 },
44660702
DM
10072 "agent" : {
10073 "default" : 0,
10074 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 10075 "optional" : 1,
44660702 10076 "type" : "boolean"
56122987 10077 },
44660702
DM
10078 "archive" : {
10079 "description" : "The backup file.",
10080 "maxLength" : 255,
56122987 10081 "optional" : 1,
44660702 10082 "type" : "string"
56122987 10083 },
44660702
DM
10084 "args" : {
10085 "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n",
56122987 10086 "optional" : 1,
44660702 10087 "type" : "string"
56122987 10088 },
44660702 10089 "autostart" : {
7aacca6f 10090 "default" : 0,
44660702
DM
10091 "description" : "Automatic restart after crash (currently ignored).",
10092 "optional" : 1,
10093 "type" : "boolean"
7aacca6f 10094 },
44660702
DM
10095 "balloon" : {
10096 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
10097 "minimum" : 0,
56122987 10098 "optional" : 1,
44660702 10099 "type" : "integer"
56122987 10100 },
44660702
DM
10101 "bios" : {
10102 "default" : "seabios",
10103 "description" : "Select BIOS implementation.",
10104 "enum" : [
10105 "seabios",
10106 "ovmf"
10107 ],
56122987 10108 "optional" : 1,
44660702 10109 "type" : "string"
56122987 10110 },
44660702
DM
10111 "boot" : {
10112 "default" : "cdn",
10113 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
56122987 10114 "optional" : 1,
44660702
DM
10115 "pattern" : "[acdn]{1,4}",
10116 "type" : "string"
56122987 10117 },
7aacca6f
DM
10118 "bootdisk" : {
10119 "description" : "Enable booting from specified disk.",
44660702
DM
10120 "format" : "pve-qm-bootdisk",
10121 "optional" : 1,
7aacca6f 10122 "pattern" : "(ide|sata|scsi|virtio)\\d+",
44660702
DM
10123 "type" : "string"
10124 },
10125 "cdrom" : {
10126 "description" : "This is an alias for option -ide2",
10127 "format" : "pve-qm-drive",
56122987 10128 "optional" : 1,
44660702
DM
10129 "type" : "string",
10130 "typetext" : "volume"
56122987 10131 },
44660702
DM
10132 "cores" : {
10133 "default" : 1,
10134 "description" : "The number of cores per socket.",
7aacca6f 10135 "minimum" : 1,
44660702 10136 "optional" : 1,
7aacca6f
DM
10137 "type" : "integer"
10138 },
44660702
DM
10139 "cpu" : {
10140 "description" : "Emulated CPU type.",
10141 "format" : {
10142 "cputype" : {
10143 "default" : "kvm64",
10144 "default_key" : 1,
10145 "description" : "Emulated CPU type.",
10146 "enum" : [
10147 "486",
10148 "athlon",
10149 "pentium",
10150 "pentium2",
10151 "pentium3",
10152 "coreduo",
10153 "core2duo",
10154 "kvm32",
10155 "kvm64",
10156 "qemu32",
10157 "qemu64",
10158 "phenom",
10159 "Conroe",
10160 "Penryn",
10161 "Nehalem",
10162 "Westmere",
10163 "SandyBridge",
10164 "IvyBridge",
10165 "Haswell",
10166 "Haswell-noTSX",
10167 "Broadwell",
10168 "Broadwell-noTSX",
10169 "Opteron_G1",
10170 "Opteron_G2",
10171 "Opteron_G3",
10172 "Opteron_G4",
10173 "Opteron_G5",
10174 "host"
10175 ],
10176 "format_description" : "cputype",
10177 "type" : "string"
10178 },
10179 "hidden" : {
10180 "default" : 0,
10181 "description" : "Do not identify as a KVM virtual machine.",
10182 "optional" : 1,
10183 "type" : "boolean"
10184 }
10185 },
56122987 10186 "optional" : 1,
44660702 10187 "type" : "string"
56122987 10188 },
44660702 10189 "cpulimit" : {
7aacca6f 10190 "default" : 0,
44660702
DM
10191 "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.",
10192 "maximum" : 128,
10193 "minimum" : 0,
7aacca6f 10194 "optional" : 1,
44660702 10195 "type" : "number"
7aacca6f
DM
10196 },
10197 "cpuunits" : {
7aacca6f 10198 "default" : 1000,
44660702 10199 "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.",
7aacca6f 10200 "maximum" : 500000,
44660702
DM
10201 "minimum" : 0,
10202 "optional" : 1,
10203 "type" : "integer"
10204 },
10205 "description" : {
10206 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
56122987 10207 "optional" : 1,
44660702
DM
10208 "type" : "string"
10209 },
10210 "force" : {
10211 "description" : "Allow to overwrite existing VM.",
10212 "optional" : 1,
10213 "requires" : "archive",
10214 "type" : "boolean"
10215 },
10216 "freeze" : {
10217 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
10218 "optional" : 1,
10219 "type" : "boolean"
10220 },
10221 "hostpci[n]" : {
10222 "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\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\nExperimental: user reported problems with this option.\n",
10223 "format" : "pve-qm-hostpci",
10224 "optional" : 1,
10225 "type" : "string"
10226 },
10227 "hotplug" : {
10228 "default" : "network,disk,usb",
10229 "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'.",
10230 "format" : "pve-hotplug-features",
10231 "optional" : 1,
10232 "type" : "string"
7aacca6f
DM
10233 },
10234 "ide[n]" : {
44660702 10235 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 10236 "format" : {
44660702
DM
10237 "aio" : {
10238 "description" : "AIO type to use.",
10239 "enum" : [
10240 "native",
10241 "threads"
10242 ],
10243 "format_description" : "native|threads",
10244 "optional" : 1,
10245 "type" : "string"
10246 },
10247 "backup" : {
10248 "description" : "Whether the drive should be included when making backups.",
10249 "format_description" : "on|off",
10250 "optional" : 1,
10251 "type" : "boolean"
10252 },
10253 "bps" : {
10254 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 10255 "format_description" : "bps",
56122987 10256 "optional" : 1,
44660702 10257 "type" : "integer"
56122987 10258 },
44660702
DM
10259 "bps_rd" : {
10260 "description" : "Maximum read speed speed in bytes per second.",
10261 "format_description" : "bps",
56122987 10262 "optional" : 1,
44660702 10263 "type" : "integer"
56122987 10264 },
44660702
DM
10265 "bps_wr" : {
10266 "description" : "Maximum write speed speed in bytes per second.",
10267 "format_description" : "bps",
56122987 10268 "optional" : 1,
44660702 10269 "type" : "integer"
56122987 10270 },
44660702
DM
10271 "cache" : {
10272 "description" : "The drive's cache mode",
56122987 10273 "enum" : [
7aacca6f 10274 "none",
44660702
DM
10275 "writethrough",
10276 "writeback",
10277 "unsafe",
10278 "directsync"
56122987 10279 ],
44660702 10280 "format_description" : "none|writethrough|writeback|unsafe|directsync",
56122987 10281 "optional" : 1,
44660702 10282 "type" : "string"
56122987 10283 },
44660702
DM
10284 "cyls" : {
10285 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
10286 "format_description" : "count",
10287 "optional" : 1,
10288 "type" : "integer"
7aacca6f 10289 },
44660702
DM
10290 "detect_zeroes" : {
10291 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10292 "optional" : 1,
44660702 10293 "type" : "boolean"
56122987 10294 },
44660702
DM
10295 "discard" : {
10296 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
10297 "enum" : [
10298 "ignore",
10299 "on"
10300 ],
10301 "format_description" : "ignore|on",
56122987 10302 "optional" : 1,
44660702 10303 "type" : "string"
56122987 10304 },
7aacca6f 10305 "file" : {
44660702 10306 "default_key" : 1,
7aacca6f 10307 "description" : "The drive's backing volume.",
7aacca6f
DM
10308 "format" : "pve-volume-id-or-qm-path",
10309 "format_description" : "volume",
7aacca6f 10310 "type" : "string"
56122987 10311 },
44660702
DM
10312 "format" : {
10313 "description" : "The drive's backing file's data format.",
56122987 10314 "enum" : [
44660702
DM
10315 "raw",
10316 "cow",
10317 "qcow",
10318 "qed",
10319 "qcow2",
10320 "vmdk",
10321 "cloop"
7aacca6f 10322 ],
44660702 10323 "format_description" : "drive format",
7aacca6f
DM
10324 "optional" : 1,
10325 "type" : "string"
56122987 10326 },
44660702
DM
10327 "heads" : {
10328 "description" : "Force the drive's physical geometry to have a specific head count.",
10329 "format_description" : "count",
56122987 10330 "optional" : 1,
44660702 10331 "type" : "integer"
56122987 10332 },
44660702
DM
10333 "iops" : {
10334 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 10335 "format_description" : "iops",
56122987 10336 "optional" : 1,
44660702 10337 "type" : "integer"
56122987 10338 },
44660702
DM
10339 "iops_max" : {
10340 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
10341 "format_description" : "iops",
56122987 10342 "optional" : 1,
44660702 10343 "type" : "integer"
56122987 10344 },
7aacca6f 10345 "iops_rd" : {
7aacca6f 10346 "description" : "Maximum read I/O speed in operations per second.",
44660702
DM
10347 "format_description" : "iops",
10348 "optional" : 1,
10349 "type" : "integer"
7aacca6f 10350 },
44660702
DM
10351 "iops_rd_max" : {
10352 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
10353 "format_description" : "iops",
56122987 10354 "optional" : 1,
44660702 10355 "type" : "integer"
56122987 10356 },
44660702
DM
10357 "iops_wr" : {
10358 "description" : "Maximum write I/O speed in operations per second.",
10359 "format_description" : "iops",
56122987 10360 "optional" : 1,
44660702 10361 "type" : "integer"
7aacca6f 10362 },
44660702
DM
10363 "iops_wr_max" : {
10364 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
10365 "format_description" : "iops",
7aacca6f 10366 "optional" : 1,
44660702 10367 "type" : "integer"
56122987 10368 },
44660702
DM
10369 "mbps" : {
10370 "description" : "Maximum r/w speed speed in megabytes per second.",
10371 "format_description" : "mbps",
7aacca6f 10372 "optional" : 1,
44660702 10373 "type" : "number"
56122987 10374 },
44660702
DM
10375 "mbps_max" : {
10376 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7aacca6f 10377 "format_description" : "mbps",
56122987 10378 "optional" : 1,
44660702 10379 "type" : "number"
56122987 10380 },
44660702
DM
10381 "mbps_rd" : {
10382 "description" : "Maximum read speed speed in megabytes per second.",
10383 "format_description" : "mbps",
7aacca6f 10384 "optional" : 1,
44660702 10385 "type" : "number"
7aacca6f 10386 },
44660702
DM
10387 "mbps_rd_max" : {
10388 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
10389 "format_description" : "mbps",
56122987 10390 "optional" : 1,
44660702 10391 "type" : "number"
56122987 10392 },
44660702
DM
10393 "mbps_wr" : {
10394 "description" : "Maximum write speed speed in megabytes per second.",
10395 "format_description" : "mbps",
7aacca6f 10396 "optional" : 1,
44660702 10397 "type" : "number"
56122987 10398 },
44660702
DM
10399 "mbps_wr_max" : {
10400 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
10401 "format_description" : "mbps",
56122987 10402 "optional" : 1,
44660702 10403 "type" : "number"
7aacca6f
DM
10404 },
10405 "media" : {
44660702
DM
10406 "default" : "disk",
10407 "description" : "The drive's media type.",
56122987 10408 "enum" : [
7aacca6f
DM
10409 "cdrom",
10410 "disk"
56122987 10411 ],
44660702 10412 "format_description" : "cdrom|disk",
56122987 10413 "optional" : 1,
44660702 10414 "type" : "string"
56122987 10415 },
44660702
DM
10416 "model" : {
10417 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
10418 "format" : "urlencoded",
10419 "format_description" : "model",
10420 "maxLength" : 120,
56122987 10421 "optional" : 1,
44660702 10422 "type" : "string"
56122987 10423 },
7aacca6f 10424 "rerror" : {
7aacca6f
DM
10425 "description" : "Read error action.",
10426 "enum" : [
10427 "ignore",
10428 "report",
10429 "stop"
44660702
DM
10430 ],
10431 "format_description" : "ignore|report|stop",
10432 "optional" : 1,
10433 "type" : "string"
56122987 10434 },
44660702
DM
10435 "secs" : {
10436 "description" : "Force the drive's physical geometry to have a specific sector count.",
10437 "format_description" : "count",
56122987 10438 "optional" : 1,
44660702
DM
10439 "type" : "integer"
10440 },
10441 "serial" : {
10442 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
10443 "format" : "urlencoded",
10444 "format_description" : "serial",
10445 "maxLength" : 60,
10446 "optional" : 1,
10447 "type" : "string"
10448 },
10449 "size" : {
10450 "description" : "Disk size. This is purely informational and has no effect.",
10451 "format" : "disk-size",
10452 "optional" : 1,
10453 "type" : "string"
7aacca6f
DM
10454 },
10455 "snapshot" : {
44660702 10456 "description" : "Whether the drive should be included when making snapshots.",
7aacca6f
DM
10457 "format_description" : "on|off",
10458 "optional" : 1,
44660702 10459 "type" : "boolean"
7aacca6f 10460 },
44660702
DM
10461 "trans" : {
10462 "description" : "Force disk geometry bios translation mode.",
10463 "enum" : [
10464 "none",
10465 "lba",
10466 "auto"
10467 ],
10468 "format_description" : "none|lba|auto",
7aacca6f 10469 "optional" : 1,
44660702
DM
10470 "type" : "string"
10471 },
10472 "volume" : {
10473 "alias" : "file"
10474 },
10475 "werror" : {
10476 "description" : "Write error action.",
10477 "enum" : [
10478 "enospc",
10479 "ignore",
10480 "report",
10481 "stop"
10482 ],
10483 "format_description" : "enospc|ignore|report|stop",
10484 "optional" : 1,
10485 "type" : "string"
56122987
DM
10486 }
10487 },
56122987 10488 "optional" : 1,
7aacca6f 10489 "type" : "string"
56122987 10490 },
56122987 10491 "keyboard" : {
44660702 10492 "default" : "en-us",
7aacca6f 10493 "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.",
56122987 10494 "enum" : [
44660702
DM
10495 "de",
10496 "de-ch",
7aacca6f 10497 "da",
56122987 10498 "en-gb",
44660702
DM
10499 "en-us",
10500 "es",
10501 "fi",
10502 "fr",
10503 "fr-be",
10504 "fr-ca",
10505 "fr-ch",
10506 "hu",
7aacca6f 10507 "is",
44660702
DM
10508 "it",
10509 "ja",
10510 "lt",
56122987 10511 "mk",
7aacca6f 10512 "nl",
56122987 10513 "no",
44660702 10514 "pl",
7aacca6f 10515 "pt",
44660702
DM
10516 "pt-br",
10517 "sv",
10518 "sl",
10519 "tr"
56122987 10520 ],
44660702
DM
10521 "optional" : 1,
10522 "type" : "string"
56122987 10523 },
44660702
DM
10524 "kvm" : {
10525 "default" : 1,
10526 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 10527 "optional" : 1,
44660702 10528 "type" : "boolean"
7aacca6f 10529 },
44660702
DM
10530 "localtime" : {
10531 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 10532 "optional" : 1,
44660702
DM
10533 "type" : "boolean"
10534 },
10535 "lock" : {
10536 "description" : "Lock/unlock the VM.",
7aacca6f
DM
10537 "enum" : [
10538 "migrate",
10539 "backup",
10540 "snapshot",
10541 "rollback"
10542 ],
44660702
DM
10543 "optional" : 1,
10544 "type" : "string"
56122987 10545 },
44660702
DM
10546 "machine" : {
10547 "description" : "Specific the Qemu machine type.",
10548 "maxLength" : 40,
10549 "optional" : 1,
10550 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
10551 "type" : "string"
10552 },
10553 "memory" : {
10554 "default" : 512,
10555 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
10556 "minimum" : 16,
10557 "optional" : 1,
10558 "type" : "integer"
10559 },
10560 "migrate_downtime" : {
10561 "default" : 0.1,
10562 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
10563 "minimum" : 0,
10564 "optional" : 1,
10565 "type" : "number"
10566 },
10567 "migrate_speed" : {
56122987 10568 "default" : 0,
44660702
DM
10569 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
10570 "minimum" : 0,
56122987 10571 "optional" : 1,
44660702 10572 "type" : "integer"
56122987 10573 },
44660702
DM
10574 "name" : {
10575 "description" : "Set a name for the VM. Only used on the configuration web interface.",
10576 "format" : "dns-name",
10577 "optional" : 1,
10578 "type" : "string"
10579 },
10580 "net[n]" : {
10581 "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n",
10582 "format" : "pve-qm-net",
10583 "optional" : 1,
10584 "type" : "string"
10585 },
10586 "node" : {
10587 "description" : "The cluster node name.",
10588 "format" : "pve-node",
10589 "type" : "string"
10590 },
10591 "numa" : {
7aacca6f 10592 "default" : 0,
44660702
DM
10593 "description" : "Enable/disable NUMA.",
10594 "optional" : 1,
10595 "type" : "boolean"
56122987 10596 },
7aacca6f 10597 "numa[n]" : {
44660702 10598 "description" : "numa topology",
7aacca6f 10599 "format" : {
44660702
DM
10600 "cpus" : {
10601 "description" : "CPUs accessing this numa node.",
10602 "format_description" : "id[-id];...",
10603 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10604 "type" : "string"
10605 },
7aacca6f
DM
10606 "hostnodes" : {
10607 "description" : "host numa nodes to use",
44660702 10608 "format_description" : "id[-id];...",
7aacca6f 10609 "optional" : 1,
44660702
DM
10610 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10611 "type" : "string"
7aacca6f 10612 },
44660702
DM
10613 "memory" : {
10614 "description" : "Amount of memory this numa node provides.",
10615 "format_description" : "mb",
10616 "optional" : 1,
10617 "type" : "number"
7aacca6f
DM
10618 },
10619 "policy" : {
10620 "description" : "numa allocation policy.",
10621 "enum" : [
10622 "preferred",
10623 "bind",
10624 "interleave"
10625 ],
44660702 10626 "format_description" : "preferred|bind|interleave",
7aacca6f 10627 "optional" : 1,
44660702 10628 "type" : "string"
7aacca6f
DM
10629 }
10630 },
56122987 10631 "optional" : 1,
44660702 10632 "type" : "string"
56122987 10633 },
44660702
DM
10634 "onboot" : {
10635 "default" : 0,
10636 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 10637 "optional" : 1,
44660702 10638 "type" : "boolean"
56122987
DM
10639 },
10640 "ostype" : {
7aacca6f 10641 "description" : "Used to enable special optimization/features for specific\noperating systems:\n\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\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n",
56122987
DM
10642 "enum" : [
10643 "other",
10644 "wxp",
10645 "w2k",
10646 "w2k3",
10647 "w2k8",
10648 "wvista",
10649 "win7",
10650 "win8",
10651 "l24",
10652 "l26",
10653 "solaris"
44660702 10654 ],
56122987 10655 "optional" : 1,
44660702 10656 "type" : "string"
56122987 10657 },
44660702
DM
10658 "parallel[n]" : {
10659 "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\nExperimental: user reported problems with this option.\n",
56122987 10660 "optional" : 1,
44660702
DM
10661 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
10662 "type" : "string"
56122987 10663 },
44660702
DM
10664 "pool" : {
10665 "description" : "Add the VM to the specified pool.",
10666 "format" : "pve-poolid",
56122987 10667 "optional" : 1,
44660702 10668 "type" : "string"
56122987 10669 },
44660702
DM
10670 "protection" : {
10671 "default" : 0,
10672 "description" : "Sets the protection flag of the VM. This will prevent the remove operation.",
56122987 10673 "optional" : 1,
44660702 10674 "type" : "boolean"
56122987 10675 },
44660702 10676 "reboot" : {
7aacca6f 10677 "default" : 1,
44660702
DM
10678 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
10679 "optional" : 1,
10680 "type" : "boolean"
56122987 10681 },
56122987 10682 "sata[n]" : {
44660702 10683 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 10684 "format" : {
7aacca6f 10685 "aio" : {
44660702 10686 "description" : "AIO type to use.",
56122987 10687 "enum" : [
7aacca6f
DM
10688 "native",
10689 "threads"
56122987 10690 ],
44660702 10691 "format_description" : "native|threads",
7aacca6f 10692 "optional" : 1,
44660702 10693 "type" : "string"
7aacca6f
DM
10694 },
10695 "backup" : {
7aacca6f 10696 "description" : "Whether the drive should be included when making backups.",
44660702 10697 "format_description" : "on|off",
7aacca6f 10698 "optional" : 1,
44660702 10699 "type" : "boolean"
56122987 10700 },
44660702
DM
10701 "bps" : {
10702 "description" : "Maximum r/w speed speed in bytes per second.",
10703 "format_description" : "bps",
7aacca6f 10704 "optional" : 1,
44660702 10705 "type" : "integer"
56122987 10706 },
44660702
DM
10707 "bps_rd" : {
10708 "description" : "Maximum read speed speed in bytes per second.",
10709 "format_description" : "bps",
56122987 10710 "optional" : 1,
44660702 10711 "type" : "integer"
7aacca6f 10712 },
44660702
DM
10713 "bps_wr" : {
10714 "description" : "Maximum write speed speed in bytes per second.",
10715 "format_description" : "bps",
56122987 10716 "optional" : 1,
44660702 10717 "type" : "integer"
56122987 10718 },
7aacca6f 10719 "cache" : {
7aacca6f
DM
10720 "description" : "The drive's cache mode",
10721 "enum" : [
10722 "none",
10723 "writethrough",
10724 "writeback",
10725 "unsafe",
10726 "directsync"
10727 ],
44660702
DM
10728 "format_description" : "none|writethrough|writeback|unsafe|directsync",
10729 "optional" : 1,
10730 "type" : "string"
56122987 10731 },
44660702
DM
10732 "cyls" : {
10733 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 10734 "format_description" : "count",
56122987 10735 "optional" : 1,
7aacca6f 10736 "type" : "integer"
56122987 10737 },
7aacca6f
DM
10738 "detect_zeroes" : {
10739 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10740 "optional" : 1,
7aacca6f 10741 "type" : "boolean"
56122987 10742 },
44660702
DM
10743 "discard" : {
10744 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
10745 "enum" : [
10746 "ignore",
10747 "on"
10748 ],
10749 "format_description" : "ignore|on",
56122987 10750 "optional" : 1,
44660702 10751 "type" : "string"
56122987 10752 },
44660702
DM
10753 "file" : {
10754 "default_key" : 1,
10755 "description" : "The drive's backing volume.",
10756 "format" : "pve-volume-id-or-qm-path",
10757 "format_description" : "volume",
10758 "type" : "string"
56122987
DM
10759 },
10760 "format" : {
44660702 10761 "description" : "The drive's backing file's data format.",
56122987
DM
10762 "enum" : [
10763 "raw",
10764 "cow",
10765 "qcow",
10766 "qed",
10767 "qcow2",
10768 "vmdk",
10769 "cloop"
10770 ],
44660702 10771 "format_description" : "drive format",
56122987 10772 "optional" : 1,
44660702 10773 "type" : "string"
56122987 10774 },
7aacca6f 10775 "heads" : {
7aacca6f 10776 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
10777 "format_description" : "count",
10778 "optional" : 1,
10779 "type" : "integer"
56122987 10780 },
44660702
DM
10781 "iops" : {
10782 "description" : "Maximum r/w I/O speed in operations per second.",
10783 "format_description" : "iops",
10784 "optional" : 1,
10785 "type" : "integer"
56122987 10786 },
44660702
DM
10787 "iops_max" : {
10788 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
10789 "format_description" : "iops",
56122987 10790 "optional" : 1,
44660702 10791 "type" : "integer"
56122987 10792 },
44660702
DM
10793 "iops_rd" : {
10794 "description" : "Maximum read I/O speed in operations per second.",
10795 "format_description" : "iops",
56122987 10796 "optional" : 1,
44660702 10797 "type" : "integer"
56122987 10798 },
44660702
DM
10799 "iops_rd_max" : {
10800 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 10801 "format_description" : "iops",
56122987 10802 "optional" : 1,
44660702 10803 "type" : "integer"
56122987 10804 },
44660702
DM
10805 "iops_wr" : {
10806 "description" : "Maximum write I/O speed in operations per second.",
10807 "format_description" : "iops",
7aacca6f 10808 "optional" : 1,
44660702 10809 "type" : "integer"
7aacca6f 10810 },
44660702
DM
10811 "iops_wr_max" : {
10812 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
10813 "format_description" : "iops",
56122987 10814 "optional" : 1,
7aacca6f 10815 "type" : "integer"
56122987 10816 },
44660702
DM
10817 "mbps" : {
10818 "description" : "Maximum r/w speed speed in megabytes per second.",
10819 "format_description" : "mbps",
56122987 10820 "optional" : 1,
44660702 10821 "type" : "number"
56122987 10822 },
44660702
DM
10823 "mbps_max" : {
10824 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
10825 "format_description" : "mbps",
7aacca6f 10826 "optional" : 1,
44660702 10827 "type" : "number"
7aacca6f 10828 },
44660702
DM
10829 "mbps_rd" : {
10830 "description" : "Maximum read speed speed in megabytes per second.",
10831 "format_description" : "mbps",
7aacca6f 10832 "optional" : 1,
44660702 10833 "type" : "number"
7aacca6f 10834 },
44660702
DM
10835 "mbps_rd_max" : {
10836 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
10837 "format_description" : "mbps",
7aacca6f 10838 "optional" : 1,
44660702 10839 "type" : "number"
7aacca6f 10840 },
44660702
DM
10841 "mbps_wr" : {
10842 "description" : "Maximum write speed speed in megabytes per second.",
10843 "format_description" : "mbps",
7aacca6f 10844 "optional" : 1,
44660702 10845 "type" : "number"
7aacca6f
DM
10846 },
10847 "mbps_wr_max" : {
7aacca6f 10848 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
44660702 10849 "format_description" : "mbps",
7aacca6f 10850 "optional" : 1,
44660702 10851 "type" : "number"
7aacca6f 10852 },
44660702
DM
10853 "media" : {
10854 "default" : "disk",
10855 "description" : "The drive's media type.",
56122987 10856 "enum" : [
44660702
DM
10857 "cdrom",
10858 "disk"
56122987 10859 ],
44660702 10860 "format_description" : "cdrom|disk",
56122987 10861 "optional" : 1,
44660702 10862 "type" : "string"
56122987 10863 },
44660702
DM
10864 "rerror" : {
10865 "description" : "Read error action.",
7aacca6f
DM
10866 "enum" : [
10867 "ignore",
44660702
DM
10868 "report",
10869 "stop"
7aacca6f 10870 ],
44660702 10871 "format_description" : "ignore|report|stop",
56122987 10872 "optional" : 1,
44660702 10873 "type" : "string"
56122987 10874 },
44660702
DM
10875 "secs" : {
10876 "description" : "Force the drive's physical geometry to have a specific sector count.",
10877 "format_description" : "count",
56122987 10878 "optional" : 1,
44660702 10879 "type" : "integer"
56122987 10880 },
44660702
DM
10881 "serial" : {
10882 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
10883 "format" : "urlencoded",
10884 "format_description" : "serial",
10885 "maxLength" : 60,
10886 "optional" : 1,
10887 "type" : "string"
7aacca6f
DM
10888 },
10889 "size" : {
10890 "description" : "Disk size. This is purely informational and has no effect.",
44660702 10891 "format" : "disk-size",
56122987 10892 "optional" : 1,
44660702 10893 "type" : "string"
56122987 10894 },
44660702
DM
10895 "snapshot" : {
10896 "description" : "Whether the drive should be included when making snapshots.",
10897 "format_description" : "on|off",
56122987 10898 "optional" : 1,
44660702 10899 "type" : "boolean"
56122987 10900 },
44660702
DM
10901 "trans" : {
10902 "description" : "Force disk geometry bios translation mode.",
56122987 10903 "enum" : [
44660702
DM
10904 "none",
10905 "lba",
10906 "auto"
7aacca6f 10907 ],
44660702
DM
10908 "format_description" : "none|lba|auto",
10909 "optional" : 1,
10910 "type" : "string"
10911 },
10912 "volume" : {
10913 "alias" : "file"
56122987
DM
10914 },
10915 "werror" : {
56122987
DM
10916 "description" : "Write error action.",
10917 "enum" : [
10918 "enospc",
10919 "ignore",
10920 "report",
10921 "stop"
10922 ],
44660702 10923 "format_description" : "enospc|ignore|report|stop",
56122987 10924 "optional" : 1,
44660702
DM
10925 "type" : "string"
10926 }
10927 },
10928 "optional" : 1,
10929 "type" : "string"
10930 },
10931 "scsi[n]" : {
10932 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
10933 "format" : {
10934 "aio" : {
10935 "description" : "AIO type to use.",
10936 "enum" : [
10937 "native",
10938 "threads"
10939 ],
10940 "format_description" : "native|threads",
10941 "optional" : 1,
10942 "type" : "string"
56122987 10943 },
7aacca6f 10944 "backup" : {
44660702 10945 "description" : "Whether the drive should be included when making backups.",
7aacca6f 10946 "format_description" : "on|off",
7aacca6f 10947 "optional" : 1,
44660702 10948 "type" : "boolean"
7aacca6f 10949 },
44660702
DM
10950 "bps" : {
10951 "description" : "Maximum r/w speed speed in bytes per second.",
10952 "format_description" : "bps",
7aacca6f 10953 "optional" : 1,
44660702 10954 "type" : "integer"
7aacca6f 10955 },
44660702
DM
10956 "bps_rd" : {
10957 "description" : "Maximum read speed speed in bytes per second.",
10958 "format_description" : "bps",
56122987 10959 "optional" : 1,
44660702 10960 "type" : "integer"
56122987 10961 },
44660702
DM
10962 "bps_wr" : {
10963 "description" : "Maximum write speed speed in bytes per second.",
10964 "format_description" : "bps",
7aacca6f 10965 "optional" : 1,
44660702 10966 "type" : "integer"
56122987 10967 },
44660702
DM
10968 "cache" : {
10969 "description" : "The drive's cache mode",
7aacca6f
DM
10970 "enum" : [
10971 "none",
44660702
DM
10972 "writethrough",
10973 "writeback",
10974 "unsafe",
10975 "directsync"
7aacca6f 10976 ],
44660702 10977 "format_description" : "none|writethrough|writeback|unsafe|directsync",
56122987 10978 "optional" : 1,
44660702 10979 "type" : "string"
56122987 10980 },
7aacca6f
DM
10981 "cyls" : {
10982 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702 10983 "format_description" : "count",
7aacca6f 10984 "optional" : 1,
44660702 10985 "type" : "integer"
7aacca6f 10986 },
44660702
DM
10987 "detect_zeroes" : {
10988 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10989 "optional" : 1,
44660702 10990 "type" : "boolean"
56122987 10991 },
44660702
DM
10992 "discard" : {
10993 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7aacca6f 10994 "enum" : [
44660702
DM
10995 "ignore",
10996 "on"
7aacca6f 10997 ],
44660702 10998 "format_description" : "ignore|on",
7aacca6f 10999 "optional" : 1,
44660702 11000 "type" : "string"
56122987
DM
11001 },
11002 "file" : {
7aacca6f
DM
11003 "default_key" : 1,
11004 "description" : "The drive's backing volume.",
44660702
DM
11005 "format" : "pve-volume-id-or-qm-path",
11006 "format_description" : "volume",
7aacca6f 11007 "type" : "string"
56122987 11008 },
7aacca6f 11009 "format" : {
44660702 11010 "description" : "The drive's backing file's data format.",
56122987 11011 "enum" : [
7aacca6f
DM
11012 "raw",
11013 "cow",
11014 "qcow",
11015 "qed",
11016 "qcow2",
11017 "vmdk",
11018 "cloop"
56122987 11019 ],
44660702
DM
11020 "format_description" : "drive format",
11021 "optional" : 1,
11022 "type" : "string"
56122987 11023 },
44660702
DM
11024 "heads" : {
11025 "description" : "Force the drive's physical geometry to have a specific head count.",
11026 "format_description" : "count",
11027 "optional" : 1,
11028 "type" : "integer"
11029 },
11030 "iops" : {
11031 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 11032 "format_description" : "iops",
56122987 11033 "optional" : 1,
44660702 11034 "type" : "integer"
56122987 11035 },
44660702
DM
11036 "iops_max" : {
11037 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11038 "format_description" : "iops",
7aacca6f 11039 "optional" : 1,
44660702 11040 "type" : "integer"
56122987 11041 },
44660702
DM
11042 "iops_rd" : {
11043 "description" : "Maximum read I/O speed in operations per second.",
11044 "format_description" : "iops",
56122987 11045 "optional" : 1,
44660702 11046 "type" : "integer"
56122987 11047 },
44660702
DM
11048 "iops_rd_max" : {
11049 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11050 "format_description" : "iops",
11051 "optional" : 1,
11052 "type" : "integer"
56122987 11053 },
44660702
DM
11054 "iops_wr" : {
11055 "description" : "Maximum write I/O speed in operations per second.",
11056 "format_description" : "iops",
56122987 11057 "optional" : 1,
44660702 11058 "type" : "integer"
56122987 11059 },
44660702
DM
11060 "iops_wr_max" : {
11061 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11062 "format_description" : "iops",
56122987 11063 "optional" : 1,
56122987
DM
11064 "type" : "integer"
11065 },
44660702
DM
11066 "iothread" : {
11067 "description" : "Whether to use iothreads for this drive",
11068 "format_description" : "off|on",
11069 "optional" : 1,
11070 "type" : "boolean"
11071 },
11072 "mbps" : {
11073 "description" : "Maximum r/w speed speed in megabytes per second.",
11074 "format_description" : "mbps",
11075 "optional" : 1,
11076 "type" : "number"
11077 },
7aacca6f
DM
11078 "mbps_max" : {
11079 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 11080 "format_description" : "mbps",
56122987 11081 "optional" : 1,
44660702 11082 "type" : "number"
56122987 11083 },
44660702
DM
11084 "mbps_rd" : {
11085 "description" : "Maximum read speed speed in megabytes per second.",
11086 "format_description" : "mbps",
11087 "optional" : 1,
11088 "type" : "number"
56122987 11089 },
44660702
DM
11090 "mbps_rd_max" : {
11091 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11092 "format_description" : "mbps",
56122987 11093 "optional" : 1,
44660702 11094 "type" : "number"
56122987 11095 },
44660702
DM
11096 "mbps_wr" : {
11097 "description" : "Maximum write speed speed in megabytes per second.",
11098 "format_description" : "mbps",
56122987 11099 "optional" : 1,
44660702 11100 "type" : "number"
56122987 11101 },
44660702
DM
11102 "mbps_wr_max" : {
11103 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11104 "format_description" : "mbps",
7aacca6f 11105 "optional" : 1,
44660702 11106 "type" : "number"
56122987 11107 },
7aacca6f 11108 "media" : {
44660702 11109 "default" : "disk",
7aacca6f
DM
11110 "description" : "The drive's media type.",
11111 "enum" : [
11112 "cdrom",
11113 "disk"
11114 ],
44660702 11115 "format_description" : "cdrom|disk",
56122987 11116 "optional" : 1,
44660702 11117 "type" : "string"
56122987 11118 },
44660702
DM
11119 "queues" : {
11120 "description" : "Number of queues.",
11121 "format_description" : "nbqueues",
11122 "minimum" : 2,
11123 "optional" : 1,
11124 "type" : "integer"
56122987 11125 },
7aacca6f 11126 "secs" : {
7aacca6f 11127 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11128 "format_description" : "count",
11129 "optional" : 1,
11130 "type" : "integer"
11131 },
11132 "serial" : {
11133 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11134 "format" : "urlencoded",
11135 "format_description" : "serial",
11136 "maxLength" : 60,
11137 "optional" : 1,
11138 "type" : "string"
11139 },
11140 "size" : {
11141 "description" : "Disk size. This is purely informational and has no effect.",
11142 "format" : "disk-size",
11143 "optional" : 1,
11144 "type" : "string"
11145 },
11146 "snapshot" : {
11147 "description" : "Whether the drive should be included when making snapshots.",
11148 "format_description" : "on|off",
11149 "optional" : 1,
11150 "type" : "boolean"
11151 },
11152 "trans" : {
11153 "description" : "Force disk geometry bios translation mode.",
11154 "enum" : [
11155 "none",
11156 "lba",
11157 "auto"
11158 ],
11159 "format_description" : "none|lba|auto",
11160 "optional" : 1,
11161 "type" : "string"
11162 },
11163 "volume" : {
11164 "alias" : "file"
11165 },
11166 "werror" : {
11167 "description" : "Write error action.",
11168 "enum" : [
11169 "enospc",
11170 "ignore",
11171 "report",
11172 "stop"
11173 ],
11174 "format_description" : "enospc|ignore|report|stop",
11175 "optional" : 1,
11176 "type" : "string"
56122987
DM
11177 }
11178 },
7aacca6f 11179 "optional" : 1,
44660702 11180 "type" : "string"
56122987 11181 },
44660702
DM
11182 "scsihw" : {
11183 "default" : "lsi",
11184 "description" : "scsi controller model",
11185 "enum" : [
11186 "lsi",
11187 "lsi53c810",
11188 "virtio-scsi-pci",
11189 "virtio-scsi-single",
11190 "megasas",
11191 "pvscsi"
11192 ],
7aacca6f 11193 "optional" : 1,
44660702 11194 "type" : "string"
7aacca6f 11195 },
44660702
DM
11196 "serial[n]" : {
11197 "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host 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\nExperimental: user reported problems with this option.\n",
11198 "optional" : 1,
11199 "pattern" : "(/dev/.+|socket)",
11200 "type" : "string"
11201 },
11202 "shares" : {
11203 "default" : 1000,
11204 "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",
11205 "maximum" : 50000,
11206 "minimum" : 0,
11207 "optional" : 1,
11208 "type" : "integer"
11209 },
11210 "smbios1" : {
11211 "description" : "Specify SMBIOS type 1 fields.",
11212 "format" : "pve-qm-smbios1",
11213 "maxLength" : 256,
7aacca6f
DM
11214 "optional" : 1,
11215 "type" : "string"
11216 },
11217 "smp" : {
44660702 11218 "default" : 1,
7aacca6f 11219 "description" : "The number of CPUs. Please use option -sockets instead.",
44660702 11220 "minimum" : 1,
56122987 11221 "optional" : 1,
44660702
DM
11222 "type" : "integer"
11223 },
11224 "sockets" : {
7aacca6f 11225 "default" : 1,
44660702
DM
11226 "description" : "The number of CPU sockets.",
11227 "minimum" : 1,
11228 "optional" : 1,
11229 "type" : "integer"
7aacca6f 11230 },
44660702
DM
11231 "startdate" : {
11232 "default" : "now",
11233 "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'.",
11234 "optional" : 1,
11235 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
11236 "type" : "string",
11237 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
11238 },
11239 "startup" : {
11240 "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.",
11241 "format" : "pve-startup-order",
11242 "optional" : 1,
11243 "type" : "string",
11244 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
11245 },
11246 "storage" : {
11247 "description" : "Default storage.",
11248 "format" : "pve-storage-id",
7aacca6f 11249 "optional" : 1,
56122987
DM
11250 "type" : "string"
11251 },
44660702
DM
11252 "tablet" : {
11253 "default" : 1,
11254 "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 11255 "optional" : 1,
44660702
DM
11256 "type" : "boolean"
11257 },
11258 "tdf" : {
11259 "default" : 0,
11260 "description" : "Enable/disable time drift fix.",
11261 "optional" : 1,
11262 "type" : "boolean"
7aacca6f
DM
11263 },
11264 "template" : {
7aacca6f 11265 "default" : 0,
44660702 11266 "description" : "Enable/disable Template.",
7aacca6f
DM
11267 "optional" : 1,
11268 "type" : "boolean"
11269 },
44660702
DM
11270 "unique" : {
11271 "description" : "Assign a unique random ethernet address.",
7aacca6f 11272 "optional" : 1,
44660702
DM
11273 "requires" : "archive",
11274 "type" : "boolean"
56122987 11275 },
44660702
DM
11276 "unused[n]" : {
11277 "description" : "Reference to unused volumes.",
11278 "format" : "pve-volume-id",
7aacca6f 11279 "optional" : 1,
44660702
DM
11280 "type" : "string"
11281 },
11282 "usb[n]" : {
7aacca6f 11283 "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. 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\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n",
56122987 11284 "format" : {
7aacca6f
DM
11285 "host" : {
11286 "default_key" : 1,
44660702 11287 "description" : "The Host USB device or port or the value spice",
7aacca6f 11288 "format" : "pve-qm-usb-device",
44660702
DM
11289 "format_description" : "HOSTUSBDEVICE|spice",
11290 "type" : "string"
7aacca6f 11291 },
56122987
DM
11292 "usb3" : {
11293 "description" : "Specifies whether if given host option is a USB3 device or port",
44660702 11294 "format_description" : "yes|no",
56122987 11295 "optional" : 1,
56122987 11296 "type" : "boolean"
7aacca6f 11297 }
56122987 11298 },
56122987 11299 "optional" : 1,
44660702 11300 "type" : "string"
56122987 11301 },
44660702
DM
11302 "vcpus" : {
11303 "default" : 0,
11304 "description" : "Number of hotplugged vcpus.",
11305 "minimum" : 1,
56122987 11306 "optional" : 1,
44660702 11307 "type" : "integer"
7aacca6f 11308 },
44660702
DM
11309 "vga" : {
11310 "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.",
11311 "enum" : [
11312 "std",
11313 "cirrus",
11314 "vmware",
11315 "qxl",
11316 "serial0",
11317 "serial1",
11318 "serial2",
11319 "serial3",
11320 "qxl2",
11321 "qxl3",
11322 "qxl4"
11323 ],
11324 "optional" : 1,
11325 "type" : "string"
7aacca6f 11326 },
44660702
DM
11327 "virtio[n]" : {
11328 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
11329 "format" : {
11330 "aio" : {
11331 "description" : "AIO type to use.",
11332 "enum" : [
11333 "native",
11334 "threads"
11335 ],
11336 "format_description" : "native|threads",
11337 "optional" : 1,
11338 "type" : "string"
11339 },
11340 "backup" : {
11341 "description" : "Whether the drive should be included when making backups.",
11342 "format_description" : "on|off",
11343 "optional" : 1,
11344 "type" : "boolean"
11345 },
11346 "bps" : {
11347 "description" : "Maximum r/w speed speed in bytes per second.",
11348 "format_description" : "bps",
11349 "optional" : 1,
11350 "type" : "integer"
11351 },
11352 "bps_rd" : {
11353 "description" : "Maximum read speed speed in bytes per second.",
11354 "format_description" : "bps",
11355 "optional" : 1,
11356 "type" : "integer"
11357 },
11358 "bps_wr" : {
11359 "description" : "Maximum write speed speed in bytes per second.",
11360 "format_description" : "bps",
11361 "optional" : 1,
11362 "type" : "integer"
11363 },
11364 "cache" : {
11365 "description" : "The drive's cache mode",
11366 "enum" : [
11367 "none",
11368 "writethrough",
11369 "writeback",
11370 "unsafe",
11371 "directsync"
11372 ],
11373 "format_description" : "none|writethrough|writeback|unsafe|directsync",
11374 "optional" : 1,
11375 "type" : "string"
11376 },
11377 "cyls" : {
11378 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
11379 "format_description" : "count",
11380 "optional" : 1,
11381 "type" : "integer"
11382 },
11383 "detect_zeroes" : {
11384 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
11385 "optional" : 1,
11386 "type" : "boolean"
11387 },
11388 "discard" : {
11389 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11390 "enum" : [
11391 "ignore",
11392 "on"
11393 ],
11394 "format_description" : "ignore|on",
11395 "optional" : 1,
11396 "type" : "string"
11397 },
11398 "file" : {
11399 "default_key" : 1,
11400 "description" : "The drive's backing volume.",
11401 "format" : "pve-volume-id-or-qm-path",
11402 "format_description" : "volume",
11403 "type" : "string"
11404 },
11405 "format" : {
11406 "description" : "The drive's backing file's data format.",
11407 "enum" : [
11408 "raw",
11409 "cow",
11410 "qcow",
11411 "qed",
11412 "qcow2",
11413 "vmdk",
11414 "cloop"
11415 ],
11416 "format_description" : "drive format",
11417 "optional" : 1,
11418 "type" : "string"
11419 },
11420 "heads" : {
11421 "description" : "Force the drive's physical geometry to have a specific head count.",
11422 "format_description" : "count",
11423 "optional" : 1,
11424 "type" : "integer"
11425 },
11426 "iops" : {
11427 "description" : "Maximum r/w I/O speed in operations per second.",
11428 "format_description" : "iops",
11429 "optional" : 1,
11430 "type" : "integer"
11431 },
11432 "iops_max" : {
11433 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11434 "format_description" : "iops",
11435 "optional" : 1,
11436 "type" : "integer"
11437 },
11438 "iops_rd" : {
11439 "description" : "Maximum read I/O speed in operations per second.",
11440 "format_description" : "iops",
11441 "optional" : 1,
11442 "type" : "integer"
11443 },
11444 "iops_rd_max" : {
11445 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11446 "format_description" : "iops",
11447 "optional" : 1,
11448 "type" : "integer"
11449 },
11450 "iops_wr" : {
11451 "description" : "Maximum write I/O speed in operations per second.",
11452 "format_description" : "iops",
11453 "optional" : 1,
11454 "type" : "integer"
11455 },
11456 "iops_wr_max" : {
11457 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11458 "format_description" : "iops",
11459 "optional" : 1,
11460 "type" : "integer"
11461 },
11462 "iothread" : {
11463 "description" : "Whether to use iothreads for this drive",
11464 "format_description" : "off|on",
11465 "optional" : 1,
11466 "type" : "boolean"
11467 },
11468 "mbps" : {
11469 "description" : "Maximum r/w speed speed in megabytes per second.",
11470 "format_description" : "mbps",
11471 "optional" : 1,
11472 "type" : "number"
11473 },
11474 "mbps_max" : {
11475 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11476 "format_description" : "mbps",
11477 "optional" : 1,
11478 "type" : "number"
11479 },
11480 "mbps_rd" : {
11481 "description" : "Maximum read speed speed in megabytes per second.",
11482 "format_description" : "mbps",
11483 "optional" : 1,
11484 "type" : "number"
11485 },
11486 "mbps_rd_max" : {
11487 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11488 "format_description" : "mbps",
11489 "optional" : 1,
11490 "type" : "number"
11491 },
11492 "mbps_wr" : {
11493 "description" : "Maximum write speed speed in megabytes per second.",
11494 "format_description" : "mbps",
11495 "optional" : 1,
11496 "type" : "number"
11497 },
11498 "mbps_wr_max" : {
11499 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11500 "format_description" : "mbps",
11501 "optional" : 1,
11502 "type" : "number"
11503 },
11504 "media" : {
11505 "default" : "disk",
11506 "description" : "The drive's media type.",
11507 "enum" : [
11508 "cdrom",
11509 "disk"
11510 ],
11511 "format_description" : "cdrom|disk",
11512 "optional" : 1,
11513 "type" : "string"
11514 },
11515 "rerror" : {
11516 "description" : "Read error action.",
11517 "enum" : [
11518 "ignore",
11519 "report",
11520 "stop"
11521 ],
11522 "format_description" : "ignore|report|stop",
11523 "optional" : 1,
11524 "type" : "string"
11525 },
11526 "secs" : {
11527 "description" : "Force the drive's physical geometry to have a specific sector count.",
11528 "format_description" : "count",
11529 "optional" : 1,
11530 "type" : "integer"
11531 },
11532 "serial" : {
11533 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11534 "format" : "urlencoded",
11535 "format_description" : "serial",
11536 "maxLength" : 60,
11537 "optional" : 1,
11538 "type" : "string"
11539 },
11540 "size" : {
11541 "description" : "Disk size. This is purely informational and has no effect.",
11542 "format" : "disk-size",
11543 "optional" : 1,
11544 "type" : "string"
11545 },
11546 "snapshot" : {
11547 "description" : "Whether the drive should be included when making snapshots.",
11548 "format_description" : "on|off",
11549 "optional" : 1,
11550 "type" : "boolean"
11551 },
11552 "trans" : {
11553 "description" : "Force disk geometry bios translation mode.",
11554 "enum" : [
11555 "none",
11556 "lba",
11557 "auto"
11558 ],
11559 "format_description" : "none|lba|auto",
11560 "optional" : 1,
11561 "type" : "string"
11562 },
11563 "volume" : {
11564 "alias" : "file"
11565 },
11566 "werror" : {
11567 "description" : "Write error action.",
11568 "enum" : [
11569 "enospc",
11570 "ignore",
11571 "report",
11572 "stop"
11573 ],
11574 "format_description" : "enospc|ignore|report|stop",
11575 "optional" : 1,
11576 "type" : "string"
11577 }
11578 },
11579 "optional" : 1,
11580 "type" : "string"
7aacca6f 11581 },
44660702
DM
11582 "vmid" : {
11583 "description" : "The (unique) ID of the VM.",
11584 "format" : "pve-vmid",
11585 "minimum" : 1,
11586 "type" : "integer"
11587 },
11588 "watchdog" : {
11589 "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)",
11590 "format" : "pve-qm-watchdog",
7aacca6f 11591 "optional" : 1,
44660702 11592 "type" : "string"
56122987 11593 }
44660702 11594 }
56122987 11595 },
56122987 11596 "permissions" : {
44660702
DM
11597 "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.",
11598 "user" : "all"
56122987 11599 },
44660702
DM
11600 "protected" : 1,
11601 "proxyto" : "node",
56122987 11602 "returns" : {
44660702 11603 "type" : "string"
7aacca6f 11604 }
56122987 11605 }
7aacca6f 11606 },
44660702 11607 "leaf" : 0,
7aacca6f 11608 "path" : "/nodes/{node}/qemu",
44660702 11609 "text" : "qemu"
56122987
DM
11610 },
11611 {
11612 "children" : [
11613 {
56122987
DM
11614 "children" : [
11615 {
56122987 11616 "info" : {
44660702
DM
11617 "GET" : {
11618 "description" : "Get container configuration.",
11619 "method" : "GET",
11620 "name" : "vm_config",
11621 "parameters" : {
11622 "additionalProperties" : 0,
11623 "properties" : {
11624 "node" : {
11625 "description" : "The cluster node name.",
11626 "format" : "pve-node",
11627 "type" : "string"
11628 },
11629 "vmid" : {
11630 "description" : "The (unique) ID of the VM.",
11631 "format" : "pve-vmid",
11632 "minimum" : 1,
11633 "type" : "integer"
11634 }
11635 }
11636 },
11637 "permissions" : {
11638 "check" : [
11639 "perm",
11640 "/vms/{vmid}",
11641 [
11642 "VM.Audit"
11643 ]
11644 ]
11645 },
11646 "proxyto" : "node",
11647 "returns" : {
11648 "properties" : {
11649 "digest" : {
11650 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
11651 "type" : "string"
11652 }
11653 },
11654 "type" : "object"
11655 }
11656 },
56122987 11657 "PUT" : {
44660702
DM
11658 "description" : "Set container options.",
11659 "method" : "PUT",
11660 "name" : "update_vm",
56122987 11661 "parameters" : {
44660702 11662 "additionalProperties" : 0,
56122987 11663 "properties" : {
44660702
DM
11664 "arch" : {
11665 "default" : "amd64",
11666 "description" : "OS architecture type.",
11667 "enum" : [
11668 "amd64",
11669 "i386"
11670 ],
7aacca6f 11671 "optional" : 1,
44660702
DM
11672 "type" : "string"
11673 },
11674 "cmode" : {
7aacca6f 11675 "default" : "tty",
44660702 11676 "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
11677 "enum" : [
11678 "shell",
11679 "console",
11680 "tty"
11681 ],
44660702
DM
11682 "optional" : 1,
11683 "type" : "string"
7aacca6f 11684 },
44660702
DM
11685 "console" : {
11686 "default" : 1,
11687 "description" : "Attach a console device (/dev/console) to the container.",
7aacca6f 11688 "optional" : 1,
44660702 11689 "type" : "boolean"
7aacca6f 11690 },
44660702
DM
11691 "cpulimit" : {
11692 "default" : 0,
11693 "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.",
11694 "maximum" : 128,
7aacca6f 11695 "minimum" : 0,
7aacca6f 11696 "optional" : 1,
44660702 11697 "type" : "number"
7aacca6f 11698 },
44660702
DM
11699 "cpuunits" : {
11700 "default" : 1024,
11701 "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.",
11702 "maximum" : 500000,
11703 "minimum" : 0,
11704 "optional" : 1,
11705 "type" : "integer"
7aacca6f 11706 },
44660702
DM
11707 "delete" : {
11708 "description" : "A list of settings you want to delete.",
11709 "format" : "pve-configid-list",
7aacca6f 11710 "optional" : 1,
44660702 11711 "type" : "string"
7aacca6f 11712 },
44660702
DM
11713 "description" : {
11714 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 11715 "optional" : 1,
44660702 11716 "type" : "string"
7aacca6f 11717 },
44660702
DM
11718 "digest" : {
11719 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
11720 "maxLength" : 40,
7aacca6f 11721 "optional" : 1,
44660702 11722 "type" : "string"
7aacca6f 11723 },
44660702
DM
11724 "hostname" : {
11725 "description" : "Set a host name for the container.",
11726 "format" : "dns-name",
11727 "maxLength" : 255,
56122987 11728 "optional" : 1,
44660702
DM
11729 "type" : "string"
11730 },
11731 "lock" : {
11732 "description" : "Lock/unlock the VM.",
11733 "enum" : [
11734 "migrate",
11735 "backup",
11736 "snapshot",
11737 "rollback"
11738 ],
11739 "optional" : 1,
11740 "type" : "string"
11741 },
11742 "memory" : {
11743 "default" : 512,
11744 "description" : "Amount of RAM for the VM in MB.",
11745 "minimum" : 16,
11746 "optional" : 1,
11747 "type" : "integer"
7aacca6f
DM
11748 },
11749 "mp[n]" : {
44660702 11750 "description" : "Use volume as container mount point (experimental feature).",
7aacca6f 11751 "format" : {
7aacca6f
DM
11752 "acl" : {
11753 "description" : "Explicitly enable or disable ACL support.",
44660702 11754 "format_description" : "acl",
7aacca6f 11755 "optional" : 1,
44660702 11756 "type" : "boolean"
7aacca6f
DM
11757 },
11758 "backup" : {
11759 "description" : "Whether to include the mountpoint in backups.",
44660702 11760 "format_description" : "[1|0]",
7aacca6f 11761 "optional" : 1,
44660702 11762 "type" : "boolean"
7aacca6f
DM
11763 },
11764 "mp" : {
11765 "description" : "Path to the mountpoint as seen from inside the container.",
7aacca6f 11766 "format" : "pve-lxc-mp-string",
44660702
DM
11767 "format_description" : "Path",
11768 "type" : "string"
11769 },
11770 "quota" : {
11771 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
11772 "format_description" : "[0|1]",
11773 "optional" : 1,
11774 "type" : "boolean"
11775 },
11776 "ro" : {
11777 "description" : "Read-only mountpoint (not supported with bind mounts)",
11778 "format_description" : "ro",
11779 "optional" : 1,
11780 "type" : "boolean"
11781 },
11782 "size" : {
11783 "description" : "Volume size (read only value).",
11784 "format" : "disk-size",
11785 "format_description" : "DiskSize",
11786 "optional" : 1,
11787 "type" : "string"
11788 },
11789 "volume" : {
11790 "default_key" : 1,
11791 "description" : "Volume, device or directory to mount into the container.",
11792 "format" : "pve-lxc-mp-string",
11793 "format_description" : "volume",
11794 "type" : "string"
11795 }
11796 },
7aacca6f 11797 "optional" : 1,
44660702 11798 "type" : "string"
56122987 11799 },
44660702
DM
11800 "nameserver" : {
11801 "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.",
11802 "format" : "address-list",
56122987 11803 "optional" : 1,
44660702 11804 "type" : "string"
56122987
DM
11805 },
11806 "net[n]" : {
44660702 11807 "description" : "Specifies network interfaces for the container.",
56122987 11808 "format" : {
44660702
DM
11809 "bridge" : {
11810 "description" : "Bridge to attach the network device to.",
11811 "format_description" : "vmbr<Number>",
56122987 11812 "optional" : 1,
44660702
DM
11813 "pattern" : "[-_.\\w\\d]+",
11814 "type" : "string"
56122987 11815 },
44660702
DM
11816 "firewall" : {
11817 "description" : "Controls whether this interface's firewall rules should be used.",
11818 "format_description" : "[1|0]",
56122987 11819 "optional" : 1,
44660702 11820 "type" : "boolean"
56122987 11821 },
44660702
DM
11822 "gw" : {
11823 "description" : "Default gateway for IPv4 traffic.",
11824 "format" : "ipv4",
11825 "format_description" : "GatewayIPv4",
56122987 11826 "optional" : 1,
44660702 11827 "type" : "string"
56122987
DM
11828 },
11829 "gw6" : {
7aacca6f 11830 "description" : "Default gateway for IPv6 traffic.",
44660702
DM
11831 "format" : "ipv6",
11832 "format_description" : "GatewayIPv6",
7aacca6f 11833 "optional" : 1,
56122987
DM
11834 "type" : "string"
11835 },
44660702
DM
11836 "hwaddr" : {
11837 "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)",
11838 "format_description" : "MAC",
11839 "optional" : 1,
11840 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
11841 "type" : "string"
11842 },
11843 "ip" : {
11844 "description" : "IPv4 address in CIDR format.",
11845 "format" : "pve-ipv4-config",
11846 "format_description" : "IPv4Format/CIDR",
56122987 11847 "optional" : 1,
44660702 11848 "type" : "string"
56122987 11849 },
7aacca6f 11850 "ip6" : {
7aacca6f
DM
11851 "description" : "IPv6 address in CIDR format.",
11852 "format" : "pve-ipv6-config",
44660702 11853 "format_description" : "IPv6Format/CIDR",
7aacca6f 11854 "optional" : 1,
44660702 11855 "type" : "string"
56122987 11856 },
44660702
DM
11857 "mtu" : {
11858 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
11859 "format_description" : "Number",
11860 "minimum" : 64,
56122987 11861 "optional" : 1,
44660702 11862 "type" : "integer"
56122987
DM
11863 },
11864 "name" : {
44660702 11865 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
7aacca6f 11866 "format_description" : "String",
56122987 11867 "pattern" : "[-_.\\w\\d]+",
44660702 11868 "type" : "string"
56122987 11869 },
44660702
DM
11870 "rate" : {
11871 "description" : "Apply rate limiting to the interface",
11872 "format_description" : "mbps",
56122987 11873 "optional" : 1,
44660702 11874 "type" : "number"
7aacca6f 11875 },
44660702
DM
11876 "tag" : {
11877 "description" : "VLAN tag for this interface.",
11878 "format_description" : "VlanNo",
11879 "maximum" : "4094",
11880 "minimum" : "2",
56122987 11881 "optional" : 1,
7aacca6f 11882 "type" : "integer"
56122987 11883 },
44660702
DM
11884 "trunks" : {
11885 "description" : "VLAN ids to pass through the interface",
11886 "format_description" : "vlanid[;vlanid...]",
11887 "optional" : 1,
11888 "pattern" : "(?^:\\d+(?:;\\d+)*)",
11889 "type" : "string"
11890 },
11891 "type" : {
11892 "description" : "Network interface type.",
11893 "enum" : [
11894 "veth"
11895 ],
56122987 11896 "optional" : 1,
44660702 11897 "type" : "string"
56122987
DM
11898 }
11899 },
7aacca6f 11900 "optional" : 1,
56122987
DM
11901 "type" : "string"
11902 },
44660702
DM
11903 "node" : {
11904 "description" : "The cluster node name.",
11905 "format" : "pve-node",
11906 "type" : "string"
56122987 11907 },
44660702
DM
11908 "onboot" : {
11909 "default" : 0,
11910 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 11911 "optional" : 1,
44660702 11912 "type" : "boolean"
56122987 11913 },
44660702
DM
11914 "ostype" : {
11915 "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.",
11916 "enum" : [
11917 "debian",
11918 "ubuntu",
11919 "centos",
11920 "fedora",
11921 "opensuse",
11922 "archlinux",
11923 "alpine",
11924 "unmanaged"
11925 ],
56122987 11926 "optional" : 1,
44660702 11927 "type" : "string"
56122987 11928 },
44660702
DM
11929 "protection" : {
11930 "default" : 0,
11931 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
56122987 11932 "optional" : 1,
44660702 11933 "type" : "boolean"
56122987 11934 },
7aacca6f
DM
11935 "rootfs" : {
11936 "description" : "Use volume as container root.",
56122987
DM
11937 "format" : {
11938 "acl" : {
44660702 11939 "description" : "Explicitly enable or disable ACL support.",
7aacca6f 11940 "format_description" : "acl",
7aacca6f
DM
11941 "optional" : 1,
11942 "type" : "boolean"
56122987
DM
11943 },
11944 "backup" : {
7aacca6f 11945 "description" : "Whether to include the mountpoint in backups.",
44660702 11946 "format_description" : "[1|0]",
7aacca6f 11947 "optional" : 1,
56122987
DM
11948 "type" : "boolean"
11949 },
44660702
DM
11950 "quota" : {
11951 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
11952 "format_description" : "[0|1]",
11953 "optional" : 1,
11954 "type" : "boolean"
11955 },
11956 "ro" : {
11957 "description" : "Read-only mountpoint (not supported with bind mounts)",
11958 "format_description" : "ro",
56122987 11959 "optional" : 1,
44660702
DM
11960 "type" : "boolean"
11961 },
11962 "size" : {
7aacca6f 11963 "description" : "Volume size (read only value).",
44660702 11964 "format" : "disk-size",
56122987 11965 "format_description" : "DiskSize",
56122987 11966 "optional" : 1,
44660702 11967 "type" : "string"
7aacca6f
DM
11968 },
11969 "volume" : {
7aacca6f
DM
11970 "default_key" : 1,
11971 "description" : "Volume, device or directory to mount into the container.",
44660702
DM
11972 "format" : "pve-lxc-mp-string",
11973 "format_description" : "volume",
7aacca6f 11974 "type" : "string"
56122987 11975 }
44660702
DM
11976 },
11977 "optional" : 1,
11978 "type" : "string"
11979 },
11980 "searchdomain" : {
11981 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
11982 "format" : "dns-name-list",
11983 "optional" : 1,
11984 "type" : "string"
11985 },
11986 "startup" : {
11987 "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.",
11988 "format" : "pve-startup-order",
11989 "optional" : 1,
11990 "type" : "string",
11991 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
11992 },
11993 "swap" : {
11994 "default" : 512,
11995 "description" : "Amount of SWAP for the VM in MB.",
11996 "minimum" : 0,
11997 "optional" : 1,
11998 "type" : "integer"
56122987 11999 },
56122987 12000 "template" : {
44660702 12001 "default" : 0,
7aacca6f 12002 "description" : "Enable/disable Template.",
56122987 12003 "optional" : 1,
44660702 12004 "type" : "boolean"
56122987 12005 },
44660702
DM
12006 "tty" : {
12007 "default" : 2,
12008 "description" : "Specify the number of tty available to the container",
12009 "maximum" : 6,
12010 "minimum" : 0,
12011 "optional" : 1,
12012 "type" : "integer"
56122987 12013 },
44660702
DM
12014 "unprivileged" : {
12015 "default" : 0,
12016 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
56122987 12017 "optional" : 1,
44660702 12018 "type" : "boolean"
56122987 12019 },
44660702
DM
12020 "unused[n]" : {
12021 "description" : "Reference to unused volumes.",
12022 "format" : "pve-volume-id",
56122987 12023 "optional" : 1,
44660702
DM
12024 "type" : "string"
12025 },
12026 "vmid" : {
12027 "description" : "The (unique) ID of the VM.",
12028 "format" : "pve-vmid",
12029 "minimum" : 1,
12030 "type" : "integer"
56122987 12031 }
44660702 12032 }
56122987 12033 },
56122987
DM
12034 "permissions" : {
12035 "check" : [
12036 "perm",
12037 "/vms/{vmid}",
12038 [
12039 "VM.Config.Disk",
12040 "VM.Config.CPU",
12041 "VM.Config.Memory",
12042 "VM.Config.Network",
12043 "VM.Config.Options"
12044 ],
12045 "any",
12046 1
12047 ]
12048 },
44660702
DM
12049 "protected" : 1,
12050 "proxyto" : "node",
56122987
DM
12051 "returns" : {
12052 "type" : "null"
7aacca6f 12053 }
56122987 12054 }
7aacca6f 12055 },
44660702 12056 "leaf" : 1,
7aacca6f 12057 "path" : "/nodes/{node}/lxc/{vmid}/config",
44660702 12058 "text" : "config"
56122987
DM
12059 },
12060 {
56122987
DM
12061 "children" : [
12062 {
12063 "info" : {
12064 "GET" : {
44660702 12065 "description" : "Get virtual machine status.",
7aacca6f 12066 "method" : "GET",
44660702 12067 "name" : "vm_status",
56122987 12068 "parameters" : {
44660702 12069 "additionalProperties" : 0,
56122987 12070 "properties" : {
56122987 12071 "node" : {
44660702 12072 "description" : "The cluster node name.",
56122987 12073 "format" : "pve-node",
44660702 12074 "type" : "string"
7aacca6f
DM
12075 },
12076 "vmid" : {
12077 "description" : "The (unique) ID of the VM.",
44660702 12078 "format" : "pve-vmid",
7aacca6f 12079 "minimum" : 1,
44660702 12080 "type" : "integer"
56122987 12081 }
44660702 12082 }
7aacca6f
DM
12083 },
12084 "permissions" : {
12085 "check" : [
12086 "perm",
12087 "/vms/{vmid}",
12088 [
12089 "VM.Audit"
12090 ]
12091 ]
12092 },
44660702 12093 "protected" : 1,
7aacca6f 12094 "proxyto" : "node",
44660702
DM
12095 "returns" : {
12096 "type" : "object"
12097 }
56122987
DM
12098 }
12099 },
44660702
DM
12100 "leaf" : 1,
12101 "path" : "/nodes/{node}/lxc/{vmid}/status/current",
56122987
DM
12102 "text" : "current"
12103 },
12104 {
56122987
DM
12105 "info" : {
12106 "POST" : {
7aacca6f 12107 "description" : "Start the container.",
44660702 12108 "method" : "POST",
7aacca6f 12109 "name" : "vm_start",
56122987
DM
12110 "parameters" : {
12111 "additionalProperties" : 0,
12112 "properties" : {
56122987 12113 "node" : {
7aacca6f 12114 "description" : "The cluster node name.",
44660702
DM
12115 "format" : "pve-node",
12116 "type" : "string"
56122987 12117 },
7aacca6f 12118 "skiplock" : {
44660702 12119 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 12120 "optional" : 1,
44660702 12121 "type" : "boolean"
7aacca6f 12122 },
56122987 12123 "vmid" : {
7aacca6f 12124 "description" : "The (unique) ID of the VM.",
44660702 12125 "format" : "pve-vmid",
56122987 12126 "minimum" : 1,
44660702 12127 "type" : "integer"
56122987
DM
12128 }
12129 }
12130 },
12131 "permissions" : {
12132 "check" : [
12133 "perm",
12134 "/vms/{vmid}",
12135 [
12136 "VM.PowerMgmt"
12137 ]
12138 ]
12139 },
44660702 12140 "protected" : 1,
7aacca6f 12141 "proxyto" : "node",
44660702
DM
12142 "returns" : {
12143 "type" : "string"
12144 }
12145 }
12146 },
12147 "leaf" : 1,
12148 "path" : "/nodes/{node}/lxc/{vmid}/status/start",
12149 "text" : "start"
12150 },
12151 {
12152 "info" : {
12153 "POST" : {
12154 "description" : "Stop the container. This will abruptly stop all processes running in the container.",
7aacca6f
DM
12155 "method" : "POST",
12156 "name" : "vm_stop",
12157 "parameters" : {
44660702 12158 "additionalProperties" : 0,
7aacca6f 12159 "properties" : {
44660702
DM
12160 "node" : {
12161 "description" : "The cluster node name.",
12162 "format" : "pve-node",
12163 "type" : "string"
12164 },
7aacca6f
DM
12165 "skiplock" : {
12166 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
12167 "optional" : 1,
12168 "type" : "boolean"
7aacca6f
DM
12169 },
12170 "vmid" : {
44660702 12171 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12172 "format" : "pve-vmid",
12173 "minimum" : 1,
7aacca6f 12174 "type" : "integer"
7aacca6f 12175 }
44660702
DM
12176 }
12177 },
12178 "permissions" : {
12179 "check" : [
12180 "perm",
12181 "/vms/{vmid}",
12182 [
12183 "VM.PowerMgmt"
12184 ]
12185 ]
7aacca6f 12186 },
44660702
DM
12187 "protected" : 1,
12188 "proxyto" : "node",
12189 "returns" : {
12190 "type" : "string"
12191 }
56122987 12192 }
7aacca6f 12193 },
7aacca6f 12194 "leaf" : 1,
44660702
DM
12195 "path" : "/nodes/{node}/lxc/{vmid}/status/stop",
12196 "text" : "stop"
56122987
DM
12197 },
12198 {
56122987
DM
12199 "info" : {
12200 "POST" : {
44660702
DM
12201 "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.",
12202 "method" : "POST",
7aacca6f 12203 "name" : "vm_shutdown",
56122987 12204 "parameters" : {
44660702 12205 "additionalProperties" : 0,
56122987 12206 "properties" : {
7aacca6f 12207 "forceStop" : {
44660702 12208 "default" : 0,
7aacca6f
DM
12209 "description" : "Make sure the Container stops.",
12210 "optional" : 1,
44660702
DM
12211 "type" : "boolean"
12212 },
12213 "node" : {
12214 "description" : "The cluster node name.",
12215 "format" : "pve-node",
12216 "type" : "string"
7aacca6f
DM
12217 },
12218 "timeout" : {
7aacca6f 12219 "default" : 60,
44660702
DM
12220 "description" : "Wait maximal timeout seconds.",
12221 "minimum" : 0,
56122987 12222 "optional" : 1,
44660702 12223 "type" : "integer"
56122987
DM
12224 },
12225 "vmid" : {
7aacca6f 12226 "description" : "The (unique) ID of the VM.",
44660702
DM
12227 "format" : "pve-vmid",
12228 "minimum" : 1,
7aacca6f 12229 "type" : "integer"
56122987 12230 }
44660702 12231 }
56122987
DM
12232 },
12233 "permissions" : {
12234 "check" : [
12235 "perm",
12236 "/vms/{vmid}",
12237 [
12238 "VM.PowerMgmt"
12239 ]
12240 ]
12241 },
44660702
DM
12242 "protected" : 1,
12243 "proxyto" : "node",
7aacca6f
DM
12244 "returns" : {
12245 "type" : "string"
12246 }
56122987
DM
12247 }
12248 },
44660702
DM
12249 "leaf" : 1,
12250 "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown",
7aacca6f 12251 "text" : "shutdown"
56122987
DM
12252 },
12253 {
56122987
DM
12254 "info" : {
12255 "POST" : {
7aacca6f 12256 "description" : "Suspend the container.",
7aacca6f 12257 "method" : "POST",
7aacca6f 12258 "name" : "vm_suspend",
56122987
DM
12259 "parameters" : {
12260 "additionalProperties" : 0,
12261 "properties" : {
44660702
DM
12262 "node" : {
12263 "description" : "The cluster node name.",
12264 "format" : "pve-node",
12265 "type" : "string"
12266 },
7aacca6f 12267 "vmid" : {
7aacca6f
DM
12268 "description" : "The (unique) ID of the VM.",
12269 "format" : "pve-vmid",
44660702
DM
12270 "minimum" : 1,
12271 "type" : "integer"
56122987
DM
12272 }
12273 }
7aacca6f 12274 },
56122987
DM
12275 "permissions" : {
12276 "check" : [
12277 "perm",
12278 "/vms/{vmid}",
12279 [
12280 "VM.PowerMgmt"
12281 ]
12282 ]
12283 },
7aacca6f 12284 "protected" : 1,
44660702
DM
12285 "proxyto" : "node",
12286 "returns" : {
12287 "type" : "string"
12288 }
12289 }
12290 },
12291 "leaf" : 1,
12292 "path" : "/nodes/{node}/lxc/{vmid}/status/suspend",
12293 "text" : "suspend"
12294 },
12295 {
12296 "info" : {
12297 "POST" : {
12298 "description" : "Resume the container.",
12299 "method" : "POST",
12300 "name" : "vm_resume",
56122987 12301 "parameters" : {
44660702 12302 "additionalProperties" : 0,
56122987
DM
12303 "properties" : {
12304 "node" : {
7aacca6f 12305 "description" : "The cluster node name.",
44660702
DM
12306 "format" : "pve-node",
12307 "type" : "string"
56122987
DM
12308 },
12309 "vmid" : {
7aacca6f 12310 "description" : "The (unique) ID of the VM.",
56122987 12311 "format" : "pve-vmid",
44660702
DM
12312 "minimum" : 1,
12313 "type" : "integer"
56122987 12314 }
44660702
DM
12315 }
12316 },
12317 "permissions" : {
12318 "check" : [
12319 "perm",
12320 "/vms/{vmid}",
12321 [
12322 "VM.PowerMgmt"
12323 ]
12324 ]
56122987 12325 },
44660702
DM
12326 "protected" : 1,
12327 "proxyto" : "node",
12328 "returns" : {
12329 "type" : "string"
12330 }
7aacca6f
DM
12331 }
12332 },
44660702
DM
12333 "leaf" : 1,
12334 "path" : "/nodes/{node}/lxc/{vmid}/status/resume",
7aacca6f
DM
12335 "text" : "resume"
12336 }
12337 ],
12338 "info" : {
12339 "GET" : {
7aacca6f 12340 "description" : "Directory index",
44660702 12341 "method" : "GET",
7aacca6f 12342 "name" : "vmcmdidx",
7aacca6f
DM
12343 "parameters" : {
12344 "additionalProperties" : 0,
12345 "properties" : {
12346 "node" : {
12347 "description" : "The cluster node name.",
44660702
DM
12348 "format" : "pve-node",
12349 "type" : "string"
56122987 12350 },
7aacca6f 12351 "vmid" : {
44660702 12352 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12353 "format" : "pve-vmid",
12354 "minimum" : 1,
44660702 12355 "type" : "integer"
7aacca6f 12356 }
56122987
DM
12357 }
12358 },
44660702
DM
12359 "permissions" : {
12360 "user" : "all"
12361 },
12362 "proxyto" : "node",
7aacca6f 12363 "returns" : {
7aacca6f
DM
12364 "items" : {
12365 "properties" : {
12366 "subdir" : {
12367 "type" : "string"
12368 }
12369 },
12370 "type" : "object"
12371 },
12372 "links" : [
12373 {
44660702
DM
12374 "href" : "{subdir}",
12375 "rel" : "child"
7aacca6f 12376 }
44660702
DM
12377 ],
12378 "type" : "array"
7aacca6f
DM
12379 }
12380 }
44660702
DM
12381 },
12382 "leaf" : 0,
12383 "path" : "/nodes/{node}/lxc/{vmid}/status",
12384 "text" : "status"
7aacca6f
DM
12385 },
12386 {
7aacca6f 12387 "children" : [
56122987 12388 {
7aacca6f
DM
12389 "children" : [
12390 {
12391 "info" : {
12392 "POST" : {
7aacca6f 12393 "description" : "Rollback LXC state to specified snapshot.",
7aacca6f 12394 "method" : "POST",
44660702 12395 "name" : "rollback",
7aacca6f 12396 "parameters" : {
44660702 12397 "additionalProperties" : 0,
7aacca6f 12398 "properties" : {
44660702
DM
12399 "node" : {
12400 "description" : "The cluster node name.",
12401 "format" : "pve-node",
12402 "type" : "string"
12403 },
7aacca6f 12404 "snapname" : {
44660702 12405 "description" : "The name of the snapshot.",
7aacca6f
DM
12406 "format" : "pve-configid",
12407 "maxLength" : 40,
7aacca6f
DM
12408 "type" : "string"
12409 },
7aacca6f 12410 "vmid" : {
44660702 12411 "description" : "The (unique) ID of the VM.",
7aacca6f 12412 "format" : "pve-vmid",
44660702
DM
12413 "minimum" : 1,
12414 "type" : "integer"
7aacca6f 12415 }
44660702
DM
12416 }
12417 },
12418 "permissions" : {
12419 "check" : [
12420 "perm",
12421 "/vms/{vmid}",
12422 [
12423 "VM.Snapshot"
12424 ]
12425 ]
7aacca6f 12426 },
44660702
DM
12427 "protected" : 1,
12428 "proxyto" : "node",
12429 "returns" : {
12430 "description" : "the task ID.",
12431 "type" : "string"
12432 }
7aacca6f
DM
12433 }
12434 },
7aacca6f 12435 "leaf" : 1,
44660702
DM
12436 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback",
12437 "text" : "rollback"
7aacca6f
DM
12438 },
12439 {
7aacca6f
DM
12440 "info" : {
12441 "GET" : {
7aacca6f 12442 "description" : "Get snapshot configuration",
44660702
DM
12443 "method" : "GET",
12444 "name" : "get_snapshot_config",
7aacca6f
DM
12445 "parameters" : {
12446 "additionalProperties" : 0,
12447 "properties" : {
7aacca6f 12448 "node" : {
7aacca6f 12449 "description" : "The cluster node name.",
44660702 12450 "format" : "pve-node",
7aacca6f
DM
12451 "type" : "string"
12452 },
12453 "snapname" : {
44660702 12454 "description" : "The name of the snapshot.",
7aacca6f
DM
12455 "format" : "pve-configid",
12456 "maxLength" : 40,
44660702
DM
12457 "type" : "string"
12458 },
12459 "vmid" : {
12460 "description" : "The (unique) ID of the VM.",
12461 "format" : "pve-vmid",
12462 "minimum" : 1,
12463 "type" : "integer"
7aacca6f
DM
12464 }
12465 }
12466 },
12467 "permissions" : {
12468 "check" : [
12469 "perm",
12470 "/vms/{vmid}",
12471 [
12472 "VM.Snapshot"
12473 ]
12474 ]
12475 },
44660702
DM
12476 "proxyto" : "node",
12477 "returns" : {
12478 "type" : "object"
12479 }
7aacca6f
DM
12480 },
12481 "PUT" : {
44660702
DM
12482 "description" : "Update snapshot metadata.",
12483 "method" : "PUT",
7aacca6f
DM
12484 "name" : "update_snapshot_config",
12485 "parameters" : {
12486 "additionalProperties" : 0,
12487 "properties" : {
44660702
DM
12488 "description" : {
12489 "description" : "A textual description or comment.",
12490 "optional" : 1,
12491 "type" : "string"
12492 },
7aacca6f 12493 "node" : {
7aacca6f 12494 "description" : "The cluster node name.",
44660702
DM
12495 "format" : "pve-node",
12496 "type" : "string"
7aacca6f
DM
12497 },
12498 "snapname" : {
12499 "description" : "The name of the snapshot.",
7aacca6f 12500 "format" : "pve-configid",
44660702
DM
12501 "maxLength" : 40,
12502 "type" : "string"
7aacca6f
DM
12503 },
12504 "vmid" : {
44660702 12505 "description" : "The (unique) ID of the VM.",
7aacca6f 12506 "format" : "pve-vmid",
44660702
DM
12507 "minimum" : 1,
12508 "type" : "integer"
7aacca6f
DM
12509 }
12510 }
12511 },
7aacca6f
DM
12512 "permissions" : {
12513 "check" : [
12514 "perm",
12515 "/vms/{vmid}",
12516 [
12517 "VM.Snapshot"
12518 ]
12519 ]
12520 },
44660702
DM
12521 "protected" : 1,
12522 "proxyto" : "node",
7aacca6f
DM
12523 "returns" : {
12524 "type" : "null"
12525 }
12526 }
12527 },
44660702 12528 "leaf" : 1,
7aacca6f 12529 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config",
44660702 12530 "text" : "config"
7aacca6f
DM
12531 }
12532 ],
56122987 12533 "info" : {
44660702
DM
12534 "DELETE" : {
12535 "description" : "Delete a LXC snapshot.",
12536 "method" : "DELETE",
12537 "name" : "delsnapshot",
56122987 12538 "parameters" : {
44660702 12539 "additionalProperties" : 0,
56122987 12540 "properties" : {
44660702
DM
12541 "force" : {
12542 "description" : "For removal from config file, even if removing disk snapshots fails.",
12543 "optional" : 1,
12544 "type" : "boolean"
12545 },
12546 "node" : {
12547 "description" : "The cluster node name.",
12548 "format" : "pve-node",
12549 "type" : "string"
7aacca6f
DM
12550 },
12551 "snapname" : {
7aacca6f
DM
12552 "description" : "The name of the snapshot.",
12553 "format" : "pve-configid",
44660702 12554 "maxLength" : 40,
7aacca6f 12555 "type" : "string"
44660702
DM
12556 },
12557 "vmid" : {
12558 "description" : "The (unique) ID of the VM.",
12559 "format" : "pve-vmid",
12560 "minimum" : 1,
12561 "type" : "integer"
56122987 12562 }
44660702 12563 }
7aacca6f 12564 },
56122987
DM
12565 "permissions" : {
12566 "check" : [
12567 "perm",
12568 "/vms/{vmid}",
12569 [
7aacca6f 12570 "VM.Snapshot"
56122987
DM
12571 ]
12572 ]
12573 },
44660702 12574 "protected" : 1,
7aacca6f 12575 "proxyto" : "node",
56122987 12576 "returns" : {
7aacca6f 12577 "description" : "the task ID.",
56122987 12578 "type" : "string"
44660702
DM
12579 }
12580 },
12581 "GET" : {
12582 "description" : "",
12583 "method" : "GET",
12584 "name" : "snapshot_cmd_idx",
7aacca6f
DM
12585 "parameters" : {
12586 "additionalProperties" : 0,
12587 "properties" : {
7aacca6f 12588 "node" : {
44660702 12589 "description" : "The cluster node name.",
7aacca6f 12590 "format" : "pve-node",
44660702 12591 "type" : "string"
7aacca6f
DM
12592 },
12593 "snapname" : {
44660702 12594 "description" : "The name of the snapshot.",
7aacca6f 12595 "format" : "pve-configid",
44660702
DM
12596 "maxLength" : 40,
12597 "type" : "string"
12598 },
12599 "vmid" : {
12600 "description" : "The (unique) ID of the VM.",
12601 "format" : "pve-vmid",
12602 "minimum" : 1,
12603 "type" : "integer"
7aacca6f
DM
12604 }
12605 }
12606 },
44660702
DM
12607 "permissions" : {
12608 "user" : "all"
12609 },
12610 "returns" : {
12611 "items" : {
12612 "properties" : {},
12613 "type" : "object"
12614 },
12615 "links" : [
12616 {
12617 "href" : "{cmd}",
12618 "rel" : "child"
12619 }
12620 ],
12621 "type" : "array"
12622 }
12623 }
12624 },
12625 "leaf" : 0,
12626 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}",
12627 "text" : "{snapname}"
12628 }
12629 ],
12630 "info" : {
12631 "GET" : {
12632 "description" : "List all snapshots.",
12633 "method" : "GET",
12634 "name" : "list",
12635 "parameters" : {
12636 "additionalProperties" : 0,
12637 "properties" : {
12638 "node" : {
12639 "description" : "The cluster node name.",
12640 "format" : "pve-node",
12641 "type" : "string"
12642 },
12643 "vmid" : {
12644 "description" : "The (unique) ID of the VM.",
12645 "format" : "pve-vmid",
12646 "minimum" : 1,
12647 "type" : "integer"
12648 }
56122987
DM
12649 }
12650 },
56122987 12651 "permissions" : {
7aacca6f
DM
12652 "check" : [
12653 "perm",
12654 "/vms/{vmid}",
12655 [
12656 "VM.Audit"
12657 ]
12658 ]
12659 },
44660702 12660 "protected" : 1,
56122987 12661 "proxyto" : "node",
7aacca6f 12662 "returns" : {
44660702
DM
12663 "items" : {
12664 "properties" : {},
12665 "type" : "object"
12666 },
7aacca6f
DM
12667 "links" : [
12668 {
12669 "href" : "{name}",
12670 "rel" : "child"
12671 }
12672 ],
7aacca6f 12673 "type" : "array"
44660702 12674 }
7aacca6f
DM
12675 },
12676 "POST" : {
44660702
DM
12677 "description" : "Snapshot a container.",
12678 "method" : "POST",
12679 "name" : "snapshot",
56122987
DM
12680 "parameters" : {
12681 "additionalProperties" : 0,
12682 "properties" : {
7aacca6f 12683 "description" : {
44660702 12684 "description" : "A textual description or comment.",
7aacca6f 12685 "optional" : 1,
44660702
DM
12686 "type" : "string"
12687 },
12688 "node" : {
12689 "description" : "The cluster node name.",
12690 "format" : "pve-node",
12691 "type" : "string"
56122987
DM
12692 },
12693 "snapname" : {
56122987 12694 "description" : "The name of the snapshot.",
44660702 12695 "format" : "pve-configid",
7aacca6f 12696 "maxLength" : 40,
44660702 12697 "type" : "string"
56122987 12698 },
44660702
DM
12699 "vmid" : {
12700 "description" : "The (unique) ID of the VM.",
12701 "format" : "pve-vmid",
12702 "minimum" : 1,
12703 "type" : "integer"
56122987 12704 }
7aacca6f 12705 }
56122987 12706 },
56122987
DM
12707 "permissions" : {
12708 "check" : [
12709 "perm",
12710 "/vms/{vmid}",
12711 [
7aacca6f 12712 "VM.Snapshot"
56122987
DM
12713 ]
12714 ]
7aacca6f 12715 },
44660702 12716 "protected" : 1,
7aacca6f
DM
12717 "proxyto" : "node",
12718 "returns" : {
12719 "description" : "the task ID.",
12720 "type" : "string"
56122987
DM
12721 }
12722 }
44660702
DM
12723 },
12724 "leaf" : 0,
12725 "path" : "/nodes/{node}/lxc/{vmid}/snapshot",
12726 "text" : "snapshot"
7aacca6f
DM
12727 },
12728 {
56122987
DM
12729 "children" : [
12730 {
56122987
DM
12731 "children" : [
12732 {
56122987 12733 "info" : {
44660702
DM
12734 "DELETE" : {
12735 "description" : "Delete rule.",
12736 "method" : "DELETE",
12737 "name" : "delete_rule",
56122987 12738 "parameters" : {
44660702 12739 "additionalProperties" : 0,
56122987 12740 "properties" : {
44660702
DM
12741 "digest" : {
12742 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
12743 "maxLength" : 40,
7aacca6f 12744 "optional" : 1,
44660702 12745 "type" : "string"
7aacca6f
DM
12746 },
12747 "node" : {
44660702 12748 "description" : "The cluster node name.",
7aacca6f 12749 "format" : "pve-node",
44660702
DM
12750 "type" : "string"
12751 },
12752 "pos" : {
12753 "description" : "Update rule at position <pos>.",
12754 "minimum" : 0,
12755 "optional" : 1,
12756 "type" : "integer"
12757 },
12758 "vmid" : {
12759 "description" : "The (unique) ID of the VM.",
12760 "format" : "pve-vmid",
12761 "minimum" : 1,
12762 "type" : "integer"
56122987 12763 }
44660702 12764 }
56122987 12765 },
56122987
DM
12766 "permissions" : {
12767 "check" : [
12768 "perm",
12769 "/vms/{vmid}",
12770 [
44660702 12771 "VM.Config.Network"
56122987
DM
12772 ]
12773 ]
12774 },
44660702 12775 "protected" : 1,
7aacca6f 12776 "proxyto" : null,
44660702
DM
12777 "returns" : {
12778 "type" : "null"
12779 }
7aacca6f 12780 },
44660702
DM
12781 "GET" : {
12782 "description" : "Get single rule data.",
12783 "method" : "GET",
12784 "name" : "get_rule",
56122987 12785 "parameters" : {
44660702 12786 "additionalProperties" : 0,
56122987 12787 "properties" : {
7aacca6f 12788 "node" : {
7aacca6f 12789 "description" : "The cluster node name.",
44660702 12790 "format" : "pve-node",
56122987
DM
12791 "type" : "string"
12792 },
7aacca6f 12793 "pos" : {
7aacca6f 12794 "description" : "Update rule at position <pos>.",
44660702 12795 "minimum" : 0,
7aacca6f 12796 "optional" : 1,
44660702 12797 "type" : "integer"
56122987 12798 },
7aacca6f 12799 "vmid" : {
44660702 12800 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12801 "format" : "pve-vmid",
12802 "minimum" : 1,
7aacca6f 12803 "type" : "integer"
56122987 12804 }
44660702 12805 }
56122987 12806 },
7aacca6f
DM
12807 "permissions" : {
12808 "check" : [
12809 "perm",
12810 "/vms/{vmid}",
12811 [
44660702 12812 "VM.Audit"
7aacca6f
DM
12813 ]
12814 ]
12815 },
7aacca6f
DM
12816 "proxyto" : null,
12817 "returns" : {
44660702
DM
12818 "properties" : {
12819 "pos" : {
12820 "type" : "integer"
12821 }
12822 },
12823 "type" : "object"
7aacca6f 12824 }
56122987 12825 },
44660702
DM
12826 "PUT" : {
12827 "description" : "Modify rule data.",
12828 "method" : "PUT",
12829 "name" : "update_rule",
56122987
DM
12830 "parameters" : {
12831 "additionalProperties" : 0,
12832 "properties" : {
44660702
DM
12833 "action" : {
12834 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
12835 "maxLength" : 20,
12836 "minLength" : 2,
12837 "optional" : 1,
12838 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
12839 "type" : "string"
12840 },
12841 "comment" : {
12842 "optional" : 1,
12843 "type" : "string"
12844 },
12845 "delete" : {
12846 "description" : "A list of settings you want to delete.",
12847 "format" : "pve-configid-list",
12848 "optional" : 1,
12849 "type" : "string"
12850 },
12851 "dest" : {
12852 "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.",
12853 "format" : "pve-fw-addr-spec",
12854 "optional" : 1,
12855 "type" : "string"
12856 },
12857 "digest" : {
12858 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
12859 "maxLength" : 40,
12860 "optional" : 1,
12861 "type" : "string"
12862 },
12863 "dport" : {
12864 "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.",
12865 "format" : "pve-fw-dport-spec",
12866 "optional" : 1,
12867 "type" : "string"
12868 },
12869 "enable" : {
12870 "minimum" : 0,
12871 "optional" : 1,
12872 "type" : "integer"
12873 },
12874 "iface" : {
12875 "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.",
12876 "format" : "pve-iface",
12877 "maxLength" : 20,
12878 "minLength" : 2,
12879 "optional" : 1,
12880 "type" : "string"
12881 },
12882 "macro" : {
12883 "maxLength" : 128,
12884 "optional" : 1,
12885 "type" : "string"
12886 },
12887 "moveto" : {
12888 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
12889 "minimum" : 0,
12890 "optional" : 1,
12891 "type" : "integer"
12892 },
7aacca6f
DM
12893 "node" : {
12894 "description" : "The cluster node name.",
44660702
DM
12895 "format" : "pve-node",
12896 "type" : "string"
56122987
DM
12897 },
12898 "pos" : {
44660702 12899 "description" : "Update rule at position <pos>.",
56122987 12900 "minimum" : 0,
7aacca6f 12901 "optional" : 1,
44660702 12902 "type" : "integer"
56122987 12903 },
44660702
DM
12904 "proto" : {
12905 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
12906 "format" : "pve-fw-protocol-spec",
12907 "optional" : 1,
12908 "type" : "string"
7aacca6f 12909 },
44660702
DM
12910 "source" : {
12911 "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.",
12912 "format" : "pve-fw-addr-spec",
12913 "optional" : 1,
12914 "type" : "string"
12915 },
12916 "sport" : {
12917 "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.",
12918 "format" : "pve-fw-sport-spec",
12919 "optional" : 1,
12920 "type" : "string"
12921 },
12922 "type" : {
12923 "enum" : [
12924 "in",
12925 "out",
12926 "group"
12927 ],
7aacca6f 12928 "optional" : 1,
44660702
DM
12929 "type" : "string"
12930 },
12931 "vmid" : {
12932 "description" : "The (unique) ID of the VM.",
12933 "format" : "pve-vmid",
12934 "minimum" : 1,
12935 "type" : "integer"
56122987
DM
12936 }
12937 }
12938 },
56122987
DM
12939 "permissions" : {
12940 "check" : [
12941 "perm",
12942 "/vms/{vmid}",
12943 [
7aacca6f 12944 "VM.Config.Network"
56122987
DM
12945 ]
12946 ]
12947 },
44660702 12948 "protected" : 1,
56122987 12949 "proxyto" : null,
56122987 12950 "returns" : {
7aacca6f
DM
12951 "type" : "null"
12952 }
56122987 12953 }
44660702
DM
12954 },
12955 "leaf" : 1,
12956 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}",
12957 "text" : "{pos}"
56122987
DM
12958 }
12959 ],
12960 "info" : {
7aacca6f 12961 "GET" : {
44660702
DM
12962 "description" : "List rules.",
12963 "method" : "GET",
12964 "name" : "get_rules",
7aacca6f 12965 "parameters" : {
44660702 12966 "additionalProperties" : 0,
7aacca6f
DM
12967 "properties" : {
12968 "node" : {
7aacca6f 12969 "description" : "The cluster node name.",
44660702
DM
12970 "format" : "pve-node",
12971 "type" : "string"
7aacca6f
DM
12972 },
12973 "vmid" : {
12974 "description" : "The (unique) ID of the VM.",
44660702 12975 "format" : "pve-vmid",
7aacca6f 12976 "minimum" : 1,
44660702 12977 "type" : "integer"
7aacca6f 12978 }
44660702 12979 }
56122987 12980 },
56122987
DM
12981 "permissions" : {
12982 "check" : [
12983 "perm",
12984 "/vms/{vmid}",
12985 [
7aacca6f 12986 "VM.Audit"
56122987
DM
12987 ]
12988 ]
12989 },
12990 "proxyto" : null,
7aacca6f 12991 "returns" : {
7aacca6f
DM
12992 "items" : {
12993 "properties" : {
12994 "pos" : {
12995 "type" : "integer"
12996 }
12997 },
12998 "type" : "object"
12999 },
13000 "links" : [
13001 {
44660702
DM
13002 "href" : "{pos}",
13003 "rel" : "child"
7aacca6f 13004 }
44660702
DM
13005 ],
13006 "type" : "array"
13007 }
7aacca6f
DM
13008 },
13009 "POST" : {
44660702
DM
13010 "description" : "Create new rule.",
13011 "method" : "POST",
7aacca6f 13012 "name" : "create_rule",
56122987 13013 "parameters" : {
44660702 13014 "additionalProperties" : 0,
56122987 13015 "properties" : {
7aacca6f 13016 "action" : {
44660702 13017 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 13018 "maxLength" : 20,
44660702 13019 "minLength" : 2,
7aacca6f
DM
13020 "optional" : 0,
13021 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
13022 "type" : "string"
13023 },
44660702 13024 "comment" : {
7aacca6f 13025 "optional" : 1,
44660702 13026 "type" : "string"
56122987 13027 },
44660702
DM
13028 "dest" : {
13029 "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.",
13030 "format" : "pve-fw-addr-spec",
56122987 13031 "optional" : 1,
44660702 13032 "type" : "string"
56122987 13033 },
44660702
DM
13034 "digest" : {
13035 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13036 "maxLength" : 40,
56122987 13037 "optional" : 1,
44660702 13038 "type" : "string"
56122987 13039 },
44660702
DM
13040 "dport" : {
13041 "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.",
13042 "format" : "pve-fw-dport-spec",
56122987 13043 "optional" : 1,
44660702 13044 "type" : "string"
56122987 13045 },
44660702
DM
13046 "enable" : {
13047 "minimum" : 0,
56122987 13048 "optional" : 1,
44660702 13049 "type" : "integer"
56122987 13050 },
44660702
DM
13051 "iface" : {
13052 "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.",
13053 "format" : "pve-iface",
13054 "maxLength" : 20,
13055 "minLength" : 2,
7aacca6f 13056 "optional" : 1,
56122987 13057 "type" : "string"
56122987 13058 },
44660702
DM
13059 "macro" : {
13060 "maxLength" : 128,
56122987
DM
13061 "optional" : 1,
13062 "type" : "string"
13063 },
13064 "node" : {
7aacca6f 13065 "description" : "The cluster node name.",
44660702
DM
13066 "format" : "pve-node",
13067 "type" : "string"
7aacca6f 13068 },
44660702
DM
13069 "pos" : {
13070 "description" : "Update rule at position <pos>.",
13071 "minimum" : 0,
13072 "optional" : 1,
13073 "type" : "integer"
13074 },
13075 "proto" : {
13076 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13077 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
13078 "optional" : 1,
13079 "type" : "string"
7aacca6f 13080 },
44660702
DM
13081 "source" : {
13082 "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.",
13083 "format" : "pve-fw-addr-spec",
13084 "optional" : 1,
13085 "type" : "string"
56122987 13086 },
44660702
DM
13087 "sport" : {
13088 "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.",
13089 "format" : "pve-fw-sport-spec",
13090 "optional" : 1,
13091 "type" : "string"
7aacca6f 13092 },
44660702
DM
13093 "type" : {
13094 "enum" : [
13095 "in",
13096 "out",
13097 "group"
13098 ],
13099 "optional" : 0,
13100 "type" : "string"
13101 },
13102 "vmid" : {
13103 "description" : "The (unique) ID of the VM.",
13104 "format" : "pve-vmid",
13105 "minimum" : 1,
13106 "type" : "integer"
13107 }
13108 }
13109 },
13110 "permissions" : {
13111 "check" : [
13112 "perm",
13113 "/vms/{vmid}",
13114 [
13115 "VM.Config.Network"
13116 ]
13117 ]
13118 },
13119 "protected" : 1,
13120 "proxyto" : null,
13121 "returns" : {
13122 "type" : "null"
13123 }
13124 }
13125 },
13126 "leaf" : 0,
13127 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules",
13128 "text" : "rules"
13129 },
13130 {
13131 "children" : [
13132 {
13133 "info" : {
13134 "DELETE" : {
13135 "description" : "Remove IP or Network alias.",
13136 "method" : "DELETE",
13137 "name" : "remove_alias",
56122987 13138 "parameters" : {
44660702 13139 "additionalProperties" : 0,
56122987 13140 "properties" : {
44660702
DM
13141 "digest" : {
13142 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13143 "maxLength" : 40,
56122987
DM
13144 "optional" : 1,
13145 "type" : "string"
13146 },
7aacca6f 13147 "name" : {
44660702 13148 "description" : "Alias name.",
7aacca6f 13149 "maxLength" : 64,
7aacca6f
DM
13150 "minLength" : 2,
13151 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13152 "type" : "string"
7aacca6f
DM
13153 },
13154 "node" : {
44660702 13155 "description" : "The cluster node name.",
56122987 13156 "format" : "pve-node",
44660702 13157 "type" : "string"
7aacca6f 13158 },
56122987 13159 "vmid" : {
44660702 13160 "description" : "The (unique) ID of the VM.",
56122987 13161 "format" : "pve-vmid",
44660702
DM
13162 "minimum" : 1,
13163 "type" : "integer"
56122987 13164 }
44660702 13165 }
56122987 13166 },
56122987
DM
13167 "permissions" : {
13168 "check" : [
13169 "perm",
13170 "/vms/{vmid}",
13171 [
7aacca6f 13172 "VM.Config.Network"
56122987
DM
13173 ]
13174 ]
13175 },
44660702 13176 "protected" : 1,
56122987 13177 "returns" : {
7aacca6f 13178 "type" : "null"
44660702 13179 }
56122987 13180 },
44660702
DM
13181 "GET" : {
13182 "description" : "Read alias.",
13183 "method" : "GET",
13184 "name" : "read_alias",
13185 "parameters" : {
13186 "additionalProperties" : 0,
13187 "properties" : {
13188 "name" : {
13189 "description" : "Alias name.",
13190 "maxLength" : 64,
13191 "minLength" : 2,
13192 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13193 "type" : "string"
13194 },
13195 "node" : {
13196 "description" : "The cluster node name.",
13197 "format" : "pve-node",
13198 "type" : "string"
13199 },
13200 "vmid" : {
13201 "description" : "The (unique) ID of the VM.",
13202 "format" : "pve-vmid",
13203 "minimum" : 1,
13204 "type" : "integer"
13205 }
13206 }
56122987 13207 },
7aacca6f
DM
13208 "permissions" : {
13209 "check" : [
13210 "perm",
13211 "/vms/{vmid}",
13212 [
44660702 13213 "VM.Audit"
7aacca6f
DM
13214 ]
13215 ]
13216 },
44660702
DM
13217 "returns" : {
13218 "type" : "object"
13219 }
13220 },
13221 "PUT" : {
13222 "description" : "Update IP or Network alias.",
13223 "method" : "PUT",
13224 "name" : "update_alias",
56122987
DM
13225 "parameters" : {
13226 "additionalProperties" : 0,
13227 "properties" : {
44660702
DM
13228 "cidr" : {
13229 "description" : "Network/IP specification in CIDR format.",
13230 "format" : "IPorCIDR",
13231 "type" : "string"
13232 },
13233 "comment" : {
13234 "optional" : 1,
13235 "type" : "string"
13236 },
13237 "digest" : {
13238 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13239 "maxLength" : 40,
13240 "optional" : 1,
13241 "type" : "string"
13242 },
56122987 13243 "name" : {
7aacca6f 13244 "description" : "Alias name.",
44660702
DM
13245 "maxLength" : 64,
13246 "minLength" : 2,
7aacca6f 13247 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13248 "type" : "string"
56122987
DM
13249 },
13250 "node" : {
13251 "description" : "The cluster node name.",
44660702
DM
13252 "format" : "pve-node",
13253 "type" : "string"
13254 },
13255 "rename" : {
13256 "description" : "Rename an existing alias.",
13257 "maxLength" : 64,
13258 "minLength" : 2,
13259 "optional" : 1,
13260 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13261 "type" : "string"
56122987 13262 },
7aacca6f 13263 "vmid" : {
7aacca6f 13264 "description" : "The (unique) ID of the VM.",
44660702 13265 "format" : "pve-vmid",
7aacca6f 13266 "minimum" : 1,
44660702 13267 "type" : "integer"
56122987
DM
13268 }
13269 }
13270 },
44660702
DM
13271 "permissions" : {
13272 "check" : [
13273 "perm",
13274 "/vms/{vmid}",
13275 [
13276 "VM.Config.Network"
13277 ]
13278 ]
7aacca6f 13279 },
44660702
DM
13280 "protected" : 1,
13281 "returns" : {
13282 "type" : "null"
7aacca6f
DM
13283 }
13284 }
13285 },
44660702
DM
13286 "leaf" : 1,
13287 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}",
13288 "text" : "{name}"
13289 }
13290 ],
13291 "info" : {
13292 "GET" : {
13293 "description" : "List aliases",
13294 "method" : "GET",
13295 "name" : "get_aliases",
56122987
DM
13296 "parameters" : {
13297 "additionalProperties" : 0,
13298 "properties" : {
13299 "node" : {
44660702 13300 "description" : "The cluster node name.",
56122987 13301 "format" : "pve-node",
44660702 13302 "type" : "string"
56122987
DM
13303 },
13304 "vmid" : {
7aacca6f 13305 "description" : "The (unique) ID of the VM.",
44660702 13306 "format" : "pve-vmid",
7aacca6f 13307 "minimum" : 1,
44660702 13308 "type" : "integer"
56122987
DM
13309 }
13310 }
13311 },
44660702
DM
13312 "permissions" : {
13313 "check" : [
13314 "perm",
13315 "/vms/{vmid}",
13316 [
13317 "VM.Audit"
13318 ]
13319 ]
13320 },
56122987
DM
13321 "returns" : {
13322 "items" : {
56122987 13323 "properties" : {
44660702
DM
13324 "cidr" : {
13325 "type" : "string"
7aacca6f 13326 },
44660702
DM
13327 "comment" : {
13328 "optional" : 1,
56122987
DM
13329 "type" : "string"
13330 },
56122987 13331 "digest" : {
56122987 13332 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
13333 "maxLength" : 40,
13334 "optional" : 0,
13335 "type" : "string"
13336 },
13337 "name" : {
13338 "type" : "string"
56122987 13339 }
44660702
DM
13340 },
13341 "type" : "object"
13342 },
13343 "links" : [
13344 {
13345 "href" : "{name}",
13346 "rel" : "child"
56122987 13347 }
44660702
DM
13348 ],
13349 "type" : "array"
7aacca6f
DM
13350 }
13351 },
13352 "POST" : {
44660702 13353 "description" : "Create IP or Network Alias.",
7aacca6f 13354 "method" : "POST",
44660702 13355 "name" : "create_alias",
7aacca6f
DM
13356 "parameters" : {
13357 "additionalProperties" : 0,
13358 "properties" : {
44660702
DM
13359 "cidr" : {
13360 "description" : "Network/IP specification in CIDR format.",
13361 "format" : "IPorCIDR",
7aacca6f
DM
13362 "type" : "string"
13363 },
13364 "comment" : {
13365 "optional" : 1,
13366 "type" : "string"
13367 },
44660702
DM
13368 "name" : {
13369 "description" : "Alias name.",
13370 "maxLength" : 64,
7aacca6f
DM
13371 "minLength" : 2,
13372 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13373 "type" : "string"
7aacca6f
DM
13374 },
13375 "node" : {
44660702 13376 "description" : "The cluster node name.",
7aacca6f 13377 "format" : "pve-node",
44660702 13378 "type" : "string"
7aacca6f 13379 },
44660702
DM
13380 "vmid" : {
13381 "description" : "The (unique) ID of the VM.",
13382 "format" : "pve-vmid",
13383 "minimum" : 1,
13384 "type" : "integer"
7aacca6f
DM
13385 }
13386 }
13387 },
44660702
DM
13388 "permissions" : {
13389 "check" : [
13390 "perm",
13391 "/vms/{vmid}",
13392 [
13393 "VM.Config.Network"
13394 ]
13395 ]
13396 },
13397 "protected" : 1,
13398 "returns" : {
13399 "type" : "null"
13400 }
56122987
DM
13401 }
13402 },
44660702
DM
13403 "leaf" : 0,
13404 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases",
13405 "text" : "aliases"
13406 },
13407 {
56122987
DM
13408 "children" : [
13409 {
56122987
DM
13410 "children" : [
13411 {
13412 "info" : {
13413 "DELETE" : {
44660702 13414 "description" : "Remove IP or Network from IPSet.",
7aacca6f 13415 "method" : "DELETE",
44660702 13416 "name" : "remove_ip",
56122987
DM
13417 "parameters" : {
13418 "additionalProperties" : 0,
13419 "properties" : {
44660702
DM
13420 "cidr" : {
13421 "description" : "Network/IP specification in CIDR format.",
13422 "format" : "IPorCIDRorAlias",
13423 "type" : "string"
56122987
DM
13424 },
13425 "digest" : {
44660702 13426 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987 13427 "maxLength" : 40,
7aacca6f 13428 "optional" : 1,
44660702 13429 "type" : "string"
56122987 13430 },
56122987 13431 "name" : {
44660702 13432 "description" : "IP set name.",
56122987 13433 "maxLength" : 64,
7aacca6f 13434 "minLength" : 2,
56122987 13435 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 13436 "type" : "string"
7aacca6f
DM
13437 },
13438 "node" : {
7aacca6f 13439 "description" : "The cluster node name.",
44660702
DM
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"
56122987
DM
13448 }
13449 }
13450 },
44660702
DM
13451 "permissions" : {
13452 "check" : [
13453 "perm",
13454 "/vms/{vmid}",
13455 [
13456 "VM.Config.Network"
13457 ]
13458 ]
13459 },
7aacca6f 13460 "protected" : 1,
56122987
DM
13461 "returns" : {
13462 "type" : "null"
44660702
DM
13463 }
13464 },
13465 "GET" : {
13466 "description" : "Read IP or Network settings from IPSet.",
13467 "method" : "GET",
13468 "name" : "read_ip",
56122987
DM
13469 "parameters" : {
13470 "additionalProperties" : 0,
13471 "properties" : {
7aacca6f 13472 "cidr" : {
7aacca6f 13473 "description" : "Network/IP specification in CIDR format.",
44660702 13474 "format" : "IPorCIDRorAlias",
56122987
DM
13475 "type" : "string"
13476 },
7aacca6f 13477 "name" : {
44660702 13478 "description" : "IP set name.",
7aacca6f
DM
13479 "maxLength" : 64,
13480 "minLength" : 2,
7aacca6f
DM
13481 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13482 "type" : "string"
56122987 13483 },
44660702
DM
13484 "node" : {
13485 "description" : "The cluster node name.",
13486 "format" : "pve-node",
13487 "type" : "string"
13488 },
13489 "vmid" : {
13490 "description" : "The (unique) ID of the VM.",
13491 "format" : "pve-vmid",
13492 "minimum" : 1,
13493 "type" : "integer"
56122987
DM
13494 }
13495 }
13496 },
56122987
DM
13497 "permissions" : {
13498 "check" : [
13499 "perm",
13500 "/vms/{vmid}",
13501 [
44660702 13502 "VM.Audit"
56122987
DM
13503 ]
13504 ]
7aacca6f 13505 },
44660702 13506 "protected" : 1,
7aacca6f
DM
13507 "returns" : {
13508 "type" : "object"
44660702
DM
13509 }
13510 },
13511 "PUT" : {
13512 "description" : "Update IP or Network settings",
13513 "method" : "PUT",
13514 "name" : "update_ip",
7aacca6f 13515 "parameters" : {
44660702 13516 "additionalProperties" : 0,
7aacca6f
DM
13517 "properties" : {
13518 "cidr" : {
44660702 13519 "description" : "Network/IP specification in CIDR format.",
7aacca6f 13520 "format" : "IPorCIDRorAlias",
44660702 13521 "type" : "string"
7aacca6f 13522 },
44660702
DM
13523 "comment" : {
13524 "optional" : 1,
13525 "type" : "string"
13526 },
13527 "digest" : {
13528 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13529 "maxLength" : 40,
13530 "optional" : 1,
13531 "type" : "string"
13532 },
13533 "name" : {
13534 "description" : "IP set name.",
13535 "maxLength" : 64,
13536 "minLength" : 2,
13537 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13538 "type" : "string"
7aacca6f
DM
13539 },
13540 "node" : {
7aacca6f 13541 "description" : "The cluster node name.",
44660702 13542 "format" : "pve-node",
7aacca6f
DM
13543 "type" : "string"
13544 },
44660702
DM
13545 "nomatch" : {
13546 "optional" : 1,
13547 "type" : "boolean"
13548 },
13549 "vmid" : {
13550 "description" : "The (unique) ID of the VM.",
13551 "format" : "pve-vmid",
13552 "minimum" : 1,
13553 "type" : "integer"
7aacca6f 13554 }
44660702
DM
13555 }
13556 },
13557 "permissions" : {
13558 "check" : [
13559 "perm",
13560 "/vms/{vmid}",
13561 [
13562 "VM.Config.Network"
13563 ]
13564 ]
7aacca6f
DM
13565 },
13566 "protected" : 1,
44660702
DM
13567 "returns" : {
13568 "type" : "null"
13569 }
56122987
DM
13570 }
13571 },
56122987 13572 "leaf" : 1,
44660702
DM
13573 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}",
13574 "text" : "{cidr}"
56122987
DM
13575 }
13576 ],
13577 "info" : {
44660702
DM
13578 "DELETE" : {
13579 "description" : "Delete IPSet",
13580 "method" : "DELETE",
13581 "name" : "delete_ipset",
13582 "parameters" : {
13583 "additionalProperties" : 0,
13584 "properties" : {
13585 "name" : {
13586 "description" : "IP set name.",
13587 "maxLength" : 64,
13588 "minLength" : 2,
13589 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13590 "type" : "string"
13591 },
13592 "node" : {
13593 "description" : "The cluster node name.",
13594 "format" : "pve-node",
13595 "type" : "string"
13596 },
13597 "vmid" : {
13598 "description" : "The (unique) ID of the VM.",
13599 "format" : "pve-vmid",
13600 "minimum" : 1,
13601 "type" : "integer"
13602 }
13603 }
13604 },
13605 "permissions" : {
13606 "check" : [
13607 "perm",
13608 "/vms/{vmid}",
13609 [
13610 "VM.Config.Network"
13611 ]
13612 ]
13613 },
13614 "protected" : 1,
13615 "returns" : {
13616 "type" : "null"
13617 }
13618 },
56122987 13619 "GET" : {
7aacca6f 13620 "description" : "List IPSet content",
44660702
DM
13621 "method" : "GET",
13622 "name" : "get_ipset",
7aacca6f
DM
13623 "parameters" : {
13624 "additionalProperties" : 0,
13625 "properties" : {
13626 "name" : {
13627 "description" : "IP set name.",
44660702 13628 "maxLength" : 64,
7aacca6f 13629 "minLength" : 2,
44660702
DM
13630 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13631 "type" : "string"
7aacca6f
DM
13632 },
13633 "node" : {
7aacca6f 13634 "description" : "The cluster node name.",
44660702 13635 "format" : "pve-node",
7aacca6f
DM
13636 "type" : "string"
13637 },
13638 "vmid" : {
13639 "description" : "The (unique) ID of the VM.",
44660702 13640 "format" : "pve-vmid",
7aacca6f 13641 "minimum" : 1,
44660702 13642 "type" : "integer"
56122987 13643 }
7aacca6f
DM
13644 }
13645 },
7aacca6f
DM
13646 "permissions" : {
13647 "check" : [
13648 "perm",
13649 "/vms/{vmid}",
13650 [
13651 "VM.Audit"
13652 ]
13653 ]
13654 },
13655 "returns" : {
56122987
DM
13656 "items" : {
13657 "properties" : {
13658 "cidr" : {
13659 "type" : "string"
13660 },
44660702
DM
13661 "comment" : {
13662 "optional" : 1,
13663 "type" : "string"
13664 },
56122987 13665 "digest" : {
56122987 13666 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 13667 "maxLength" : 40,
7aacca6f 13668 "optional" : 0,
56122987 13669 "type" : "string"
7aacca6f
DM
13670 },
13671 "nomatch" : {
44660702
DM
13672 "optional" : 1,
13673 "type" : "boolean"
56122987 13674 }
44660702
DM
13675 },
13676 "type" : "object"
56122987 13677 },
7aacca6f
DM
13678 "links" : [
13679 {
44660702
DM
13680 "href" : "{cidr}",
13681 "rel" : "child"
56122987 13682 }
44660702
DM
13683 ],
13684 "type" : "array"
13685 }
56122987 13686 },
7aacca6f
DM
13687 "POST" : {
13688 "description" : "Add IP or Network to IPSet.",
44660702 13689 "method" : "POST",
7aacca6f 13690 "name" : "create_ip",
56122987 13691 "parameters" : {
44660702 13692 "additionalProperties" : 0,
56122987 13693 "properties" : {
44660702
DM
13694 "cidr" : {
13695 "description" : "Network/IP specification in CIDR format.",
13696 "format" : "IPorCIDRorAlias",
13697 "type" : "string"
13698 },
13699 "comment" : {
13700 "optional" : 1,
13701 "type" : "string"
56122987
DM
13702 },
13703 "name" : {
56122987 13704 "description" : "IP set name.",
44660702 13705 "maxLength" : 64,
7aacca6f 13706 "minLength" : 2,
44660702 13707 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 13708 "type" : "string"
56122987 13709 },
7aacca6f 13710 "node" : {
7aacca6f 13711 "description" : "The cluster node name.",
44660702 13712 "format" : "pve-node",
56122987
DM
13713 "type" : "string"
13714 },
44660702
DM
13715 "nomatch" : {
13716 "optional" : 1,
13717 "type" : "boolean"
7aacca6f
DM
13718 },
13719 "vmid" : {
44660702 13720 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13721 "format" : "pve-vmid",
13722 "minimum" : 1,
7aacca6f 13723 "type" : "integer"
56122987 13724 }
44660702
DM
13725 }
13726 },
13727 "permissions" : {
13728 "check" : [
13729 "perm",
13730 "/vms/{vmid}",
13731 [
13732 "VM.Config.Network"
13733 ]
13734 ]
13735 },
13736 "protected" : 1,
13737 "returns" : {
13738 "type" : "null"
13739 }
13740 }
13741 },
13742 "leaf" : 0,
13743 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}",
13744 "text" : "{name}"
13745 }
13746 ],
13747 "info" : {
13748 "GET" : {
13749 "description" : "List IPSets",
13750 "method" : "GET",
13751 "name" : "ipset_index",
13752 "parameters" : {
13753 "additionalProperties" : 0,
13754 "properties" : {
13755 "node" : {
13756 "description" : "The cluster node name.",
13757 "format" : "pve-node",
13758 "type" : "string"
13759 },
13760 "vmid" : {
13761 "description" : "The (unique) ID of the VM.",
13762 "format" : "pve-vmid",
13763 "minimum" : 1,
13764 "type" : "integer"
13765 }
13766 }
13767 },
13768 "permissions" : {
13769 "check" : [
13770 "perm",
13771 "/vms/{vmid}",
13772 [
13773 "VM.Audit"
13774 ]
13775 ]
13776 },
13777 "returns" : {
13778 "items" : {
13779 "properties" : {
13780 "comment" : {
13781 "optional" : 1,
13782 "type" : "string"
13783 },
13784 "digest" : {
13785 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13786 "maxLength" : 40,
13787 "optional" : 0,
13788 "type" : "string"
7aacca6f 13789 },
44660702
DM
13790 "name" : {
13791 "description" : "IP set name.",
13792 "maxLength" : 64,
13793 "minLength" : 2,
13794 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13795 "type" : "string"
13796 }
13797 },
13798 "type" : "object"
13799 },
13800 "links" : [
13801 {
13802 "href" : "{name}",
13803 "rel" : "child"
13804 }
13805 ],
13806 "type" : "array"
13807 }
13808 },
13809 "POST" : {
13810 "description" : "Create new IPSet",
13811 "method" : "POST",
13812 "name" : "create_ipset",
13813 "parameters" : {
13814 "additionalProperties" : 0,
13815 "properties" : {
13816 "comment" : {
13817 "optional" : 1,
13818 "type" : "string"
13819 },
13820 "digest" : {
13821 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13822 "maxLength" : 40,
13823 "optional" : 1,
13824 "type" : "string"
56122987 13825 },
44660702
DM
13826 "name" : {
13827 "description" : "IP set name.",
13828 "maxLength" : 64,
13829 "minLength" : 2,
13830 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13831 "type" : "string"
13832 },
13833 "node" : {
13834 "description" : "The cluster node name.",
13835 "format" : "pve-node",
13836 "type" : "string"
7aacca6f 13837 },
44660702
DM
13838 "rename" : {
13839 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
13840 "maxLength" : 64,
13841 "minLength" : 2,
13842 "optional" : 1,
13843 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13844 "type" : "string"
13845 },
13846 "vmid" : {
13847 "description" : "The (unique) ID of the VM.",
13848 "format" : "pve-vmid",
13849 "minimum" : 1,
13850 "type" : "integer"
13851 }
56122987 13852 }
44660702
DM
13853 },
13854 "permissions" : {
13855 "check" : [
13856 "perm",
13857 "/vms/{vmid}",
13858 [
13859 "VM.Config.Network"
13860 ]
13861 ]
13862 },
13863 "protected" : 1,
13864 "returns" : {
13865 "type" : "null"
56122987
DM
13866 }
13867 }
44660702
DM
13868 },
13869 "leaf" : 0,
13870 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset",
13871 "text" : "ipset"
56122987
DM
13872 },
13873 {
56122987 13874 "info" : {
7aacca6f 13875 "GET" : {
44660702 13876 "description" : "Get VM firewall options.",
7aacca6f 13877 "method" : "GET",
44660702
DM
13878 "name" : "get_options",
13879 "parameters" : {
13880 "additionalProperties" : 0,
13881 "properties" : {
13882 "node" : {
13883 "description" : "The cluster node name.",
13884 "format" : "pve-node",
13885 "type" : "string"
13886 },
13887 "vmid" : {
13888 "description" : "The (unique) ID of the VM.",
13889 "format" : "pve-vmid",
13890 "minimum" : 1,
13891 "type" : "integer"
13892 }
13893 }
13894 },
13895 "permissions" : {
13896 "check" : [
13897 "perm",
13898 "/vms/{vmid}",
13899 [
13900 "VM.Audit"
13901 ]
13902 ]
13903 },
13904 "proxyto" : "node",
56122987 13905 "returns" : {
56122987 13906 "properties" : {
44660702
DM
13907 "dhcp" : {
13908 "description" : "Enable DHCP.",
13909 "optional" : 1,
13910 "type" : "boolean"
13911 },
13912 "enable" : {
13913 "description" : "Enable/disable firewall rules.",
13914 "optional" : 1,
13915 "type" : "boolean"
13916 },
13917 "ipfilter" : {
13918 "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 13919 "optional" : 1,
44660702
DM
13920 "type" : "boolean"
13921 },
13922 "log_level_in" : {
7aacca6f
DM
13923 "description" : "Log level for incoming traffic.",
13924 "enum" : [
13925 "emerg",
13926 "alert",
13927 "crit",
13928 "err",
13929 "warning",
13930 "notice",
13931 "info",
13932 "debug",
13933 "nolog"
44660702
DM
13934 ],
13935 "optional" : 1,
13936 "type" : "string"
56122987 13937 },
44660702
DM
13938 "log_level_out" : {
13939 "description" : "Log level for outgoing traffic.",
56122987 13940 "enum" : [
44660702
DM
13941 "emerg",
13942 "alert",
13943 "crit",
13944 "err",
13945 "warning",
13946 "notice",
13947 "info",
13948 "debug",
13949 "nolog"
7aacca6f 13950 ],
7aacca6f
DM
13951 "optional" : 1,
13952 "type" : "string"
56122987 13953 },
44660702
DM
13954 "macfilter" : {
13955 "description" : "Enable/disable MAC address filter.",
13956 "optional" : 1,
13957 "type" : "boolean"
7aacca6f 13958 },
44660702
DM
13959 "ndp" : {
13960 "description" : "Enable NDP.",
56122987 13961 "optional" : 1,
44660702 13962 "type" : "boolean"
56122987
DM
13963 },
13964 "policy_in" : {
7aacca6f 13965 "description" : "Input policy.",
56122987
DM
13966 "enum" : [
13967 "ACCEPT",
13968 "REJECT",
13969 "DROP"
13970 ],
7aacca6f 13971 "optional" : 1,
44660702 13972 "type" : "string"
56122987 13973 },
44660702
DM
13974 "policy_out" : {
13975 "description" : "Output policy.",
56122987 13976 "enum" : [
44660702
DM
13977 "ACCEPT",
13978 "REJECT",
13979 "DROP"
56122987 13980 ],
7aacca6f 13981 "optional" : 1,
56122987
DM
13982 "type" : "string"
13983 },
44660702
DM
13984 "radv" : {
13985 "description" : "Allow sending Router Advertisement.",
56122987 13986 "optional" : 1,
7aacca6f
DM
13987 "type" : "boolean"
13988 }
7aacca6f 13989 },
44660702
DM
13990 "type" : "object"
13991 }
7aacca6f
DM
13992 },
13993 "PUT" : {
44660702
DM
13994 "description" : "Set Firewall options.",
13995 "method" : "PUT",
7aacca6f
DM
13996 "name" : "set_options",
13997 "parameters" : {
44660702 13998 "additionalProperties" : 0,
7aacca6f 13999 "properties" : {
44660702
DM
14000 "delete" : {
14001 "description" : "A list of settings you want to delete.",
14002 "format" : "pve-configid-list",
14003 "optional" : 1,
14004 "type" : "string"
14005 },
14006 "dhcp" : {
14007 "description" : "Enable DHCP.",
14008 "optional" : 1,
14009 "type" : "boolean"
14010 },
14011 "digest" : {
14012 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14013 "maxLength" : 40,
14014 "optional" : 1,
14015 "type" : "string"
14016 },
7aacca6f
DM
14017 "enable" : {
14018 "description" : "Enable/disable firewall rules.",
56122987 14019 "optional" : 1,
7aacca6f 14020 "type" : "boolean"
56122987 14021 },
44660702
DM
14022 "ipfilter" : {
14023 "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.",
14024 "optional" : 1,
14025 "type" : "boolean"
14026 },
14027 "log_level_in" : {
14028 "description" : "Log level for incoming traffic.",
56122987
DM
14029 "enum" : [
14030 "emerg",
14031 "alert",
14032 "crit",
14033 "err",
14034 "warning",
14035 "notice",
14036 "info",
14037 "debug",
14038 "nolog"
14039 ],
56122987 14040 "optional" : 1,
44660702 14041 "type" : "string"
56122987 14042 },
44660702
DM
14043 "log_level_out" : {
14044 "description" : "Log level for outgoing traffic.",
56122987
DM
14045 "enum" : [
14046 "emerg",
14047 "alert",
14048 "crit",
14049 "err",
14050 "warning",
14051 "notice",
14052 "info",
14053 "debug",
14054 "nolog"
14055 ],
44660702
DM
14056 "optional" : 1,
14057 "type" : "string"
56122987 14058 },
44660702
DM
14059 "macfilter" : {
14060 "description" : "Enable/disable MAC address filter.",
14061 "optional" : 1,
14062 "type" : "boolean"
14063 },
14064 "ndp" : {
14065 "description" : "Enable NDP.",
56122987 14066 "optional" : 1,
56122987
DM
14067 "type" : "boolean"
14068 },
7aacca6f
DM
14069 "node" : {
14070 "description" : "The cluster node name.",
44660702
DM
14071 "format" : "pve-node",
14072 "type" : "string"
7aacca6f 14073 },
44660702
DM
14074 "policy_in" : {
14075 "description" : "Input policy.",
14076 "enum" : [
14077 "ACCEPT",
14078 "REJECT",
14079 "DROP"
14080 ],
7aacca6f 14081 "optional" : 1,
44660702 14082 "type" : "string"
7aacca6f 14083 },
44660702
DM
14084 "policy_out" : {
14085 "description" : "Output policy.",
56122987 14086 "enum" : [
7aacca6f
DM
14087 "ACCEPT",
14088 "REJECT",
14089 "DROP"
56122987
DM
14090 ],
14091 "optional" : 1,
56122987 14092 "type" : "string"
7aacca6f 14093 },
44660702
DM
14094 "radv" : {
14095 "description" : "Allow sending Router Advertisement.",
7aacca6f 14096 "optional" : 1,
44660702
DM
14097 "type" : "boolean"
14098 },
14099 "vmid" : {
14100 "description" : "The (unique) ID of the VM.",
14101 "format" : "pve-vmid",
14102 "minimum" : 1,
14103 "type" : "integer"
56122987 14104 }
44660702 14105 }
56122987 14106 },
7aacca6f
DM
14107 "permissions" : {
14108 "check" : [
14109 "perm",
14110 "/vms/{vmid}",
14111 [
14112 "VM.Config.Network"
14113 ]
14114 ]
14115 },
44660702
DM
14116 "protected" : 1,
14117 "proxyto" : "node",
7aacca6f
DM
14118 "returns" : {
14119 "type" : "null"
56122987
DM
14120 }
14121 }
14122 },
44660702 14123 "leaf" : 1,
7aacca6f 14124 "path" : "/nodes/{node}/lxc/{vmid}/firewall/options",
44660702 14125 "text" : "options"
56122987
DM
14126 },
14127 {
56122987
DM
14128 "info" : {
14129 "GET" : {
44660702 14130 "description" : "Read firewall log",
56122987 14131 "method" : "GET",
7aacca6f 14132 "name" : "log",
56122987
DM
14133 "parameters" : {
14134 "additionalProperties" : 0,
14135 "properties" : {
44660702
DM
14136 "limit" : {
14137 "minimum" : 0,
14138 "optional" : 1,
14139 "type" : "integer"
14140 },
56122987
DM
14141 "node" : {
14142 "description" : "The cluster node name.",
44660702
DM
14143 "format" : "pve-node",
14144 "type" : "string"
56122987 14145 },
44660702
DM
14146 "start" : {
14147 "minimum" : 0,
7aacca6f 14148 "optional" : 1,
44660702 14149 "type" : "integer"
56122987
DM
14150 },
14151 "vmid" : {
44660702 14152 "description" : "The (unique) ID of the VM.",
7aacca6f 14153 "format" : "pve-vmid",
56122987 14154 "minimum" : 1,
7aacca6f 14155 "type" : "integer"
56122987
DM
14156 }
14157 }
14158 },
44660702
DM
14159 "permissions" : {
14160 "check" : [
14161 "perm",
14162 "/vms/{vmid}",
14163 [
14164 "VM.Console"
14165 ]
14166 ]
14167 },
56122987 14168 "protected" : 1,
44660702 14169 "proxyto" : "node",
7aacca6f
DM
14170 "returns" : {
14171 "items" : {
14172 "properties" : {
7aacca6f
DM
14173 "n" : {
14174 "description" : "Line number",
14175 "type" : "integer"
44660702
DM
14176 },
14177 "t" : {
14178 "description" : "Line text",
14179 "type" : "string"
7aacca6f
DM
14180 }
14181 },
14182 "type" : "object"
14183 },
14184 "type" : "array"
44660702 14185 }
56122987
DM
14186 }
14187 },
7aacca6f 14188 "leaf" : 1,
44660702
DM
14189 "path" : "/nodes/{node}/lxc/{vmid}/firewall/log",
14190 "text" : "log"
56122987
DM
14191 },
14192 {
56122987
DM
14193 "info" : {
14194 "GET" : {
7aacca6f 14195 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
14196 "method" : "GET",
14197 "name" : "refs",
56122987 14198 "parameters" : {
7aacca6f 14199 "additionalProperties" : 0,
56122987 14200 "properties" : {
44660702
DM
14201 "node" : {
14202 "description" : "The cluster node name.",
14203 "format" : "pve-node",
14204 "type" : "string"
7aacca6f 14205 },
56122987 14206 "type" : {
44660702 14207 "description" : "Only list references of specified type.",
56122987
DM
14208 "enum" : [
14209 "alias",
14210 "ipset"
14211 ],
44660702
DM
14212 "optional" : 1,
14213 "type" : "string"
56122987 14214 },
44660702
DM
14215 "vmid" : {
14216 "description" : "The (unique) ID of the VM.",
14217 "format" : "pve-vmid",
14218 "minimum" : 1,
14219 "type" : "integer"
56122987 14220 }
7aacca6f 14221 }
56122987 14222 },
44660702
DM
14223 "permissions" : {
14224 "check" : [
14225 "perm",
14226 "/vms/{vmid}",
14227 [
14228 "VM.Audit"
14229 ]
14230 ]
14231 },
56122987 14232 "returns" : {
56122987 14233 "items" : {
56122987 14234 "properties" : {
44660702
DM
14235 "comment" : {
14236 "optional" : 1,
14237 "type" : "string"
14238 },
14239 "name" : {
14240 "type" : "string"
14241 },
56122987 14242 "type" : {
56122987
DM
14243 "enum" : [
14244 "alias",
14245 "ipset"
44660702 14246 ],
7aacca6f 14247 "type" : "string"
56122987 14248 }
44660702
DM
14249 },
14250 "type" : "object"
14251 },
14252 "type" : "array"
56122987
DM
14253 }
14254 }
14255 },
44660702 14256 "leaf" : 1,
7aacca6f 14257 "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs",
44660702 14258 "text" : "refs"
56122987
DM
14259 }
14260 ],
56122987
DM
14261 "info" : {
14262 "GET" : {
7aacca6f 14263 "description" : "Directory index.",
44660702
DM
14264 "method" : "GET",
14265 "name" : "index",
56122987 14266 "parameters" : {
44660702 14267 "additionalProperties" : 0,
56122987 14268 "properties" : {
56122987 14269 "node" : {
44660702 14270 "description" : "The cluster node name.",
56122987 14271 "format" : "pve-node",
44660702
DM
14272 "type" : "string"
14273 },
14274 "vmid" : {
14275 "description" : "The (unique) ID of the VM.",
14276 "format" : "pve-vmid",
14277 "minimum" : 1,
14278 "type" : "integer"
56122987 14279 }
44660702
DM
14280 }
14281 },
14282 "permissions" : {
14283 "user" : "all"
56122987
DM
14284 },
14285 "returns" : {
7aacca6f 14286 "items" : {
44660702
DM
14287 "properties" : {},
14288 "type" : "object"
7aacca6f 14289 },
56122987
DM
14290 "links" : [
14291 {
44660702
DM
14292 "href" : "{name}",
14293 "rel" : "child"
56122987 14294 }
44660702
DM
14295 ],
14296 "type" : "array"
56122987
DM
14297 }
14298 }
14299 },
44660702 14300 "leaf" : 0,
7aacca6f 14301 "path" : "/nodes/{node}/lxc/{vmid}/firewall",
44660702 14302 "text" : "firewall"
56122987
DM
14303 },
14304 {
56122987
DM
14305 "info" : {
14306 "GET" : {
56122987 14307 "description" : "Read VM RRD statistics (returns PNG)",
44660702 14308 "method" : "GET",
7aacca6f 14309 "name" : "rrd",
56122987 14310 "parameters" : {
7aacca6f 14311 "additionalProperties" : 0,
56122987 14312 "properties" : {
44660702
DM
14313 "cf" : {
14314 "description" : "The RRD consolidation function",
14315 "enum" : [
14316 "AVERAGE",
14317 "MAX"
14318 ],
14319 "optional" : 1,
14320 "type" : "string"
14321 },
14322 "ds" : {
14323 "description" : "The list of datasources you want to display.",
14324 "format" : "pve-configid-list",
14325 "type" : "string"
14326 },
7aacca6f
DM
14327 "node" : {
14328 "description" : "The cluster node name.",
44660702
DM
14329 "format" : "pve-node",
14330 "type" : "string"
56122987
DM
14331 },
14332 "timeframe" : {
14333 "description" : "Specify the time frame you are interested in.",
14334 "enum" : [
14335 "hour",
14336 "day",
14337 "week",
14338 "month",
14339 "year"
7aacca6f 14340 ],
44660702 14341 "type" : "string"
7aacca6f
DM
14342 },
14343 "vmid" : {
44660702 14344 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14345 "format" : "pve-vmid",
14346 "minimum" : 1,
7aacca6f 14347 "type" : "integer"
56122987 14348 }
7aacca6f
DM
14349 }
14350 },
14351 "permissions" : {
14352 "check" : [
14353 "perm",
14354 "/vms/{vmid}",
14355 [
14356 "VM.Audit"
14357 ]
14358 ]
56122987 14359 },
44660702 14360 "protected" : 1,
7aacca6f
DM
14361 "returns" : {
14362 "properties" : {
14363 "filename" : {
14364 "type" : "string"
14365 }
14366 },
14367 "type" : "object"
14368 }
56122987 14369 }
7aacca6f 14370 },
44660702 14371 "leaf" : 1,
7aacca6f 14372 "path" : "/nodes/{node}/lxc/{vmid}/rrd",
44660702 14373 "text" : "rrd"
56122987
DM
14374 },
14375 {
56122987
DM
14376 "info" : {
14377 "GET" : {
44660702
DM
14378 "description" : "Read VM RRD statistics",
14379 "method" : "GET",
14380 "name" : "rrddata",
56122987 14381 "parameters" : {
7aacca6f 14382 "additionalProperties" : 0,
56122987 14383 "properties" : {
44660702
DM
14384 "cf" : {
14385 "description" : "The RRD consolidation function",
14386 "enum" : [
14387 "AVERAGE",
14388 "MAX"
14389 ],
14390 "optional" : 1,
14391 "type" : "string"
14392 },
7aacca6f 14393 "node" : {
44660702 14394 "description" : "The cluster node name.",
7aacca6f 14395 "format" : "pve-node",
44660702 14396 "type" : "string"
7aacca6f 14397 },
56122987
DM
14398 "timeframe" : {
14399 "description" : "Specify the time frame you are interested in.",
14400 "enum" : [
14401 "hour",
14402 "day",
14403 "week",
14404 "month",
14405 "year"
44660702
DM
14406 ],
14407 "type" : "string"
7aacca6f
DM
14408 },
14409 "vmid" : {
14410 "description" : "The (unique) ID of the VM.",
44660702 14411 "format" : "pve-vmid",
7aacca6f 14412 "minimum" : 1,
44660702 14413 "type" : "integer"
56122987 14414 }
56122987
DM
14415 }
14416 },
56122987
DM
14417 "permissions" : {
14418 "check" : [
14419 "perm",
14420 "/vms/{vmid}",
14421 [
14422 "VM.Audit"
14423 ]
14424 ]
14425 },
7aacca6f
DM
14426 "protected" : 1,
14427 "returns" : {
7aacca6f
DM
14428 "items" : {
14429 "properties" : {},
14430 "type" : "object"
44660702
DM
14431 },
14432 "type" : "array"
14433 }
56122987
DM
14434 }
14435 },
44660702 14436 "leaf" : 1,
7aacca6f 14437 "path" : "/nodes/{node}/lxc/{vmid}/rrddata",
44660702 14438 "text" : "rrddata"
56122987
DM
14439 },
14440 {
14441 "info" : {
14442 "POST" : {
14443 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
14444 "method" : "POST",
14445 "name" : "vncproxy",
7aacca6f 14446 "parameters" : {
44660702 14447 "additionalProperties" : 0,
7aacca6f 14448 "properties" : {
44660702
DM
14449 "node" : {
14450 "description" : "The cluster node name.",
14451 "format" : "pve-node",
14452 "type" : "string"
14453 },
7aacca6f 14454 "vmid" : {
44660702 14455 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14456 "format" : "pve-vmid",
14457 "minimum" : 1,
7aacca6f
DM
14458 "type" : "integer"
14459 },
14460 "websocket" : {
44660702 14461 "description" : "use websocket instead of standard VNC.",
7aacca6f 14462 "optional" : 1,
44660702 14463 "type" : "boolean"
7aacca6f 14464 }
44660702 14465 }
7aacca6f 14466 },
56122987
DM
14467 "permissions" : {
14468 "check" : [
14469 "perm",
14470 "/vms/{vmid}",
14471 [
14472 "VM.Console"
14473 ]
14474 ]
14475 },
44660702 14476 "protected" : 1,
56122987 14477 "returns" : {
7aacca6f 14478 "additionalProperties" : 0,
56122987 14479 "properties" : {
7aacca6f 14480 "cert" : {
56122987
DM
14481 "type" : "string"
14482 },
44660702
DM
14483 "port" : {
14484 "type" : "integer"
56122987 14485 },
44660702 14486 "ticket" : {
56122987
DM
14487 "type" : "string"
14488 },
44660702 14489 "upid" : {
56122987
DM
14490 "type" : "string"
14491 },
44660702
DM
14492 "user" : {
14493 "type" : "string"
56122987 14494 }
7aacca6f 14495 }
56122987
DM
14496 }
14497 }
14498 },
44660702 14499 "leaf" : 1,
56122987 14500 "path" : "/nodes/{node}/lxc/{vmid}/vncproxy",
44660702 14501 "text" : "vncproxy"
56122987
DM
14502 },
14503 {
56122987
DM
14504 "info" : {
14505 "GET" : {
44660702
DM
14506 "description" : "Opens a weksocket for VNC traffic.",
14507 "method" : "GET",
14508 "name" : "vncwebsocket",
56122987 14509 "parameters" : {
44660702 14510 "additionalProperties" : 0,
56122987 14511 "properties" : {
56122987
DM
14512 "node" : {
14513 "description" : "The cluster node name.",
44660702 14514 "format" : "pve-node",
56122987 14515 "type" : "string"
7aacca6f 14516 },
44660702
DM
14517 "port" : {
14518 "description" : "Port number returned by previous vncproxy call.",
14519 "maximum" : 5999,
14520 "minimum" : 5900,
14521 "type" : "integer"
14522 },
7aacca6f
DM
14523 "vmid" : {
14524 "description" : "The (unique) ID of the VM.",
7aacca6f 14525 "format" : "pve-vmid",
44660702
DM
14526 "minimum" : 1,
14527 "type" : "integer"
14528 },
14529 "vncticket" : {
14530 "description" : "Ticket from previous call to vncproxy.",
14531 "maxLength" : 512,
14532 "type" : "string"
56122987 14533 }
44660702 14534 }
7aacca6f 14535 },
7aacca6f
DM
14536 "permissions" : {
14537 "check" : [
14538 "perm",
14539 "/vms/{vmid}",
14540 [
14541 "VM.Console"
14542 ]
14543 ],
14544 "description" : "You also need to pass a valid ticket (vncticket)."
56122987
DM
14545 },
14546 "returns" : {
56122987
DM
14547 "properties" : {
14548 "port" : {
14549 "type" : "string"
14550 }
44660702
DM
14551 },
14552 "type" : "object"
14553 }
56122987
DM
14554 }
14555 },
44660702 14556 "leaf" : 1,
7aacca6f 14557 "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket",
44660702 14558 "text" : "vncwebsocket"
56122987
DM
14559 },
14560 {
56122987
DM
14561 "info" : {
14562 "POST" : {
44660702
DM
14563 "description" : "Returns a SPICE configuration to connect to the CT.",
14564 "method" : "POST",
14565 "name" : "spiceproxy",
56122987
DM
14566 "parameters" : {
14567 "additionalProperties" : 0,
14568 "properties" : {
44660702
DM
14569 "node" : {
14570 "description" : "The cluster node name.",
14571 "format" : "pve-node",
14572 "type" : "string"
56122987
DM
14573 },
14574 "proxy" : {
7aacca6f 14575 "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
14576 "format" : "address",
14577 "optional" : 1,
7aacca6f 14578 "type" : "string"
44660702
DM
14579 },
14580 "vmid" : {
14581 "description" : "The (unique) ID of the VM.",
14582 "format" : "pve-vmid",
14583 "minimum" : 1,
14584 "type" : "integer"
56122987
DM
14585 }
14586 }
14587 },
56122987
DM
14588 "permissions" : {
14589 "check" : [
14590 "perm",
14591 "/vms/{vmid}",
14592 [
14593 "VM.Console"
14594 ]
14595 ]
14596 },
44660702
DM
14597 "protected" : 1,
14598 "proxyto" : "node",
56122987 14599 "returns" : {
7aacca6f 14600 "additionalProperties" : 1,
44660702 14601 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 14602 "properties" : {
44660702 14603 "host" : {
56122987
DM
14604 "type" : "string"
14605 },
44660702 14606 "password" : {
56122987
DM
14607 "type" : "string"
14608 },
14609 "proxy" : {
14610 "type" : "string"
14611 },
56122987
DM
14612 "tls-port" : {
14613 "type" : "integer"
7aacca6f 14614 },
44660702 14615 "type" : {
7aacca6f 14616 "type" : "string"
56122987 14617 }
7aacca6f
DM
14618 }
14619 }
56122987 14620 }
44660702
DM
14621 },
14622 "leaf" : 1,
14623 "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy",
14624 "text" : "spiceproxy"
56122987
DM
14625 },
14626 {
56122987
DM
14627 "info" : {
14628 "POST" : {
44660702 14629 "description" : "Migrate the container to another node. Creates a new migration task.",
7aacca6f 14630 "method" : "POST",
44660702 14631 "name" : "migrate_vm",
56122987 14632 "parameters" : {
44660702 14633 "additionalProperties" : 0,
56122987 14634 "properties" : {
44660702
DM
14635 "force" : {
14636 "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node.",
14637 "optional" : 1,
14638 "type" : "boolean"
14639 },
14640 "node" : {
14641 "description" : "The cluster node name.",
7aacca6f 14642 "format" : "pve-node",
7aacca6f
DM
14643 "type" : "string"
14644 },
56122987 14645 "online" : {
56122987 14646 "description" : "Use online/live migration.",
44660702
DM
14647 "optional" : 1,
14648 "type" : "boolean"
56122987 14649 },
44660702
DM
14650 "target" : {
14651 "description" : "Target node.",
56122987 14652 "format" : "pve-node",
44660702 14653 "type" : "string"
56122987 14654 },
44660702
DM
14655 "vmid" : {
14656 "description" : "The (unique) ID of the VM.",
14657 "format" : "pve-vmid",
14658 "minimum" : 1,
14659 "type" : "integer"
56122987 14660 }
44660702 14661 }
7aacca6f 14662 },
56122987
DM
14663 "permissions" : {
14664 "check" : [
14665 "perm",
14666 "/vms/{vmid}",
14667 [
14668 "VM.Migrate"
14669 ]
14670 ]
14671 },
44660702 14672 "protected" : 1,
7aacca6f 14673 "proxyto" : "node",
44660702
DM
14674 "returns" : {
14675 "description" : "the task ID.",
14676 "type" : "string"
14677 }
56122987
DM
14678 }
14679 },
44660702
DM
14680 "leaf" : 1,
14681 "path" : "/nodes/{node}/lxc/{vmid}/migrate",
7aacca6f 14682 "text" : "migrate"
56122987
DM
14683 },
14684 {
56122987
DM
14685 "info" : {
14686 "GET" : {
44660702
DM
14687 "description" : "Check if feature for virtual machine is available.",
14688 "method" : "GET",
56122987 14689 "name" : "vm_feature",
56122987 14690 "parameters" : {
7aacca6f 14691 "additionalProperties" : 0,
56122987 14692 "properties" : {
44660702
DM
14693 "feature" : {
14694 "description" : "Feature to check.",
14695 "enum" : [
14696 "snapshot"
14697 ],
14698 "type" : "string"
14699 },
7aacca6f 14700 "node" : {
44660702 14701 "description" : "The cluster node name.",
7aacca6f 14702 "format" : "pve-node",
44660702 14703 "type" : "string"
7aacca6f 14704 },
56122987 14705 "snapname" : {
7aacca6f
DM
14706 "description" : "The name of the snapshot.",
14707 "format" : "pve-configid",
44660702
DM
14708 "maxLength" : 40,
14709 "optional" : 1,
56122987
DM
14710 "type" : "string"
14711 },
14712 "vmid" : {
7aacca6f 14713 "description" : "The (unique) ID of the VM.",
44660702 14714 "format" : "pve-vmid",
7aacca6f 14715 "minimum" : 1,
44660702 14716 "type" : "integer"
56122987 14717 }
7aacca6f 14718 }
56122987
DM
14719 },
14720 "permissions" : {
14721 "check" : [
14722 "perm",
14723 "/vms/{vmid}",
14724 [
14725 "VM.Audit"
14726 ]
14727 ]
14728 },
44660702 14729 "protected" : 1,
7aacca6f 14730 "proxyto" : "node",
7aacca6f
DM
14731 "returns" : {
14732 "properties" : {
14733 "hasFeature" : {
14734 "type" : "boolean"
14735 }
14736 },
14737 "type" : "object"
14738 }
56122987
DM
14739 }
14740 },
7aacca6f 14741 "leaf" : 1,
44660702
DM
14742 "path" : "/nodes/{node}/lxc/{vmid}/feature",
14743 "text" : "feature"
56122987
DM
14744 },
14745 {
56122987
DM
14746 "info" : {
14747 "POST" : {
44660702
DM
14748 "description" : "Create a Template.",
14749 "method" : "POST",
56122987 14750 "name" : "template",
56122987
DM
14751 "parameters" : {
14752 "additionalProperties" : 0,
14753 "properties" : {
44660702
DM
14754 "experimental" : {
14755 "default" : 0,
14756 "description" : "The template feature is experimental, set this flag if you know what you are doing.",
14757 "type" : "boolean"
7aacca6f
DM
14758 },
14759 "node" : {
7aacca6f 14760 "description" : "The cluster node name.",
44660702 14761 "format" : "pve-node",
7aacca6f 14762 "type" : "string"
56122987 14763 },
44660702
DM
14764 "vmid" : {
14765 "description" : "The (unique) ID of the VM.",
14766 "format" : "pve-vmid",
14767 "minimum" : 1,
14768 "type" : "integer"
56122987
DM
14769 }
14770 }
14771 },
56122987 14772 "permissions" : {
56122987
DM
14773 "check" : [
14774 "perm",
14775 "/vms/{vmid}",
14776 [
14777 "VM.Allocate"
14778 ]
44660702
DM
14779 ],
14780 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
7aacca6f 14781 },
44660702 14782 "protected" : 1,
7aacca6f
DM
14783 "proxyto" : "node",
14784 "returns" : {
14785 "type" : "null"
56122987
DM
14786 }
14787 }
14788 },
44660702 14789 "leaf" : 1,
7aacca6f 14790 "path" : "/nodes/{node}/lxc/{vmid}/template",
44660702 14791 "text" : "template"
56122987
DM
14792 },
14793 {
56122987
DM
14794 "info" : {
14795 "POST" : {
44660702
DM
14796 "description" : "Create a container clone/copy",
14797 "method" : "POST",
56122987 14798 "name" : "clone_vm",
7aacca6f
DM
14799 "parameters" : {
14800 "additionalProperties" : 0,
14801 "properties" : {
44660702
DM
14802 "description" : {
14803 "description" : "Description for the new CT.",
7aacca6f 14804 "optional" : 1,
44660702 14805 "type" : "string"
7aacca6f
DM
14806 },
14807 "experimental" : {
7aacca6f 14808 "default" : 0,
44660702
DM
14809 "description" : "The clone feature is experimental, set this flag if you know what you are doing.",
14810 "type" : "boolean"
7aacca6f 14811 },
44660702
DM
14812 "full" : {
14813 "default" : 0,
14814 "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 14815 "optional" : 1,
44660702 14816 "type" : "boolean"
7aacca6f
DM
14817 },
14818 "hostname" : {
44660702 14819 "description" : "Set a hostname for the new CT.",
7aacca6f 14820 "format" : "dns-name",
7aacca6f 14821 "optional" : 1,
44660702 14822 "type" : "string"
7aacca6f 14823 },
44660702
DM
14824 "newid" : {
14825 "description" : "VMID for the clone.",
7aacca6f 14826 "format" : "pve-vmid",
44660702 14827 "minimum" : 1,
7aacca6f
DM
14828 "type" : "integer"
14829 },
14830 "node" : {
14831 "description" : "The cluster node name.",
44660702
DM
14832 "format" : "pve-node",
14833 "type" : "string"
14834 },
14835 "pool" : {
14836 "description" : "Add the new CT to the specified pool.",
14837 "format" : "pve-poolid",
14838 "optional" : 1,
14839 "type" : "string"
7aacca6f
DM
14840 },
14841 "snapname" : {
44660702 14842 "description" : "The name of the snapshot.",
7aacca6f
DM
14843 "format" : "pve-configid",
14844 "maxLength" : 40,
7aacca6f 14845 "optional" : 1,
44660702 14846 "type" : "string"
7aacca6f
DM
14847 },
14848 "storage" : {
44660702 14849 "description" : "Target storage for full clone.",
7aacca6f
DM
14850 "format" : "pve-storage-id",
14851 "optional" : 1,
7aacca6f 14852 "requires" : "full",
44660702
DM
14853 "type" : "string"
14854 },
14855 "vmid" : {
14856 "description" : "The (unique) ID of the VM.",
14857 "format" : "pve-vmid",
14858 "minimum" : 1,
14859 "type" : "integer"
7aacca6f
DM
14860 }
14861 }
56122987
DM
14862 },
14863 "permissions" : {
56122987
DM
14864 "check" : [
14865 "and",
14866 [
14867 "perm",
14868 "/vms/{vmid}",
14869 [
14870 "VM.Clone"
14871 ]
14872 ],
14873 [
14874 "or",
14875 [
14876 "perm",
14877 "/vms/{newid}",
14878 [
14879 "VM.Allocate"
14880 ]
14881 ],
14882 [
14883 "perm",
14884 "/pool/{pool}",
14885 [
14886 "VM.Allocate"
14887 ],
14888 "require_param",
14889 "pool"
14890 ]
14891 ]
7aacca6f
DM
14892 ],
14893 "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 14894 },
44660702 14895 "protected" : 1,
56122987 14896 "proxyto" : "node",
7aacca6f
DM
14897 "returns" : {
14898 "type" : "string"
56122987
DM
14899 }
14900 }
44660702
DM
14901 },
14902 "leaf" : 1,
14903 "path" : "/nodes/{node}/lxc/{vmid}/clone",
14904 "text" : "clone"
56122987
DM
14905 },
14906 {
56122987
DM
14907 "info" : {
14908 "PUT" : {
44660702
DM
14909 "description" : "Resize a container mountpoint.",
14910 "method" : "PUT",
14911 "name" : "resize_vm",
56122987 14912 "parameters" : {
44660702 14913 "additionalProperties" : 0,
56122987 14914 "properties" : {
44660702
DM
14915 "digest" : {
14916 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14917 "maxLength" : 40,
14918 "optional" : 1,
14919 "type" : "string"
56122987
DM
14920 },
14921 "disk" : {
7aacca6f 14922 "description" : "The disk you want to resize.",
56122987
DM
14923 "enum" : [
14924 "rootfs",
14925 "mp0",
14926 "mp1",
14927 "mp2",
14928 "mp3",
14929 "mp4",
14930 "mp5",
14931 "mp6",
14932 "mp7",
14933 "mp8",
14934 "mp9"
14935 ],
7aacca6f
DM
14936 "type" : "string"
14937 },
44660702
DM
14938 "node" : {
14939 "description" : "The cluster node name.",
14940 "format" : "pve-node",
14941 "type" : "string"
14942 },
14943 "size" : {
14944 "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.",
14945 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
14946 "type" : "string"
14947 },
14948 "vmid" : {
14949 "description" : "The (unique) ID of the VM.",
14950 "format" : "pve-vmid",
14951 "minimum" : 1,
14952 "type" : "integer"
56122987 14953 }
44660702 14954 }
56122987 14955 },
7aacca6f
DM
14956 "permissions" : {
14957 "check" : [
14958 "perm",
14959 "/vms/{vmid}",
14960 [
14961 "VM.Config.Disk"
14962 ],
14963 "any",
14964 1
14965 ]
14966 },
44660702 14967 "protected" : 1,
7aacca6f
DM
14968 "proxyto" : "node",
14969 "returns" : {
14970 "description" : "the task ID.",
14971 "type" : "string"
14972 }
56122987
DM
14973 }
14974 },
44660702 14975 "leaf" : 1,
7aacca6f 14976 "path" : "/nodes/{node}/lxc/{vmid}/resize",
44660702 14977 "text" : "resize"
56122987
DM
14978 }
14979 ],
14980 "info" : {
14981 "DELETE" : {
7aacca6f 14982 "description" : "Destroy the container (also delete all uses files).",
44660702
DM
14983 "method" : "DELETE",
14984 "name" : "destroy_vm",
14985 "parameters" : {
14986 "additionalProperties" : 0,
14987 "properties" : {
14988 "node" : {
14989 "description" : "The cluster node name.",
14990 "format" : "pve-node",
14991 "type" : "string"
14992 },
14993 "vmid" : {
14994 "description" : "The (unique) ID of the VM.",
14995 "format" : "pve-vmid",
14996 "minimum" : 1,
14997 "type" : "integer"
14998 }
14999 }
15000 },
7aacca6f
DM
15001 "permissions" : {
15002 "check" : [
15003 "perm",
15004 "/vms/{vmid}",
15005 [
15006 "VM.Allocate"
15007 ]
15008 ]
15009 },
44660702
DM
15010 "protected" : 1,
15011 "proxyto" : "node",
56122987
DM
15012 "returns" : {
15013 "type" : "string"
44660702 15014 }
56122987
DM
15015 },
15016 "GET" : {
7aacca6f 15017 "description" : "Directory index",
44660702 15018 "method" : "GET",
7aacca6f 15019 "name" : "vmdiridx",
56122987 15020 "parameters" : {
7aacca6f 15021 "additionalProperties" : 0,
56122987
DM
15022 "properties" : {
15023 "node" : {
7aacca6f 15024 "description" : "The cluster node name.",
44660702
DM
15025 "format" : "pve-node",
15026 "type" : "string"
56122987
DM
15027 },
15028 "vmid" : {
15029 "description" : "The (unique) ID of the VM.",
56122987 15030 "format" : "pve-vmid",
44660702
DM
15031 "minimum" : 1,
15032 "type" : "integer"
56122987 15033 }
7aacca6f 15034 }
56122987 15035 },
56122987
DM
15036 "permissions" : {
15037 "user" : "all"
44660702
DM
15038 },
15039 "proxyto" : "node",
15040 "returns" : {
15041 "items" : {
15042 "properties" : {
15043 "subdir" : {
15044 "type" : "string"
15045 }
15046 },
15047 "type" : "object"
15048 },
15049 "links" : [
15050 {
15051 "href" : "{subdir}",
15052 "rel" : "child"
15053 }
15054 ],
15055 "type" : "array"
56122987
DM
15056 }
15057 }
44660702
DM
15058 },
15059 "leaf" : 0,
15060 "path" : "/nodes/{node}/lxc/{vmid}",
15061 "text" : "{vmid}"
56122987
DM
15062 }
15063 ],
56122987 15064 "info" : {
44660702
DM
15065 "GET" : {
15066 "description" : "LXC container index (per node).",
15067 "method" : "GET",
15068 "name" : "vmlist",
15069 "parameters" : {
15070 "additionalProperties" : 0,
15071 "properties" : {
15072 "node" : {
15073 "description" : "The cluster node name.",
15074 "format" : "pve-node",
15075 "type" : "string"
15076 }
15077 }
15078 },
15079 "permissions" : {
15080 "description" : "Only list CTs where you have VM.Audit permissons on /vms/<vmid>.",
15081 "user" : "all"
15082 },
15083 "protected" : 1,
15084 "proxyto" : "node",
15085 "returns" : {
15086 "items" : {
15087 "properties" : {},
15088 "type" : "object"
15089 },
15090 "links" : [
15091 {
15092 "href" : "{vmid}",
15093 "rel" : "child"
15094 }
15095 ],
15096 "type" : "array"
15097 }
15098 },
56122987 15099 "POST" : {
44660702 15100 "description" : "Create or restore a container.",
7aacca6f
DM
15101 "method" : "POST",
15102 "name" : "create_vm",
56122987 15103 "parameters" : {
7aacca6f 15104 "additionalProperties" : 0,
56122987 15105 "properties" : {
44660702
DM
15106 "arch" : {
15107 "default" : "amd64",
15108 "description" : "OS architecture type.",
15109 "enum" : [
15110 "amd64",
15111 "i386"
15112 ],
7aacca6f 15113 "optional" : 1,
44660702 15114 "type" : "string"
7aacca6f 15115 },
44660702
DM
15116 "cmode" : {
15117 "default" : "tty",
15118 "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).",
15119 "enum" : [
15120 "shell",
15121 "console",
15122 "tty"
15123 ],
7aacca6f 15124 "optional" : 1,
44660702 15125 "type" : "string"
7aacca6f
DM
15126 },
15127 "console" : {
7aacca6f 15128 "default" : 1,
44660702 15129 "description" : "Attach a console device (/dev/console) to the container.",
56122987 15130 "optional" : 1,
7aacca6f 15131 "type" : "boolean"
56122987 15132 },
44660702
DM
15133 "cpulimit" : {
15134 "default" : 0,
15135 "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.",
15136 "maximum" : 128,
15137 "minimum" : 0,
56122987 15138 "optional" : 1,
44660702 15139 "type" : "number"
56122987 15140 },
44660702
DM
15141 "cpuunits" : {
15142 "default" : 1024,
15143 "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.",
15144 "maximum" : 500000,
15145 "minimum" : 0,
56122987 15146 "optional" : 1,
44660702 15147 "type" : "integer"
7aacca6f
DM
15148 },
15149 "description" : {
44660702 15150 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 15151 "optional" : 1,
44660702 15152 "type" : "string"
7aacca6f 15153 },
44660702
DM
15154 "force" : {
15155 "description" : "Allow to overwrite existing container.",
7aacca6f 15156 "optional" : 1,
44660702
DM
15157 "type" : "boolean"
15158 },
15159 "hostname" : {
15160 "description" : "Set a host name for the container.",
15161 "format" : "dns-name",
15162 "maxLength" : 255,
15163 "optional" : 1,
15164 "type" : "string"
15165 },
15166 "ignore-unpack-errors" : {
15167 "description" : "Ignore errors when extracting the template.",
15168 "optional" : 1,
15169 "type" : "boolean"
15170 },
15171 "lock" : {
15172 "description" : "Lock/unlock the VM.",
7aacca6f
DM
15173 "enum" : [
15174 "migrate",
15175 "backup",
15176 "snapshot",
15177 "rollback"
15178 ],
44660702
DM
15179 "optional" : 1,
15180 "type" : "string"
7aacca6f 15181 },
44660702
DM
15182 "memory" : {
15183 "default" : 512,
15184 "description" : "Amount of RAM for the VM in MB.",
15185 "minimum" : 16,
7aacca6f 15186 "optional" : 1,
44660702
DM
15187 "type" : "integer"
15188 },
15189 "mp[n]" : {
15190 "description" : "Use volume as container mount point (experimental feature).",
56122987 15191 "format" : {
7aacca6f
DM
15192 "acl" : {
15193 "description" : "Explicitly enable or disable ACL support.",
44660702 15194 "format_description" : "acl",
7aacca6f 15195 "optional" : 1,
44660702 15196 "type" : "boolean"
56122987
DM
15197 },
15198 "backup" : {
56122987 15199 "description" : "Whether to include the mountpoint in backups.",
44660702
DM
15200 "format_description" : "[1|0]",
15201 "optional" : 1,
15202 "type" : "boolean"
15203 },
15204 "mp" : {
15205 "description" : "Path to the mountpoint as seen from inside the container.",
15206 "format" : "pve-lxc-mp-string",
15207 "format_description" : "Path",
15208 "type" : "string"
15209 },
15210 "quota" : {
15211 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
15212 "format_description" : "[0|1]",
7aacca6f 15213 "optional" : 1,
44660702
DM
15214 "type" : "boolean"
15215 },
15216 "ro" : {
15217 "description" : "Read-only mountpoint (not supported with bind mounts)",
15218 "format_description" : "ro",
15219 "optional" : 1,
15220 "type" : "boolean"
7aacca6f
DM
15221 },
15222 "size" : {
44660702 15223 "description" : "Volume size (read only value).",
7aacca6f
DM
15224 "format" : "disk-size",
15225 "format_description" : "DiskSize",
7aacca6f
DM
15226 "optional" : 1,
15227 "type" : "string"
56122987
DM
15228 },
15229 "volume" : {
7aacca6f 15230 "default_key" : 1,
44660702 15231 "description" : "Volume, device or directory to mount into the container.",
56122987 15232 "format" : "pve-lxc-mp-string",
56122987 15233 "format_description" : "volume",
44660702 15234 "type" : "string"
56122987 15235 }
44660702 15236 },
56122987 15237 "optional" : 1,
7aacca6f 15238 "type" : "string"
56122987 15239 },
44660702
DM
15240 "nameserver" : {
15241 "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.",
15242 "format" : "address-list",
56122987 15243 "optional" : 1,
44660702 15244 "type" : "string"
56122987 15245 },
44660702
DM
15246 "net[n]" : {
15247 "description" : "Specifies network interfaces for the container.",
7aacca6f 15248 "format" : {
44660702
DM
15249 "bridge" : {
15250 "description" : "Bridge to attach the network device to.",
15251 "format_description" : "vmbr<Number>",
7aacca6f 15252 "optional" : 1,
44660702
DM
15253 "pattern" : "[-_.\\w\\d]+",
15254 "type" : "string"
7aacca6f 15255 },
44660702
DM
15256 "firewall" : {
15257 "description" : "Controls whether this interface's firewall rules should be used.",
15258 "format_description" : "[1|0]",
7aacca6f 15259 "optional" : 1,
44660702 15260 "type" : "boolean"
7aacca6f 15261 },
44660702
DM
15262 "gw" : {
15263 "description" : "Default gateway for IPv4 traffic.",
15264 "format" : "ipv4",
15265 "format_description" : "GatewayIPv4",
7aacca6f 15266 "optional" : 1,
44660702 15267 "type" : "string"
7aacca6f 15268 },
44660702
DM
15269 "gw6" : {
15270 "description" : "Default gateway for IPv6 traffic.",
15271 "format" : "ipv6",
15272 "format_description" : "GatewayIPv6",
15273 "optional" : 1,
15274 "type" : "string"
7aacca6f 15275 },
44660702
DM
15276 "hwaddr" : {
15277 "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)",
15278 "format_description" : "MAC",
15279 "optional" : 1,
15280 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
7aacca6f
DM
15281 "type" : "string"
15282 },
44660702
DM
15283 "ip" : {
15284 "description" : "IPv4 address in CIDR format.",
15285 "format" : "pve-ipv4-config",
15286 "format_description" : "IPv4Format/CIDR",
7aacca6f 15287 "optional" : 1,
44660702 15288 "type" : "string"
7aacca6f 15289 },
44660702
DM
15290 "ip6" : {
15291 "description" : "IPv6 address in CIDR format.",
15292 "format" : "pve-ipv6-config",
15293 "format_description" : "IPv6Format/CIDR",
15294 "optional" : 1,
15295 "type" : "string"
15296 },
15297 "mtu" : {
15298 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
15299 "format_description" : "Number",
15300 "minimum" : 64,
15301 "optional" : 1,
15302 "type" : "integer"
15303 },
15304 "name" : {
15305 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
15306 "format_description" : "String",
15307 "pattern" : "[-_.\\w\\d]+",
15308 "type" : "string"
15309 },
15310 "rate" : {
15311 "description" : "Apply rate limiting to the interface",
15312 "format_description" : "mbps",
15313 "optional" : 1,
15314 "type" : "number"
15315 },
15316 "tag" : {
15317 "description" : "VLAN tag for this interface.",
15318 "format_description" : "VlanNo",
15319 "maximum" : "4094",
15320 "minimum" : "2",
15321 "optional" : 1,
15322 "type" : "integer"
15323 },
15324 "trunks" : {
15325 "description" : "VLAN ids to pass through the interface",
15326 "format_description" : "vlanid[;vlanid...]",
15327 "optional" : 1,
15328 "pattern" : "(?^:\\d+(?:;\\d+)*)",
15329 "type" : "string"
15330 },
15331 "type" : {
15332 "description" : "Network interface type.",
15333 "enum" : [
15334 "veth"
15335 ],
15336 "optional" : 1,
15337 "type" : "string"
7aacca6f
DM
15338 }
15339 },
56122987 15340 "optional" : 1,
44660702 15341 "type" : "string"
56122987 15342 },
44660702
DM
15343 "node" : {
15344 "description" : "The cluster node name.",
15345 "format" : "pve-node",
15346 "type" : "string"
56122987 15347 },
44660702
DM
15348 "onboot" : {
15349 "default" : 0,
15350 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 15351 "optional" : 1,
44660702
DM
15352 "type" : "boolean"
15353 },
15354 "ostemplate" : {
15355 "description" : "The OS template or backup file.",
15356 "maxLength" : 255,
15357 "type" : "string"
56122987
DM
15358 },
15359 "ostype" : {
7aacca6f 15360 "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
15361 "enum" : [
15362 "debian",
15363 "ubuntu",
15364 "centos",
15365 "fedora",
15366 "opensuse",
15367 "archlinux",
15368 "alpine",
15369 "unmanaged"
44660702 15370 ],
56122987 15371 "optional" : 1,
7aacca6f 15372 "type" : "string"
56122987 15373 },
44660702
DM
15374 "password" : {
15375 "description" : "Sets root password inside container.",
15376 "minLength" : 5,
7aacca6f
DM
15377 "optional" : 1,
15378 "type" : "string"
15379 },
44660702
DM
15380 "pool" : {
15381 "description" : "Add the VM to the specified pool.",
15382 "format" : "pve-poolid",
7aacca6f 15383 "optional" : 1,
44660702 15384 "type" : "string"
7aacca6f 15385 },
44660702
DM
15386 "protection" : {
15387 "default" : 0,
15388 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
7aacca6f 15389 "optional" : 1,
44660702 15390 "type" : "boolean"
7aacca6f 15391 },
44660702
DM
15392 "restore" : {
15393 "description" : "Mark this as restore task.",
15394 "optional" : 1,
15395 "type" : "boolean"
7aacca6f 15396 },
44660702
DM
15397 "rootfs" : {
15398 "description" : "Use volume as container root.",
56122987 15399 "format" : {
44660702
DM
15400 "acl" : {
15401 "description" : "Explicitly enable or disable ACL support.",
15402 "format_description" : "acl",
56122987 15403 "optional" : 1,
44660702 15404 "type" : "boolean"
56122987 15405 },
44660702
DM
15406 "backup" : {
15407 "description" : "Whether to include the mountpoint in backups.",
56122987 15408 "format_description" : "[1|0]",
56122987
DM
15409 "optional" : 1,
15410 "type" : "boolean"
15411 },
44660702
DM
15412 "quota" : {
15413 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
15414 "format_description" : "[0|1]",
7aacca6f 15415 "optional" : 1,
44660702 15416 "type" : "boolean"
7aacca6f 15417 },
44660702
DM
15418 "ro" : {
15419 "description" : "Read-only mountpoint (not supported with bind mounts)",
15420 "format_description" : "ro",
7aacca6f 15421 "optional" : 1,
44660702 15422 "type" : "boolean"
7aacca6f 15423 },
44660702
DM
15424 "size" : {
15425 "description" : "Volume size (read only value).",
15426 "format" : "disk-size",
15427 "format_description" : "DiskSize",
7aacca6f
DM
15428 "optional" : 1,
15429 "type" : "string"
15430 },
44660702
DM
15431 "volume" : {
15432 "default_key" : 1,
15433 "description" : "Volume, device or directory to mount into the container.",
15434 "format" : "pve-lxc-mp-string",
15435 "format_description" : "volume",
15436 "type" : "string"
56122987 15437 }
7aacca6f 15438 },
7aacca6f
DM
15439 "optional" : 1,
15440 "type" : "string"
44660702
DM
15441 },
15442 "searchdomain" : {
15443 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
15444 "format" : "dns-name-list",
15445 "optional" : 1,
15446 "type" : "string"
15447 },
15448 "ssh-public-keys" : {
15449 "description" : "Setup public SSH keys (one key per line, OpenSSH format).",
15450 "optional" : 1,
15451 "type" : "string"
15452 },
15453 "startup" : {
15454 "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.",
15455 "format" : "pve-startup-order",
15456 "optional" : 1,
7aacca6f 15457 "type" : "string",
44660702 15458 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 15459 },
44660702
DM
15460 "storage" : {
15461 "default" : "local",
15462 "description" : "Default Storage.",
15463 "format" : "pve-storage-id",
15464 "optional" : 1,
7aacca6f 15465 "type" : "string"
7aacca6f 15466 },
44660702
DM
15467 "swap" : {
15468 "default" : 512,
15469 "description" : "Amount of SWAP for the VM in MB.",
15470 "minimum" : 0,
15471 "optional" : 1,
15472 "type" : "integer"
15473 },
15474 "template" : {
15475 "default" : 0,
15476 "description" : "Enable/disable Template.",
15477 "optional" : 1,
15478 "type" : "boolean"
7aacca6f 15479 },
44660702
DM
15480 "tty" : {
15481 "default" : 2,
15482 "description" : "Specify the number of tty available to the container",
15483 "maximum" : 6,
15484 "minimum" : 0,
15485 "optional" : 1,
15486 "type" : "integer"
7aacca6f 15487 },
44660702
DM
15488 "unprivileged" : {
15489 "default" : 0,
15490 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
15491 "optional" : 1,
15492 "type" : "boolean"
15493 },
15494 "unused[n]" : {
15495 "description" : "Reference to unused volumes.",
15496 "format" : "pve-volume-id",
15497 "optional" : 1,
15498 "type" : "string"
15499 },
15500 "vmid" : {
15501 "description" : "The (unique) ID of the VM.",
15502 "format" : "pve-vmid",
15503 "minimum" : 1,
15504 "type" : "integer"
15505 }
7aacca6f
DM
15506 }
15507 },
44660702
DM
15508 "permissions" : {
15509 "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.",
15510 "user" : "all"
15511 },
15512 "protected" : 1,
15513 "proxyto" : "node",
15514 "returns" : {
15515 "type" : "string"
15516 }
15517 }
15518 },
15519 "leaf" : 0,
15520 "path" : "/nodes/{node}/lxc",
15521 "text" : "lxc"
15522 },
15523 {
15524 "children" : [
15525 {
56122987
DM
15526 "children" : [
15527 {
7aacca6f
DM
15528 "children" : [
15529 {
7aacca6f
DM
15530 "info" : {
15531 "POST" : {
44660702
DM
15532 "description" : "ceph osd in",
15533 "method" : "POST",
15534 "name" : "in",
15535 "parameters" : {
15536 "additionalProperties" : 0,
15537 "properties" : {
15538 "node" : {
15539 "description" : "The cluster node name.",
15540 "format" : "pve-node",
15541 "type" : "string"
15542 },
15543 "osdid" : {
15544 "description" : "OSD ID",
15545 "type" : "integer"
15546 }
15547 }
15548 },
56122987
DM
15549 "permissions" : {
15550 "check" : [
15551 "perm",
15552 "/",
15553 [
15554 "Sys.Modify"
15555 ]
15556 ]
7aacca6f 15557 },
44660702 15558 "protected" : 1,
7aacca6f
DM
15559 "proxyto" : "node",
15560 "returns" : {
15561 "type" : "null"
44660702 15562 }
56122987
DM
15563 }
15564 },
44660702 15565 "leaf" : 1,
7aacca6f 15566 "path" : "/nodes/{node}/ceph/osd/{osdid}/in",
44660702 15567 "text" : "in"
56122987
DM
15568 },
15569 {
56122987
DM
15570 "info" : {
15571 "POST" : {
44660702
DM
15572 "description" : "ceph osd out",
15573 "method" : "POST",
15574 "name" : "out",
15575 "parameters" : {
15576 "additionalProperties" : 0,
15577 "properties" : {
15578 "node" : {
15579 "description" : "The cluster node name.",
15580 "format" : "pve-node",
15581 "type" : "string"
15582 },
15583 "osdid" : {
15584 "description" : "OSD ID",
15585 "type" : "integer"
15586 }
15587 }
15588 },
56122987
DM
15589 "permissions" : {
15590 "check" : [
15591 "perm",
15592 "/",
15593 [
15594 "Sys.Modify"
15595 ]
15596 ]
15597 },
44660702 15598 "protected" : 1,
56122987 15599 "proxyto" : "node",
7aacca6f
DM
15600 "returns" : {
15601 "type" : "null"
44660702
DM
15602 }
15603 }
15604 },
15605 "leaf" : 1,
15606 "path" : "/nodes/{node}/ceph/osd/{osdid}/out",
15607 "text" : "out"
15608 }
15609 ],
15610 "info" : {
15611 "DELETE" : {
15612 "description" : "Destroy OSD",
15613 "method" : "DELETE",
15614 "name" : "destroyosd",
15615 "parameters" : {
15616 "additionalProperties" : 0,
15617 "properties" : {
15618 "cleanup" : {
15619 "default" : 0,
15620 "description" : "If set, we remove partition table entries.",
15621 "optional" : 1,
15622 "type" : "boolean"
7aacca6f 15623 },
44660702
DM
15624 "node" : {
15625 "description" : "The cluster node name.",
15626 "format" : "pve-node",
15627 "type" : "string"
56122987 15628 },
44660702
DM
15629 "osdid" : {
15630 "description" : "OSD ID",
15631 "type" : "integer"
15632 }
56122987
DM
15633 }
15634 },
44660702
DM
15635 "protected" : 1,
15636 "proxyto" : "node",
15637 "returns" : {
15638 "type" : "string"
15639 }
15640 }
15641 },
15642 "leaf" : 0,
15643 "path" : "/nodes/{node}/ceph/osd/{osdid}",
15644 "text" : "{osdid}"
15645 }
15646 ],
15647 "info" : {
15648 "GET" : {
15649 "description" : "Get Ceph osd list/tree.",
15650 "method" : "GET",
15651 "name" : "index",
15652 "parameters" : {
15653 "additionalProperties" : 0,
15654 "properties" : {
15655 "node" : {
15656 "description" : "The cluster node name.",
15657 "format" : "pve-node",
15658 "type" : "string"
15659 }
15660 }
15661 },
15662 "permissions" : {
15663 "check" : [
15664 "perm",
15665 "/",
15666 [
15667 "Sys.Audit",
15668 "Datastore.Audit"
15669 ],
15670 "any",
15671 1
15672 ]
15673 },
15674 "protected" : 1,
15675 "proxyto" : "node",
15676 "returns" : {
15677 "type" : "object"
15678 }
15679 },
15680 "POST" : {
15681 "description" : "Create OSD",
15682 "method" : "POST",
15683 "name" : "createosd",
15684 "parameters" : {
15685 "additionalProperties" : 0,
15686 "properties" : {
15687 "dev" : {
15688 "description" : "Block device name.",
15689 "type" : "string"
15690 },
15691 "fstype" : {
15692 "default" : "xfs",
15693 "description" : "File system type.",
15694 "enum" : [
15695 "xfs",
15696 "ext4",
15697 "btrfs"
15698 ],
15699 "optional" : 1,
15700 "type" : "string"
15701 },
15702 "journal_dev" : {
15703 "description" : "Block device name for journal.",
15704 "optional" : 1,
15705 "type" : "string"
15706 },
15707 "node" : {
15708 "description" : "The cluster node name.",
15709 "format" : "pve-node",
15710 "type" : "string"
15711 }
56122987 15712 }
44660702
DM
15713 },
15714 "protected" : 1,
15715 "proxyto" : "node",
15716 "returns" : {
15717 "type" : "string"
15718 }
56122987 15719 }
44660702 15720 },
7aacca6f 15721 "leaf" : 0,
44660702
DM
15722 "path" : "/nodes/{node}/ceph/osd",
15723 "text" : "osd"
7aacca6f
DM
15724 },
15725 {
56122987
DM
15726 "info" : {
15727 "GET" : {
7aacca6f 15728 "description" : "List local disks.",
44660702
DM
15729 "method" : "GET",
15730 "name" : "disks",
15731 "parameters" : {
15732 "additionalProperties" : 0,
15733 "properties" : {
15734 "node" : {
15735 "description" : "The cluster node name.",
15736 "format" : "pve-node",
15737 "type" : "string"
15738 },
15739 "type" : {
15740 "description" : "Only list specific types of disks.",
15741 "enum" : [
15742 "unused",
15743 "journal_disks"
15744 ],
15745 "optional" : 1,
15746 "type" : "string"
15747 }
15748 }
15749 },
56122987
DM
15750 "permissions" : {
15751 "check" : [
15752 "perm",
15753 "/",
15754 [
15755 "Sys.Audit",
15756 "Datastore.Audit"
15757 ],
15758 "any",
15759 1
15760 ]
7aacca6f 15761 },
44660702
DM
15762 "protected" : 1,
15763 "proxyto" : "node",
56122987 15764 "returns" : {
7aacca6f
DM
15765 "items" : {
15766 "properties" : {
44660702
DM
15767 "dev" : {
15768 "type" : "string"
15769 },
15770 "gpt" : {
15771 "type" : "boolean"
15772 },
15773 "model" : {
15774 "optional" : 1,
15775 "type" : "string"
7aacca6f
DM
15776 },
15777 "osdid" : {
15778 "type" : "integer"
15779 },
15780 "serial" : {
7aacca6f
DM
15781 "optional" : 1,
15782 "type" : "string"
15783 },
15784 "size" : {
15785 "type" : "integer"
15786 },
44660702
DM
15787 "used" : {
15788 "optional" : 1,
7aacca6f
DM
15789 "type" : "string"
15790 },
44660702
DM
15791 "vendor" : {
15792 "optional" : 1,
15793 "type" : "string"
7aacca6f
DM
15794 }
15795 },
15796 "type" : "object"
44660702
DM
15797 },
15798 "type" : "array"
15799 }
56122987 15800 }
44660702
DM
15801 },
15802 "leaf" : 1,
15803 "path" : "/nodes/{node}/ceph/disks",
15804 "text" : "disks"
56122987
DM
15805 },
15806 {
56122987
DM
15807 "info" : {
15808 "GET" : {
7aacca6f 15809 "description" : "Get Ceph configuration.",
44660702
DM
15810 "method" : "GET",
15811 "name" : "config",
56122987 15812 "parameters" : {
7aacca6f 15813 "additionalProperties" : 0,
56122987 15814 "properties" : {
56122987 15815 "node" : {
7aacca6f 15816 "description" : "The cluster node name.",
44660702 15817 "format" : "pve-node",
56122987
DM
15818 "type" : "string"
15819 }
7aacca6f 15820 }
56122987 15821 },
56122987
DM
15822 "permissions" : {
15823 "check" : [
15824 "perm",
15825 "/",
15826 [
15827 "Sys.Audit",
15828 "Datastore.Audit"
15829 ],
15830 "any",
15831 1
15832 ]
44660702
DM
15833 },
15834 "returns" : {
15835 "type" : "string"
7aacca6f
DM
15836 }
15837 }
44660702
DM
15838 },
15839 "leaf" : 1,
15840 "path" : "/nodes/{node}/ceph/config",
15841 "text" : "config"
7aacca6f
DM
15842 },
15843 {
7aacca6f
DM
15844 "children" : [
15845 {
7aacca6f
DM
15846 "info" : {
15847 "DELETE" : {
7aacca6f 15848 "description" : "Destroy Ceph monitor.",
44660702
DM
15849 "method" : "DELETE",
15850 "name" : "destroymon",
15851 "parameters" : {
15852 "additionalProperties" : 0,
15853 "properties" : {
15854 "monid" : {
15855 "description" : "Monitor ID",
15856 "type" : "integer"
15857 },
15858 "node" : {
15859 "description" : "The cluster node name.",
15860 "format" : "pve-node",
15861 "type" : "string"
15862 }
15863 }
15864 },
7aacca6f
DM
15865 "permissions" : {
15866 "check" : [
15867 "perm",
15868 "/",
15869 [
15870 "Sys.Modify"
15871 ]
15872 ]
15873 },
44660702
DM
15874 "protected" : 1,
15875 "proxyto" : "node",
7aacca6f
DM
15876 "returns" : {
15877 "type" : "string"
44660702 15878 }
7aacca6f 15879 }
44660702
DM
15880 },
15881 "leaf" : 1,
15882 "path" : "/nodes/{node}/ceph/mon/{monid}",
15883 "text" : "{monid}"
7aacca6f
DM
15884 }
15885 ],
15886 "info" : {
15887 "GET" : {
44660702 15888 "description" : "Get Ceph monitor list.",
7aacca6f 15889 "method" : "GET",
44660702 15890 "name" : "listmon",
7aacca6f
DM
15891 "parameters" : {
15892 "additionalProperties" : 0,
15893 "properties" : {
15894 "node" : {
7aacca6f 15895 "description" : "The cluster node name.",
44660702
DM
15896 "format" : "pve-node",
15897 "type" : "string"
7aacca6f
DM
15898 }
15899 }
15900 },
44660702
DM
15901 "permissions" : {
15902 "check" : [
15903 "perm",
15904 "/",
15905 [
15906 "Sys.Audit",
15907 "Datastore.Audit"
15908 ],
15909 "any",
15910 1
15911 ]
15912 },
7aacca6f 15913 "protected" : 1,
44660702 15914 "proxyto" : "node",
7aacca6f
DM
15915 "returns" : {
15916 "items" : {
15917 "properties" : {
44660702 15918 "addr" : {
7aacca6f 15919 "type" : "string"
56122987 15920 },
44660702 15921 "name" : {
56122987
DM
15922 "type" : "string"
15923 }
7aacca6f
DM
15924 },
15925 "type" : "object"
56122987 15926 },
7aacca6f
DM
15927 "links" : [
15928 {
15929 "href" : "{name}",
15930 "rel" : "child"
15931 }
15932 ],
56122987 15933 "type" : "array"
44660702 15934 }
7aacca6f
DM
15935 },
15936 "POST" : {
44660702
DM
15937 "description" : "Create Ceph Monitor",
15938 "method" : "POST",
15939 "name" : "createmon",
15940 "parameters" : {
15941 "additionalProperties" : 0,
15942 "properties" : {
15943 "node" : {
15944 "description" : "The cluster node name.",
15945 "format" : "pve-node",
15946 "type" : "string"
15947 }
15948 }
15949 },
7aacca6f
DM
15950 "permissions" : {
15951 "check" : [
15952 "perm",
15953 "/",
15954 [
15955 "Sys.Modify"
15956 ]
15957 ]
15958 },
44660702 15959 "protected" : 1,
7aacca6f 15960 "proxyto" : "node",
56122987
DM
15961 "returns" : {
15962 "type" : "string"
44660702 15963 }
56122987 15964 }
44660702
DM
15965 },
15966 "leaf" : 0,
15967 "path" : "/nodes/{node}/ceph/mon",
15968 "text" : "mon"
56122987
DM
15969 },
15970 {
15971 "info" : {
15972 "POST" : {
44660702
DM
15973 "description" : "Create initial ceph default configuration and setup symlinks.",
15974 "method" : "POST",
15975 "name" : "init",
15976 "parameters" : {
15977 "additionalProperties" : 0,
15978 "properties" : {
15979 "network" : {
15980 "description" : "Use specific network for all ceph related traffic",
15981 "format" : "CIDR",
15982 "maxLength" : 128,
15983 "optional" : 1,
15984 "type" : "string"
15985 },
15986 "node" : {
15987 "description" : "The cluster node name.",
15988 "format" : "pve-node",
15989 "type" : "string"
15990 },
15991 "pg_bits" : {
15992 "default" : 6,
15993 "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.",
15994 "maximum" : 14,
15995 "minimum" : 6,
15996 "optional" : 1,
15997 "type" : "integer"
15998 },
15999 "size" : {
16000 "default" : 2,
16001 "description" : "Number of replicas per object",
16002 "maximum" : 3,
16003 "minimum" : 1,
16004 "optional" : 1,
16005 "type" : "integer"
16006 }
16007 }
7aacca6f 16008 },
56122987
DM
16009 "permissions" : {
16010 "check" : [
16011 "perm",
16012 "/",
16013 [
16014 "Sys.Modify"
16015 ]
16016 ]
16017 },
7aacca6f 16018 "protected" : 1,
44660702
DM
16019 "proxyto" : "node",
16020 "returns" : {
16021 "type" : "null"
7aacca6f
DM
16022 }
16023 }
16024 },
7aacca6f 16025 "leaf" : 1,
44660702
DM
16026 "path" : "/nodes/{node}/ceph/init",
16027 "text" : "init"
7aacca6f
DM
16028 },
16029 {
7aacca6f
DM
16030 "info" : {
16031 "POST" : {
44660702 16032 "description" : "Stop ceph services.",
7aacca6f
DM
16033 "method" : "POST",
16034 "name" : "stop",
16035 "parameters" : {
44660702 16036 "additionalProperties" : 0,
7aacca6f
DM
16037 "properties" : {
16038 "node" : {
7aacca6f 16039 "description" : "The cluster node name.",
44660702 16040 "format" : "pve-node",
56122987 16041 "type" : "string"
7aacca6f
DM
16042 },
16043 "service" : {
7aacca6f 16044 "description" : "Ceph service name.",
44660702
DM
16045 "optional" : 1,
16046 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
16047 "type" : "string"
56122987 16048 }
44660702 16049 }
7aacca6f
DM
16050 },
16051 "permissions" : {
16052 "check" : [
16053 "perm",
16054 "/",
16055 [
16056 "Sys.Modify"
16057 ]
16058 ]
16059 },
44660702
DM
16060 "protected" : 1,
16061 "proxyto" : "node",
16062 "returns" : {
16063 "type" : "string"
16064 }
7aacca6f 16065 }
44660702
DM
16066 },
16067 "leaf" : 1,
16068 "path" : "/nodes/{node}/ceph/stop",
16069 "text" : "stop"
7aacca6f
DM
16070 },
16071 {
7aacca6f
DM
16072 "info" : {
16073 "POST" : {
7aacca6f 16074 "description" : "Start ceph services.",
44660702 16075 "method" : "POST",
7aacca6f 16076 "name" : "start",
56122987
DM
16077 "parameters" : {
16078 "additionalProperties" : 0,
16079 "properties" : {
16080 "node" : {
7aacca6f 16081 "description" : "The cluster node name.",
44660702 16082 "format" : "pve-node",
7aacca6f
DM
16083 "type" : "string"
16084 },
16085 "service" : {
16086 "description" : "Ceph service name.",
44660702 16087 "optional" : 1,
7aacca6f 16088 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
44660702 16089 "type" : "string"
7aacca6f
DM
16090 }
16091 }
16092 },
44660702
DM
16093 "permissions" : {
16094 "check" : [
16095 "perm",
16096 "/",
16097 [
16098 "Sys.Modify"
16099 ]
16100 ]
16101 },
7aacca6f 16102 "protected" : 1,
44660702
DM
16103 "proxyto" : "node",
16104 "returns" : {
16105 "type" : "string"
16106 }
7aacca6f 16107 }
44660702
DM
16108 },
16109 "leaf" : 1,
16110 "path" : "/nodes/{node}/ceph/start",
16111 "text" : "start"
7aacca6f
DM
16112 },
16113 {
7aacca6f
DM
16114 "info" : {
16115 "GET" : {
44660702
DM
16116 "description" : "Get ceph status.",
16117 "method" : "GET",
16118 "name" : "status",
7aacca6f
DM
16119 "parameters" : {
16120 "additionalProperties" : 0,
16121 "properties" : {
16122 "node" : {
7aacca6f 16123 "description" : "The cluster node name.",
44660702 16124 "format" : "pve-node",
7aacca6f 16125 "type" : "string"
56122987
DM
16126 }
16127 }
16128 },
16129 "permissions" : {
16130 "check" : [
16131 "perm",
16132 "/",
16133 [
16134 "Sys.Audit",
16135 "Datastore.Audit"
16136 ],
16137 "any",
16138 1
16139 ]
16140 },
44660702
DM
16141 "protected" : 1,
16142 "proxyto" : "node",
56122987 16143 "returns" : {
7aacca6f
DM
16144 "type" : "object"
16145 }
16146 }
16147 },
44660702 16148 "leaf" : 1,
7aacca6f 16149 "path" : "/nodes/{node}/ceph/status",
44660702 16150 "text" : "status"
7aacca6f
DM
16151 },
16152 {
44660702
DM
16153 "children" : [
16154 {
16155 "info" : {
16156 "DELETE" : {
16157 "description" : "Destroy pool",
16158 "method" : "DELETE",
16159 "name" : "destroypool",
16160 "parameters" : {
16161 "additionalProperties" : 0,
16162 "properties" : {
16163 "name" : {
16164 "description" : "The name of the pool. It must be unique.",
16165 "type" : "string"
16166 },
16167 "node" : {
16168 "description" : "The cluster node name.",
16169 "format" : "pve-node",
16170 "type" : "string"
16171 }
16172 }
16173 },
16174 "permissions" : {
16175 "check" : [
16176 "perm",
16177 "/",
16178 [
16179 "Sys.Modify"
16180 ]
16181 ]
16182 },
16183 "protected" : 1,
16184 "proxyto" : "node",
16185 "returns" : {
16186 "type" : "null"
16187 }
16188 }
16189 },
16190 "leaf" : 1,
16191 "path" : "/nodes/{node}/ceph/pools/{name}",
16192 "text" : "{name}"
16193 }
16194 ],
7aacca6f
DM
16195 "info" : {
16196 "GET" : {
44660702
DM
16197 "description" : "List all pools.",
16198 "method" : "GET",
16199 "name" : "lspools",
7aacca6f
DM
16200 "parameters" : {
16201 "additionalProperties" : 0,
16202 "properties" : {
16203 "node" : {
7aacca6f 16204 "description" : "The cluster node name.",
44660702
DM
16205 "format" : "pve-node",
16206 "type" : "string"
7aacca6f
DM
16207 }
16208 }
16209 },
7aacca6f
DM
16210 "permissions" : {
16211 "check" : [
16212 "perm",
16213 "/",
16214 [
16215 "Sys.Audit",
16216 "Datastore.Audit"
16217 ],
16218 "any",
16219 1
16220 ]
16221 },
44660702
DM
16222 "protected" : 1,
16223 "proxyto" : "node",
7aacca6f 16224 "returns" : {
56122987 16225 "items" : {
56122987 16226 "properties" : {
7aacca6f
DM
16227 "pool" : {
16228 "type" : "integer"
16229 },
44660702
DM
16230 "pool_name" : {
16231 "type" : "string"
16232 },
7aacca6f
DM
16233 "size" : {
16234 "type" : "integer"
56122987 16235 }
44660702
DM
16236 },
16237 "type" : "object"
7aacca6f 16238 },
44660702
DM
16239 "links" : [
16240 {
16241 "href" : "{pool_name}",
16242 "rel" : "child"
16243 }
16244 ],
7aacca6f
DM
16245 "type" : "array"
16246 }
16247 },
16248 "POST" : {
7aacca6f 16249 "description" : "Create POOL",
7aacca6f 16250 "method" : "POST",
7aacca6f
DM
16251 "name" : "createpool",
16252 "parameters" : {
16253 "additionalProperties" : 0,
16254 "properties" : {
7aacca6f 16255 "crush_ruleset" : {
7aacca6f 16256 "default" : 0,
44660702 16257 "description" : "The ruleset to use for mapping object placement in the cluster.",
7aacca6f 16258 "maximum" : 32768,
44660702 16259 "minimum" : 0,
7aacca6f 16260 "optional" : 1,
44660702 16261 "type" : "integer"
56122987 16262 },
44660702
DM
16263 "min_size" : {
16264 "default" : 1,
16265 "description" : "Minimum number of replicas per object",
16266 "maximum" : 3,
16267 "minimum" : 1,
16268 "optional" : 1,
16269 "type" : "integer"
7aacca6f 16270 },
44660702
DM
16271 "name" : {
16272 "description" : "The name of the pool. It must be unique.",
16273 "type" : "string"
16274 },
16275 "node" : {
16276 "description" : "The cluster node name.",
16277 "format" : "pve-node",
16278 "type" : "string"
16279 },
16280 "pg_num" : {
16281 "default" : 64,
16282 "description" : "Number of placement groups.",
16283 "maximum" : 32768,
16284 "minimum" : 8,
16285 "optional" : 1,
16286 "type" : "integer"
16287 },
16288 "size" : {
16289 "default" : 2,
16290 "description" : "Number of replicas per object",
16291 "maximum" : 3,
16292 "minimum" : 1,
16293 "optional" : 1,
16294 "type" : "integer"
56122987
DM
16295 }
16296 }
44660702
DM
16297 },
16298 "permissions" : {
16299 "check" : [
16300 "perm",
16301 "/",
16302 [
16303 "Sys.Modify"
16304 ]
16305 ]
16306 },
16307 "protected" : 1,
16308 "proxyto" : "node",
16309 "returns" : {
16310 "type" : "null"
7aacca6f 16311 }
56122987 16312 }
44660702 16313 },
56122987 16314 "leaf" : 0,
44660702
DM
16315 "path" : "/nodes/{node}/ceph/pools",
16316 "text" : "pools"
56122987
DM
16317 },
16318 {
56122987 16319 "info" : {
7aacca6f 16320 "GET" : {
44660702
DM
16321 "description" : "Get OSD crush map",
16322 "method" : "GET",
16323 "name" : "crush",
16324 "parameters" : {
16325 "additionalProperties" : 0,
16326 "properties" : {
16327 "node" : {
16328 "description" : "The cluster node name.",
16329 "format" : "pve-node",
16330 "type" : "string"
16331 }
16332 }
16333 },
7aacca6f
DM
16334 "permissions" : {
16335 "check" : [
16336 "perm",
16337 "/",
16338 [
16339 "Sys.Audit",
16340 "Datastore.Audit"
16341 ],
16342 "any",
16343 1
16344 ]
16345 },
44660702 16346 "protected" : 1,
7aacca6f 16347 "proxyto" : "node",
56122987 16348 "returns" : {
7aacca6f 16349 "type" : "string"
44660702 16350 }
56122987
DM
16351 }
16352 },
44660702
DM
16353 "leaf" : 1,
16354 "path" : "/nodes/{node}/ceph/crush",
7aacca6f 16355 "text" : "crush"
56122987
DM
16356 },
16357 {
56122987 16358 "info" : {
7aacca6f 16359 "GET" : {
44660702
DM
16360 "description" : "Read ceph log",
16361 "method" : "GET",
16362 "name" : "log",
16363 "parameters" : {
16364 "additionalProperties" : 0,
16365 "properties" : {
16366 "limit" : {
16367 "minimum" : 0,
16368 "optional" : 1,
16369 "type" : "integer"
7aacca6f 16370 },
44660702
DM
16371 "node" : {
16372 "description" : "The cluster node name.",
16373 "format" : "pve-node",
16374 "type" : "string"
16375 },
16376 "start" : {
16377 "minimum" : 0,
16378 "optional" : 1,
16379 "type" : "integer"
16380 }
7aacca6f 16381 }
56122987 16382 },
56122987
DM
16383 "permissions" : {
16384 "check" : [
16385 "perm",
7aacca6f 16386 "/nodes/{node}",
56122987 16387 [
7aacca6f 16388 "Sys.Syslog"
56122987
DM
16389 ]
16390 ]
16391 },
7aacca6f 16392 "protected" : 1,
44660702
DM
16393 "proxyto" : "node",
16394 "returns" : {
16395 "items" : {
16396 "properties" : {
16397 "n" : {
16398 "description" : "Line number",
16399 "type" : "integer"
16400 },
16401 "t" : {
16402 "description" : "Line text",
16403 "type" : "string"
16404 }
56122987 16405 },
44660702 16406 "type" : "object"
56122987 16407 },
44660702 16408 "type" : "array"
7aacca6f 16409 }
56122987
DM
16410 }
16411 },
16412 "leaf" : 1,
44660702
DM
16413 "path" : "/nodes/{node}/ceph/log",
16414 "text" : "log"
7aacca6f
DM
16415 }
16416 ],
44660702
DM
16417 "info" : {
16418 "GET" : {
16419 "description" : "Directory index.",
16420 "method" : "GET",
16421 "name" : "index",
16422 "parameters" : {
16423 "additionalProperties" : 0,
16424 "properties" : {
16425 "node" : {
16426 "description" : "The cluster node name.",
16427 "format" : "pve-node",
16428 "type" : "string"
16429 }
16430 }
16431 },
16432 "permissions" : {
16433 "check" : [
16434 "perm",
16435 "/",
16436 [
16437 "Sys.Audit",
16438 "Datastore.Audit"
16439 ],
16440 "any",
16441 1
16442 ]
16443 },
16444 "returns" : {
16445 "items" : {
16446 "properties" : {},
16447 "type" : "object"
16448 },
16449 "links" : [
16450 {
16451 "href" : "{name}",
16452 "rel" : "child"
16453 }
16454 ],
16455 "type" : "array"
16456 }
16457 }
16458 },
7aacca6f 16459 "leaf" : 0,
44660702
DM
16460 "path" : "/nodes/{node}/ceph",
16461 "text" : "ceph"
7aacca6f
DM
16462 },
16463 {
7aacca6f
DM
16464 "info" : {
16465 "POST" : {
7aacca6f 16466 "description" : "Create backup.",
44660702 16467 "method" : "POST",
7aacca6f
DM
16468 "name" : "vzdump",
16469 "parameters" : {
44660702 16470 "additionalProperties" : 0,
7aacca6f 16471 "properties" : {
44660702
DM
16472 "all" : {
16473 "default" : 0,
16474 "description" : "Backup all known guest systems on this host.",
7aacca6f 16475 "optional" : 1,
44660702 16476 "type" : "boolean"
56122987 16477 },
44660702 16478 "bwlimit" : {
7aacca6f 16479 "default" : 0,
44660702
DM
16480 "description" : "Limit I/O bandwidth (KBytes per second).",
16481 "minimum" : 0,
7aacca6f 16482 "optional" : 1,
44660702 16483 "type" : "integer"
56122987 16484 },
44660702
DM
16485 "compress" : {
16486 "default" : "0",
16487 "description" : "Compress dump file.",
16488 "enum" : [
16489 "0",
16490 "1",
16491 "gzip",
16492 "lzo"
16493 ],
7aacca6f 16494 "optional" : 1,
44660702 16495 "type" : "string"
56122987 16496 },
44660702
DM
16497 "dumpdir" : {
16498 "description" : "Store resulting files to specified directory.",
7aacca6f 16499 "optional" : 1,
44660702 16500 "type" : "string"
7aacca6f 16501 },
44660702
DM
16502 "exclude" : {
16503 "description" : "Exclude specified guest systems (assumes --all)",
16504 "format" : "pve-vmid-list",
7aacca6f 16505 "optional" : 1,
44660702 16506 "type" : "string"
7aacca6f 16507 },
44660702
DM
16508 "exclude-path" : {
16509 "description" : "Exclude certain files/directories (shell globs).",
16510 "format" : "string-alist",
7aacca6f 16511 "optional" : 1,
44660702 16512 "type" : "string"
7aacca6f 16513 },
44660702
DM
16514 "ionice" : {
16515 "default" : 7,
16516 "description" : "Set CFQ ionice priority.",
16517 "maximum" : 8,
16518 "minimum" : 0,
16519 "optional" : 1,
16520 "type" : "integer"
7aacca6f 16521 },
44660702
DM
16522 "lockwait" : {
16523 "default" : 180,
16524 "description" : "Maximal time to wait for the global lock (minutes).",
16525 "minimum" : 0,
7aacca6f 16526 "optional" : 1,
44660702 16527 "type" : "integer"
7aacca6f
DM
16528 },
16529 "mailnotification" : {
44660702 16530 "default" : "always",
7aacca6f
DM
16531 "description" : "Specify when to send an email",
16532 "enum" : [
16533 "always",
16534 "failure"
16535 ],
7aacca6f 16536 "optional" : 1,
44660702 16537 "type" : "string"
7aacca6f
DM
16538 },
16539 "mailto" : {
7aacca6f 16540 "description" : "Comma-separated list of email addresses that should receive email notifications.",
44660702 16541 "format" : "string-list",
7aacca6f 16542 "optional" : 1,
44660702 16543 "type" : "string"
56122987 16544 },
44660702
DM
16545 "maxfiles" : {
16546 "default" : 1,
16547 "description" : "Maximal number of backup files per guest system.",
16548 "minimum" : 1,
7aacca6f 16549 "optional" : 1,
44660702 16550 "type" : "integer"
56122987 16551 },
7aacca6f 16552 "mode" : {
44660702 16553 "default" : "snapshot",
7aacca6f
DM
16554 "description" : "Backup mode.",
16555 "enum" : [
16556 "snapshot",
16557 "suspend",
16558 "stop"
16559 ],
44660702
DM
16560 "optional" : 1,
16561 "type" : "string"
7aacca6f 16562 },
44660702
DM
16563 "node" : {
16564 "description" : "Only run if executed on this node.",
16565 "format" : "pve-node",
16566 "optional" : 1,
16567 "type" : "string"
16568 },
16569 "pigz" : {
16570 "default" : 0,
16571 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
16572 "optional" : 1,
16573 "type" : "integer"
16574 },
16575 "quiet" : {
16576 "default" : 0,
16577 "description" : "Be quiet.",
16578 "optional" : 1,
16579 "type" : "boolean"
16580 },
16581 "remove" : {
7aacca6f 16582 "default" : 1,
44660702 16583 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
7aacca6f 16584 "optional" : 1,
44660702 16585 "type" : "boolean"
7aacca6f 16586 },
44660702
DM
16587 "script" : {
16588 "description" : "Use specified hook script.",
16589 "optional" : 1,
16590 "type" : "string"
16591 },
16592 "size" : {
16593 "default" : 1024,
16594 "description" : "Unused, will be removed in a future release.",
16595 "minimum" : 500,
16596 "optional" : 1,
16597 "type" : "integer"
16598 },
16599 "stdexcludes" : {
16600 "default" : 1,
16601 "description" : "Exclude temporary files and logs.",
16602 "optional" : 1,
16603 "type" : "boolean"
16604 },
16605 "stdout" : {
16606 "description" : "Write tar to stdout, not to a file.",
7aacca6f 16607 "optional" : 1,
44660702
DM
16608 "type" : "boolean"
16609 },
16610 "stop" : {
7aacca6f 16611 "default" : 0,
44660702
DM
16612 "description" : "Stop runnig backup jobs on this host.",
16613 "optional" : 1,
16614 "type" : "boolean"
7aacca6f 16615 },
44660702
DM
16616 "stopwait" : {
16617 "default" : 10,
16618 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
7aacca6f
DM
16619 "minimum" : 0,
16620 "optional" : 1,
44660702 16621 "type" : "integer"
7aacca6f 16622 },
44660702
DM
16623 "storage" : {
16624 "description" : "Store resulting file to this storage.",
16625 "format" : "pve-storage-id",
7aacca6f 16626 "optional" : 1,
44660702
DM
16627 "type" : "string"
16628 },
16629 "tmpdir" : {
16630 "description" : "Store temporary files to specified directory.",
16631 "optional" : 1,
16632 "type" : "string"
7aacca6f
DM
16633 },
16634 "vmid" : {
7aacca6f 16635 "description" : "The ID of the guest system you want to backup.",
44660702 16636 "format" : "pve-vmid-list",
7aacca6f
DM
16637 "optional" : 1,
16638 "type" : "string"
16639 }
7aacca6f
DM
16640 }
16641 },
7aacca6f 16642 "permissions" : {
44660702
DM
16643 "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.",
16644 "user" : "all"
7aacca6f 16645 },
44660702 16646 "protected" : 1,
7aacca6f 16647 "proxyto" : "node",
7aacca6f 16648 "returns" : {
44660702 16649 "type" : "string"
7aacca6f
DM
16650 }
16651 }
16652 },
44660702
DM
16653 "leaf" : 1,
16654 "path" : "/nodes/{node}/vzdump",
16655 "text" : "vzdump"
16656 },
16657 {
7aacca6f
DM
16658 "children" : [
16659 {
7aacca6f
DM
16660 "children" : [
16661 {
7aacca6f
DM
16662 "info" : {
16663 "GET" : {
7aacca6f
DM
16664 "description" : "Read service properties",
16665 "method" : "GET",
16666 "name" : "service_state",
16667 "parameters" : {
44660702 16668 "additionalProperties" : 0,
7aacca6f
DM
16669 "properties" : {
16670 "node" : {
7aacca6f 16671 "description" : "The cluster node name.",
44660702
DM
16672 "format" : "pve-node",
16673 "type" : "string"
7aacca6f
DM
16674 },
16675 "service" : {
44660702 16676 "description" : "Service ID",
7aacca6f
DM
16677 "enum" : [
16678 "pveproxy",
16679 "pvedaemon",
16680 "spiceproxy",
16681 "pvestatd",
16682 "pve-cluster",
16683 "corosync",
16684 "pve-firewall",
16685 "pvefw-logger",
16686 "pve-ha-crm",
16687 "pve-ha-lrm",
16688 "sshd",
16689 "syslog",
16690 "cron",
16691 "postfix",
16692 "ksmtuned",
16693 "systemd-timesyncd"
16694 ],
7aacca6f
DM
16695 "type" : "string"
16696 }
44660702 16697 }
56122987 16698 },
7aacca6f
DM
16699 "permissions" : {
16700 "check" : [
16701 "perm",
16702 "/nodes/{node}",
16703 [
44660702 16704 "Sys.Audit"
7aacca6f
DM
16705 ]
16706 ]
56122987 16707 },
44660702 16708 "protected" : 1,
7aacca6f 16709 "proxyto" : "node",
44660702
DM
16710 "returns" : {
16711 "properties" : {},
16712 "type" : "object"
16713 }
16714 }
16715 },
16716 "leaf" : 1,
16717 "path" : "/nodes/{node}/services/{service}/state",
16718 "text" : "state"
16719 },
16720 {
16721 "info" : {
16722 "POST" : {
16723 "description" : "Start service.",
7aacca6f
DM
16724 "method" : "POST",
16725 "name" : "service_start",
16726 "parameters" : {
44660702 16727 "additionalProperties" : 0,
7aacca6f 16728 "properties" : {
44660702
DM
16729 "node" : {
16730 "description" : "The cluster node name.",
16731 "format" : "pve-node",
16732 "type" : "string"
16733 },
7aacca6f 16734 "service" : {
44660702 16735 "description" : "Service ID",
7aacca6f
DM
16736 "enum" : [
16737 "pveproxy",
16738 "pvedaemon",
16739 "spiceproxy",
16740 "pvestatd",
16741 "pve-cluster",
16742 "corosync",
16743 "pve-firewall",
16744 "pvefw-logger",
16745 "pve-ha-crm",
16746 "pve-ha-lrm",
16747 "sshd",
16748 "syslog",
16749 "cron",
16750 "postfix",
16751 "ksmtuned",
16752 "systemd-timesyncd"
16753 ],
7aacca6f
DM
16754 "type" : "string"
16755 }
44660702 16756 }
56122987 16757 },
56122987
DM
16758 "permissions" : {
16759 "check" : [
16760 "perm",
16761 "/nodes/{node}",
16762 [
7aacca6f 16763 "Sys.Modify"
56122987
DM
16764 ]
16765 ]
7aacca6f 16766 },
7aacca6f 16767 "protected" : 1,
44660702
DM
16768 "proxyto" : "node",
16769 "returns" : {
16770 "type" : "string"
16771 }
16772 }
16773 },
16774 "leaf" : 1,
16775 "path" : "/nodes/{node}/services/{service}/start",
16776 "text" : "start"
16777 },
16778 {
16779 "info" : {
16780 "POST" : {
16781 "description" : "Stop service.",
16782 "method" : "POST",
7aacca6f 16783 "name" : "service_stop",
56122987 16784 "parameters" : {
7aacca6f 16785 "additionalProperties" : 0,
56122987
DM
16786 "properties" : {
16787 "node" : {
44660702 16788 "description" : "The cluster node name.",
56122987 16789 "format" : "pve-node",
44660702 16790 "type" : "string"
56122987
DM
16791 },
16792 "service" : {
44660702 16793 "description" : "Service ID",
56122987
DM
16794 "enum" : [
16795 "pveproxy",
16796 "pvedaemon",
16797 "spiceproxy",
16798 "pvestatd",
16799 "pve-cluster",
16800 "corosync",
16801 "pve-firewall",
16802 "pvefw-logger",
16803 "pve-ha-crm",
16804 "pve-ha-lrm",
16805 "sshd",
16806 "syslog",
16807 "cron",
16808 "postfix",
16809 "ksmtuned",
16810 "systemd-timesyncd"
16811 ],
56122987
DM
16812 "type" : "string"
16813 }
7aacca6f 16814 }
44660702 16815 },
56122987
DM
16816 "permissions" : {
16817 "check" : [
16818 "perm",
16819 "/nodes/{node}",
16820 [
16821 "Sys.Modify"
16822 ]
16823 ]
16824 },
44660702
DM
16825 "protected" : 1,
16826 "proxyto" : "node",
7aacca6f
DM
16827 "returns" : {
16828 "type" : "string"
44660702
DM
16829 }
16830 }
16831 },
16832 "leaf" : 1,
16833 "path" : "/nodes/{node}/services/{service}/stop",
16834 "text" : "stop"
16835 },
16836 {
16837 "info" : {
16838 "POST" : {
16839 "description" : "Restart service.",
16840 "method" : "POST",
16841 "name" : "service_restart",
56122987
DM
16842 "parameters" : {
16843 "additionalProperties" : 0,
16844 "properties" : {
7aacca6f
DM
16845 "node" : {
16846 "description" : "The cluster node name.",
44660702
DM
16847 "format" : "pve-node",
16848 "type" : "string"
7aacca6f
DM
16849 },
16850 "service" : {
44660702 16851 "description" : "Service ID",
56122987
DM
16852 "enum" : [
16853 "pveproxy",
16854 "pvedaemon",
16855 "spiceproxy",
16856 "pvestatd",
16857 "pve-cluster",
16858 "corosync",
16859 "pve-firewall",
16860 "pvefw-logger",
16861 "pve-ha-crm",
16862 "pve-ha-lrm",
16863 "sshd",
16864 "syslog",
16865 "cron",
16866 "postfix",
16867 "ksmtuned",
16868 "systemd-timesyncd"
7aacca6f 16869 ],
7aacca6f 16870 "type" : "string"
56122987
DM
16871 }
16872 }
16873 },
44660702
DM
16874 "permissions" : {
16875 "check" : [
16876 "perm",
16877 "/nodes/{node}",
16878 [
16879 "Sys.Modify"
16880 ]
16881 ]
16882 },
16883 "protected" : 1,
16884 "proxyto" : "node",
16885 "returns" : {
16886 "type" : "string"
16887 }
56122987 16888 }
44660702
DM
16889 },
16890 "leaf" : 1,
16891 "path" : "/nodes/{node}/services/{service}/restart",
16892 "text" : "restart"
56122987
DM
16893 },
16894 {
56122987
DM
16895 "info" : {
16896 "POST" : {
44660702
DM
16897 "description" : "Reload service.",
16898 "method" : "POST",
7aacca6f 16899 "name" : "service_reload",
56122987
DM
16900 "parameters" : {
16901 "additionalProperties" : 0,
16902 "properties" : {
44660702
DM
16903 "node" : {
16904 "description" : "The cluster node name.",
16905 "format" : "pve-node",
16906 "type" : "string"
16907 },
56122987 16908 "service" : {
56122987
DM
16909 "description" : "Service ID",
16910 "enum" : [
16911 "pveproxy",
16912 "pvedaemon",
16913 "spiceproxy",
16914 "pvestatd",
16915 "pve-cluster",
16916 "corosync",
16917 "pve-firewall",
16918 "pvefw-logger",
16919 "pve-ha-crm",
16920 "pve-ha-lrm",
16921 "sshd",
16922 "syslog",
16923 "cron",
16924 "postfix",
16925 "ksmtuned",
16926 "systemd-timesyncd"
44660702
DM
16927 ],
16928 "type" : "string"
56122987
DM
16929 }
16930 }
16931 },
56122987
DM
16932 "permissions" : {
16933 "check" : [
16934 "perm",
16935 "/nodes/{node}",
16936 [
16937 "Sys.Modify"
16938 ]
16939 ]
16940 },
44660702 16941 "protected" : 1,
56122987 16942 "proxyto" : "node",
7aacca6f
DM
16943 "returns" : {
16944 "type" : "string"
56122987
DM
16945 }
16946 }
44660702
DM
16947 },
16948 "leaf" : 1,
16949 "path" : "/nodes/{node}/services/{service}/reload",
16950 "text" : "reload"
16951 }
16952 ],
16953 "info" : {
16954 "GET" : {
16955 "description" : "Directory index",
16956 "method" : "GET",
16957 "name" : "srvcmdidx",
16958 "parameters" : {
16959 "additionalProperties" : 0,
16960 "properties" : {
16961 "node" : {
16962 "description" : "The cluster node name.",
16963 "format" : "pve-node",
16964 "type" : "string"
16965 },
16966 "service" : {
16967 "description" : "Service ID",
16968 "enum" : [
16969 "pveproxy",
16970 "pvedaemon",
16971 "spiceproxy",
16972 "pvestatd",
16973 "pve-cluster",
16974 "corosync",
16975 "pve-firewall",
16976 "pvefw-logger",
16977 "pve-ha-crm",
16978 "pve-ha-lrm",
16979 "sshd",
16980 "syslog",
16981 "cron",
16982 "postfix",
16983 "ksmtuned",
16984 "systemd-timesyncd"
16985 ],
16986 "type" : "string"
16987 }
16988 }
16989 },
16990 "permissions" : {
16991 "check" : [
16992 "perm",
16993 "/nodes/{node}",
16994 [
16995 "Sys.Audit"
16996 ]
16997 ]
16998 },
16999 "returns" : {
17000 "items" : {
17001 "properties" : {
17002 "subdir" : {
17003 "type" : "string"
17004 }
17005 },
17006 "type" : "object"
17007 },
17008 "links" : [
17009 {
17010 "href" : "{subdir}",
17011 "rel" : "child"
17012 }
17013 ],
17014 "type" : "array"
17015 }
17016 }
17017 },
17018 "leaf" : 0,
17019 "path" : "/nodes/{node}/services/{service}",
17020 "text" : "{service}"
17021 }
17022 ],
17023 "info" : {
17024 "GET" : {
17025 "description" : "Service list.",
17026 "method" : "GET",
17027 "name" : "index",
17028 "parameters" : {
17029 "additionalProperties" : 0,
17030 "properties" : {
17031 "node" : {
17032 "description" : "The cluster node name.",
17033 "format" : "pve-node",
17034 "type" : "string"
17035 }
17036 }
17037 },
17038 "permissions" : {
17039 "check" : [
17040 "perm",
17041 "/nodes/{node}",
17042 [
17043 "Sys.Audit"
17044 ]
17045 ]
17046 },
17047 "protected" : 1,
17048 "proxyto" : "node",
17049 "returns" : {
17050 "items" : {
17051 "properties" : {},
17052 "type" : "object"
17053 },
17054 "links" : [
17055 {
17056 "href" : "{service}",
17057 "rel" : "child"
56122987 17058 }
44660702
DM
17059 ],
17060 "type" : "array"
17061 }
7aacca6f 17062 }
44660702 17063 },
7aacca6f 17064 "leaf" : 0,
44660702
DM
17065 "path" : "/nodes/{node}/services",
17066 "text" : "services"
7aacca6f
DM
17067 },
17068 {
7aacca6f
DM
17069 "info" : {
17070 "GET" : {
44660702
DM
17071 "description" : "Read subscription info.",
17072 "method" : "GET",
17073 "name" : "get",
7aacca6f 17074 "parameters" : {
44660702 17075 "additionalProperties" : 0,
7aacca6f
DM
17076 "properties" : {
17077 "node" : {
17078 "description" : "The cluster node name.",
44660702
DM
17079 "format" : "pve-node",
17080 "type" : "string"
7aacca6f 17081 }
44660702
DM
17082 }
17083 },
17084 "permissions" : {
17085 "user" : "all"
7aacca6f 17086 },
7aacca6f
DM
17087 "proxyto" : "node",
17088 "returns" : {
17089 "type" : "object"
44660702 17090 }
7aacca6f 17091 },
44660702
DM
17092 "POST" : {
17093 "description" : "Update subscription info.",
17094 "method" : "POST",
17095 "name" : "update",
7aacca6f
DM
17096 "parameters" : {
17097 "additionalProperties" : 0,
17098 "properties" : {
44660702
DM
17099 "force" : {
17100 "default" : 0,
17101 "description" : "Always connect to server, even if we have up to date info inside local cache.",
17102 "optional" : 1,
17103 "type" : "boolean"
17104 },
7aacca6f 17105 "node" : {
7aacca6f 17106 "description" : "The cluster node name.",
44660702 17107 "format" : "pve-node",
7aacca6f
DM
17108 "type" : "string"
17109 }
17110 }
17111 },
7aacca6f 17112 "protected" : 1,
7aacca6f 17113 "proxyto" : "node",
44660702
DM
17114 "returns" : {
17115 "type" : "null"
17116 }
17117 },
17118 "PUT" : {
17119 "description" : "Set subscription key.",
17120 "method" : "PUT",
17121 "name" : "set",
7aacca6f
DM
17122 "parameters" : {
17123 "additionalProperties" : 0,
17124 "properties" : {
44660702
DM
17125 "key" : {
17126 "description" : "Proxmox VE subscription key",
17127 "type" : "string"
7aacca6f
DM
17128 },
17129 "node" : {
7aacca6f 17130 "description" : "The cluster node name.",
44660702
DM
17131 "format" : "pve-node",
17132 "type" : "string"
7aacca6f
DM
17133 }
17134 }
17135 },
44660702
DM
17136 "protected" : 1,
17137 "proxyto" : "node",
7aacca6f
DM
17138 "returns" : {
17139 "type" : "null"
44660702 17140 }
7aacca6f
DM
17141 }
17142 },
44660702 17143 "leaf" : 1,
7aacca6f 17144 "path" : "/nodes/{node}/subscription",
44660702 17145 "text" : "subscription"
7aacca6f
DM
17146 },
17147 {
7aacca6f
DM
17148 "children" : [
17149 {
56122987 17150 "info" : {
7aacca6f 17151 "DELETE" : {
44660702
DM
17152 "description" : "Delete network device configuration",
17153 "method" : "DELETE",
17154 "name" : "delete_network",
17155 "parameters" : {
17156 "additionalProperties" : 0,
17157 "properties" : {
17158 "iface" : {
17159 "description" : "Network interface name.",
17160 "format" : "pve-iface",
17161 "maxLength" : 20,
17162 "minLength" : 2,
17163 "type" : "string"
17164 },
17165 "node" : {
17166 "description" : "The cluster node name.",
17167 "format" : "pve-node",
17168 "type" : "string"
17169 }
17170 }
7aacca6f
DM
17171 },
17172 "permissions" : {
17173 "check" : [
17174 "perm",
17175 "/nodes/{node}",
17176 [
17177 "Sys.Modify"
17178 ]
17179 ]
17180 },
44660702 17181 "protected" : 1,
7aacca6f 17182 "proxyto" : "node",
44660702
DM
17183 "returns" : {
17184 "type" : "null"
17185 }
17186 },
17187 "GET" : {
17188 "description" : "Read network device configuration",
17189 "method" : "GET",
17190 "name" : "network_config",
56122987 17191 "parameters" : {
44660702 17192 "additionalProperties" : 0,
56122987 17193 "properties" : {
7aacca6f 17194 "iface" : {
7aacca6f 17195 "description" : "Network interface name.",
44660702
DM
17196 "format" : "pve-iface",
17197 "maxLength" : 20,
7aacca6f
DM
17198 "minLength" : 2,
17199 "type" : "string"
44660702
DM
17200 },
17201 "node" : {
17202 "description" : "The cluster node name.",
17203 "format" : "pve-node",
17204 "type" : "string"
56122987 17205 }
44660702 17206 }
7aacca6f
DM
17207 },
17208 "permissions" : {
17209 "check" : [
17210 "perm",
17211 "/nodes/{node}",
17212 [
44660702 17213 "Sys.Audit"
7aacca6f
DM
17214 ]
17215 ]
17216 },
17217 "proxyto" : "node",
44660702
DM
17218 "returns" : {
17219 "properties" : {
17220 "method" : {
17221 "type" : "string"
17222 },
17223 "type" : {
17224 "type" : "string"
17225 }
17226 },
17227 "type" : "object"
17228 }
17229 },
17230 "PUT" : {
7aacca6f
DM
17231 "description" : "Update network device configuration",
17232 "method" : "PUT",
17233 "name" : "update_network",
17234 "parameters" : {
17235 "additionalProperties" : 0,
17236 "properties" : {
7aacca6f 17237 "address" : {
44660702 17238 "description" : "IP address.",
7aacca6f 17239 "format" : "ipv4",
44660702 17240 "optional" : 1,
7aacca6f 17241 "requires" : "netmask",
44660702 17242 "type" : "string"
7aacca6f 17243 },
44660702
DM
17244 "address6" : {
17245 "description" : "IP address.",
17246 "format" : "ipv6",
17247 "optional" : 1,
17248 "requires" : "netmask6",
17249 "type" : "string"
7aacca6f
DM
17250 },
17251 "autostart" : {
44660702 17252 "description" : "Automatically start interface on boot.",
7aacca6f 17253 "optional" : 1,
44660702 17254 "type" : "boolean"
7aacca6f 17255 },
44660702
DM
17256 "bond_mode" : {
17257 "description" : "Bonding mode.",
7aacca6f 17258 "enum" : [
44660702
DM
17259 "balance-rr",
17260 "active-backup",
17261 "balance-xor",
17262 "broadcast",
17263 "802.3ad",
17264 "balance-tlb",
17265 "balance-alb",
17266 "balance-slb",
17267 "lacp-balance-slb",
17268 "lacp-balance-tcp"
17269 ],
7aacca6f 17270 "optional" : 1,
44660702 17271 "type" : "string"
7aacca6f 17272 },
44660702
DM
17273 "bond_xmit_hash_policy" : {
17274 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17275 "enum" : [
17276 "layer2",
17277 "layer2+3",
17278 "layer3+4"
17279 ],
7aacca6f 17280 "optional" : 1,
44660702 17281 "type" : "string"
7aacca6f 17282 },
44660702
DM
17283 "bridge_ports" : {
17284 "description" : "Specify the iterfaces you want to add to your bridge.",
17285 "format" : "pve-iface-list",
7aacca6f 17286 "optional" : 1,
44660702 17287 "type" : "string"
7aacca6f 17288 },
44660702
DM
17289 "bridge_vlan_aware" : {
17290 "description" : "Enable bridge vlan support.",
7aacca6f 17291 "optional" : 1,
44660702 17292 "type" : "boolean"
7aacca6f
DM
17293 },
17294 "comments" : {
44660702 17295 "description" : "Comments",
7aacca6f 17296 "optional" : 1,
44660702 17297 "type" : "string"
7aacca6f 17298 },
44660702
DM
17299 "comments6" : {
17300 "description" : "Comments",
7aacca6f 17301 "optional" : 1,
44660702 17302 "type" : "string"
7aacca6f 17303 },
44660702
DM
17304 "delete" : {
17305 "description" : "A list of settings you want to delete.",
17306 "format" : "pve-configid-list",
7aacca6f
DM
17307 "optional" : 1,
17308 "type" : "string"
17309 },
44660702
DM
17310 "gateway" : {
17311 "description" : "Default gateway address.",
17312 "format" : "ipv4",
7aacca6f
DM
17313 "optional" : 1,
17314 "type" : "string"
17315 },
44660702
DM
17316 "gateway6" : {
17317 "description" : "Default ipv6 gateway address.",
17318 "format" : "ipv6",
7aacca6f 17319 "optional" : 1,
44660702 17320 "type" : "string"
7aacca6f
DM
17321 },
17322 "iface" : {
44660702 17323 "description" : "Network interface name.",
7aacca6f
DM
17324 "format" : "pve-iface",
17325 "maxLength" : 20,
17326 "minLength" : 2,
7aacca6f
DM
17327 "type" : "string"
17328 },
44660702
DM
17329 "netmask" : {
17330 "description" : "Network mask.",
17331 "format" : "ipv4mask",
7aacca6f 17332 "optional" : 1,
44660702
DM
17333 "requires" : "address",
17334 "type" : "string"
7aacca6f
DM
17335 },
17336 "netmask6" : {
44660702 17337 "description" : "Network mask.",
7aacca6f 17338 "maximum" : 128,
44660702 17339 "minimum" : 0,
7aacca6f
DM
17340 "optional" : 1,
17341 "requires" : "address6",
44660702
DM
17342 "type" : "integer"
17343 },
7aacca6f 17344 "node" : {
44660702 17345 "description" : "The cluster node name.",
7aacca6f 17346 "format" : "pve-node",
44660702 17347 "type" : "string"
7aacca6f 17348 },
44660702
DM
17349 "ovs_bonds" : {
17350 "description" : "Specify the interfaces used by the bonding device.",
17351 "format" : "pve-iface-list",
17352 "optional" : 1,
17353 "type" : "string"
17354 },
17355 "ovs_bridge" : {
17356 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17357 "format" : "pve-iface",
17358 "optional" : 1,
17359 "type" : "string"
17360 },
17361 "ovs_options" : {
17362 "description" : "OVS interface options.",
17363 "maxLength" : 1024,
17364 "optional" : 1,
17365 "type" : "string"
17366 },
17367 "ovs_ports" : {
17368 "description" : "Specify the iterfaces you want to add to your bridge.",
17369 "format" : "pve-iface-list",
17370 "optional" : 1,
17371 "type" : "string"
17372 },
17373 "ovs_tag" : {
17374 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17375 "maximum" : 4094,
17376 "minimum" : 1,
17377 "optional" : 1,
17378 "type" : "integer"
17379 },
17380 "slaves" : {
17381 "description" : "Specify the interfaces used by the bonding device.",
17382 "format" : "pve-iface-list",
17383 "optional" : 1,
17384 "type" : "string"
17385 },
17386 "type" : {
17387 "description" : "Network interface type",
17388 "enum" : [
17389 "bridge",
17390 "bond",
17391 "eth",
17392 "alias",
17393 "vlan",
17394 "OVSBridge",
17395 "OVSBond",
17396 "OVSPort",
17397 "OVSIntPort",
17398 "unknown"
17399 ],
17400 "type" : "string"
7aacca6f
DM
17401 }
17402 }
17403 },
7aacca6f
DM
17404 "permissions" : {
17405 "check" : [
17406 "perm",
17407 "/nodes/{node}",
17408 [
44660702 17409 "Sys.Modify"
7aacca6f
DM
17410 ]
17411 ]
17412 },
44660702
DM
17413 "protected" : 1,
17414 "proxyto" : "node",
7aacca6f 17415 "returns" : {
44660702
DM
17416 "type" : "null"
17417 }
7aacca6f
DM
17418 }
17419 },
7aacca6f 17420 "leaf" : 1,
44660702
DM
17421 "path" : "/nodes/{node}/network/{iface}",
17422 "text" : "{iface}"
7aacca6f
DM
17423 }
17424 ],
7aacca6f 17425 "info" : {
44660702
DM
17426 "DELETE" : {
17427 "description" : "Revert network configuration changes.",
17428 "method" : "DELETE",
17429 "name" : "revert_network_changes",
7aacca6f
DM
17430 "parameters" : {
17431 "additionalProperties" : 0,
17432 "properties" : {
7aacca6f 17433 "node" : {
7aacca6f 17434 "description" : "The cluster node name.",
44660702 17435 "format" : "pve-node",
7aacca6f
DM
17436 "type" : "string"
17437 }
17438 }
44660702 17439 },
7aacca6f
DM
17440 "permissions" : {
17441 "check" : [
17442 "perm",
17443 "/nodes/{node}",
17444 [
17445 "Sys.Modify"
17446 ]
17447 ]
17448 },
44660702
DM
17449 "protected" : 1,
17450 "proxyto" : "node",
7aacca6f
DM
17451 "returns" : {
17452 "type" : "null"
44660702 17453 }
7aacca6f 17454 },
44660702
DM
17455 "GET" : {
17456 "description" : "List available networks",
17457 "method" : "GET",
17458 "name" : "index",
7aacca6f 17459 "parameters" : {
44660702 17460 "additionalProperties" : 0,
7aacca6f 17461 "properties" : {
7aacca6f 17462 "node" : {
44660702
DM
17463 "description" : "The cluster node name.",
17464 "format" : "pve-node",
17465 "type" : "string"
7aacca6f
DM
17466 },
17467 "type" : {
44660702 17468 "description" : "Only list specific interface types.",
7aacca6f
DM
17469 "enum" : [
17470 "bridge",
17471 "bond",
17472 "eth",
17473 "alias",
17474 "vlan",
17475 "OVSBridge",
17476 "OVSBond",
17477 "OVSPort",
17478 "OVSIntPort",
44660702 17479 "any_bridge"
7aacca6f 17480 ],
7aacca6f 17481 "optional" : 1,
44660702
DM
17482 "type" : "string"
17483 }
17484 }
17485 },
17486 "permissions" : {
17487 "user" : "all"
17488 },
17489 "proxyto" : "node",
17490 "returns" : {
17491 "items" : {
17492 "properties" : {},
17493 "type" : "object"
17494 },
17495 "links" : [
17496 {
17497 "href" : "{iface}",
17498 "rel" : "child"
17499 }
17500 ],
17501 "type" : "array"
17502 }
17503 },
17504 "POST" : {
17505 "description" : "Create network device configuration",
17506 "method" : "POST",
17507 "name" : "create_network",
17508 "parameters" : {
17509 "additionalProperties" : 0,
17510 "properties" : {
7aacca6f 17511 "address" : {
44660702
DM
17512 "description" : "IP address.",
17513 "format" : "ipv4",
17514 "optional" : 1,
7aacca6f 17515 "requires" : "netmask",
44660702
DM
17516 "type" : "string"
17517 },
17518 "address6" : {
7aacca6f 17519 "description" : "IP address.",
44660702
DM
17520 "format" : "ipv6",
17521 "optional" : 1,
17522 "requires" : "netmask6",
17523 "type" : "string"
17524 },
17525 "autostart" : {
17526 "description" : "Automatically start interface on boot.",
7aacca6f 17527 "optional" : 1,
44660702 17528 "type" : "boolean"
7aacca6f
DM
17529 },
17530 "bond_mode" : {
17531 "description" : "Bonding mode.",
17532 "enum" : [
17533 "balance-rr",
17534 "active-backup",
17535 "balance-xor",
17536 "broadcast",
17537 "802.3ad",
17538 "balance-tlb",
17539 "balance-alb",
17540 "balance-slb",
17541 "lacp-balance-slb",
17542 "lacp-balance-tcp"
17543 ],
17544 "optional" : 1,
17545 "type" : "string"
17546 },
44660702
DM
17547 "bond_xmit_hash_policy" : {
17548 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17549 "enum" : [
17550 "layer2",
17551 "layer2+3",
17552 "layer3+4"
17553 ],
17554 "optional" : 1,
17555 "type" : "string"
17556 },
17557 "bridge_ports" : {
17558 "description" : "Specify the iterfaces you want to add to your bridge.",
7aacca6f 17559 "format" : "pve-iface-list",
7aacca6f 17560 "optional" : 1,
44660702 17561 "type" : "string"
7aacca6f 17562 },
44660702
DM
17563 "bridge_vlan_aware" : {
17564 "description" : "Enable bridge vlan support.",
7aacca6f 17565 "optional" : 1,
44660702 17566 "type" : "boolean"
7aacca6f 17567 },
44660702
DM
17568 "comments" : {
17569 "description" : "Comments",
7aacca6f 17570 "optional" : 1,
44660702
DM
17571 "type" : "string"
17572 },
17573 "comments6" : {
17574 "description" : "Comments",
17575 "optional" : 1,
17576 "type" : "string"
17577 },
17578 "gateway" : {
17579 "description" : "Default gateway address.",
17580 "format" : "ipv4",
17581 "optional" : 1,
17582 "type" : "string"
17583 },
17584 "gateway6" : {
17585 "description" : "Default ipv6 gateway address.",
17586 "format" : "ipv6",
17587 "optional" : 1,
17588 "type" : "string"
56122987 17589 },
7aacca6f 17590 "iface" : {
44660702 17591 "description" : "Network interface name.",
7aacca6f
DM
17592 "format" : "pve-iface",
17593 "maxLength" : 20,
44660702
DM
17594 "minLength" : 2,
17595 "type" : "string"
56122987 17596 },
44660702
DM
17597 "netmask" : {
17598 "description" : "Network mask.",
17599 "format" : "ipv4mask",
7aacca6f 17600 "optional" : 1,
44660702
DM
17601 "requires" : "address",
17602 "type" : "string"
7aacca6f 17603 },
44660702
DM
17604 "netmask6" : {
17605 "description" : "Network mask.",
17606 "maximum" : 128,
17607 "minimum" : 0,
7aacca6f 17608 "optional" : 1,
44660702
DM
17609 "requires" : "address6",
17610 "type" : "integer"
7aacca6f 17611 },
44660702
DM
17612 "node" : {
17613 "description" : "The cluster node name.",
17614 "format" : "pve-node",
17615 "type" : "string"
17616 },
17617 "ovs_bonds" : {
17618 "description" : "Specify the interfaces used by the bonding device.",
17619 "format" : "pve-iface-list",
7aacca6f
DM
17620 "optional" : 1,
17621 "type" : "string"
17622 },
44660702
DM
17623 "ovs_bridge" : {
17624 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17625 "format" : "pve-iface",
17626 "optional" : 1,
17627 "type" : "string"
17628 },
17629 "ovs_options" : {
17630 "description" : "OVS interface options.",
17631 "maxLength" : 1024,
17632 "optional" : 1,
17633 "type" : "string"
17634 },
17635 "ovs_ports" : {
17636 "description" : "Specify the iterfaces you want to add to your bridge.",
17637 "format" : "pve-iface-list",
17638 "optional" : 1,
17639 "type" : "string"
17640 },
17641 "ovs_tag" : {
17642 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17643 "maximum" : 4094,
17644 "minimum" : 1,
17645 "optional" : 1,
17646 "type" : "integer"
17647 },
17648 "slaves" : {
17649 "description" : "Specify the interfaces used by the bonding device.",
17650 "format" : "pve-iface-list",
7aacca6f 17651 "optional" : 1,
44660702
DM
17652 "type" : "string"
17653 },
17654 "type" : {
17655 "description" : "Network interface type",
7aacca6f 17656 "enum" : [
44660702
DM
17657 "bridge",
17658 "bond",
17659 "eth",
17660 "alias",
17661 "vlan",
17662 "OVSBridge",
17663 "OVSBond",
17664 "OVSPort",
17665 "OVSIntPort",
17666 "unknown"
7aacca6f 17667 ],
44660702 17668 "type" : "string"
56122987 17669 }
44660702 17670 }
56122987 17671 },
56122987
DM
17672 "permissions" : {
17673 "check" : [
17674 "perm",
17675 "/nodes/{node}",
17676 [
7aacca6f 17677 "Sys.Modify"
44660702
DM
17678 ]
17679 ]
7aacca6f 17680 },
44660702
DM
17681 "protected" : 1,
17682 "proxyto" : "node",
17683 "returns" : {
17684 "type" : "null"
17685 }
17686 }
17687 },
17688 "leaf" : 0,
17689 "path" : "/nodes/{node}/network",
17690 "text" : "network"
17691 },
17692 {
17693 "children" : [
17694 {
7aacca6f
DM
17695 "children" : [
17696 {
17697 "info" : {
17698 "GET" : {
44660702 17699 "description" : "Read task log.",
7aacca6f
DM
17700 "method" : "GET",
17701 "name" : "read_task_log",
17702 "parameters" : {
44660702 17703 "additionalProperties" : 0,
7aacca6f 17704 "properties" : {
44660702
DM
17705 "limit" : {
17706 "minimum" : 0,
7aacca6f 17707 "optional" : 1,
44660702 17708 "type" : "integer"
7aacca6f
DM
17709 },
17710 "node" : {
17711 "description" : "The cluster node name.",
44660702
DM
17712 "format" : "pve-node",
17713 "type" : "string"
7aacca6f 17714 },
44660702
DM
17715 "start" : {
17716 "minimum" : 0,
7aacca6f 17717 "optional" : 1,
44660702
DM
17718 "type" : "integer"
17719 },
17720 "upid" : {
17721 "type" : "string"
7aacca6f 17722 }
44660702
DM
17723 }
17724 },
17725 "permissions" : {
17726 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
17727 "user" : "all"
7aacca6f
DM
17728 },
17729 "protected" : 1,
44660702 17730 "proxyto" : "node",
7aacca6f 17731 "returns" : {
7aacca6f 17732 "items" : {
7aacca6f
DM
17733 "properties" : {
17734 "n" : {
44660702
DM
17735 "description" : "Line number",
17736 "type" : "integer"
7aacca6f
DM
17737 },
17738 "t" : {
44660702
DM
17739 "description" : "Line text",
17740 "type" : "string"
7aacca6f 17741 }
44660702
DM
17742 },
17743 "type" : "object"
17744 },
17745 "type" : "array"
17746 }
7aacca6f 17747 }
56122987 17748 },
7aacca6f 17749 "leaf" : 1,
44660702
DM
17750 "path" : "/nodes/{node}/tasks/{upid}/log",
17751 "text" : "log"
7aacca6f
DM
17752 },
17753 {
7aacca6f
DM
17754 "info" : {
17755 "GET" : {
44660702
DM
17756 "description" : "Read task status.",
17757 "method" : "GET",
7aacca6f
DM
17758 "name" : "read_task_status",
17759 "parameters" : {
17760 "additionalProperties" : 0,
17761 "properties" : {
17762 "node" : {
7aacca6f 17763 "description" : "The cluster node name.",
44660702 17764 "format" : "pve-node",
7aacca6f
DM
17765 "type" : "string"
17766 },
17767 "upid" : {
17768 "type" : "string"
17769 }
17770 }
17771 },
7aacca6f
DM
17772 "permissions" : {
17773 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
17774 "user" : "all"
56122987 17775 },
44660702 17776 "protected" : 1,
7aacca6f 17777 "proxyto" : "node",
7aacca6f
DM
17778 "returns" : {
17779 "properties" : {
17780 "pid" : {
17781 "type" : "integer"
17782 },
17783 "status" : {
7aacca6f
DM
17784 "enum" : [
17785 "running",
17786 "stopped"
44660702
DM
17787 ],
17788 "type" : "string"
7aacca6f
DM
17789 }
17790 },
17791 "type" : "object"
56122987 17792 }
7aacca6f 17793 }
44660702
DM
17794 },
17795 "leaf" : 1,
17796 "path" : "/nodes/{node}/tasks/{upid}/status",
17797 "text" : "status"
56122987 17798 }
7aacca6f 17799 ],
44660702
DM
17800 "info" : {
17801 "DELETE" : {
17802 "description" : "Stop a task.",
17803 "method" : "DELETE",
17804 "name" : "stop_task",
17805 "parameters" : {
17806 "additionalProperties" : 0,
17807 "properties" : {
17808 "node" : {
17809 "description" : "The cluster node name.",
17810 "format" : "pve-node",
17811 "type" : "string"
17812 },
17813 "upid" : {
17814 "type" : "string"
17815 }
7aacca6f 17816 }
44660702
DM
17817 },
17818 "permissions" : {
17819 "description" : "The user needs 'Sys.Modify' permissions on '/nodes/<node>' if the task does not belong to him.",
17820 "user" : "all"
17821 },
17822 "protected" : 1,
17823 "proxyto" : "node",
17824 "returns" : {
17825 "type" : "null"
7aacca6f 17826 }
56122987 17827 },
44660702
DM
17828 "GET" : {
17829 "description" : "",
17830 "method" : "GET",
17831 "name" : "upid_index",
17832 "parameters" : {
17833 "additionalProperties" : 0,
17834 "properties" : {
17835 "node" : {
17836 "description" : "The cluster node name.",
17837 "format" : "pve-node",
17838 "type" : "string"
17839 },
17840 "upid" : {
17841 "type" : "string"
17842 }
17843 }
17844 },
17845 "permissions" : {
17846 "user" : "all"
17847 },
17848 "returns" : {
17849 "items" : {
17850 "properties" : {},
17851 "type" : "object"
17852 },
17853 "links" : [
17854 {
17855 "href" : "{name}",
17856 "rel" : "child"
17857 }
17858 ],
17859 "type" : "array"
56122987 17860 }
44660702 17861 }
56122987 17862 },
44660702
DM
17863 "leaf" : 0,
17864 "path" : "/nodes/{node}/tasks/{upid}",
17865 "text" : "{upid}"
17866 }
17867 ],
17868 "info" : {
17869 "GET" : {
7aacca6f 17870 "description" : "Read task list for one node (finished tasks).",
44660702
DM
17871 "method" : "GET",
17872 "name" : "node_tasks",
56122987 17873 "parameters" : {
7aacca6f 17874 "additionalProperties" : 0,
56122987 17875 "properties" : {
44660702 17876 "errors" : {
56122987 17877 "optional" : 1,
44660702 17878 "type" : "boolean"
56122987 17879 },
44660702 17880 "limit" : {
56122987 17881 "minimum" : 0,
56122987 17882 "optional" : 1,
7aacca6f 17883 "type" : "integer"
56122987 17884 },
56122987
DM
17885 "node" : {
17886 "description" : "The cluster node name.",
44660702
DM
17887 "format" : "pve-node",
17888 "type" : "string"
56122987 17889 },
44660702 17890 "start" : {
7aacca6f 17891 "minimum" : 0,
44660702
DM
17892 "optional" : 1,
17893 "type" : "integer"
56122987 17894 },
7aacca6f 17895 "userfilter" : {
44660702
DM
17896 "optional" : 1,
17897 "type" : "string"
17898 },
17899 "vmid" : {
17900 "description" : "Only list tasks for this VM.",
17901 "format" : "pve-vmid",
17902 "minimum" : 1,
17903 "optional" : 1,
17904 "type" : "integer"
56122987
DM
17905 }
17906 }
17907 },
7aacca6f 17908 "permissions" : {
44660702 17909 "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
17910 "user" : "all"
17911 },
44660702 17912 "proxyto" : "node",
56122987
DM
17913 "returns" : {
17914 "items" : {
17915 "properties" : {
44660702 17916 "upid" : {
56122987
DM
17917 "type" : "string"
17918 }
17919 },
17920 "type" : "object"
17921 },
56122987
DM
17922 "links" : [
17923 {
44660702
DM
17924 "href" : "{upid}",
17925 "rel" : "child"
56122987 17926 }
44660702
DM
17927 ],
17928 "type" : "array"
56122987
DM
17929 }
17930 }
17931 },
44660702
DM
17932 "leaf" : 0,
17933 "path" : "/nodes/{node}/tasks",
17934 "text" : "tasks"
17935 },
17936 {
56122987
DM
17937 "children" : [
17938 {
56122987
DM
17939 "info" : {
17940 "GET" : {
7aacca6f 17941 "description" : "Scan zfs pool list on local node.",
44660702
DM
17942 "method" : "GET",
17943 "name" : "zfsscan",
56122987 17944 "parameters" : {
44660702 17945 "additionalProperties" : 0,
56122987 17946 "properties" : {
56122987
DM
17947 "node" : {
17948 "description" : "The cluster node name.",
44660702
DM
17949 "format" : "pve-node",
17950 "type" : "string"
56122987 17951 }
44660702
DM
17952 }
17953 },
7aacca6f
DM
17954 "permissions" : {
17955 "check" : [
17956 "perm",
17957 "/storage",
17958 [
17959 "Datastore.Allocate"
17960 ]
17961 ]
17962 },
44660702
DM
17963 "protected" : 1,
17964 "proxyto" : "node",
56122987 17965 "returns" : {
56122987
DM
17966 "items" : {
17967 "properties" : {
44660702 17968 "pool" : {
56122987
DM
17969 "type" : "string"
17970 }
44660702
DM
17971 },
17972 "type" : "object"
17973 },
17974 "type" : "array"
17975 }
17976 }
17977 },
17978 "leaf" : 1,
17979 "path" : "/nodes/{node}/scan/zfs",
17980 "text" : "zfs"
17981 },
17982 {
17983 "info" : {
17984 "GET" : {
17985 "description" : "Scan remote NFS server.",
17986 "method" : "GET",
7aacca6f 17987 "name" : "nfsscan",
56122987 17988 "parameters" : {
44660702 17989 "additionalProperties" : 0,
56122987
DM
17990 "properties" : {
17991 "node" : {
7aacca6f 17992 "description" : "The cluster node name.",
44660702 17993 "format" : "pve-node",
7aacca6f
DM
17994 "type" : "string"
17995 },
17996 "server" : {
17997 "format" : "pve-storage-server",
17998 "type" : "string"
56122987 17999 }
44660702 18000 }
56122987 18001 },
56122987
DM
18002 "permissions" : {
18003 "check" : [
18004 "perm",
18005 "/storage",
18006 [
18007 "Datastore.Allocate"
18008 ]
18009 ]
18010 },
44660702 18011 "protected" : 1,
56122987 18012 "proxyto" : "node",
44660702
DM
18013 "returns" : {
18014 "items" : {
18015 "properties" : {
18016 "options" : {
18017 "type" : "string"
18018 },
18019 "path" : {
18020 "type" : "string"
18021 }
18022 },
18023 "type" : "object"
18024 },
18025 "type" : "array"
18026 }
18027 }
18028 },
18029 "leaf" : 1,
18030 "path" : "/nodes/{node}/scan/nfs",
18031 "text" : "nfs"
18032 },
18033 {
18034 "info" : {
18035 "GET" : {
18036 "description" : "Scan remote GlusterFS server.",
7aacca6f
DM
18037 "method" : "GET",
18038 "name" : "glusterfsscan",
56122987 18039 "parameters" : {
44660702 18040 "additionalProperties" : 0,
56122987 18041 "properties" : {
56122987 18042 "node" : {
44660702 18043 "description" : "The cluster node name.",
56122987 18044 "format" : "pve-node",
44660702 18045 "type" : "string"
7aacca6f
DM
18046 },
18047 "server" : {
18048 "format" : "pve-storage-server",
18049 "type" : "string"
56122987 18050 }
44660702
DM
18051 }
18052 },
18053 "permissions" : {
18054 "check" : [
18055 "perm",
18056 "/storage",
18057 [
18058 "Datastore.Allocate"
18059 ]
18060 ]
7aacca6f 18061 },
44660702
DM
18062 "protected" : 1,
18063 "proxyto" : "node",
18064 "returns" : {
18065 "items" : {
18066 "properties" : {
18067 "volname" : {
18068 "type" : "string"
18069 }
18070 },
18071 "type" : "object"
18072 },
18073 "type" : "array"
18074 }
56122987
DM
18075 }
18076 },
44660702
DM
18077 "leaf" : 1,
18078 "path" : "/nodes/{node}/scan/glusterfs",
7aacca6f 18079 "text" : "glusterfs"
56122987
DM
18080 },
18081 {
56122987
DM
18082 "info" : {
18083 "GET" : {
7aacca6f 18084 "description" : "Scan remote iSCSI server.",
44660702
DM
18085 "method" : "GET",
18086 "name" : "iscsiscan",
18087 "parameters" : {
18088 "additionalProperties" : 0,
18089 "properties" : {
18090 "node" : {
18091 "description" : "The cluster node name.",
18092 "format" : "pve-node",
18093 "type" : "string"
18094 },
18095 "portal" : {
18096 "format" : "pve-storage-portal-dns",
18097 "type" : "string"
18098 }
18099 }
18100 },
56122987
DM
18101 "permissions" : {
18102 "check" : [
18103 "perm",
18104 "/storage",
18105 [
18106 "Datastore.Allocate"
18107 ]
18108 ]
18109 },
44660702
DM
18110 "protected" : 1,
18111 "proxyto" : "node",
56122987 18112 "returns" : {
56122987
DM
18113 "items" : {
18114 "properties" : {
44660702 18115 "portal" : {
56122987
DM
18116 "type" : "string"
18117 },
44660702 18118 "target" : {
56122987
DM
18119 "type" : "string"
18120 }
18121 },
18122 "type" : "object"
56122987 18123 },
44660702
DM
18124 "type" : "array"
18125 }
56122987
DM
18126 }
18127 },
44660702 18128 "leaf" : 1,
7aacca6f 18129 "path" : "/nodes/{node}/scan/iscsi",
44660702 18130 "text" : "iscsi"
56122987
DM
18131 },
18132 {
56122987
DM
18133 "info" : {
18134 "GET" : {
44660702
DM
18135 "description" : "List local LVM volume groups.",
18136 "method" : "GET",
18137 "name" : "lvmscan",
18138 "parameters" : {
18139 "additionalProperties" : 0,
18140 "properties" : {
18141 "node" : {
18142 "description" : "The cluster node name.",
18143 "format" : "pve-node",
18144 "type" : "string"
56122987 18145 }
7aacca6f 18146 }
56122987 18147 },
56122987
DM
18148 "permissions" : {
18149 "check" : [
18150 "perm",
18151 "/storage",
18152 [
18153 "Datastore.Allocate"
18154 ]
18155 ]
18156 },
7aacca6f 18157 "protected" : 1,
44660702
DM
18158 "proxyto" : "node",
18159 "returns" : {
18160 "items" : {
18161 "properties" : {
18162 "vg" : {
18163 "type" : "string"
18164 }
18165 },
18166 "type" : "object"
18167 },
18168 "type" : "array"
7aacca6f 18169 }
56122987
DM
18170 }
18171 },
18172 "leaf" : 1,
44660702
DM
18173 "path" : "/nodes/{node}/scan/lvm",
18174 "text" : "lvm"
56122987
DM
18175 },
18176 {
56122987
DM
18177 "info" : {
18178 "GET" : {
44660702
DM
18179 "description" : "List local LVM Thin Pools.",
18180 "method" : "GET",
18181 "name" : "lvmthinscan",
56122987 18182 "parameters" : {
44660702 18183 "additionalProperties" : 0,
56122987
DM
18184 "properties" : {
18185 "node" : {
44660702 18186 "description" : "The cluster node name.",
56122987 18187 "format" : "pve-node",
44660702 18188 "type" : "string"
56122987
DM
18189 },
18190 "vg" : {
44660702 18191 "maxLength" : 100,
56122987 18192 "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+",
44660702 18193 "type" : "string"
56122987 18194 }
44660702 18195 }
56122987 18196 },
7aacca6f
DM
18197 "permissions" : {
18198 "check" : [
18199 "perm",
18200 "/storage",
18201 [
18202 "Datastore.Allocate"
18203 ]
18204 ]
18205 },
44660702 18206 "protected" : 1,
7aacca6f 18207 "proxyto" : "node",
56122987 18208 "returns" : {
56122987
DM
18209 "items" : {
18210 "properties" : {
18211 "lv" : {
18212 "type" : "string"
18213 }
18214 },
18215 "type" : "object"
44660702
DM
18216 },
18217 "type" : "array"
7aacca6f 18218 }
56122987
DM
18219 }
18220 },
7aacca6f 18221 "leaf" : 1,
44660702
DM
18222 "path" : "/nodes/{node}/scan/lvmthin",
18223 "text" : "lvmthin"
56122987
DM
18224 },
18225 {
56122987
DM
18226 "info" : {
18227 "GET" : {
44660702
DM
18228 "description" : "List local USB devices.",
18229 "method" : "GET",
18230 "name" : "usbscan",
18231 "parameters" : {
18232 "additionalProperties" : 0,
18233 "properties" : {
18234 "node" : {
18235 "description" : "The cluster node name.",
18236 "format" : "pve-node",
18237 "type" : "string"
18238 }
18239 }
18240 },
7aacca6f
DM
18241 "permissions" : {
18242 "check" : [
18243 "perm",
18244 "/",
18245 [
18246 "Sys.Modify"
18247 ]
18248 ]
18249 },
44660702 18250 "protected" : 1,
7aacca6f 18251 "proxyto" : "node",
56122987
DM
18252 "returns" : {
18253 "items" : {
18254 "properties" : {
44660702
DM
18255 "busnum" : {
18256 "type" : "integer"
56122987 18257 },
44660702
DM
18258 "class" : {
18259 "type" : "integer"
56122987 18260 },
7aacca6f 18261 "devnum" : {
56122987
DM
18262 "type" : "integer"
18263 },
44660702
DM
18264 "level" : {
18265 "type" : "integer"
18266 },
18267 "manufacturer" : {
18268 "optional" : 1,
7aacca6f
DM
18269 "type" : "string"
18270 },
44660702 18271 "port" : {
56122987
DM
18272 "type" : "integer"
18273 },
44660702
DM
18274 "prodid" : {
18275 "type" : "string"
56122987 18276 },
44660702
DM
18277 "product" : {
18278 "optional" : 1,
18279 "type" : "string"
18280 },
18281 "serial" : {
7aacca6f 18282 "optional" : 1,
56122987
DM
18283 "type" : "string"
18284 },
44660702 18285 "speed" : {
7aacca6f 18286 "type" : "string"
56122987 18287 },
44660702 18288 "usbpath" : {
56122987
DM
18289 "optional" : 1,
18290 "type" : "string"
18291 },
44660702
DM
18292 "vendid" : {
18293 "type" : "string"
56122987
DM
18294 }
18295 },
18296 "type" : "object"
7aacca6f
DM
18297 },
18298 "type" : "array"
44660702
DM
18299 }
18300 }
18301 },
18302 "leaf" : 1,
18303 "path" : "/nodes/{node}/scan/usb",
18304 "text" : "usb"
18305 }
18306 ],
18307 "info" : {
18308 "GET" : {
18309 "description" : "Index of available scan methods",
18310 "method" : "GET",
18311 "name" : "index",
18312 "parameters" : {
18313 "additionalProperties" : 0,
18314 "properties" : {
18315 "node" : {
18316 "description" : "The cluster node name.",
18317 "format" : "pve-node",
18318 "type" : "string"
18319 }
18320 }
18321 },
18322 "permissions" : {
18323 "user" : "all"
18324 },
18325 "returns" : {
18326 "items" : {
18327 "properties" : {
18328 "method" : {
18329 "type" : "string"
56122987
DM
18330 }
18331 },
44660702
DM
18332 "type" : "object"
18333 },
18334 "links" : [
18335 {
18336 "href" : "{method}",
18337 "rel" : "child"
18338 }
18339 ],
18340 "type" : "array"
56122987
DM
18341 }
18342 }
44660702
DM
18343 },
18344 "leaf" : 0,
18345 "path" : "/nodes/{node}/scan",
7aacca6f 18346 "text" : "scan"
56122987
DM
18347 },
18348 {
56122987
DM
18349 "children" : [
18350 {
56122987
DM
18351 "children" : [
18352 {
7aacca6f
DM
18353 "children" : [
18354 {
18355 "info" : {
44660702
DM
18356 "DELETE" : {
18357 "description" : "Delete volume",
18358 "method" : "DELETE",
18359 "name" : "delete",
7aacca6f
DM
18360 "parameters" : {
18361 "additionalProperties" : 0,
18362 "properties" : {
7aacca6f
DM
18363 "node" : {
18364 "description" : "The cluster node name.",
44660702
DM
18365 "format" : "pve-node",
18366 "type" : "string"
18367 },
18368 "storage" : {
18369 "description" : "The storage identifier.",
18370 "format" : "pve-storage-id",
18371 "optional" : 1,
18372 "type" : "string"
7aacca6f
DM
18373 },
18374 "volume" : {
18375 "description" : "Volume identifier",
18376 "type" : "string"
18377 }
18378 }
18379 },
44660702
DM
18380 "permissions" : {
18381 "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).",
18382 "user" : "all"
18383 },
18384 "protected" : 1,
18385 "proxyto" : "node",
18386 "returns" : {
18387 "type" : "null"
18388 }
7aacca6f 18389 },
44660702
DM
18390 "GET" : {
18391 "description" : "Get volume attributes",
18392 "method" : "GET",
18393 "name" : "info",
7aacca6f
DM
18394 "parameters" : {
18395 "additionalProperties" : 0,
18396 "properties" : {
7aacca6f
DM
18397 "node" : {
18398 "description" : "The cluster node name.",
44660702
DM
18399 "format" : "pve-node",
18400 "type" : "string"
7aacca6f
DM
18401 },
18402 "storage" : {
7aacca6f 18403 "description" : "The storage identifier.",
44660702 18404 "format" : "pve-storage-id",
7aacca6f
DM
18405 "optional" : 1,
18406 "type" : "string"
44660702
DM
18407 },
18408 "volume" : {
18409 "description" : "Volume identifier",
18410 "type" : "string"
7aacca6f
DM
18411 }
18412 }
18413 },
7aacca6f 18414 "permissions" : {
44660702 18415 "description" : "You need read access for the volume.",
7aacca6f
DM
18416 "user" : "all"
18417 },
44660702 18418 "protected" : 1,
7aacca6f 18419 "proxyto" : "node",
7aacca6f 18420 "returns" : {
44660702 18421 "type" : "object"
7aacca6f
DM
18422 }
18423 },
18424 "POST" : {
44660702
DM
18425 "description" : "Copy a volume. This is experimental code - do not use.",
18426 "method" : "POST",
18427 "name" : "copy",
7aacca6f
DM
18428 "parameters" : {
18429 "additionalProperties" : 0,
18430 "properties" : {
44660702
DM
18431 "node" : {
18432 "description" : "The cluster node name.",
18433 "format" : "pve-node",
18434 "type" : "string"
18435 },
18436 "storage" : {
18437 "description" : "The storage identifier.",
18438 "format" : "pve-storage-id",
18439 "optional" : 1,
18440 "type" : "string"
18441 },
7aacca6f 18442 "target" : {
44660702
DM
18443 "description" : "Target volume identifier",
18444 "type" : "string"
7aacca6f
DM
18445 },
18446 "target_node" : {
7aacca6f 18447 "description" : "Target node. Default is local node.",
44660702
DM
18448 "format" : "pve-node",
18449 "optional" : 1,
18450 "type" : "string"
7aacca6f
DM
18451 },
18452 "volume" : {
44660702
DM
18453 "description" : "Source volume identifier",
18454 "type" : "string"
7aacca6f
DM
18455 }
18456 }
18457 },
7aacca6f
DM
18458 "protected" : 1,
18459 "proxyto" : "node",
18460 "returns" : {
18461 "type" : "string"
44660702 18462 }
7aacca6f
DM
18463 }
18464 },
7aacca6f 18465 "leaf" : 1,
44660702
DM
18466 "path" : "/nodes/{node}/storage/{storage}/content/{volume}",
18467 "text" : "{volume}"
7aacca6f
DM
18468 }
18469 ],
56122987
DM
18470 "info" : {
18471 "GET" : {
44660702
DM
18472 "description" : "List storage content.",
18473 "method" : "GET",
18474 "name" : "index",
18475 "parameters" : {
18476 "additionalProperties" : 0,
18477 "properties" : {
18478 "content" : {
18479 "description" : "Only list content of this type.",
18480 "format" : "pve-storage-content",
18481 "optional" : 1,
18482 "type" : "string"
18483 },
18484 "node" : {
18485 "description" : "The cluster node name.",
18486 "format" : "pve-node",
18487 "type" : "string"
18488 },
18489 "storage" : {
18490 "description" : "The storage identifier.",
18491 "format" : "pve-storage-id",
18492 "type" : "string"
18493 },
18494 "vmid" : {
18495 "description" : "Only list images for this VM",
18496 "format" : "pve-vmid",
18497 "minimum" : 1,
18498 "optional" : 1,
18499 "type" : "integer"
18500 }
18501 }
18502 },
7aacca6f
DM
18503 "permissions" : {
18504 "check" : [
18505 "perm",
18506 "/storage/{storage}",
18507 [
18508 "Datastore.Audit",
18509 "Datastore.AllocateSpace"
18510 ],
18511 "any",
18512 1
18513 ]
18514 },
44660702 18515 "protected" : 1,
7aacca6f 18516 "proxyto" : "node",
56122987 18517 "returns" : {
44660702
DM
18518 "items" : {
18519 "properties" : {
18520 "volid" : {
18521 "type" : "string"
18522 }
18523 },
18524 "type" : "object"
18525 },
18526 "links" : [
18527 {
18528 "href" : "{volid}",
18529 "rel" : "child"
18530 }
18531 ],
18532 "type" : "array"
18533 }
18534 },
18535 "POST" : {
18536 "description" : "Allocate disk images.",
18537 "method" : "POST",
18538 "name" : "create",
56122987 18539 "parameters" : {
44660702 18540 "additionalProperties" : 0,
56122987 18541 "properties" : {
44660702
DM
18542 "filename" : {
18543 "description" : "The name of the file to create.",
18544 "type" : "string"
18545 },
18546 "format" : {
18547 "enum" : [
18548 "raw",
18549 "qcow2",
18550 "subvol"
18551 ],
18552 "optional" : 1,
18553 "requires" : "size",
18554 "type" : "string"
18555 },
18556 "node" : {
18557 "description" : "The cluster node name.",
18558 "format" : "pve-node",
18559 "type" : "string"
18560 },
18561 "size" : {
18562 "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)",
18563 "pattern" : "\\d+[MG]?",
18564 "type" : "string"
18565 },
56122987
DM
18566 "storage" : {
18567 "description" : "The storage identifier.",
44660702
DM
18568 "format" : "pve-storage-id",
18569 "type" : "string"
56122987 18570 },
44660702
DM
18571 "vmid" : {
18572 "description" : "Specify owner VM",
18573 "format" : "pve-vmid",
18574 "minimum" : 1,
18575 "type" : "integer"
18576 }
18577 }
18578 },
18579 "permissions" : {
18580 "check" : [
18581 "perm",
18582 "/storage/{storage}",
18583 [
18584 "Datastore.AllocateSpace"
18585 ]
18586 ]
18587 },
18588 "protected" : 1,
18589 "proxyto" : "node",
18590 "returns" : {
18591 "description" : "Volume identifier",
18592 "type" : "string"
18593 }
18594 }
18595 },
18596 "leaf" : 0,
18597 "path" : "/nodes/{node}/storage/{storage}/content",
18598 "text" : "content"
18599 },
18600 {
18601 "info" : {
18602 "GET" : {
18603 "description" : "Read storage status.",
18604 "method" : "GET",
18605 "name" : "read_status",
18606 "parameters" : {
18607 "additionalProperties" : 0,
18608 "properties" : {
56122987
DM
18609 "node" : {
18610 "description" : "The cluster node name.",
44660702
DM
18611 "format" : "pve-node",
18612 "type" : "string"
18613 },
18614 "storage" : {
18615 "description" : "The storage identifier.",
18616 "format" : "pve-storage-id",
18617 "type" : "string"
56122987 18618 }
44660702
DM
18619 }
18620 },
18621 "permissions" : {
18622 "check" : [
18623 "perm",
18624 "/storage/{storage}",
18625 [
18626 "Datastore.Audit",
18627 "Datastore.AllocateSpace"
18628 ],
18629 "any",
18630 1
18631 ]
56122987
DM
18632 },
18633 "protected" : 1,
44660702
DM
18634 "proxyto" : "node",
18635 "returns" : {
18636 "properties" : {},
18637 "type" : "object"
18638 }
56122987
DM
18639 }
18640 },
44660702
DM
18641 "leaf" : 1,
18642 "path" : "/nodes/{node}/storage/{storage}/status",
7aacca6f 18643 "text" : "status"
56122987
DM
18644 },
18645 {
56122987
DM
18646 "info" : {
18647 "GET" : {
44660702
DM
18648 "description" : "Read storage RRD statistics (returns PNG).",
18649 "method" : "GET",
18650 "name" : "rrd",
56122987 18651 "parameters" : {
44660702 18652 "additionalProperties" : 0,
56122987 18653 "properties" : {
44660702
DM
18654 "cf" : {
18655 "description" : "The RRD consolidation function",
18656 "enum" : [
18657 "AVERAGE",
18658 "MAX"
18659 ],
18660 "optional" : 1,
18661 "type" : "string"
18662 },
7aacca6f 18663 "ds" : {
7aacca6f 18664 "description" : "The list of datasources you want to display.",
44660702
DM
18665 "format" : "pve-configid-list",
18666 "type" : "string"
56122987 18667 },
7aacca6f
DM
18668 "node" : {
18669 "description" : "The cluster node name.",
44660702
DM
18670 "format" : "pve-node",
18671 "type" : "string"
56122987 18672 },
7aacca6f 18673 "storage" : {
7aacca6f 18674 "description" : "The storage identifier.",
44660702
DM
18675 "format" : "pve-storage-id",
18676 "type" : "string"
18677 },
18678 "timeframe" : {
18679 "description" : "Specify the time frame you are interested in.",
7aacca6f 18680 "enum" : [
44660702
DM
18681 "hour",
18682 "day",
18683 "week",
18684 "month",
18685 "year"
7aacca6f 18686 ],
44660702 18687 "type" : "string"
56122987 18688 }
44660702 18689 }
56122987
DM
18690 },
18691 "permissions" : {
18692 "check" : [
18693 "perm",
18694 "/storage/{storage}",
18695 [
18696 "Datastore.Audit",
18697 "Datastore.AllocateSpace"
18698 ],
18699 "any",
18700 1
18701 ]
18702 },
44660702
DM
18703 "protected" : 1,
18704 "proxyto" : "node",
7aacca6f
DM
18705 "returns" : {
18706 "properties" : {
18707 "filename" : {
18708 "type" : "string"
18709 }
18710 },
18711 "type" : "object"
18712 }
56122987
DM
18713 }
18714 },
18715 "leaf" : 1,
44660702
DM
18716 "path" : "/nodes/{node}/storage/{storage}/rrd",
18717 "text" : "rrd"
56122987
DM
18718 },
18719 {
56122987
DM
18720 "info" : {
18721 "GET" : {
44660702
DM
18722 "description" : "Read storage RRD statistics.",
18723 "method" : "GET",
18724 "name" : "rrddata",
56122987 18725 "parameters" : {
44660702 18726 "additionalProperties" : 0,
56122987 18727 "properties" : {
44660702
DM
18728 "cf" : {
18729 "description" : "The RRD consolidation function",
18730 "enum" : [
18731 "AVERAGE",
18732 "MAX"
18733 ],
18734 "optional" : 1,
18735 "type" : "string"
18736 },
7aacca6f 18737 "node" : {
7aacca6f 18738 "description" : "The cluster node name.",
44660702
DM
18739 "format" : "pve-node",
18740 "type" : "string"
18741 },
18742 "storage" : {
18743 "description" : "The storage identifier.",
18744 "format" : "pve-storage-id",
7aacca6f
DM
18745 "type" : "string"
18746 },
56122987 18747 "timeframe" : {
7aacca6f 18748 "description" : "Specify the time frame you are interested in.",
56122987
DM
18749 "enum" : [
18750 "hour",
18751 "day",
18752 "week",
18753 "month",
18754 "year"
56122987 18755 ],
44660702 18756 "type" : "string"
56122987 18757 }
44660702 18758 }
7aacca6f 18759 },
7aacca6f
DM
18760 "permissions" : {
18761 "check" : [
18762 "perm",
18763 "/storage/{storage}",
18764 [
18765 "Datastore.Audit",
18766 "Datastore.AllocateSpace"
18767 ],
18768 "any",
18769 1
18770 ]
18771 },
44660702
DM
18772 "protected" : 1,
18773 "proxyto" : "node",
7aacca6f
DM
18774 "returns" : {
18775 "items" : {
44660702
DM
18776 "properties" : {},
18777 "type" : "object"
7aacca6f
DM
18778 },
18779 "type" : "array"
56122987
DM
18780 }
18781 }
7aacca6f 18782 },
7aacca6f 18783 "leaf" : 1,
44660702
DM
18784 "path" : "/nodes/{node}/storage/{storage}/rrddata",
18785 "text" : "rrddata"
56122987
DM
18786 },
18787 {
56122987
DM
18788 "info" : {
18789 "POST" : {
7aacca6f 18790 "description" : "Upload templates and ISO images.",
44660702
DM
18791 "method" : "POST",
18792 "name" : "upload",
56122987 18793 "parameters" : {
7aacca6f 18794 "additionalProperties" : 0,
56122987 18795 "properties" : {
56122987 18796 "content" : {
7aacca6f 18797 "description" : "Content type.",
44660702
DM
18798 "format" : "pve-storage-content",
18799 "type" : "string"
56122987
DM
18800 },
18801 "filename" : {
44660702
DM
18802 "description" : "The name of the file to create.",
18803 "type" : "string"
56122987
DM
18804 },
18805 "node" : {
18806 "description" : "The cluster node name.",
44660702
DM
18807 "format" : "pve-node",
18808 "type" : "string"
18809 },
18810 "storage" : {
18811 "description" : "The storage identifier.",
18812 "format" : "pve-storage-id",
18813 "type" : "string"
18814 },
18815 "tmpfilename" : {
18816 "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.",
18817 "optional" : 1,
18818 "type" : "string"
56122987 18819 }
7aacca6f 18820 }
56122987 18821 },
56122987
DM
18822 "permissions" : {
18823 "check" : [
18824 "perm",
18825 "/storage/{storage}",
18826 [
18827 "Datastore.AllocateTemplate"
18828 ]
18829 ]
44660702
DM
18830 },
18831 "protected" : 1,
18832 "returns" : {
18833 "type" : "string"
18834 }
18835 }
18836 },
18837 "leaf" : 1,
18838 "path" : "/nodes/{node}/storage/{storage}/upload",
18839 "text" : "upload"
18840 }
18841 ],
18842 "info" : {
18843 "GET" : {
18844 "description" : "",
18845 "method" : "GET",
18846 "name" : "diridx",
18847 "parameters" : {
18848 "additionalProperties" : 0,
18849 "properties" : {
18850 "node" : {
18851 "description" : "The cluster node name.",
18852 "format" : "pve-node",
18853 "type" : "string"
18854 },
18855 "storage" : {
18856 "description" : "The storage identifier.",
18857 "format" : "pve-storage-id",
18858 "type" : "string"
56122987
DM
18859 }
18860 }
44660702
DM
18861 },
18862 "permissions" : {
18863 "check" : [
18864 "perm",
18865 "/storage/{storage}",
18866 [
18867 "Datastore.Audit",
18868 "Datastore.AllocateSpace"
18869 ],
18870 "any",
18871 1
18872 ]
18873 },
18874 "returns" : {
18875 "items" : {
18876 "properties" : {
18877 "subdir" : {
18878 "type" : "string"
18879 }
18880 },
18881 "type" : "object"
18882 },
18883 "links" : [
18884 {
18885 "href" : "{subdir}",
18886 "rel" : "child"
18887 }
18888 ],
18889 "type" : "array"
56122987
DM
18890 }
18891 }
44660702
DM
18892 },
18893 "leaf" : 0,
18894 "path" : "/nodes/{node}/storage/{storage}",
18895 "text" : "{storage}"
56122987
DM
18896 }
18897 ],
56122987
DM
18898 "info" : {
18899 "GET" : {
44660702
DM
18900 "description" : "Get status for all datastores.",
18901 "method" : "GET",
18902 "name" : "index",
18903 "parameters" : {
18904 "additionalProperties" : 0,
18905 "properties" : {
18906 "content" : {
18907 "description" : "Only list stores which support this content type.",
18908 "format" : "pve-storage-content-list",
18909 "optional" : 1,
18910 "type" : "string"
18911 },
18912 "enabled" : {
18913 "default" : 0,
18914 "description" : "Only list stores which are enabled (not disabled in config).",
18915 "optional" : 1,
18916 "type" : "boolean"
18917 },
18918 "node" : {
18919 "description" : "The cluster node name.",
18920 "format" : "pve-node",
18921 "type" : "string"
18922 },
18923 "storage" : {
18924 "description" : "Only list status for specified storage",
18925 "format" : "pve-storage-id",
18926 "optional" : 1,
18927 "type" : "string"
18928 },
18929 "target" : {
18930 "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.",
18931 "format" : "pve-node",
18932 "optional" : 1,
18933 "type" : "string"
18934 }
18935 }
18936 },
7aacca6f
DM
18937 "permissions" : {
18938 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
18939 "user" : "all"
18940 },
44660702 18941 "protected" : 1,
7aacca6f 18942 "proxyto" : "node",
56122987
DM
18943 "returns" : {
18944 "items" : {
56122987
DM
18945 "properties" : {
18946 "storage" : {
18947 "type" : "string"
18948 }
44660702
DM
18949 },
18950 "type" : "object"
56122987 18951 },
56122987
DM
18952 "links" : [
18953 {
7aacca6f
DM
18954 "href" : "{storage}",
18955 "rel" : "child"
56122987 18956 }
44660702
DM
18957 ],
18958 "type" : "array"
18959 }
56122987 18960 }
44660702
DM
18961 },
18962 "leaf" : 0,
18963 "path" : "/nodes/{node}/storage",
18964 "text" : "storage"
56122987
DM
18965 },
18966 {
56122987
DM
18967 "children" : [
18968 {
18969 "info" : {
44660702
DM
18970 "GET" : {
18971 "description" : "List available updates.",
18972 "method" : "GET",
18973 "name" : "list_updates",
18974 "parameters" : {
18975 "additionalProperties" : 0,
18976 "properties" : {
18977 "node" : {
18978 "description" : "The cluster node name.",
18979 "format" : "pve-node",
18980 "type" : "string"
18981 }
18982 }
7aacca6f
DM
18983 },
18984 "permissions" : {
18985 "check" : [
18986 "perm",
18987 "/nodes/{node}",
18988 [
18989 "Sys.Modify"
18990 ]
18991 ]
18992 },
44660702 18993 "protected" : 1,
56122987 18994 "proxyto" : "node",
44660702
DM
18995 "returns" : {
18996 "items" : {
18997 "properties" : {},
18998 "type" : "object"
18999 },
19000 "type" : "array"
19001 }
19002 },
19003 "POST" : {
19004 "description" : "This is used to resynchronize the package index files from their sources (apt-get update).",
7aacca6f
DM
19005 "method" : "POST",
19006 "name" : "update_database",
56122987
DM
19007 "parameters" : {
19008 "additionalProperties" : 0,
19009 "properties" : {
44660702
DM
19010 "node" : {
19011 "description" : "The cluster node name.",
19012 "format" : "pve-node",
19013 "type" : "string"
19014 },
56122987 19015 "notify" : {
56122987 19016 "default" : 0,
44660702
DM
19017 "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').",
19018 "optional" : 1,
19019 "type" : "boolean"
56122987
DM
19020 },
19021 "quiet" : {
56122987 19022 "default" : 0,
44660702 19023 "description" : "Only produces output suitable for logging, omitting progress indicators.",
56122987 19024 "optional" : 1,
44660702 19025 "type" : "boolean"
56122987 19026 }
7aacca6f
DM
19027 }
19028 },
19029 "permissions" : {
19030 "check" : [
19031 "perm",
19032 "/nodes/{node}",
19033 [
19034 "Sys.Modify"
19035 ]
19036 ]
19037 },
44660702
DM
19038 "protected" : 1,
19039 "proxyto" : "node",
19040 "returns" : {
19041 "type" : "string"
19042 }
56122987
DM
19043 }
19044 },
7aacca6f 19045 "leaf" : 1,
44660702
DM
19046 "path" : "/nodes/{node}/apt/update",
19047 "text" : "update"
56122987
DM
19048 },
19049 {
56122987
DM
19050 "info" : {
19051 "GET" : {
44660702 19052 "description" : "Get package changelogs.",
56122987 19053 "method" : "GET",
7aacca6f 19054 "name" : "changelog",
56122987 19055 "parameters" : {
44660702 19056 "additionalProperties" : 0,
56122987
DM
19057 "properties" : {
19058 "name" : {
19059 "description" : "Package name.",
19060 "type" : "string"
19061 },
44660702
DM
19062 "node" : {
19063 "description" : "The cluster node name.",
19064 "format" : "pve-node",
19065 "type" : "string"
19066 },
56122987 19067 "version" : {
7aacca6f 19068 "description" : "Package version.",
44660702
DM
19069 "optional" : 1,
19070 "type" : "string"
56122987 19071 }
44660702 19072 }
56122987 19073 },
44660702
DM
19074 "permissions" : {
19075 "check" : [
19076 "perm",
19077 "/nodes/{node}",
19078 [
19079 "Sys.Modify"
19080 ]
19081 ]
19082 },
19083 "proxyto" : "node",
19084 "returns" : {
19085 "type" : "string"
19086 }
56122987
DM
19087 }
19088 },
44660702
DM
19089 "leaf" : 1,
19090 "path" : "/nodes/{node}/apt/changelog",
7aacca6f 19091 "text" : "changelog"
56122987
DM
19092 },
19093 {
56122987
DM
19094 "info" : {
19095 "GET" : {
44660702
DM
19096 "description" : "Get package information for important Proxmox packages.",
19097 "method" : "GET",
7aacca6f
DM
19098 "name" : "versions",
19099 "parameters" : {
44660702 19100 "additionalProperties" : 0,
7aacca6f
DM
19101 "properties" : {
19102 "node" : {
44660702 19103 "description" : "The cluster node name.",
7aacca6f 19104 "format" : "pve-node",
44660702 19105 "type" : "string"
7aacca6f 19106 }
44660702 19107 }
7aacca6f 19108 },
56122987
DM
19109 "permissions" : {
19110 "check" : [
19111 "perm",
19112 "/nodes/{node}",
19113 [
19114 "Sys.Audit"
19115 ]
19116 ]
19117 },
7aacca6f 19118 "proxyto" : "node",
56122987
DM
19119 "returns" : {
19120 "items" : {
7aacca6f
DM
19121 "properties" : {},
19122 "type" : "object"
44660702
DM
19123 },
19124 "type" : "array"
56122987
DM
19125 }
19126 }
19127 },
44660702 19128 "leaf" : 1,
7aacca6f 19129 "path" : "/nodes/{node}/apt/versions",
44660702 19130 "text" : "versions"
56122987
DM
19131 }
19132 ],
56122987
DM
19133 "info" : {
19134 "GET" : {
44660702 19135 "description" : "Directory index for apt (Advanced Package Tool).",
7aacca6f 19136 "method" : "GET",
44660702 19137 "name" : "index",
7aacca6f
DM
19138 "parameters" : {
19139 "additionalProperties" : 0,
19140 "properties" : {
19141 "node" : {
44660702 19142 "description" : "The cluster node name.",
7aacca6f 19143 "format" : "pve-node",
44660702 19144 "type" : "string"
7aacca6f
DM
19145 }
19146 }
19147 },
7aacca6f
DM
19148 "permissions" : {
19149 "user" : "all"
19150 },
44660702
DM
19151 "returns" : {
19152 "items" : {
19153 "properties" : {
19154 "id" : {
19155 "type" : "string"
19156 }
19157 },
19158 "type" : "object"
19159 },
19160 "links" : [
19161 {
19162 "href" : "{id}",
19163 "rel" : "child"
19164 }
19165 ],
19166 "type" : "array"
19167 }
56122987 19168 }
7aacca6f 19169 },
44660702 19170 "leaf" : 0,
7aacca6f 19171 "path" : "/nodes/{node}/apt",
44660702 19172 "text" : "apt"
56122987
DM
19173 },
19174 {
56122987
DM
19175 "children" : [
19176 {
19177 "children" : [
19178 {
56122987
DM
19179 "info" : {
19180 "DELETE" : {
44660702 19181 "description" : "Delete rule.",
7aacca6f 19182 "method" : "DELETE",
44660702 19183 "name" : "delete_rule",
56122987
DM
19184 "parameters" : {
19185 "additionalProperties" : 0,
19186 "properties" : {
56122987
DM
19187 "digest" : {
19188 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 19189 "maxLength" : 40,
56122987 19190 "optional" : 1,
56122987
DM
19191 "type" : "string"
19192 },
44660702
DM
19193 "node" : {
19194 "description" : "The cluster node name.",
19195 "format" : "pve-node",
19196 "type" : "string"
19197 },
7aacca6f 19198 "pos" : {
7aacca6f 19199 "description" : "Update rule at position <pos>.",
44660702
DM
19200 "minimum" : 0,
19201 "optional" : 1,
19202 "type" : "integer"
56122987
DM
19203 }
19204 }
19205 },
44660702
DM
19206 "permissions" : {
19207 "check" : [
19208 "perm",
19209 "/nodes/{node}",
19210 [
19211 "Sys.Modify"
19212 ]
19213 ]
19214 },
19215 "protected" : 1,
19216 "proxyto" : "node",
56122987
DM
19217 "returns" : {
19218 "type" : "null"
44660702
DM
19219 }
19220 },
19221 "GET" : {
19222 "description" : "Get single rule data.",
19223 "method" : "GET",
19224 "name" : "get_rule",
19225 "parameters" : {
19226 "additionalProperties" : 0,
19227 "properties" : {
19228 "node" : {
19229 "description" : "The cluster node name.",
19230 "format" : "pve-node",
19231 "type" : "string"
19232 },
19233 "pos" : {
19234 "description" : "Update rule at position <pos>.",
19235 "minimum" : 0,
19236 "optional" : 1,
19237 "type" : "integer"
19238 }
19239 }
56122987 19240 },
56122987
DM
19241 "permissions" : {
19242 "check" : [
19243 "perm",
19244 "/nodes/{node}",
19245 [
44660702 19246 "Sys.Audit"
56122987
DM
19247 ]
19248 ]
44660702
DM
19249 },
19250 "proxyto" : "node",
19251 "returns" : {
19252 "properties" : {
19253 "pos" : {
19254 "type" : "integer"
19255 }
19256 },
19257 "type" : "object"
7aacca6f 19258 }
56122987
DM
19259 },
19260 "PUT" : {
44660702
DM
19261 "description" : "Modify rule data.",
19262 "method" : "PUT",
56122987 19263 "name" : "update_rule",
56122987 19264 "parameters" : {
44660702 19265 "additionalProperties" : 0,
56122987 19266 "properties" : {
44660702
DM
19267 "action" : {
19268 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
19269 "maxLength" : 20,
19270 "minLength" : 2,
56122987 19271 "optional" : 1,
44660702
DM
19272 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19273 "type" : "string"
56122987 19274 },
7aacca6f 19275 "comment" : {
56122987 19276 "optional" : 1,
56122987
DM
19277 "type" : "string"
19278 },
44660702
DM
19279 "delete" : {
19280 "description" : "A list of settings you want to delete.",
19281 "format" : "pve-configid-list",
56122987 19282 "optional" : 1,
44660702 19283 "type" : "string"
56122987 19284 },
44660702
DM
19285 "dest" : {
19286 "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.",
19287 "format" : "pve-fw-addr-spec",
56122987 19288 "optional" : 1,
44660702 19289 "type" : "string"
56122987 19290 },
44660702
DM
19291 "digest" : {
19292 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19293 "maxLength" : 40,
56122987 19294 "optional" : 1,
44660702 19295 "type" : "string"
56122987 19296 },
7aacca6f 19297 "dport" : {
7aacca6f 19298 "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
19299 "format" : "pve-fw-dport-spec",
19300 "optional" : 1,
19301 "type" : "string"
7aacca6f 19302 },
44660702
DM
19303 "enable" : {
19304 "minimum" : 0,
56122987 19305 "optional" : 1,
44660702 19306 "type" : "integer"
56122987 19307 },
7aacca6f 19308 "iface" : {
44660702 19309 "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 19310 "format" : "pve-iface",
44660702 19311 "maxLength" : 20,
56122987 19312 "minLength" : 2,
44660702
DM
19313 "optional" : 1,
19314 "type" : "string"
56122987 19315 },
44660702
DM
19316 "macro" : {
19317 "maxLength" : 128,
19318 "optional" : 1,
19319 "type" : "string"
19320 },
19321 "moveto" : {
19322 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
19323 "minimum" : 0,
7aacca6f 19324 "optional" : 1,
44660702
DM
19325 "type" : "integer"
19326 },
19327 "node" : {
19328 "description" : "The cluster node name.",
19329 "format" : "pve-node",
19330 "type" : "string"
56122987
DM
19331 },
19332 "pos" : {
44660702 19333 "description" : "Update rule at position <pos>.",
7aacca6f 19334 "minimum" : 0,
7aacca6f 19335 "optional" : 1,
44660702 19336 "type" : "integer"
7aacca6f 19337 },
44660702
DM
19338 "proto" : {
19339 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19340 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
19341 "optional" : 1,
19342 "type" : "string"
19343 },
44660702
DM
19344 "source" : {
19345 "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.",
19346 "format" : "pve-fw-addr-spec",
56122987 19347 "optional" : 1,
44660702 19348 "type" : "string"
7aacca6f 19349 },
44660702
DM
19350 "sport" : {
19351 "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.",
19352 "format" : "pve-fw-sport-spec",
19353 "optional" : 1,
19354 "type" : "string"
19355 },
19356 "type" : {
19357 "enum" : [
19358 "in",
19359 "out",
19360 "group"
19361 ],
19362 "optional" : 1,
19363 "type" : "string"
56122987 19364 }
44660702 19365 }
56122987 19366 },
56122987
DM
19367 "permissions" : {
19368 "check" : [
19369 "perm",
19370 "/nodes/{node}",
19371 [
19372 "Sys.Modify"
19373 ]
19374 ]
7aacca6f 19375 },
44660702 19376 "protected" : 1,
7aacca6f 19377 "proxyto" : "node",
7aacca6f
DM
19378 "returns" : {
19379 "type" : "null"
56122987
DM
19380 }
19381 }
7aacca6f 19382 },
44660702 19383 "leaf" : 1,
7aacca6f 19384 "path" : "/nodes/{node}/firewall/rules/{pos}",
44660702 19385 "text" : "{pos}"
56122987
DM
19386 }
19387 ],
56122987
DM
19388 "info" : {
19389 "GET" : {
44660702
DM
19390 "description" : "List rules.",
19391 "method" : "GET",
19392 "name" : "get_rules",
19393 "parameters" : {
19394 "additionalProperties" : 0,
19395 "properties" : {
19396 "node" : {
19397 "description" : "The cluster node name.",
19398 "format" : "pve-node",
19399 "type" : "string"
19400 }
19401 }
19402 },
19403 "permissions" : {
19404 "check" : [
19405 "perm",
19406 "/nodes/{node}",
19407 [
19408 "Sys.Audit"
19409 ]
19410 ]
19411 },
19412 "proxyto" : "node",
56122987 19413 "returns" : {
56122987
DM
19414 "items" : {
19415 "properties" : {
19416 "pos" : {
19417 "type" : "integer"
19418 }
44660702
DM
19419 },
19420 "type" : "object"
56122987 19421 },
7aacca6f
DM
19422 "links" : [
19423 {
19424 "href" : "{pos}",
19425 "rel" : "child"
19426 }
19427 ],
19428 "type" : "array"
44660702 19429 }
56122987
DM
19430 },
19431 "POST" : {
44660702 19432 "description" : "Create new rule.",
7aacca6f
DM
19433 "method" : "POST",
19434 "name" : "create_rule",
56122987 19435 "parameters" : {
44660702 19436 "additionalProperties" : 0,
56122987 19437 "properties" : {
7aacca6f 19438 "action" : {
7aacca6f 19439 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
44660702 19440 "maxLength" : 20,
7aacca6f
DM
19441 "minLength" : 2,
19442 "optional" : 0,
44660702
DM
19443 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19444 "type" : "string"
56122987 19445 },
44660702 19446 "comment" : {
56122987 19447 "optional" : 1,
44660702 19448 "type" : "string"
56122987 19449 },
44660702
DM
19450 "dest" : {
19451 "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.",
19452 "format" : "pve-fw-addr-spec",
7aacca6f 19453 "optional" : 1,
44660702 19454 "type" : "string"
56122987 19455 },
44660702
DM
19456 "digest" : {
19457 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19458 "maxLength" : 40,
19459 "optional" : 1,
19460 "type" : "string"
56122987 19461 },
44660702
DM
19462 "dport" : {
19463 "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.",
19464 "format" : "pve-fw-dport-spec",
7aacca6f
DM
19465 "optional" : 1,
19466 "type" : "string"
56122987 19467 },
44660702
DM
19468 "enable" : {
19469 "minimum" : 0,
19470 "optional" : 1,
19471 "type" : "integer"
19472 },
7aacca6f 19473 "iface" : {
44660702 19474 "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 19475 "format" : "pve-iface",
56122987 19476 "maxLength" : 20,
7aacca6f 19477 "minLength" : 2,
7aacca6f 19478 "optional" : 1,
56122987
DM
19479 "type" : "string"
19480 },
44660702
DM
19481 "macro" : {
19482 "maxLength" : 128,
7aacca6f
DM
19483 "optional" : 1,
19484 "type" : "string"
56122987 19485 },
44660702
DM
19486 "node" : {
19487 "description" : "The cluster node name.",
19488 "format" : "pve-node",
19489 "type" : "string"
19490 },
19491 "pos" : {
19492 "description" : "Update rule at position <pos>.",
19493 "minimum" : 0,
19494 "optional" : 1,
19495 "type" : "integer"
19496 },
19497 "proto" : {
19498 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19499 "format" : "pve-fw-protocol-spec",
56122987 19500 "optional" : 1,
44660702 19501 "type" : "string"
56122987 19502 },
7aacca6f 19503 "source" : {
7aacca6f 19504 "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
19505 "format" : "pve-fw-addr-spec",
19506 "optional" : 1,
19507 "type" : "string"
7aacca6f 19508 },
44660702
DM
19509 "sport" : {
19510 "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.",
19511 "format" : "pve-fw-sport-spec",
7aacca6f 19512 "optional" : 1,
44660702
DM
19513 "type" : "string"
19514 },
19515 "type" : {
19516 "enum" : [
19517 "in",
19518 "out",
19519 "group"
19520 ],
19521 "optional" : 0,
19522 "type" : "string"
56122987 19523 }
44660702 19524 }
7aacca6f 19525 },
56122987
DM
19526 "permissions" : {
19527 "check" : [
19528 "perm",
19529 "/nodes/{node}",
19530 [
19531 "Sys.Modify"
19532 ]
19533 ]
19534 },
44660702
DM
19535 "protected" : 1,
19536 "proxyto" : "node",
19537 "returns" : {
19538 "type" : "null"
19539 }
56122987
DM
19540 }
19541 },
44660702 19542 "leaf" : 0,
7aacca6f 19543 "path" : "/nodes/{node}/firewall/rules",
44660702 19544 "text" : "rules"
56122987
DM
19545 },
19546 {
56122987 19547 "info" : {
44660702
DM
19548 "GET" : {
19549 "description" : "Get host firewall options.",
19550 "method" : "GET",
19551 "name" : "get_options",
56122987 19552 "parameters" : {
7aacca6f 19553 "additionalProperties" : 0,
56122987 19554 "properties" : {
44660702
DM
19555 "node" : {
19556 "description" : "The cluster node name.",
19557 "format" : "pve-node",
19558 "type" : "string"
19559 }
19560 }
19561 },
19562 "permissions" : {
19563 "check" : [
19564 "perm",
19565 "/nodes/{node}",
19566 [
19567 "Sys.Audit"
19568 ]
19569 ]
19570 },
19571 "proxyto" : "node",
19572 "returns" : {
19573 "properties" : {
19574 "enable" : {
19575 "description" : "Enable host firewall rules.",
7aacca6f 19576 "optional" : 1,
44660702 19577 "type" : "boolean"
7aacca6f 19578 },
44660702
DM
19579 "log_level_in" : {
19580 "description" : "Log level for incoming traffic.",
56122987
DM
19581 "enum" : [
19582 "emerg",
19583 "alert",
19584 "crit",
19585 "err",
19586 "warning",
19587 "notice",
19588 "info",
19589 "debug",
19590 "nolog"
19591 ],
56122987 19592 "optional" : 1,
44660702
DM
19593 "type" : "string"
19594 },
19595 "log_level_out" : {
19596 "description" : "Log level for outgoing traffic.",
56122987
DM
19597 "enum" : [
19598 "emerg",
19599 "alert",
19600 "crit",
19601 "err",
19602 "warning",
19603 "notice",
19604 "info",
19605 "debug",
19606 "nolog"
19607 ],
44660702
DM
19608 "optional" : 1,
19609 "type" : "string"
19610 },
19611 "ndp" : {
19612 "description" : "Enable NDP.",
19613 "optional" : 1,
19614 "type" : "boolean"
19615 },
19616 "nf_conntrack_max" : {
19617 "description" : "Maximum number of tracked connections.",
19618 "minimum" : 32768,
19619 "optional" : 1,
19620 "type" : "integer"
19621 },
19622 "nf_conntrack_tcp_timeout_established" : {
19623 "description" : "Conntrack established timeout.",
19624 "minimum" : 7875,
19625 "optional" : 1,
19626 "type" : "integer"
19627 },
19628 "nosmurfs" : {
19629 "description" : "Enable SMURFS filter.",
19630 "optional" : 1,
19631 "type" : "boolean"
56122987 19632 },
7aacca6f 19633 "smurf_log_level" : {
44660702 19634 "description" : "Log level for SMURFS filter.",
56122987
DM
19635 "enum" : [
19636 "emerg",
19637 "alert",
19638 "crit",
19639 "err",
19640 "warning",
19641 "notice",
19642 "info",
19643 "debug",
19644 "nolog"
7aacca6f 19645 ],
7aacca6f
DM
19646 "optional" : 1,
19647 "type" : "string"
56122987 19648 },
44660702
DM
19649 "tcp_flags_log_level" : {
19650 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
19651 "enum" : [
19652 "emerg",
19653 "alert",
19654 "crit",
19655 "err",
19656 "warning",
19657 "notice",
19658 "info",
19659 "debug",
19660 "nolog"
19661 ],
44660702
DM
19662 "optional" : 1,
19663 "type" : "string"
7aacca6f 19664 },
44660702
DM
19665 "tcpflags" : {
19666 "description" : "Filter illegal combinations of TCP flags.",
56122987 19667 "optional" : 1,
44660702 19668 "type" : "boolean"
56122987 19669 }
44660702
DM
19670 },
19671 "type" : "object"
7aacca6f 19672 }
56122987 19673 },
44660702
DM
19674 "PUT" : {
19675 "description" : "Set Firewall options.",
19676 "method" : "PUT",
19677 "name" : "set_options",
7aacca6f 19678 "parameters" : {
44660702 19679 "additionalProperties" : 0,
7aacca6f 19680 "properties" : {
44660702
DM
19681 "delete" : {
19682 "description" : "A list of settings you want to delete.",
19683 "format" : "pve-configid-list",
7aacca6f 19684 "optional" : 1,
44660702 19685 "type" : "string"
56122987 19686 },
44660702
DM
19687 "digest" : {
19688 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19689 "maxLength" : 40,
19690 "optional" : 1,
19691 "type" : "string"
56122987 19692 },
44660702
DM
19693 "enable" : {
19694 "description" : "Enable host firewall rules.",
7aacca6f 19695 "optional" : 1,
44660702
DM
19696 "type" : "boolean"
19697 },
19698 "log_level_in" : {
19699 "description" : "Log level for incoming traffic.",
56122987
DM
19700 "enum" : [
19701 "emerg",
19702 "alert",
19703 "crit",
19704 "err",
19705 "warning",
19706 "notice",
19707 "info",
19708 "debug",
19709 "nolog"
44660702 19710 ],
7aacca6f 19711 "optional" : 1,
44660702 19712 "type" : "string"
7aacca6f 19713 },
44660702
DM
19714 "log_level_out" : {
19715 "description" : "Log level for outgoing traffic.",
56122987
DM
19716 "enum" : [
19717 "emerg",
19718 "alert",
19719 "crit",
19720 "err",
19721 "warning",
19722 "notice",
19723 "info",
19724 "debug",
19725 "nolog"
19726 ],
19727 "optional" : 1,
7aacca6f 19728 "type" : "string"
56122987 19729 },
44660702
DM
19730 "ndp" : {
19731 "description" : "Enable NDP.",
7aacca6f 19732 "optional" : 1,
44660702
DM
19733 "type" : "boolean"
19734 },
19735 "nf_conntrack_max" : {
19736 "description" : "Maximum number of tracked connections.",
19737 "minimum" : 32768,
19738 "optional" : 1,
19739 "type" : "integer"
19740 },
19741 "nf_conntrack_tcp_timeout_established" : {
19742 "description" : "Conntrack established timeout.",
19743 "minimum" : 7875,
19744 "optional" : 1,
19745 "type" : "integer"
19746 },
19747 "node" : {
19748 "description" : "The cluster node name.",
19749 "format" : "pve-node",
19750 "type" : "string"
19751 },
19752 "nosmurfs" : {
19753 "description" : "Enable SMURFS filter.",
19754 "optional" : 1,
19755 "type" : "boolean"
19756 },
19757 "smurf_log_level" : {
19758 "description" : "Log level for SMURFS filter.",
56122987
DM
19759 "enum" : [
19760 "emerg",
19761 "alert",
19762 "crit",
19763 "err",
19764 "warning",
19765 "notice",
19766 "info",
19767 "debug",
19768 "nolog"
44660702
DM
19769 ],
19770 "optional" : 1,
19771 "type" : "string"
56122987 19772 },
44660702
DM
19773 "tcp_flags_log_level" : {
19774 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
19775 "enum" : [
19776 "emerg",
19777 "alert",
19778 "crit",
19779 "err",
19780 "warning",
19781 "notice",
19782 "info",
19783 "debug",
19784 "nolog"
19785 ],
44660702
DM
19786 "optional" : 1,
19787 "type" : "string"
7aacca6f 19788 },
44660702
DM
19789 "tcpflags" : {
19790 "description" : "Filter illegal combinations of TCP flags.",
56122987 19791 "optional" : 1,
7aacca6f 19792 "type" : "boolean"
56122987 19793 }
7aacca6f 19794 }
56122987 19795 },
44660702
DM
19796 "permissions" : {
19797 "check" : [
19798 "perm",
19799 "/nodes/{node}",
19800 [
19801 "Sys.Modify"
19802 ]
19803 ]
19804 },
19805 "protected" : 1,
19806 "proxyto" : "node",
19807 "returns" : {
19808 "type" : "null"
19809 }
7aacca6f
DM
19810 }
19811 },
44660702
DM
19812 "leaf" : 1,
19813 "path" : "/nodes/{node}/firewall/options",
7aacca6f
DM
19814 "text" : "options"
19815 },
19816 {
7aacca6f
DM
19817 "info" : {
19818 "GET" : {
44660702
DM
19819 "description" : "Read firewall log",
19820 "method" : "GET",
7aacca6f 19821 "name" : "log",
56122987 19822 "parameters" : {
44660702 19823 "additionalProperties" : 0,
56122987 19824 "properties" : {
7aacca6f 19825 "limit" : {
44660702 19826 "minimum" : 0,
7aacca6f 19827 "optional" : 1,
44660702 19828 "type" : "integer"
7aacca6f 19829 },
56122987 19830 "node" : {
7aacca6f 19831 "description" : "The cluster node name.",
44660702 19832 "format" : "pve-node",
7aacca6f 19833 "type" : "string"
44660702
DM
19834 },
19835 "start" : {
19836 "minimum" : 0,
19837 "optional" : 1,
19838 "type" : "integer"
56122987 19839 }
44660702 19840 }
7aacca6f 19841 },
56122987
DM
19842 "permissions" : {
19843 "check" : [
19844 "perm",
19845 "/nodes/{node}",
19846 [
19847 "Sys.Syslog"
19848 ]
19849 ]
19850 },
44660702
DM
19851 "protected" : 1,
19852 "proxyto" : "node",
56122987
DM
19853 "returns" : {
19854 "items" : {
56122987 19855 "properties" : {
56122987 19856 "n" : {
44660702
DM
19857 "description" : "Line number",
19858 "type" : "integer"
7aacca6f
DM
19859 },
19860 "t" : {
44660702
DM
19861 "description" : "Line text",
19862 "type" : "string"
56122987 19863 }
44660702
DM
19864 },
19865 "type" : "object"
56122987
DM
19866 },
19867 "type" : "array"
7aacca6f 19868 }
56122987
DM
19869 }
19870 },
44660702
DM
19871 "leaf" : 1,
19872 "path" : "/nodes/{node}/firewall/log",
7aacca6f 19873 "text" : "log"
56122987
DM
19874 }
19875 ],
19876 "info" : {
19877 "GET" : {
44660702
DM
19878 "description" : "Directory index.",
19879 "method" : "GET",
19880 "name" : "index",
56122987 19881 "parameters" : {
44660702 19882 "additionalProperties" : 0,
56122987
DM
19883 "properties" : {
19884 "node" : {
19885 "description" : "The cluster node name.",
44660702
DM
19886 "format" : "pve-node",
19887 "type" : "string"
56122987 19888 }
44660702 19889 }
56122987 19890 },
7aacca6f
DM
19891 "permissions" : {
19892 "user" : "all"
19893 },
56122987
DM
19894 "returns" : {
19895 "items" : {
19896 "properties" : {},
19897 "type" : "object"
19898 },
56122987
DM
19899 "links" : [
19900 {
44660702
DM
19901 "href" : "{name}",
19902 "rel" : "child"
56122987 19903 }
44660702
DM
19904 ],
19905 "type" : "array"
19906 }
56122987 19907 }
7aacca6f 19908 },
44660702 19909 "leaf" : 0,
7aacca6f 19910 "path" : "/nodes/{node}/firewall",
44660702 19911 "text" : "firewall"
56122987
DM
19912 },
19913 {
56122987
DM
19914 "info" : {
19915 "GET" : {
44660702
DM
19916 "description" : "API version details",
19917 "method" : "GET",
19918 "name" : "version",
56122987 19919 "parameters" : {
44660702 19920 "additionalProperties" : 0,
56122987
DM
19921 "properties" : {
19922 "node" : {
56122987 19923 "description" : "The cluster node name.",
44660702 19924 "format" : "pve-node",
7aacca6f 19925 "type" : "string"
56122987 19926 }
44660702 19927 }
56122987 19928 },
56122987 19929 "permissions" : {
7aacca6f 19930 "user" : "all"
56122987 19931 },
56122987 19932 "proxyto" : "node",
56122987 19933 "returns" : {
56122987 19934 "properties" : {
44660702 19935 "release" : {
56122987
DM
19936 "type" : "string"
19937 },
44660702 19938 "repoid" : {
7aacca6f
DM
19939 "type" : "string"
19940 },
19941 "version" : {
19942 "type" : "string"
19943 }
44660702
DM
19944 },
19945 "type" : "object"
7aacca6f 19946 }
56122987
DM
19947 }
19948 },
56122987 19949 "leaf" : 1,
44660702
DM
19950 "path" : "/nodes/{node}/version",
19951 "text" : "version"
56122987
DM
19952 },
19953 {
56122987
DM
19954 "info" : {
19955 "GET" : {
7aacca6f 19956 "description" : "Read node status",
44660702 19957 "method" : "GET",
7aacca6f 19958 "name" : "status",
56122987 19959 "parameters" : {
44660702 19960 "additionalProperties" : 0,
56122987
DM
19961 "properties" : {
19962 "node" : {
7aacca6f 19963 "description" : "The cluster node name.",
44660702
DM
19964 "format" : "pve-node",
19965 "type" : "string"
56122987 19966 }
44660702 19967 }
56122987 19968 },
56122987
DM
19969 "permissions" : {
19970 "check" : [
19971 "perm",
19972 "/nodes/{node}",
19973 [
19974 "Sys.Audit"
19975 ]
19976 ]
44660702
DM
19977 },
19978 "proxyto" : "node",
19979 "returns" : {
19980 "properties" : {},
19981 "type" : "object"
7aacca6f
DM
19982 }
19983 },
19984 "POST" : {
44660702
DM
19985 "description" : "Reboot or shutdown a node.",
19986 "method" : "POST",
7aacca6f 19987 "name" : "node_cmd",
56122987 19988 "parameters" : {
44660702 19989 "additionalProperties" : 0,
56122987 19990 "properties" : {
7aacca6f
DM
19991 "command" : {
19992 "description" : "Specify the command.",
56122987 19993 "enum" : [
7aacca6f
DM
19994 "reboot",
19995 "shutdown"
56122987
DM
19996 ],
19997 "type" : "string"
44660702
DM
19998 },
19999 "node" : {
20000 "description" : "The cluster node name.",
20001 "format" : "pve-node",
20002 "type" : "string"
56122987 20003 }
44660702 20004 }
7aacca6f 20005 },
7aacca6f
DM
20006 "permissions" : {
20007 "check" : [
20008 "perm",
20009 "/nodes/{node}",
20010 [
20011 "Sys.PowerMgmt"
20012 ]
20013 ]
20014 },
44660702 20015 "protected" : 1,
7aacca6f 20016 "proxyto" : "node",
7aacca6f
DM
20017 "returns" : {
20018 "type" : "null"
56122987
DM
20019 }
20020 }
20021 },
7aacca6f 20022 "leaf" : 1,
44660702
DM
20023 "path" : "/nodes/{node}/status",
20024 "text" : "status"
56122987
DM
20025 },
20026 {
56122987
DM
20027 "info" : {
20028 "GET" : {
44660702
DM
20029 "description" : "Read tap/vm network device interface counters",
20030 "method" : "GET",
20031 "name" : "netstat",
20032 "parameters" : {
20033 "additionalProperties" : 0,
20034 "properties" : {
20035 "node" : {
20036 "description" : "The cluster node name.",
20037 "format" : "pve-node",
20038 "type" : "string"
20039 }
56122987
DM
20040 }
20041 },
20042 "permissions" : {
20043 "check" : [
20044 "perm",
20045 "/nodes/{node}",
20046 [
7aacca6f 20047 "Sys.Audit"
56122987
DM
20048 ]
20049 ]
20050 },
7aacca6f 20051 "proxyto" : "node",
44660702
DM
20052 "returns" : {
20053 "items" : {
20054 "properties" : {},
20055 "type" : "object"
20056 },
20057 "type" : "array"
20058 }
7aacca6f
DM
20059 }
20060 },
44660702
DM
20061 "leaf" : 1,
20062 "path" : "/nodes/{node}/netstat",
7aacca6f
DM
20063 "text" : "netstat"
20064 },
20065 {
20066 "info" : {
20067 "POST" : {
7aacca6f 20068 "description" : "Execute multiple commands in order.",
7aacca6f 20069 "method" : "POST",
7aacca6f 20070 "name" : "execute",
56122987
DM
20071 "parameters" : {
20072 "additionalProperties" : 0,
20073 "properties" : {
7aacca6f
DM
20074 "commands" : {
20075 "description" : "JSON encoded array of commands.",
56122987
DM
20076 "type" : "string"
20077 },
20078 "node" : {
44660702 20079 "description" : "The cluster node name.",
56122987 20080 "format" : "pve-node",
44660702 20081 "type" : "string"
56122987
DM
20082 }
20083 }
44660702
DM
20084 },
20085 "permissions" : {
20086 "check" : [
20087 "perm",
20088 "/nodes/{node}",
20089 [
20090 "Sys.Audit"
20091 ]
20092 ]
20093 },
20094 "protected" : 1,
20095 "proxyto" : "node",
20096 "returns" : {
20097 "properties" : {},
20098 "type" : "array"
56122987
DM
20099 }
20100 }
20101 },
56122987 20102 "leaf" : 1,
44660702
DM
20103 "path" : "/nodes/{node}/execute",
20104 "text" : "execute"
56122987
DM
20105 },
20106 {
20107 "info" : {
7aacca6f 20108 "GET" : {
44660702
DM
20109 "description" : "Read node RRD statistics (returns PNG)",
20110 "method" : "GET",
7aacca6f 20111 "name" : "rrd",
56122987 20112 "parameters" : {
7aacca6f 20113 "additionalProperties" : 0,
56122987 20114 "properties" : {
44660702
DM
20115 "cf" : {
20116 "description" : "The RRD consolidation function",
20117 "enum" : [
20118 "AVERAGE",
20119 "MAX"
20120 ],
20121 "optional" : 1,
20122 "type" : "string"
20123 },
7aacca6f 20124 "ds" : {
7aacca6f 20125 "description" : "The list of datasources you want to display.",
44660702
DM
20126 "format" : "pve-configid-list",
20127 "type" : "string"
20128 },
20129 "node" : {
20130 "description" : "The cluster node name.",
20131 "format" : "pve-node",
20132 "type" : "string"
7aacca6f
DM
20133 },
20134 "timeframe" : {
20135 "description" : "Specify the time frame you are interested in.",
20136 "enum" : [
20137 "hour",
20138 "day",
20139 "week",
20140 "month",
20141 "year"
20142 ],
20143 "type" : "string"
56122987 20144 }
7aacca6f 20145 }
56122987 20146 },
56122987 20147 "permissions" : {
56122987
DM
20148 "check" : [
20149 "perm",
20150 "/nodes/{node}",
20151 [
7aacca6f 20152 "Sys.Audit"
56122987
DM
20153 ]
20154 ]
20155 },
7aacca6f 20156 "protected" : 1,
56122987 20157 "returns" : {
56122987 20158 "properties" : {
7aacca6f 20159 "filename" : {
56122987
DM
20160 "type" : "string"
20161 }
44660702
DM
20162 },
20163 "type" : "object"
20164 }
56122987
DM
20165 }
20166 },
44660702 20167 "leaf" : 1,
7aacca6f 20168 "path" : "/nodes/{node}/rrd",
44660702 20169 "text" : "rrd"
56122987
DM
20170 },
20171 {
20172 "info" : {
7aacca6f 20173 "GET" : {
44660702
DM
20174 "description" : "Read node RRD statistics",
20175 "method" : "GET",
7aacca6f 20176 "name" : "rrddata",
56122987 20177 "parameters" : {
44660702 20178 "additionalProperties" : 0,
56122987 20179 "properties" : {
7aacca6f 20180 "cf" : {
7aacca6f
DM
20181 "description" : "The RRD consolidation function",
20182 "enum" : [
20183 "AVERAGE",
20184 "MAX"
44660702
DM
20185 ],
20186 "optional" : 1,
20187 "type" : "string"
56122987
DM
20188 },
20189 "node" : {
44660702 20190 "description" : "The cluster node name.",
56122987 20191 "format" : "pve-node",
44660702 20192 "type" : "string"
56122987 20193 },
7aacca6f 20194 "timeframe" : {
7aacca6f
DM
20195 "description" : "Specify the time frame you are interested in.",
20196 "enum" : [
20197 "hour",
20198 "day",
20199 "week",
20200 "month",
20201 "year"
44660702
DM
20202 ],
20203 "type" : "string"
56122987 20204 }
56122987
DM
20205 }
20206 },
56122987
DM
20207 "permissions" : {
20208 "check" : [
20209 "perm",
20210 "/nodes/{node}",
20211 [
44660702 20212 "Sys.Audit"
56122987
DM
20213 ]
20214 ]
7aacca6f 20215 },
44660702 20216 "protected" : 1,
56122987 20217 "returns" : {
7aacca6f 20218 "items" : {
44660702 20219 "properties" : {},
7aacca6f
DM
20220 "type" : "object"
20221 },
20222 "type" : "array"
44660702
DM
20223 }
20224 }
20225 },
20226 "leaf" : 1,
20227 "path" : "/nodes/{node}/rrddata",
20228 "text" : "rrddata"
20229 },
20230 {
20231 "info" : {
20232 "GET" : {
20233 "description" : "Read system log",
20234 "method" : "GET",
20235 "name" : "syslog",
56122987 20236 "parameters" : {
44660702 20237 "additionalProperties" : 0,
56122987 20238 "properties" : {
44660702
DM
20239 "limit" : {
20240 "minimum" : 0,
7aacca6f 20241 "optional" : 1,
44660702 20242 "type" : "integer"
7aacca6f 20243 },
56122987 20244 "node" : {
7aacca6f 20245 "description" : "The cluster node name.",
44660702
DM
20246 "format" : "pve-node",
20247 "type" : "string"
56122987 20248 },
44660702
DM
20249 "since" : {
20250 "description" : "Display all log since this date-time string.",
20251 "optional" : 1,
20252 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
20253 "type" : "string"
20254 },
20255 "start" : {
7aacca6f
DM
20256 "minimum" : 0,
20257 "optional" : 1,
20258 "type" : "integer"
20259 },
20260 "until" : {
20261 "description" : "Display all log until this date-time string.",
7aacca6f 20262 "optional" : 1,
44660702 20263 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
56122987
DM
20264 "type" : "string"
20265 }
44660702 20266 }
56122987 20267 },
44660702
DM
20268 "permissions" : {
20269 "check" : [
20270 "perm",
20271 "/nodes/{node}",
20272 [
20273 "Sys.Syslog"
20274 ]
20275 ]
20276 },
20277 "protected" : 1,
20278 "proxyto" : "node",
20279 "returns" : {
20280 "items" : {
20281 "properties" : {
20282 "n" : {
20283 "description" : "Line number",
20284 "type" : "integer"
20285 },
20286 "t" : {
20287 "description" : "Line text",
20288 "type" : "string"
20289 }
20290 },
20291 "type" : "object"
20292 },
20293 "type" : "array"
20294 }
56122987
DM
20295 }
20296 },
44660702
DM
20297 "leaf" : 1,
20298 "path" : "/nodes/{node}/syslog",
7aacca6f 20299 "text" : "syslog"
56122987
DM
20300 },
20301 {
56122987
DM
20302 "info" : {
20303 "POST" : {
44660702
DM
20304 "description" : "Creates a VNC Shell proxy.",
20305 "method" : "POST",
20306 "name" : "vncshell",
20307 "parameters" : {
20308 "additionalProperties" : 0,
56122987 20309 "properties" : {
44660702
DM
20310 "node" : {
20311 "description" : "The cluster node name.",
20312 "format" : "pve-node",
7aacca6f
DM
20313 "type" : "string"
20314 },
44660702
DM
20315 "upgrade" : {
20316 "default" : 0,
20317 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20318 "optional" : 1,
20319 "type" : "boolean"
7aacca6f 20320 },
44660702
DM
20321 "websocket" : {
20322 "description" : "use websocket instead of standard vnc.",
20323 "optional" : 1,
20324 "type" : "boolean"
56122987 20325 }
44660702 20326 }
56122987 20327 },
56122987
DM
20328 "permissions" : {
20329 "check" : [
20330 "perm",
7aacca6f 20331 "/nodes/{node}",
56122987 20332 [
7aacca6f 20333 "Sys.Console"
56122987 20334 ]
44660702
DM
20335 ],
20336 "description" : "Restricted to users on realm 'pam'"
56122987 20337 },
44660702
DM
20338 "protected" : 1,
20339 "returns" : {
20340 "additionalProperties" : 0,
56122987 20341 "properties" : {
44660702
DM
20342 "cert" : {
20343 "type" : "string"
7aacca6f 20344 },
44660702
DM
20345 "port" : {
20346 "type" : "integer"
7aacca6f 20347 },
44660702
DM
20348 "ticket" : {
20349 "type" : "string"
20350 },
20351 "upid" : {
20352 "type" : "string"
20353 },
20354 "user" : {
20355 "type" : "string"
56122987 20356 }
44660702
DM
20357 }
20358 }
56122987
DM
20359 }
20360 },
7aacca6f 20361 "leaf" : 1,
44660702
DM
20362 "path" : "/nodes/{node}/vncshell",
20363 "text" : "vncshell"
56122987
DM
20364 },
20365 {
20366 "info" : {
20367 "GET" : {
7aacca6f 20368 "description" : "Opens a weksocket for VNC traffic.",
44660702
DM
20369 "method" : "GET",
20370 "name" : "vncwebsocket",
56122987 20371 "parameters" : {
44660702 20372 "additionalProperties" : 0,
56122987
DM
20373 "properties" : {
20374 "node" : {
20375 "description" : "The cluster node name.",
44660702 20376 "format" : "pve-node",
7aacca6f
DM
20377 "type" : "string"
20378 },
20379 "port" : {
7aacca6f
DM
20380 "description" : "Port number returned by previous vncproxy call.",
20381 "maximum" : 5999,
44660702 20382 "minimum" : 5900,
7aacca6f 20383 "type" : "integer"
44660702
DM
20384 },
20385 "vncticket" : {
20386 "description" : "Ticket from previous call to vncproxy.",
20387 "maxLength" : 512,
20388 "type" : "string"
56122987 20389 }
44660702 20390 }
56122987 20391 },
56122987
DM
20392 "permissions" : {
20393 "check" : [
20394 "perm",
20395 "/nodes/{node}",
20396 [
7aacca6f 20397 "Sys.Console"
56122987 20398 ]
44660702
DM
20399 ],
20400 "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket)."
20401 },
20402 "returns" : {
20403 "properties" : {
20404 "port" : {
20405 "type" : "string"
20406 }
20407 },
20408 "type" : "object"
7aacca6f 20409 }
56122987
DM
20410 }
20411 },
44660702 20412 "leaf" : 1,
7aacca6f 20413 "path" : "/nodes/{node}/vncwebsocket",
44660702 20414 "text" : "vncwebsocket"
56122987
DM
20415 },
20416 {
20417 "info" : {
20418 "POST" : {
44660702 20419 "description" : "Creates a SPICE shell.",
7aacca6f 20420 "method" : "POST",
44660702 20421 "name" : "spiceshell",
56122987 20422 "parameters" : {
7aacca6f 20423 "additionalProperties" : 0,
56122987 20424 "properties" : {
7aacca6f 20425 "node" : {
44660702 20426 "description" : "The cluster node name.",
56122987 20427 "format" : "pve-node",
7aacca6f
DM
20428 "type" : "string"
20429 },
44660702
DM
20430 "proxy" : {
20431 "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).",
20432 "format" : "address",
20433 "optional" : 1,
7aacca6f
DM
20434 "type" : "string"
20435 },
44660702
DM
20436 "upgrade" : {
20437 "default" : 0,
20438 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20439 "optional" : 1,
20440 "type" : "boolean"
56122987 20441 }
7aacca6f 20442 }
56122987 20443 },
56122987
DM
20444 "permissions" : {
20445 "check" : [
20446 "perm",
7aacca6f 20447 "/nodes/{node}",
56122987 20448 [
7aacca6f 20449 "Sys.Console"
56122987 20450 ]
7aacca6f
DM
20451 ],
20452 "description" : "Restricted to users on realm 'pam'"
44660702
DM
20453 },
20454 "protected" : 1,
20455 "proxyto" : "node",
20456 "returns" : {
20457 "additionalProperties" : 1,
20458 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
20459 "properties" : {
20460 "host" : {
20461 "type" : "string"
20462 },
20463 "password" : {
20464 "type" : "string"
20465 },
20466 "proxy" : {
20467 "type" : "string"
20468 },
20469 "tls-port" : {
20470 "type" : "integer"
20471 },
20472 "type" : {
20473 "type" : "string"
20474 }
20475 }
7aacca6f 20476 }
56122987
DM
20477 }
20478 },
56122987 20479 "leaf" : 1,
44660702
DM
20480 "path" : "/nodes/{node}/spiceshell",
20481 "text" : "spiceshell"
56122987
DM
20482 },
20483 {
56122987 20484 "info" : {
7aacca6f 20485 "GET" : {
44660702 20486 "description" : "Read DNS settings.",
7aacca6f 20487 "method" : "GET",
44660702
DM
20488 "name" : "dns",
20489 "parameters" : {
7aacca6f
DM
20490 "additionalProperties" : 0,
20491 "properties" : {
44660702
DM
20492 "node" : {
20493 "description" : "The cluster node name.",
20494 "format" : "pve-node",
20495 "type" : "string"
7aacca6f
DM
20496 }
20497 }
20498 },
7aacca6f
DM
20499 "permissions" : {
20500 "check" : [
20501 "perm",
20502 "/nodes/{node}",
20503 [
20504 "Sys.Audit"
20505 ]
20506 ]
20507 },
44660702
DM
20508 "proxyto" : "node",
20509 "returns" : {
56122987
DM
20510 "additionalProperties" : 0,
20511 "properties" : {
44660702
DM
20512 "dns1" : {
20513 "description" : "First name server IP address.",
20514 "optional" : 1,
20515 "type" : "string"
20516 },
20517 "dns2" : {
20518 "description" : "Second name server IP address.",
20519 "optional" : 1,
20520 "type" : "string"
20521 },
20522 "dns3" : {
20523 "description" : "Third name server IP address.",
20524 "optional" : 1,
20525 "type" : "string"
20526 },
20527 "search" : {
20528 "description" : "Search domain for host-name lookup.",
20529 "optional" : 1,
20530 "type" : "string"
7aacca6f 20531 }
44660702
DM
20532 },
20533 "type" : "object"
20534 }
7aacca6f
DM
20535 },
20536 "PUT" : {
44660702
DM
20537 "description" : "Write DNS settings.",
20538 "method" : "PUT",
7aacca6f
DM
20539 "name" : "update_dns",
20540 "parameters" : {
20541 "additionalProperties" : 0,
20542 "properties" : {
44660702
DM
20543 "dns1" : {
20544 "description" : "First name server IP address.",
20545 "format" : "ip",
20546 "optional" : 1,
7aacca6f
DM
20547 "type" : "string"
20548 },
44660702
DM
20549 "dns2" : {
20550 "description" : "Second name server IP address.",
20551 "format" : "ip",
7aacca6f 20552 "optional" : 1,
44660702 20553 "type" : "string"
7aacca6f 20554 },
44660702
DM
20555 "dns3" : {
20556 "description" : "Third name server IP address.",
20557 "format" : "ip",
7aacca6f 20558 "optional" : 1,
44660702 20559 "type" : "string"
7aacca6f
DM
20560 },
20561 "node" : {
44660702 20562 "description" : "The cluster node name.",
56122987 20563 "format" : "pve-node",
44660702 20564 "type" : "string"
7aacca6f 20565 },
44660702
DM
20566 "search" : {
20567 "description" : "Search domain for host-name lookup.",
20568 "type" : "string"
56122987
DM
20569 }
20570 }
20571 },
20572 "permissions" : {
20573 "check" : [
20574 "perm",
7aacca6f 20575 "/nodes/{node}",
56122987 20576 [
7aacca6f 20577 "Sys.Modify"
56122987
DM
20578 ]
20579 ]
20580 },
44660702 20581 "protected" : 1,
7aacca6f 20582 "proxyto" : "node",
56122987 20583 "returns" : {
7aacca6f
DM
20584 "type" : "null"
20585 }
56122987 20586 }
44660702
DM
20587 },
20588 "leaf" : 1,
20589 "path" : "/nodes/{node}/dns",
20590 "text" : "dns"
56122987
DM
20591 },
20592 {
20593 "info" : {
7aacca6f 20594 "GET" : {
7aacca6f 20595 "description" : "Read server time and time zone settings.",
44660702
DM
20596 "method" : "GET",
20597 "name" : "time",
56122987 20598 "parameters" : {
44660702 20599 "additionalProperties" : 0,
56122987
DM
20600 "properties" : {
20601 "node" : {
44660702 20602 "description" : "The cluster node name.",
56122987 20603 "format" : "pve-node",
44660702 20604 "type" : "string"
56122987 20605 }
44660702 20606 }
56122987
DM
20607 },
20608 "permissions" : {
20609 "check" : [
20610 "perm",
7aacca6f 20611 "/nodes/{node}",
56122987 20612 [
7aacca6f 20613 "Sys.Audit"
56122987
DM
20614 ]
20615 ]
44660702
DM
20616 },
20617 "proxyto" : "node",
20618 "returns" : {
20619 "additionalProperties" : 0,
20620 "properties" : {
20621 "localtime" : {
20622 "description" : "Seconds since 1970-01-01 00:00:00 (local time)",
20623 "minimum" : 1297163644,
20624 "type" : "integer"
20625 },
20626 "time" : {
20627 "description" : "Seconds since 1970-01-01 00:00:00 UTC.",
20628 "minimum" : 1297163644,
20629 "type" : "integer"
20630 },
20631 "timezone" : {
20632 "description" : "Time zone",
20633 "type" : "string"
20634 }
20635 },
20636 "type" : "object"
7aacca6f
DM
20637 }
20638 },
20639 "PUT" : {
7aacca6f 20640 "description" : "Set time zone.",
44660702
DM
20641 "method" : "PUT",
20642 "name" : "set_timezone",
20643 "parameters" : {
20644 "additionalProperties" : 0,
20645 "properties" : {
20646 "node" : {
20647 "description" : "The cluster node name.",
20648 "format" : "pve-node",
20649 "type" : "string"
20650 },
20651 "timezone" : {
20652 "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.",
20653 "type" : "string"
20654 }
20655 }
20656 },
7aacca6f
DM
20657 "permissions" : {
20658 "check" : [
20659 "perm",
20660 "/nodes/{node}",
20661 [
20662 "Sys.Modify"
20663 ]
20664 ]
56122987 20665 },
7aacca6f 20666 "protected" : 1,
44660702
DM
20667 "proxyto" : "node",
20668 "returns" : {
20669 "type" : "null"
20670 }
7aacca6f
DM
20671 }
20672 },
7aacca6f 20673 "leaf" : 1,
44660702
DM
20674 "path" : "/nodes/{node}/time",
20675 "text" : "time"
7aacca6f
DM
20676 },
20677 {
20678 "info" : {
44660702
DM
20679 "GET" : {
20680 "description" : "Get list of appliances.",
20681 "method" : "GET",
20682 "name" : "aplinfo",
7aacca6f
DM
20683 "parameters" : {
20684 "additionalProperties" : 0,
20685 "properties" : {
7aacca6f 20686 "node" : {
44660702 20687 "description" : "The cluster node name.",
7aacca6f 20688 "format" : "pve-node",
44660702 20689 "type" : "string"
7aacca6f
DM
20690 }
20691 }
56122987 20692 },
7aacca6f 20693 "permissions" : {
44660702 20694 "user" : "all"
56122987 20695 },
44660702 20696 "proxyto" : "node",
7aacca6f
DM
20697 "returns" : {
20698 "items" : {
44660702
DM
20699 "properties" : {},
20700 "type" : "object"
7aacca6f
DM
20701 },
20702 "type" : "array"
44660702
DM
20703 }
20704 },
20705 "POST" : {
20706 "description" : "Download appliance templates.",
20707 "method" : "POST",
20708 "name" : "apl_download",
7aacca6f
DM
20709 "parameters" : {
20710 "additionalProperties" : 0,
20711 "properties" : {
20712 "node" : {
7aacca6f 20713 "description" : "The cluster node name.",
44660702
DM
20714 "format" : "pve-node",
20715 "type" : "string"
20716 },
20717 "storage" : {
20718 "description" : "Only list status for specified storage",
20719 "format" : "pve-storage-id",
20720 "type" : "string"
20721 },
20722 "template" : {
20723 "description" : "The template wich will downloaded",
20724 "maxLength" : 255,
7aacca6f
DM
20725 "type" : "string"
20726 }
20727 }
56122987 20728 },
7aacca6f 20729 "permissions" : {
44660702
DM
20730 "check" : [
20731 "perm",
20732 "/storage/{storage}",
20733 [
20734 "Datastore.AllocateTemplate"
20735 ]
20736 ]
20737 },
20738 "protected" : 1,
20739 "proxyto" : "node",
20740 "returns" : {
20741 "type" : "string"
7aacca6f
DM
20742 }
20743 }
20744 },
7aacca6f 20745 "leaf" : 1,
44660702
DM
20746 "path" : "/nodes/{node}/aplinfo",
20747 "text" : "aplinfo"
7aacca6f
DM
20748 },
20749 {
20750 "info" : {
20751 "GET" : {
44660702
DM
20752 "description" : "Gather various systems information about a node",
20753 "method" : "GET",
20754 "name" : "report",
7aacca6f 20755 "parameters" : {
44660702 20756 "additionalProperties" : 0,
7aacca6f
DM
20757 "properties" : {
20758 "node" : {
7aacca6f 20759 "description" : "The cluster node name.",
44660702 20760 "format" : "pve-node",
7aacca6f
DM
20761 "type" : "string"
20762 }
44660702 20763 }
56122987 20764 },
7aacca6f
DM
20765 "permissions" : {
20766 "check" : [
20767 "perm",
20768 "/nodes/{node}",
20769 [
20770 "Sys.Audit"
20771 ]
20772 ]
56122987 20773 },
44660702 20774 "protected" : 1,
7aacca6f
DM
20775 "proxyto" : "node",
20776 "returns" : {
56122987 20777 "type" : "string"
7aacca6f
DM
20778 }
20779 }
20780 },
7aacca6f 20781 "leaf" : 1,
44660702
DM
20782 "path" : "/nodes/{node}/report",
20783 "text" : "report"
7aacca6f
DM
20784 },
20785 {
7aacca6f
DM
20786 "info" : {
20787 "POST" : {
44660702 20788 "description" : "Start all VMs and containers (when onboot=1).",
7aacca6f 20789 "method" : "POST",
44660702 20790 "name" : "startall",
7aacca6f 20791 "parameters" : {
44660702 20792 "additionalProperties" : 0,
7aacca6f
DM
20793 "properties" : {
20794 "force" : {
44660702 20795 "description" : "force if onboot=0.",
7aacca6f 20796 "optional" : 1,
44660702 20797 "type" : "boolean"
7aacca6f
DM
20798 },
20799 "node" : {
7aacca6f 20800 "description" : "The cluster node name.",
44660702
DM
20801 "format" : "pve-node",
20802 "type" : "string"
7aacca6f 20803 }
44660702 20804 }
56122987 20805 },
7aacca6f
DM
20806 "permissions" : {
20807 "check" : [
20808 "perm",
20809 "/",
20810 [
20811 "VM.PowerMgmt"
20812 ]
20813 ]
44660702
DM
20814 },
20815 "protected" : 1,
20816 "proxyto" : "node",
20817 "returns" : {
20818 "type" : "string"
7aacca6f
DM
20819 }
20820 }
20821 },
44660702 20822 "leaf" : 1,
7aacca6f 20823 "path" : "/nodes/{node}/startall",
44660702 20824 "text" : "startall"
7aacca6f
DM
20825 },
20826 {
7aacca6f
DM
20827 "info" : {
20828 "POST" : {
20829 "description" : "Stop all VMs and Containers.",
44660702
DM
20830 "method" : "POST",
20831 "name" : "stopall",
7aacca6f 20832 "parameters" : {
44660702 20833 "additionalProperties" : 0,
7aacca6f
DM
20834 "properties" : {
20835 "node" : {
44660702 20836 "description" : "The cluster node name.",
7aacca6f 20837 "format" : "pve-node",
44660702 20838 "type" : "string"
7aacca6f 20839 }
44660702 20840 }
56122987 20841 },
7aacca6f
DM
20842 "permissions" : {
20843 "check" : [
20844 "perm",
20845 "/",
20846 [
44660702 20847 "VM.PowerMgmt"
7aacca6f
DM
20848 ]
20849 ]
56122987 20850 },
44660702 20851 "protected" : 1,
7aacca6f 20852 "proxyto" : "node",
44660702
DM
20853 "returns" : {
20854 "type" : "string"
20855 }
20856 }
56122987 20857 },
44660702
DM
20858 "leaf" : 1,
20859 "path" : "/nodes/{node}/stopall",
20860 "text" : "stopall"
20861 },
20862 {
20863 "info" : {
20864 "POST" : {
20865 "description" : "Migrate all VMs and Containers.",
20866 "method" : "POST",
20867 "name" : "migrateall",
20868 "parameters" : {
20869 "additionalProperties" : 0,
20870 "properties" : {
20871 "maxworkers" : {
20872 "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!",
20873 "minimum" : 1,
20874 "optional" : 1,
20875 "type" : "integer"
20876 },
20877 "node" : {
20878 "description" : "The cluster node name.",
20879 "format" : "pve-node",
20880 "type" : "string"
20881 },
20882 "target" : {
20883 "description" : "Target node.",
20884 "format" : "pve-node",
20885 "type" : "string"
20886 }
20887 }
20888 },
20889 "permissions" : {
20890 "check" : [
20891 "perm",
20892 "/",
20893 [
20894 "VM.Migrate"
20895 ]
20896 ]
20897 },
20898 "protected" : 1,
20899 "proxyto" : "node",
20900 "returns" : {
20901 "type" : "string"
20902 }
20903 }
56122987 20904 },
44660702
DM
20905 "leaf" : 1,
20906 "path" : "/nodes/{node}/migrateall",
20907 "text" : "migrateall"
20908 }
20909 ],
20910 "info" : {
20911 "GET" : {
20912 "description" : "Node index.",
20913 "method" : "GET",
20914 "name" : "index",
20915 "parameters" : {
20916 "additionalProperties" : 0,
20917 "properties" : {
20918 "node" : {
20919 "description" : "The cluster node name.",
20920 "format" : "pve-node",
20921 "type" : "string"
20922 }
20923 }
56122987 20924 },
44660702
DM
20925 "permissions" : {
20926 "user" : "all"
56122987 20927 },
44660702
DM
20928 "returns" : {
20929 "items" : {
20930 "properties" : {},
20931 "type" : "object"
20932 },
20933 "links" : [
20934 {
20935 "href" : "{name}",
20936 "rel" : "child"
20937 }
56122987 20938 ],
44660702 20939 "type" : "array"
7aacca6f
DM
20940 }
20941 }
20942 },
44660702
DM
20943 "leaf" : 0,
20944 "path" : "/nodes/{node}",
20945 "text" : "{node}"
20946 }
20947 ],
20948 "info" : {
7aacca6f 20949 "GET" : {
44660702 20950 "description" : "Cluster node index.",
7aacca6f 20951 "method" : "GET",
44660702 20952 "name" : "index",
7aacca6f 20953 "parameters" : {
7aacca6f
DM
20954 "additionalProperties" : 0
20955 },
20956 "permissions" : {
7aacca6f
DM
20957 "user" : "all"
20958 },
44660702
DM
20959 "returns" : {
20960 "items" : {
20961 "properties" : {},
20962 "type" : "object"
20963 },
20964 "links" : [
20965 {
20966 "href" : "{node}",
20967 "rel" : "child"
20968 }
20969 ],
20970 "type" : "array"
20971 }
7aacca6f
DM
20972 }
20973 },
44660702
DM
20974 "leaf" : 0,
20975 "path" : "/nodes",
20976 "text" : "nodes"
20977 },
20978 {
7aacca6f
DM
20979 "children" : [
20980 {
7aacca6f 20981 "info" : {
44660702
DM
20982 "DELETE" : {
20983 "description" : "Delete storage configuration.",
20984 "method" : "DELETE",
20985 "name" : "delete",
7aacca6f
DM
20986 "parameters" : {
20987 "additionalProperties" : 0,
20988 "properties" : {
20989 "storage" : {
7aacca6f 20990 "description" : "The storage identifier.",
44660702 20991 "format" : "pve-storage-id",
7aacca6f
DM
20992 "type" : "string"
20993 }
20994 }
56122987 20995 },
7aacca6f
DM
20996 "permissions" : {
20997 "check" : [
20998 "perm",
20999 "/storage",
21000 [
21001 "Datastore.Allocate"
21002 ]
21003 ]
56122987 21004 },
44660702
DM
21005 "protected" : 1,
21006 "returns" : {
21007 "type" : "null"
21008 }
21009 },
21010 "GET" : {
21011 "description" : "Read storage configuration.",
21012 "method" : "GET",
21013 "name" : "read",
7aacca6f
DM
21014 "parameters" : {
21015 "additionalProperties" : 0,
21016 "properties" : {
21017 "storage" : {
44660702 21018 "description" : "The storage identifier.",
7aacca6f 21019 "format" : "pve-storage-id",
44660702 21020 "type" : "string"
7aacca6f
DM
21021 }
21022 }
21023 },
44660702
DM
21024 "permissions" : {
21025 "check" : [
21026 "perm",
21027 "/storage/{storage}",
21028 [
21029 "Datastore.Allocate"
21030 ]
21031 ]
21032 },
21033 "returns" : {}
7aacca6f
DM
21034 },
21035 "PUT" : {
44660702
DM
21036 "description" : "Update storage configuration.",
21037 "method" : "PUT",
21038 "name" : "update",
21039 "parameters" : {
21040 "additionalProperties" : 0,
21041 "properties" : {
21042 "blocksize" : {
21043 "description" : "block size",
7aacca6f 21044 "optional" : 1,
44660702 21045 "type" : "string"
7aacca6f 21046 },
44660702
DM
21047 "comstar_hg" : {
21048 "description" : "host group for comstar views",
21049 "optional" : 1,
21050 "type" : "string"
7aacca6f 21051 },
44660702
DM
21052 "comstar_tg" : {
21053 "description" : "target group for comstar views",
7aacca6f 21054 "optional" : 1,
44660702 21055 "type" : "string"
7aacca6f 21056 },
44660702
DM
21057 "content" : {
21058 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21059 "format" : "pve-storage-content-list",
7aacca6f 21060 "optional" : 1,
44660702 21061 "type" : "string"
7aacca6f 21062 },
44660702
DM
21063 "delete" : {
21064 "description" : "A list of settings you want to delete.",
21065 "format" : "pve-configid-list",
21066 "maxLength" : 4096,
7aacca6f 21067 "optional" : 1,
44660702 21068 "type" : "string"
7aacca6f
DM
21069 },
21070 "digest" : {
44660702 21071 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 21072 "maxLength" : 40,
7aacca6f 21073 "optional" : 1,
7aacca6f
DM
21074 "type" : "string"
21075 },
44660702
DM
21076 "disable" : {
21077 "description" : "Flag to disable the storage.",
21078 "optional" : 1,
21079 "type" : "boolean"
7aacca6f
DM
21080 },
21081 "format" : {
21082 "description" : "Default image format.",
44660702 21083 "format" : "pve-storage-format",
7aacca6f 21084 "optional" : 1,
44660702 21085 "type" : "string"
7aacca6f 21086 },
44660702
DM
21087 "krbd" : {
21088 "description" : "Access rbd through krbd kernel module.",
7aacca6f 21089 "optional" : 1,
44660702 21090 "type" : "boolean"
7aacca6f 21091 },
44660702
DM
21092 "maxfiles" : {
21093 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21094 "minimum" : 0,
21095 "optional" : 1,
21096 "type" : "integer"
7aacca6f
DM
21097 },
21098 "nodes" : {
44660702 21099 "description" : "List of cluster node names.",
7aacca6f
DM
21100 "format" : "pve-node-list",
21101 "optional" : 1,
44660702 21102 "type" : "string"
7aacca6f 21103 },
44660702
DM
21104 "nowritecache" : {
21105 "description" : "disable write caching on the target",
7aacca6f 21106 "optional" : 1,
44660702 21107 "type" : "boolean"
7aacca6f
DM
21108 },
21109 "options" : {
7aacca6f 21110 "description" : "NFS mount options (see 'man nfs')",
44660702
DM
21111 "format" : "pve-storage-options",
21112 "optional" : 1,
21113 "type" : "string"
21114 },
21115 "pool" : {
21116 "description" : "Pool.",
21117 "optional" : 1,
21118 "type" : "string"
21119 },
21120 "redundancy" : {
21121 "default" : 2,
21122 "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.",
21123 "maximum" : 16,
21124 "minimum" : 1,
21125 "optional" : 1,
21126 "type" : "integer"
21127 },
21128 "saferemove" : {
21129 "description" : "Zero-out data when removing LVs.",
21130 "optional" : 1,
21131 "type" : "boolean"
7aacca6f
DM
21132 },
21133 "saferemove_throughput" : {
44660702 21134 "description" : "Wipe throughput (cstream -t parameter value).",
7aacca6f 21135 "optional" : 1,
44660702 21136 "type" : "string"
7aacca6f 21137 },
44660702
DM
21138 "server" : {
21139 "description" : "Server IP or DNS name.",
21140 "format" : "pve-storage-server",
7aacca6f 21141 "optional" : 1,
44660702 21142 "type" : "string"
7aacca6f 21143 },
44660702
DM
21144 "server2" : {
21145 "description" : "Backup volfile server IP or DNS name.",
21146 "format" : "pve-storage-server",
7aacca6f 21147 "optional" : 1,
44660702
DM
21148 "requires" : "server",
21149 "type" : "string"
21150 },
21151 "shared" : {
21152 "description" : "Mark storage as shared.",
21153 "optional" : 1,
21154 "type" : "boolean"
21155 },
21156 "sparse" : {
21157 "description" : "use sparse volumes",
21158 "optional" : 1,
21159 "type" : "boolean"
21160 },
21161 "storage" : {
21162 "description" : "The storage identifier.",
21163 "format" : "pve-storage-id",
21164 "type" : "string"
21165 },
21166 "transport" : {
21167 "description" : "Gluster transport: tcp or rdma",
21168 "enum" : [
21169 "tcp",
21170 "rdma",
21171 "unix"
21172 ],
21173 "optional" : 1,
21174 "type" : "string"
7aacca6f
DM
21175 },
21176 "username" : {
21177 "description" : "RBD Id.",
44660702
DM
21178 "optional" : 1,
21179 "type" : "string"
7aacca6f 21180 }
44660702
DM
21181 },
21182 "type" : "object"
21183 },
21184 "permissions" : {
21185 "check" : [
21186 "perm",
21187 "/storage",
21188 [
21189 "Datastore.Allocate"
21190 ]
21191 ]
21192 },
21193 "protected" : 1,
21194 "returns" : {
21195 "type" : "null"
21196 }
21197 }
21198 },
21199 "leaf" : 1,
21200 "path" : "/storage/{storage}",
21201 "text" : "{storage}"
21202 }
21203 ],
21204 "info" : {
21205 "GET" : {
21206 "description" : "Storage index.",
21207 "method" : "GET",
21208 "name" : "index",
21209 "parameters" : {
21210 "additionalProperties" : 0,
21211 "properties" : {
21212 "type" : {
21213 "description" : "Only list storage of specific type",
21214 "enum" : [
21215 "dir",
21216 "drbd",
21217 "glusterfs",
21218 "iscsi",
21219 "iscsidirect",
21220 "lvm",
21221 "lvmthin",
21222 "nfs",
21223 "rbd",
21224 "sheepdog",
21225 "zfs",
21226 "zfspool"
21227 ],
21228 "optional" : 1,
21229 "type" : "string"
21230 }
21231 }
21232 },
21233 "permissions" : {
21234 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
21235 "user" : "all"
21236 },
21237 "returns" : {
21238 "items" : {
21239 "properties" : {
21240 "storage" : {
21241 "type" : "string"
7aacca6f 21242 }
56122987 21243 },
44660702
DM
21244 "type" : "object"
21245 },
21246 "links" : [
21247 {
21248 "href" : "{storage}",
21249 "rel" : "child"
21250 }
21251 ],
21252 "type" : "array"
21253 }
21254 },
21255 "POST" : {
21256 "description" : "Create a new storage.",
21257 "method" : "POST",
21258 "name" : "create",
21259 "parameters" : {
21260 "additionalProperties" : 0,
21261 "properties" : {
21262 "authsupported" : {
21263 "description" : "Authsupported.",
21264 "optional" : 1,
21265 "type" : "string"
21266 },
21267 "base" : {
21268 "description" : "Base volume. This volume is automatically activated.",
21269 "format" : "pve-volume-id",
21270 "optional" : 1,
21271 "type" : "string"
21272 },
21273 "blocksize" : {
21274 "description" : "block size",
21275 "optional" : 1,
21276 "type" : "string"
21277 },
21278 "comstar_hg" : {
21279 "description" : "host group for comstar views",
21280 "optional" : 1,
21281 "type" : "string"
21282 },
21283 "comstar_tg" : {
21284 "description" : "target group for comstar views",
21285 "optional" : 1,
21286 "type" : "string"
21287 },
21288 "content" : {
21289 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21290 "format" : "pve-storage-content-list",
21291 "optional" : 1,
21292 "type" : "string"
21293 },
21294 "disable" : {
21295 "description" : "Flag to disable the storage.",
21296 "optional" : 1,
21297 "type" : "boolean"
21298 },
21299 "export" : {
21300 "description" : "NFS export path.",
21301 "format" : "pve-storage-path",
21302 "optional" : 1,
21303 "type" : "string"
21304 },
21305 "format" : {
21306 "description" : "Default image format.",
21307 "format" : "pve-storage-format",
21308 "optional" : 1,
21309 "type" : "string"
21310 },
21311 "iscsiprovider" : {
21312 "description" : "iscsi provider",
21313 "optional" : 1,
21314 "type" : "string"
21315 },
21316 "krbd" : {
21317 "description" : "Access rbd through krbd kernel module.",
21318 "optional" : 1,
21319 "type" : "boolean"
56122987 21320 },
44660702
DM
21321 "maxfiles" : {
21322 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21323 "minimum" : 0,
21324 "optional" : 1,
21325 "type" : "integer"
7aacca6f 21326 },
44660702
DM
21327 "monhost" : {
21328 "description" : "Monitors daemon ips.",
21329 "optional" : 1,
21330 "type" : "string"
7aacca6f 21331 },
44660702
DM
21332 "nodes" : {
21333 "description" : "List of cluster node names.",
21334 "format" : "pve-node-list",
21335 "optional" : 1,
21336 "type" : "string"
7aacca6f 21337 },
44660702
DM
21338 "nowritecache" : {
21339 "description" : "disable write caching on the target",
21340 "optional" : 1,
21341 "type" : "boolean"
21342 },
21343 "options" : {
21344 "description" : "NFS mount options (see 'man nfs')",
21345 "format" : "pve-storage-options",
21346 "optional" : 1,
21347 "type" : "string"
21348 },
21349 "path" : {
21350 "description" : "File system path.",
21351 "format" : "pve-storage-path",
21352 "optional" : 1,
21353 "type" : "string"
21354 },
21355 "pool" : {
21356 "description" : "Pool.",
21357 "optional" : 1,
21358 "type" : "string"
21359 },
21360 "portal" : {
21361 "description" : "iSCSI portal (IP or DNS name with optional port).",
21362 "format" : "pve-storage-portal-dns",
21363 "optional" : 1,
21364 "type" : "string"
21365 },
21366 "redundancy" : {
21367 "default" : 2,
21368 "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.",
21369 "maximum" : 16,
21370 "minimum" : 1,
21371 "optional" : 1,
21372 "type" : "integer"
21373 },
21374 "saferemove" : {
21375 "description" : "Zero-out data when removing LVs.",
21376 "optional" : 1,
21377 "type" : "boolean"
21378 },
21379 "saferemove_throughput" : {
21380 "description" : "Wipe throughput (cstream -t parameter value).",
21381 "optional" : 1,
21382 "type" : "string"
21383 },
21384 "server" : {
21385 "description" : "Server IP or DNS name.",
21386 "format" : "pve-storage-server",
21387 "optional" : 1,
21388 "type" : "string"
21389 },
21390 "server2" : {
21391 "description" : "Backup volfile server IP or DNS name.",
21392 "format" : "pve-storage-server",
21393 "optional" : 1,
21394 "requires" : "server",
21395 "type" : "string"
21396 },
21397 "shared" : {
21398 "description" : "Mark storage as shared.",
21399 "optional" : 1,
21400 "type" : "boolean"
21401 },
21402 "sparse" : {
21403 "description" : "use sparse volumes",
21404 "optional" : 1,
21405 "type" : "boolean"
21406 },
21407 "storage" : {
21408 "description" : "The storage identifier.",
21409 "format" : "pve-storage-id",
21410 "type" : "string"
21411 },
21412 "target" : {
21413 "description" : "iSCSI target.",
21414 "optional" : 1,
21415 "type" : "string"
21416 },
21417 "thinpool" : {
21418 "description" : "LVM thin pool LV name.",
21419 "format" : "pve-storage-vgname",
21420 "optional" : 1,
21421 "type" : "string"
21422 },
21423 "transport" : {
21424 "description" : "Gluster transport: tcp or rdma",
21425 "enum" : [
21426 "tcp",
21427 "rdma",
21428 "unix"
7aacca6f 21429 ],
44660702
DM
21430 "optional" : 1,
21431 "type" : "string"
56122987 21432 },
44660702
DM
21433 "type" : {
21434 "description" : "Storage type.",
21435 "enum" : [
21436 "dir",
21437 "drbd",
21438 "glusterfs",
21439 "iscsi",
21440 "iscsidirect",
21441 "lvm",
21442 "lvmthin",
21443 "nfs",
21444 "rbd",
21445 "sheepdog",
21446 "zfs",
21447 "zfspool"
21448 ],
21449 "type" : "string"
56122987 21450 },
44660702
DM
21451 "username" : {
21452 "description" : "RBD Id.",
21453 "optional" : 1,
21454 "type" : "string"
7aacca6f 21455 },
44660702
DM
21456 "vgname" : {
21457 "description" : "Volume group name.",
21458 "format" : "pve-storage-vgname",
21459 "optional" : 1,
21460 "type" : "string"
21461 },
21462 "volume" : {
21463 "description" : "Glusterfs Volume.",
21464 "optional" : 1,
21465 "type" : "string"
21466 }
21467 },
21468 "type" : "object"
21469 },
21470 "permissions" : {
21471 "check" : [
21472 "perm",
21473 "/storage",
21474 [
21475 "Datastore.Allocate"
21476 ]
21477 ]
56122987 21478 },
44660702
DM
21479 "protected" : 1,
21480 "returns" : {
21481 "type" : "null"
21482 }
21483 }
21484 },
21485 "leaf" : 0,
21486 "path" : "/storage",
21487 "text" : "storage"
21488 },
21489 {
21490 "children" : [
21491 {
56122987
DM
21492 "children" : [
21493 {
56122987 21494 "info" : {
44660702
DM
21495 "DELETE" : {
21496 "description" : "Delete user.",
21497 "method" : "DELETE",
21498 "name" : "delete_user",
56122987 21499 "parameters" : {
7aacca6f 21500 "additionalProperties" : 0,
56122987 21501 "properties" : {
56122987 21502 "userid" : {
56122987
DM
21503 "description" : "User ID",
21504 "format" : "pve-userid",
44660702 21505 "maxLength" : 64,
56122987
DM
21506 "type" : "string"
21507 }
7aacca6f 21508 }
56122987 21509 },
56122987
DM
21510 "permissions" : {
21511 "check" : [
44660702 21512 "and",
56122987 21513 [
44660702
DM
21514 "userid-param",
21515 "Realm.AllocateUser"
56122987 21516 ],
44660702
DM
21517 [
21518 "userid-group",
21519 [
21520 "User.Modify"
21521 ]
21522 ]
56122987 21523 ]
7aacca6f 21524 },
44660702 21525 "protected" : 1,
56122987
DM
21526 "returns" : {
21527 "type" : "null"
44660702 21528 }
7aacca6f 21529 },
44660702
DM
21530 "GET" : {
21531 "description" : "Get user configuration.",
21532 "method" : "GET",
21533 "name" : "read_user",
56122987
DM
21534 "parameters" : {
21535 "additionalProperties" : 0,
21536 "properties" : {
21537 "userid" : {
44660702 21538 "description" : "User ID",
56122987 21539 "format" : "pve-userid",
44660702
DM
21540 "maxLength" : 64,
21541 "type" : "string"
56122987
DM
21542 }
21543 }
21544 },
56122987
DM
21545 "permissions" : {
21546 "check" : [
44660702 21547 "userid-group",
56122987 21548 [
44660702
DM
21549 "User.Modify",
21550 "Sys.Audit"
56122987
DM
21551 ]
21552 ]
21553 },
56122987 21554 "returns" : {
7aacca6f 21555 "additionalProperties" : 0,
56122987 21556 "properties" : {
44660702
DM
21557 "comment" : {
21558 "optional" : 1,
21559 "type" : "string"
56122987 21560 },
44660702
DM
21561 "email" : {
21562 "optional" : 1,
21563 "type" : "string"
7aacca6f
DM
21564 },
21565 "enable" : {
21566 "type" : "boolean"
21567 },
44660702
DM
21568 "expire" : {
21569 "optional" : 1,
21570 "type" : "integer"
21571 },
21572 "firstname" : {
56122987
DM
21573 "optional" : 1,
21574 "type" : "string"
21575 },
44660702
DM
21576 "groups" : {
21577 "type" : "array"
56122987 21578 },
44660702
DM
21579 "keys" : {
21580 "optional" : 1,
21581 "type" : "string"
7aacca6f 21582 },
44660702
DM
21583 "lastname" : {
21584 "optional" : 1,
21585 "type" : "string"
56122987 21586 }
7aacca6f 21587 }
44660702
DM
21588 }
21589 },
21590 "PUT" : {
21591 "description" : "Update user configuration.",
21592 "method" : "PUT",
21593 "name" : "update_user",
56122987 21594 "parameters" : {
44660702 21595 "additionalProperties" : 0,
56122987 21596 "properties" : {
44660702
DM
21597 "append" : {
21598 "optional" : 1,
21599 "requires" : "groups",
21600 "type" : "boolean"
21601 },
21602 "comment" : {
21603 "optional" : 1,
21604 "type" : "string"
21605 },
21606 "email" : {
21607 "format" : "email-opt",
21608 "optional" : 1,
21609 "type" : "string"
21610 },
21611 "enable" : {
21612 "description" : "Enable/disable the account.",
21613 "optional" : 1,
21614 "type" : "boolean"
21615 },
21616 "expire" : {
21617 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
21618 "minimum" : 0,
21619 "optional" : 1,
21620 "type" : "integer"
21621 },
21622 "firstname" : {
21623 "optional" : 1,
21624 "type" : "string"
21625 },
21626 "groups" : {
21627 "format" : "pve-groupid-list",
21628 "optional" : 1,
21629 "type" : "string"
21630 },
21631 "keys" : {
21632 "description" : "Keys for two factor auth (yubico).",
21633 "optional" : 1,
21634 "type" : "string"
21635 },
21636 "lastname" : {
21637 "optional" : 1,
21638 "type" : "string"
21639 },
56122987 21640 "userid" : {
56122987
DM
21641 "description" : "User ID",
21642 "format" : "pve-userid",
44660702
DM
21643 "maxLength" : 64,
21644 "type" : "string"
56122987 21645 }
44660702 21646 }
56122987 21647 },
56122987
DM
21648 "permissions" : {
21649 "check" : [
21650 "userid-group",
21651 [
44660702
DM
21652 "User.Modify"
21653 ],
21654 "groups_param",
21655 1
56122987
DM
21656 ]
21657 },
44660702
DM
21658 "protected" : 1,
21659 "returns" : {
21660 "type" : "null"
21661 }
56122987
DM
21662 }
21663 },
44660702
DM
21664 "leaf" : 1,
21665 "path" : "/access/users/{userid}",
7aacca6f 21666 "text" : "{userid}"
56122987 21667 }
7aacca6f 21668 ],
56122987 21669 "info" : {
7aacca6f 21670 "GET" : {
44660702
DM
21671 "description" : "User index.",
21672 "method" : "GET",
7aacca6f 21673 "name" : "index",
56122987 21674 "parameters" : {
44660702
DM
21675 "additionalProperties" : 0,
21676 "properties" : {
21677 "enabled" : {
21678 "description" : "Optional filter for enable property.",
21679 "optional" : 1,
21680 "type" : "boolean"
21681 }
21682 }
21683 },
21684 "permissions" : {
21685 "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.",
21686 "user" : "all"
56122987 21687 },
7aacca6f 21688 "returns" : {
7aacca6f
DM
21689 "items" : {
21690 "properties" : {
44660702 21691 "userid" : {
7aacca6f
DM
21692 "type" : "string"
21693 }
21694 },
21695 "type" : "object"
21696 },
44660702
DM
21697 "links" : [
21698 {
21699 "href" : "{userid}",
21700 "rel" : "child"
21701 }
21702 ],
7aacca6f
DM
21703 "type" : "array"
21704 }
21705 },
21706 "POST" : {
44660702 21707 "description" : "Create new user.",
7aacca6f 21708 "method" : "POST",
44660702 21709 "name" : "create_user",
56122987 21710 "parameters" : {
7aacca6f
DM
21711 "additionalProperties" : 0,
21712 "properties" : {
44660702
DM
21713 "comment" : {
21714 "optional" : 1,
7aacca6f
DM
21715 "type" : "string"
21716 },
44660702
DM
21717 "email" : {
21718 "format" : "email-opt",
21719 "optional" : 1,
21720 "type" : "string"
21721 },
21722 "enable" : {
21723 "default" : 1,
21724 "description" : "Enable the account (default). You can set this to '0' to disable the accout",
21725 "optional" : 1,
21726 "type" : "boolean"
21727 },
21728 "expire" : {
21729 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
21730 "minimum" : 0,
21731 "optional" : 1,
21732 "type" : "integer"
21733 },
21734 "firstname" : {
21735 "optional" : 1,
21736 "type" : "string"
21737 },
21738 "groups" : {
21739 "format" : "pve-groupid-list",
21740 "optional" : 1,
21741 "type" : "string"
21742 },
21743 "keys" : {
21744 "description" : "Keys for two factor auth (yubico).",
21745 "optional" : 1,
21746 "type" : "string"
21747 },
21748 "lastname" : {
7aacca6f
DM
21749 "optional" : 1,
21750 "type" : "string"
44660702
DM
21751 },
21752 "password" : {
21753 "description" : "Initial password.",
21754 "maxLength" : 64,
21755 "minLength" : 5,
21756 "optional" : 1,
21757 "type" : "string"
21758 },
21759 "userid" : {
21760 "description" : "User ID",
21761 "format" : "pve-userid",
21762 "maxLength" : 64,
21763 "type" : "string"
56122987 21764 }
7aacca6f 21765 }
56122987 21766 },
44660702
DM
21767 "permissions" : {
21768 "check" : [
21769 "and",
21770 [
21771 "userid-param",
21772 "Realm.AllocateUser"
21773 ],
21774 [
21775 "userid-group",
21776 [
21777 "User.Modify"
21778 ],
21779 "groups_param",
21780 1
21781 ]
21782 ],
21783 "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."
21784 },
21785 "protected" : 1,
21786 "returns" : {
21787 "type" : "null"
21788 }
56122987
DM
21789 }
21790 },
44660702
DM
21791 "leaf" : 0,
21792 "path" : "/access/users",
21793 "text" : "users"
21794 },
21795 {
56122987
DM
21796 "children" : [
21797 {
56122987
DM
21798 "info" : {
21799 "DELETE" : {
44660702
DM
21800 "description" : "Delete group.",
21801 "method" : "DELETE",
21802 "name" : "delete_group",
21803 "parameters" : {
21804 "additionalProperties" : 0,
21805 "properties" : {
21806 "groupid" : {
21807 "format" : "pve-groupid",
21808 "type" : "string"
21809 }
21810 }
21811 },
7aacca6f
DM
21812 "permissions" : {
21813 "check" : [
21814 "perm",
21815 "/access/groups",
21816 [
21817 "Group.Allocate"
21818 ]
21819 ]
21820 },
7aacca6f 21821 "protected" : 1,
7aacca6f
DM
21822 "returns" : {
21823 "type" : "null"
44660702 21824 }
7aacca6f 21825 },
44660702
DM
21826 "GET" : {
21827 "description" : "Get group configuration.",
21828 "method" : "GET",
21829 "name" : "read_group",
21830 "parameters" : {
21831 "additionalProperties" : 0,
21832 "properties" : {
21833 "groupid" : {
21834 "format" : "pve-groupid",
21835 "type" : "string"
21836 }
21837 }
56122987 21838 },
7aacca6f
DM
21839 "permissions" : {
21840 "check" : [
21841 "perm",
21842 "/access/groups",
21843 [
44660702 21844 "Sys.Audit",
7aacca6f 21845 "Group.Allocate"
44660702
DM
21846 ],
21847 "any",
21848 1
7aacca6f
DM
21849 ]
21850 },
7aacca6f 21851 "returns" : {
44660702 21852 "additionalProperties" : 0,
7aacca6f
DM
21853 "properties" : {
21854 "comment" : {
44660702
DM
21855 "optional" : 1,
21856 "type" : "string"
7aacca6f
DM
21857 },
21858 "members" : {
21859 "items" : {
21860 "type" : "string"
21861 },
21862 "type" : "array"
21863 }
21864 },
44660702
DM
21865 "type" : "object"
21866 }
21867 },
21868 "PUT" : {
21869 "description" : "Update group data.",
21870 "method" : "PUT",
21871 "name" : "update_group",
56122987 21872 "parameters" : {
44660702 21873 "additionalProperties" : 0,
56122987 21874 "properties" : {
44660702
DM
21875 "comment" : {
21876 "optional" : 1,
21877 "type" : "string"
21878 },
56122987
DM
21879 "groupid" : {
21880 "format" : "pve-groupid",
21881 "type" : "string"
21882 }
44660702 21883 }
56122987 21884 },
56122987
DM
21885 "permissions" : {
21886 "check" : [
21887 "perm",
21888 "/access/groups",
21889 [
21890 "Group.Allocate"
44660702 21891 ]
56122987
DM
21892 ]
21893 },
44660702
DM
21894 "protected" : 1,
21895 "returns" : {
21896 "type" : "null"
21897 }
7aacca6f
DM
21898 }
21899 },
7aacca6f 21900 "leaf" : 1,
44660702
DM
21901 "path" : "/access/groups/{groupid}",
21902 "text" : "{groupid}"
21903 }
21904 ],
21905 "info" : {
21906 "GET" : {
21907 "description" : "Group index.",
21908 "method" : "GET",
21909 "name" : "index",
21910 "parameters" : {
21911 "additionalProperties" : 0
21912 },
21913 "permissions" : {
21914 "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/<group>.",
21915 "user" : "all"
21916 },
21917 "returns" : {
21918 "items" : {
21919 "properties" : {
21920 "groupid" : {
21921 "type" : "string"
21922 }
21923 },
21924 "type" : "object"
21925 },
21926 "links" : [
21927 {
21928 "href" : "{groupid}",
21929 "rel" : "child"
21930 }
21931 ],
21932 "type" : "array"
21933 }
21934 },
21935 "POST" : {
21936 "description" : "Create new group.",
21937 "method" : "POST",
21938 "name" : "create_group",
21939 "parameters" : {
21940 "additionalProperties" : 0,
21941 "properties" : {
21942 "comment" : {
21943 "optional" : 1,
21944 "type" : "string"
21945 },
21946 "groupid" : {
21947 "format" : "pve-groupid",
21948 "type" : "string"
21949 }
21950 }
21951 },
21952 "permissions" : {
21953 "check" : [
21954 "perm",
21955 "/access/groups",
21956 [
21957 "Group.Allocate"
21958 ]
21959 ]
21960 },
21961 "protected" : 1,
21962 "returns" : {
21963 "type" : "null"
21964 }
7aacca6f 21965 }
44660702 21966 },
7aacca6f 21967 "leaf" : 0,
44660702
DM
21968 "path" : "/access/groups",
21969 "text" : "groups"
7aacca6f
DM
21970 },
21971 {
21972 "children" : [
21973 {
7aacca6f 21974 "info" : {
7aacca6f 21975 "DELETE" : {
7aacca6f 21976 "description" : "Delete role.",
44660702 21977 "method" : "DELETE",
7aacca6f 21978 "name" : "delete_role",
56122987
DM
21979 "parameters" : {
21980 "additionalProperties" : 0,
21981 "properties" : {
7aacca6f
DM
21982 "roleid" : {
21983 "format" : "pve-roleid",
21984 "type" : "string"
56122987
DM
21985 }
21986 }
21987 },
56122987
DM
21988 "permissions" : {
21989 "check" : [
21990 "perm",
7aacca6f 21991 "/access",
56122987 21992 [
7aacca6f
DM
21993 "Sys.Modify"
21994 ]
56122987 21995 ]
44660702
DM
21996 },
21997 "protected" : 1,
21998 "returns" : {
21999 "type" : "null"
56122987
DM
22000 }
22001 },
44660702
DM
22002 "GET" : {
22003 "description" : "Get role configuration.",
22004 "method" : "GET",
22005 "name" : "read_role",
22006 "parameters" : {
22007 "additionalProperties" : 0,
22008 "properties" : {
22009 "roleid" : {
22010 "format" : "pve-roleid",
22011 "type" : "string"
22012 }
22013 }
22014 },
7aacca6f 22015 "permissions" : {
44660702 22016 "user" : "all"
56122987 22017 },
44660702
DM
22018 "returns" : {}
22019 },
22020 "PUT" : {
22021 "description" : "Create new role.",
22022 "method" : "PUT",
22023 "name" : "update_role",
56122987
DM
22024 "parameters" : {
22025 "additionalProperties" : 0,
22026 "properties" : {
7aacca6f 22027 "append" : {
44660702 22028 "optional" : 1,
7aacca6f 22029 "requires" : "privs",
44660702 22030 "type" : "boolean"
7aacca6f
DM
22031 },
22032 "privs" : {
22033 "format" : "pve-priv-list",
56122987 22034 "type" : "string"
44660702
DM
22035 },
22036 "roleid" : {
22037 "format" : "pve-roleid",
22038 "type" : "string"
56122987
DM
22039 }
22040 }
22041 },
44660702
DM
22042 "permissions" : {
22043 "check" : [
22044 "perm",
22045 "/access",
22046 [
22047 "Sys.Modify"
22048 ]
22049 ]
22050 },
56122987 22051 "protected" : 1,
7aacca6f
DM
22052 "returns" : {
22053 "type" : "null"
56122987
DM
22054 }
22055 }
22056 },
44660702 22057 "leaf" : 1,
7aacca6f 22058 "path" : "/access/roles/{roleid}",
44660702 22059 "text" : "{roleid}"
56122987
DM
22060 }
22061 ],
56122987 22062 "info" : {
7aacca6f
DM
22063 "GET" : {
22064 "description" : "Role index.",
44660702 22065 "method" : "GET",
7aacca6f 22066 "name" : "index",
56122987 22067 "parameters" : {
56122987
DM
22068 "additionalProperties" : 0
22069 },
7aacca6f
DM
22070 "permissions" : {
22071 "user" : "all"
22072 },
56122987 22073 "returns" : {
7aacca6f 22074 "items" : {
7aacca6f
DM
22075 "properties" : {
22076 "roleid" : {
22077 "type" : "string"
22078 }
44660702
DM
22079 },
22080 "type" : "object"
22081 },
22082 "links" : [
22083 {
22084 "href" : "{roleid}",
22085 "rel" : "child"
7aacca6f 22086 }
44660702
DM
22087 ],
22088 "type" : "array"
22089 }
7aacca6f
DM
22090 },
22091 "POST" : {
22092 "description" : "Create new role.",
44660702
DM
22093 "method" : "POST",
22094 "name" : "create_role",
7aacca6f
DM
22095 "parameters" : {
22096 "additionalProperties" : 0,
22097 "properties" : {
7aacca6f
DM
22098 "privs" : {
22099 "format" : "pve-priv-list",
22100 "optional" : 1,
22101 "type" : "string"
44660702
DM
22102 },
22103 "roleid" : {
22104 "format" : "pve-roleid",
22105 "type" : "string"
7aacca6f
DM
22106 }
22107 }
22108 },
44660702
DM
22109 "permissions" : {
22110 "check" : [
22111 "perm",
22112 "/access",
22113 [
22114 "Sys.Modify"
22115 ]
22116 ]
22117 },
22118 "protected" : 1,
7aacca6f
DM
22119 "returns" : {
22120 "type" : "null"
22121 }
22122 }
22123 },
44660702 22124 "leaf" : 0,
7aacca6f 22125 "path" : "/access/roles",
44660702 22126 "text" : "roles"
7aacca6f
DM
22127 },
22128 {
22129 "info" : {
56122987 22130 "GET" : {
44660702
DM
22131 "description" : "Get Access Control List (ACLs).",
22132 "method" : "GET",
22133 "name" : "read_acl",
7aacca6f
DM
22134 "parameters" : {
22135 "additionalProperties" : 0
22136 },
44660702
DM
22137 "permissions" : {
22138 "description" : "The returned list is restricted to objects where you have rights to modify permissions.",
22139 "user" : "all"
22140 },
56122987 22141 "returns" : {
56122987 22142 "items" : {
44660702 22143 "additionalProperties" : 0,
56122987 22144 "properties" : {
7aacca6f
DM
22145 "path" : {
22146 "type" : "string"
22147 },
44660702
DM
22148 "propagate" : {
22149 "type" : "boolean"
22150 },
22151 "roleid" : {
22152 "type" : "string"
22153 },
7aacca6f
DM
22154 "type" : {
22155 "enum" : [
22156 "user",
22157 "group"
22158 ],
22159 "type" : "string"
22160 },
7aacca6f
DM
22161 "ugid" : {
22162 "type" : "string"
56122987 22163 }
7aacca6f 22164 },
44660702 22165 "type" : "object"
7aacca6f
DM
22166 },
22167 "type" : "array"
44660702 22168 }
7aacca6f
DM
22169 },
22170 "PUT" : {
44660702
DM
22171 "description" : "Update Access Control List (add or remove permissions).",
22172 "method" : "PUT",
7aacca6f
DM
22173 "name" : "update_acl",
22174 "parameters" : {
22175 "additionalProperties" : 0,
22176 "properties" : {
22177 "delete" : {
44660702 22178 "description" : "Remove permissions (instead of adding it).",
7aacca6f 22179 "optional" : 1,
44660702 22180 "type" : "boolean"
7aacca6f 22181 },
44660702
DM
22182 "groups" : {
22183 "description" : "List of groups.",
22184 "format" : "pve-groupid-list",
7aacca6f 22185 "optional" : 1,
44660702 22186 "type" : "string"
7aacca6f
DM
22187 },
22188 "path" : {
22189 "description" : "Access control path",
22190 "type" : "string"
22191 },
7aacca6f 22192 "propagate" : {
44660702 22193 "default" : 1,
7aacca6f 22194 "description" : "Allow to propagate (inherit) permissions.",
7aacca6f 22195 "optional" : 1,
44660702 22196 "type" : "boolean"
7aacca6f 22197 },
44660702
DM
22198 "roles" : {
22199 "description" : "List of roles.",
22200 "format" : "pve-roleid-list",
22201 "type" : "string"
22202 },
22203 "users" : {
22204 "description" : "List of users.",
22205 "format" : "pve-userid-list",
7aacca6f 22206 "optional" : 1,
44660702 22207 "type" : "string"
56122987
DM
22208 }
22209 }
22210 },
56122987 22211 "permissions" : {
7aacca6f
DM
22212 "check" : [
22213 "perm-modify",
22214 "{path}"
22215 ]
22216 },
7aacca6f
DM
22217 "protected" : 1,
22218 "returns" : {
22219 "type" : "null"
44660702 22220 }
56122987
DM
22221 }
22222 },
7aacca6f 22223 "leaf" : 1,
44660702
DM
22224 "path" : "/access/acl",
22225 "text" : "acl"
7aacca6f
DM
22226 },
22227 {
56122987
DM
22228 "children" : [
22229 {
56122987 22230 "info" : {
44660702
DM
22231 "DELETE" : {
22232 "description" : "Delete an authentication server.",
22233 "method" : "DELETE",
22234 "name" : "delete",
22235 "parameters" : {
22236 "additionalProperties" : 0,
22237 "properties" : {
22238 "realm" : {
22239 "description" : "Authentication domain ID",
22240 "format" : "pve-realm",
22241 "maxLength" : 32,
22242 "type" : "string"
56122987 22243 }
44660702 22244 }
56122987 22245 },
56122987
DM
22246 "permissions" : {
22247 "check" : [
22248 "perm",
7aacca6f 22249 "/access/realm",
56122987 22250 [
7aacca6f 22251 "Realm.Allocate"
56122987
DM
22252 ]
22253 ]
22254 },
7aacca6f 22255 "protected" : 1,
7aacca6f
DM
22256 "returns" : {
22257 "type" : "null"
44660702 22258 }
7aacca6f 22259 },
44660702
DM
22260 "GET" : {
22261 "description" : "Get auth server configuration.",
22262 "method" : "GET",
22263 "name" : "read",
56122987 22264 "parameters" : {
44660702 22265 "additionalProperties" : 0,
56122987 22266 "properties" : {
7aacca6f 22267 "realm" : {
44660702 22268 "description" : "Authentication domain ID",
7aacca6f
DM
22269 "format" : "pve-realm",
22270 "maxLength" : 32,
44660702 22271 "type" : "string"
56122987 22272 }
44660702 22273 }
7aacca6f 22274 },
7aacca6f
DM
22275 "permissions" : {
22276 "check" : [
22277 "perm",
22278 "/access/realm",
22279 [
44660702
DM
22280 "Realm.Allocate",
22281 "Sys.Audit"
22282 ],
22283 "any",
22284 1
7aacca6f 22285 ]
44660702
DM
22286 },
22287 "returns" : {}
7aacca6f 22288 },
44660702
DM
22289 "PUT" : {
22290 "description" : "Update authentication server settings.",
22291 "method" : "PUT",
22292 "name" : "update",
7aacca6f 22293 "parameters" : {
44660702 22294 "additionalProperties" : 0,
7aacca6f 22295 "properties" : {
44660702
DM
22296 "base_dn" : {
22297 "description" : "LDAP base domain name",
22298 "maxLength" : 256,
22299 "optional" : 1,
22300 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
22301 "type" : "string"
22302 },
22303 "comment" : {
22304 "description" : "Description.",
22305 "maxLength" : 4096,
22306 "optional" : 1,
22307 "type" : "string"
22308 },
22309 "default" : {
22310 "description" : "Use this as default realm",
22311 "optional" : 1,
22312 "type" : "boolean"
22313 },
22314 "delete" : {
22315 "description" : "A list of settings you want to delete.",
22316 "format" : "pve-configid-list",
22317 "maxLength" : 4096,
22318 "optional" : 1,
22319 "type" : "string"
22320 },
22321 "digest" : {
22322 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
22323 "maxLength" : 40,
22324 "optional" : 1,
22325 "type" : "string"
22326 },
22327 "domain" : {
22328 "description" : "AD domain name",
22329 "maxLength" : 256,
22330 "optional" : 1,
22331 "pattern" : "\\S+",
22332 "type" : "string"
22333 },
22334 "port" : {
22335 "description" : "Server port.",
22336 "maximum" : 65535,
22337 "minimum" : 1,
22338 "optional" : 1,
22339 "type" : "integer"
22340 },
7aacca6f 22341 "realm" : {
7aacca6f
DM
22342 "description" : "Authentication domain ID",
22343 "format" : "pve-realm",
44660702
DM
22344 "maxLength" : 32,
22345 "type" : "string"
22346 },
22347 "secure" : {
22348 "description" : "Use secure LDAPS protocol.",
22349 "optional" : 1,
22350 "type" : "boolean"
22351 },
22352 "server1" : {
22353 "description" : "Server IP address (or DNS name)",
22354 "format" : "address",
22355 "maxLength" : 256,
22356 "optional" : 1,
22357 "type" : "string"
22358 },
22359 "server2" : {
22360 "description" : "Fallback Server IP address (or DNS name)",
22361 "format" : "address",
22362 "maxLength" : 256,
22363 "optional" : 1,
22364 "type" : "string"
22365 },
22366 "tfa" : {
22367 "description" : "Use Two-factor authentication.",
22368 "format" : "pve-tfa-config",
22369 "maxLength" : 128,
22370 "optional" : 1,
22371 "type" : "string"
22372 },
22373 "user_attr" : {
22374 "description" : "LDAP user attribute name",
22375 "maxLength" : 256,
22376 "optional" : 1,
22377 "pattern" : "\\S{2,}",
22378 "type" : "string"
7aacca6f 22379 }
56122987 22380 },
44660702 22381 "type" : "object"
56122987 22382 },
7aacca6f
DM
22383 "permissions" : {
22384 "check" : [
22385 "perm",
22386 "/access/realm",
22387 [
44660702
DM
22388 "Realm.Allocate"
22389 ]
7aacca6f
DM
22390 ]
22391 },
44660702
DM
22392 "protected" : 1,
22393 "returns" : {
22394 "type" : "null"
22395 }
56122987 22396 }
44660702
DM
22397 },
22398 "leaf" : 1,
22399 "path" : "/access/domains/{realm}",
22400 "text" : "{realm}"
56122987 22401 }
7aacca6f 22402 ],
56122987
DM
22403 "info" : {
22404 "GET" : {
44660702
DM
22405 "description" : "Authentication domain index.",
22406 "method" : "GET",
22407 "name" : "index",
22408 "parameters" : {
22409 "additionalProperties" : 0
22410 },
22411 "permissions" : {
22412 "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated).",
22413 "user" : "world"
22414 },
56122987 22415 "returns" : {
56122987
DM
22416 "items" : {
22417 "properties" : {
7aacca6f
DM
22418 "comment" : {
22419 "optional" : 1,
22420 "type" : "string"
22421 },
56122987
DM
22422 "realm" : {
22423 "type" : "string"
22424 },
22425 "tfa" : {
7aacca6f 22426 "description" : "Two-factor authentication provider.",
56122987
DM
22427 "enum" : [
22428 "yubico",
22429 "oath"
22430 ],
44660702
DM
22431 "optional" : 1,
22432 "type" : "string"
56122987
DM
22433 }
22434 },
22435 "type" : "object"
44660702
DM
22436 },
22437 "links" : [
22438 {
22439 "href" : "{realm}",
22440 "rel" : "child"
22441 }
22442 ],
22443 "type" : "array"
22444 }
56122987
DM
22445 },
22446 "POST" : {
7aacca6f 22447 "description" : "Add an authentication server.",
44660702 22448 "method" : "POST",
7aacca6f 22449 "name" : "create",
56122987 22450 "parameters" : {
44660702 22451 "additionalProperties" : 0,
56122987 22452 "properties" : {
44660702
DM
22453 "base_dn" : {
22454 "description" : "LDAP base domain name",
56122987 22455 "maxLength" : 256,
44660702
DM
22456 "optional" : 1,
22457 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
7aacca6f 22458 "type" : "string"
56122987 22459 },
44660702
DM
22460 "comment" : {
22461 "description" : "Description.",
22462 "maxLength" : 4096,
56122987 22463 "optional" : 1,
44660702 22464 "type" : "string"
56122987 22465 },
44660702
DM
22466 "default" : {
22467 "description" : "Use this as default realm",
7aacca6f 22468 "optional" : 1,
44660702 22469 "type" : "boolean"
56122987 22470 },
44660702
DM
22471 "domain" : {
22472 "description" : "AD domain name",
22473 "maxLength" : 256,
7aacca6f 22474 "optional" : 1,
44660702
DM
22475 "pattern" : "\\S+",
22476 "type" : "string"
56122987 22477 },
7aacca6f 22478 "port" : {
44660702 22479 "description" : "Server port.",
7aacca6f 22480 "maximum" : 65535,
44660702 22481 "minimum" : 1,
7aacca6f 22482 "optional" : 1,
44660702 22483 "type" : "integer"
56122987 22484 },
44660702
DM
22485 "realm" : {
22486 "description" : "Authentication domain ID",
22487 "format" : "pve-realm",
22488 "maxLength" : 32,
22489 "type" : "string"
22490 },
22491 "secure" : {
22492 "description" : "Use secure LDAPS protocol.",
7aacca6f 22493 "optional" : 1,
44660702 22494 "type" : "boolean"
56122987 22495 },
44660702
DM
22496 "server1" : {
22497 "description" : "Server IP address (or DNS name)",
22498 "format" : "address",
22499 "maxLength" : 256,
22500 "optional" : 1,
22501 "type" : "string"
56122987 22502 },
44660702
DM
22503 "server2" : {
22504 "description" : "Fallback Server IP address (or DNS name)",
22505 "format" : "address",
7aacca6f 22506 "maxLength" : 256,
7aacca6f 22507 "optional" : 1,
44660702 22508 "type" : "string"
7aacca6f 22509 },
44660702
DM
22510 "tfa" : {
22511 "description" : "Use Two-factor authentication.",
22512 "format" : "pve-tfa-config",
22513 "maxLength" : 128,
22514 "optional" : 1,
22515 "type" : "string"
22516 },
22517 "type" : {
22518 "description" : "Realm type.",
22519 "enum" : [
22520 "ad",
22521 "ldap",
22522 "pam",
22523 "pve"
22524 ],
22525 "type" : "string"
22526 },
22527 "user_attr" : {
22528 "description" : "LDAP user attribute name",
7aacca6f 22529 "maxLength" : 256,
7aacca6f 22530 "optional" : 1,
44660702
DM
22531 "pattern" : "\\S{2,}",
22532 "type" : "string"
7aacca6f
DM
22533 }
22534 },
7aacca6f 22535 "type" : "object"
56122987 22536 },
7aacca6f
DM
22537 "permissions" : {
22538 "check" : [
22539 "perm",
22540 "/access/realm",
22541 [
22542 "Realm.Allocate"
22543 ]
22544 ]
44660702
DM
22545 },
22546 "protected" : 1,
22547 "returns" : {
22548 "type" : "null"
7aacca6f 22549 }
56122987 22550 }
7aacca6f 22551 },
44660702 22552 "leaf" : 0,
56122987 22553 "path" : "/access/domains",
44660702 22554 "text" : "domains"
56122987
DM
22555 },
22556 {
56122987 22557 "info" : {
44660702
DM
22558 "GET" : {
22559 "description" : "Dummy. Useful for formaters which want to priovde a login page.",
22560 "method" : "GET",
22561 "name" : "get_ticket",
22562 "parameters" : {
22563 "additionalProperties" : 0
22564 },
22565 "permissions" : {
22566 "user" : "world"
22567 },
22568 "returns" : {
22569 "type" : "null"
22570 }
22571 },
56122987 22572 "POST" : {
44660702 22573 "description" : "Create or verify authentication ticket.",
56122987 22574 "method" : "POST",
44660702
DM
22575 "name" : "create_ticket",
22576 "parameters" : {
22577 "additionalProperties" : 0,
56122987 22578 "properties" : {
44660702
DM
22579 "otp" : {
22580 "description" : "One-time password for Two-factor authentication.",
7aacca6f
DM
22581 "optional" : 1,
22582 "type" : "string"
56122987 22583 },
7aacca6f
DM
22584 "password" : {
22585 "description" : "The secret password. This can also be a valid ticket.",
22586 "type" : "string"
22587 },
44660702
DM
22588 "path" : {
22589 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
7aacca6f 22590 "maxLength" : 64,
56122987 22591 "optional" : 1,
56122987 22592 "requires" : "privs",
44660702
DM
22593 "type" : "string"
22594 },
22595 "privs" : {
7aacca6f 22596 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
44660702
DM
22597 "format" : "pve-priv-list",
22598 "maxLength" : 64,
56122987 22599 "optional" : 1,
44660702
DM
22600 "requires" : "path",
22601 "type" : "string"
56122987
DM
22602 },
22603 "realm" : {
56122987 22604 "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<relam>.",
44660702 22605 "format" : "pve-realm",
7aacca6f 22606 "maxLength" : 32,
44660702
DM
22607 "optional" : 1,
22608 "type" : "string"
56122987
DM
22609 },
22610 "username" : {
22611 "description" : "User name",
44660702
DM
22612 "maxLength" : 64,
22613 "type" : "string"
56122987 22614 }
44660702 22615 }
7aacca6f 22616 },
56122987 22617 "permissions" : {
44660702 22618 "description" : "You need to pass valid credientials.",
56122987
DM
22619 "user" : "world"
22620 },
44660702 22621 "protected" : 1,
7aacca6f 22622 "returns" : {
56122987 22623 "properties" : {
44660702
DM
22624 "CSRFPreventionToken" : {
22625 "optional" : 1,
22626 "type" : "string"
56122987 22627 },
44660702
DM
22628 "ticket" : {
22629 "optional" : 1,
22630 "type" : "string"
22631 },
22632 "username" : {
56122987
DM
22633 "type" : "string"
22634 }
22635 },
44660702 22636 "type" : "object"
7aacca6f 22637 }
7aacca6f
DM
22638 }
22639 },
44660702
DM
22640 "leaf" : 1,
22641 "path" : "/access/ticket",
22642 "text" : "ticket"
7aacca6f 22643 },
56122987 22644 {
56122987 22645 "info" : {
7aacca6f 22646 "PUT" : {
44660702 22647 "description" : "Change user password.",
7aacca6f 22648 "method" : "PUT",
44660702 22649 "name" : "change_passsword",
56122987
DM
22650 "parameters" : {
22651 "additionalProperties" : 0,
22652 "properties" : {
44660702
DM
22653 "password" : {
22654 "description" : "The new password.",
22655 "maxLength" : 64,
22656 "minLength" : 5,
22657 "type" : "string"
7aacca6f 22658 },
44660702
DM
22659 "userid" : {
22660 "description" : "User ID",
22661 "format" : "pve-userid",
22662 "maxLength" : 64,
7aacca6f 22663 "type" : "string"
56122987 22664 }
7aacca6f 22665 }
56122987
DM
22666 },
22667 "permissions" : {
22668 "check" : [
44660702 22669 "or",
56122987 22670 [
44660702
DM
22671 "userid-param",
22672 "self"
22673 ],
22674 [
22675 "and",
22676 [
22677 "userid-param",
22678 "Realm.AllocateUser"
22679 ],
22680 [
22681 "userid-group",
22682 [
22683 "User.Modify"
22684 ]
22685 ]
56122987 22686 ]
7aacca6f 22687 ],
44660702 22688 "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 22689 },
44660702 22690 "protected" : 1,
7aacca6f
DM
22691 "returns" : {
22692 "type" : "null"
44660702
DM
22693 }
22694 }
22695 },
22696 "leaf" : 1,
22697 "path" : "/access/password",
22698 "text" : "password"
22699 }
22700 ],
22701 "info" : {
22702 "GET" : {
22703 "description" : "Directory index.",
22704 "method" : "GET",
22705 "name" : "index",
22706 "parameters" : {
22707 "additionalProperties" : 0
22708 },
22709 "permissions" : {
22710 "user" : "all"
22711 },
22712 "returns" : {
22713 "items" : {
22714 "properties" : {
22715 "subdir" : {
22716 "type" : "string"
22717 }
7aacca6f 22718 },
44660702
DM
22719 "type" : "object"
22720 },
22721 "links" : [
22722 {
22723 "href" : "{subdir}",
22724 "rel" : "child"
22725 }
22726 ],
22727 "type" : "array"
22728 }
22729 }
22730 },
22731 "leaf" : 0,
22732 "path" : "/access",
22733 "text" : "access"
22734 },
22735 {
22736 "children" : [
22737 {
22738 "info" : {
22739 "DELETE" : {
7aacca6f 22740 "description" : "Delete pool.",
44660702
DM
22741 "method" : "DELETE",
22742 "name" : "delete_pool",
7aacca6f
DM
22743 "parameters" : {
22744 "additionalProperties" : 0,
22745 "properties" : {
22746 "poolid" : {
22747 "format" : "pve-poolid",
22748 "type" : "string"
22749 }
22750 }
22751 },
56122987
DM
22752 "permissions" : {
22753 "check" : [
22754 "perm",
22755 "/pool/{poolid}",
22756 [
22757 "Pool.Allocate"
22758 ]
44660702
DM
22759 ],
22760 "description" : "You can only delete empty pools (no members)."
22761 },
22762 "protected" : 1,
22763 "returns" : {
22764 "type" : "null"
7aacca6f
DM
22765 }
22766 },
22767 "GET" : {
22768 "description" : "Get pool configuration.",
44660702 22769 "method" : "GET",
7aacca6f 22770 "name" : "read_pool",
56122987 22771 "parameters" : {
44660702 22772 "additionalProperties" : 0,
56122987
DM
22773 "properties" : {
22774 "poolid" : {
44660702
DM
22775 "format" : "pve-poolid",
22776 "type" : "string"
56122987 22777 }
44660702 22778 }
56122987 22779 },
56122987 22780 "permissions" : {
56122987
DM
22781 "check" : [
22782 "perm",
22783 "/pool/{poolid}",
22784 [
22785 "Pool.Allocate"
22786 ]
22787 ]
22788 },
7aacca6f 22789 "returns" : {
44660702 22790 "additionalProperties" : 0,
56122987 22791 "properties" : {
44660702
DM
22792 "comment" : {
22793 "optional" : 1,
22794 "type" : "string"
22795 },
7aacca6f 22796 "members" : {
7aacca6f
DM
22797 "items" : {
22798 "additionalProperties" : 1,
7aacca6f 22799 "properties" : {
7aacca6f
DM
22800 "id" : {
22801 "type" : "string"
22802 },
22803 "node" : {
22804 "type" : "string"
22805 },
44660702
DM
22806 "storage" : {
22807 "optional" : 1,
22808 "type" : "string"
22809 },
7aacca6f 22810 "type" : {
7aacca6f
DM
22811 "enum" : [
22812 "qemu",
22813 "lxc",
22814 "openvz",
22815 "storage"
44660702
DM
22816 ],
22817 "type" : "string"
22818 },
22819 "vmid" : {
22820 "optional" : 1,
22821 "type" : "integer"
7aacca6f 22822 }
44660702
DM
22823 },
22824 "type" : "object"
22825 },
22826 "type" : "array"
22827 }
22828 },
22829 "type" : "object"
22830 }
22831 },
22832 "PUT" : {
22833 "description" : "Update pool data.",
22834 "method" : "PUT",
22835 "name" : "update_pool",
22836 "parameters" : {
22837 "additionalProperties" : 0,
22838 "properties" : {
56122987
DM
22839 "comment" : {
22840 "optional" : 1,
22841 "type" : "string"
44660702
DM
22842 },
22843 "delete" : {
22844 "description" : "Remove vms/storage (instead of adding it).",
22845 "optional" : 1,
22846 "type" : "boolean"
22847 },
22848 "poolid" : {
22849 "format" : "pve-poolid",
22850 "type" : "string"
22851 },
22852 "storage" : {
22853 "description" : "List of storage IDs.",
22854 "format" : "pve-storage-id-list",
22855 "optional" : 1,
22856 "type" : "string"
22857 },
22858 "vms" : {
22859 "description" : "List of virtual machines.",
22860 "format" : "pve-vmid-list",
22861 "optional" : 1,
22862 "type" : "string"
56122987 22863 }
44660702
DM
22864 }
22865 },
22866 "permissions" : {
22867 "check" : [
22868 "perm",
22869 "/pool/{poolid}",
22870 [
22871 "Pool.Allocate"
22872 ]
22873 ],
22874 "description" : "You also need the right to modify permissions on any object you add/delete."
22875 },
22876 "protected" : 1,
22877 "returns" : {
22878 "type" : "null"
56122987
DM
22879 }
22880 }
22881 },
44660702
DM
22882 "leaf" : 1,
22883 "path" : "/pools/{poolid}",
7aacca6f 22884 "text" : "{poolid}"
56122987 22885 }
7aacca6f 22886 ],
56122987
DM
22887 "info" : {
22888 "GET" : {
44660702
DM
22889 "description" : "Pool index.",
22890 "method" : "GET",
22891 "name" : "index",
22892 "parameters" : {
22893 "additionalProperties" : 0
22894 },
22895 "permissions" : {
22896 "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/<pool>.",
22897 "user" : "all"
22898 },
56122987 22899 "returns" : {
44660702
DM
22900 "items" : {
22901 "properties" : {
22902 "poolid" : {
22903 "type" : "string"
22904 }
56122987 22905 },
44660702
DM
22906 "type" : "object"
22907 },
22908 "links" : [
22909 {
22910 "href" : "{poolid}",
22911 "rel" : "child"
22912 }
22913 ],
22914 "type" : "array"
22915 }
22916 },
22917 "POST" : {
22918 "description" : "Create new pool.",
22919 "method" : "POST",
22920 "name" : "create_pool",
22921 "parameters" : {
22922 "additionalProperties" : 0,
22923 "properties" : {
22924 "comment" : {
22925 "optional" : 1,
56122987 22926 "type" : "string"
7aacca6f 22927 },
44660702
DM
22928 "poolid" : {
22929 "format" : "pve-poolid",
7aacca6f 22930 "type" : "string"
56122987
DM
22931 }
22932 }
22933 },
56122987 22934 "permissions" : {
44660702
DM
22935 "check" : [
22936 "perm",
22937 "/pool/{poolid}",
22938 [
22939 "Pool.Allocate"
22940 ]
22941 ]
56122987 22942 },
44660702
DM
22943 "protected" : 1,
22944 "returns" : {
22945 "type" : "null"
22946 }
22947 }
22948 },
22949 "leaf" : 0,
22950 "path" : "/pools",
22951 "text" : "pools"
22952 },
22953 {
22954 "info" : {
22955 "GET" : {
22956 "description" : "API version details. The result also includes the global datacenter confguration.",
22957 "method" : "GET",
22958 "name" : "version",
7aacca6f
DM
22959 "parameters" : {
22960 "additionalProperties" : 0
22961 },
44660702
DM
22962 "permissions" : {
22963 "user" : "all"
22964 },
22965 "returns" : {
22966 "properties" : {
22967 "release" : {
22968 "type" : "string"
22969 },
22970 "repoid" : {
22971 "type" : "string"
22972 },
22973 "version" : {
22974 "type" : "string"
22975 }
22976 },
22977 "type" : "object"
22978 }
56122987
DM
22979 }
22980 },
44660702
DM
22981 "leaf" : 1,
22982 "path" : "/version",
56122987
DM
22983 "text" : "version"
22984 }
22985]
22986;
22987