]> git.proxmox.com Git - pve-docs.git/blame - api-viewer/apidata.js
bump package versions
[pve-docs.git] / api-viewer / apidata.js
CommitLineData
56122987
DM
1var pveapi = [
2 {
56122987
DM
3 "children" : [
4 {
56122987
DM
5 "children" : [
6 {
56122987
DM
7 "children" : [
8 {
44660702
DM
9 "children" : [
10 {
11 "info" : {
12 "DELETE" : {
13 "description" : "Delete rule.",
14 "method" : "DELETE",
15 "name" : "delete_rule",
16 "parameters" : {
17 "additionalProperties" : 0,
18 "properties" : {
19 "digest" : {
20 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
21 "maxLength" : 40,
22 "optional" : 1,
23 "type" : "string"
24 },
25 "group" : {
26 "description" : "Security Group name.",
27 "maxLength" : 20,
28 "minLength" : 2,
29 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
30 "type" : "string"
31 },
32 "pos" : {
33 "description" : "Update rule at position <pos>.",
34 "minimum" : 0,
35 "optional" : 1,
36 "type" : "integer"
37 }
38 }
39 },
40 "permissions" : {
41 "check" : [
42 "perm",
43 "/",
44 [
45 "Sys.Modify"
46 ]
47 ]
48 },
49 "protected" : 1,
50 "proxyto" : null,
51 "returns" : {
52 "type" : "null"
7aacca6f
DM
53 }
54 },
44660702
DM
55 "GET" : {
56 "description" : "Get single rule data.",
57 "method" : "GET",
58 "name" : "get_rule",
59 "parameters" : {
60 "additionalProperties" : 0,
61 "properties" : {
62 "group" : {
63 "description" : "Security Group name.",
64 "maxLength" : 20,
65 "minLength" : 2,
66 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
67 "type" : "string"
68 },
69 "pos" : {
70 "description" : "Update rule at position <pos>.",
71 "minimum" : 0,
72 "optional" : 1,
73 "type" : "integer"
74 }
7aacca6f 75 }
56122987 76 },
44660702
DM
77 "permissions" : {
78 "check" : [
79 "perm",
80 "/",
81 [
82 "Sys.Audit"
83 ]
84 ]
85 },
86 "proxyto" : null,
87 "returns" : {
88 "properties" : {
89 "pos" : {
90 "type" : "integer"
91 }
92 },
93 "type" : "object"
56122987 94 }
44660702 95 },
7aacca6f 96 "PUT" : {
44660702
DM
97 "description" : "Modify rule data.",
98 "method" : "PUT",
99 "name" : "update_rule",
7aacca6f
DM
100 "parameters" : {
101 "additionalProperties" : 0,
102 "properties" : {
44660702
DM
103 "action" : {
104 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 105 "maxLength" : 20,
44660702 106 "minLength" : 2,
7aacca6f 107 "optional" : 1,
44660702 108 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
109 "type" : "string"
110 },
44660702 111 "comment" : {
7aacca6f 112 "optional" : 1,
44660702 113 "type" : "string"
7aacca6f 114 },
44660702
DM
115 "delete" : {
116 "description" : "A list of settings you want to delete.",
117 "format" : "pve-configid-list",
7aacca6f 118 "optional" : 1,
44660702 119 "type" : "string"
7aacca6f 120 },
44660702
DM
121 "dest" : {
122 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
123 "format" : "pve-fw-addr-spec",
7aacca6f 124 "optional" : 1,
44660702 125 "type" : "string"
7aacca6f
DM
126 },
127 "digest" : {
128 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 129 "maxLength" : 40,
7aacca6f 130 "optional" : 1,
44660702 131 "type" : "string"
7aacca6f 132 },
44660702
DM
133 "dport" : {
134 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
135 "format" : "pve-fw-dport-spec",
7aacca6f 136 "optional" : 1,
44660702 137 "type" : "string"
7aacca6f 138 },
44660702
DM
139 "enable" : {
140 "minimum" : 0,
7aacca6f 141 "optional" : 1,
44660702 142 "type" : "integer"
7aacca6f 143 },
44660702
DM
144 "group" : {
145 "description" : "Security Group name.",
146 "maxLength" : 20,
147 "minLength" : 2,
148 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
149 "type" : "string"
150 },
151 "iface" : {
152 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
153 "format" : "pve-iface",
154 "maxLength" : 20,
155 "minLength" : 2,
7aacca6f 156 "optional" : 1,
44660702 157 "type" : "string"
7aacca6f 158 },
44660702
DM
159 "macro" : {
160 "maxLength" : 128,
161 "optional" : 1,
162 "type" : "string"
7aacca6f
DM
163 },
164 "moveto" : {
165 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
44660702 166 "minimum" : 0,
7aacca6f 167 "optional" : 1,
44660702 168 "type" : "integer"
7aacca6f 169 },
44660702
DM
170 "pos" : {
171 "description" : "Update rule at position <pos>.",
172 "minimum" : 0,
173 "optional" : 1,
174 "type" : "integer"
7aacca6f 175 },
44660702
DM
176 "proto" : {
177 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
178 "format" : "pve-fw-protocol-spec",
7aacca6f 179 "optional" : 1,
44660702
DM
180 "type" : "string"
181 },
182 "source" : {
183 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
184 "format" : "pve-fw-addr-spec",
185 "optional" : 1,
186 "type" : "string"
187 },
188 "sport" : {
189 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
190 "format" : "pve-fw-sport-spec",
191 "optional" : 1,
192 "type" : "string"
7aacca6f
DM
193 },
194 "type" : {
195 "enum" : [
196 "in",
197 "out",
198 "group"
199 ],
200 "optional" : 1,
201 "type" : "string"
202 }
203 }
204 },
7aacca6f
DM
205 "permissions" : {
206 "check" : [
207 "perm",
208 "/",
209 [
210 "Sys.Modify"
211 ]
212 ]
213 },
44660702 214 "protected" : 1,
7aacca6f
DM
215 "proxyto" : null,
216 "returns" : {
217 "type" : "null"
218 }
7aacca6f
DM
219 }
220 },
44660702 221 "leaf" : 1,
7aacca6f 222 "path" : "/cluster/firewall/groups/{group}/{pos}",
44660702 223 "text" : "{pos}"
7aacca6f
DM
224 }
225 ],
44660702
DM
226 "info" : {
227 "DELETE" : {
228 "description" : "Delete security group.",
229 "method" : "DELETE",
230 "name" : "delete_security_group",
231 "parameters" : {
232 "additionalProperties" : 0,
233 "properties" : {
234 "group" : {
235 "description" : "Security Group name.",
236 "maxLength" : 20,
237 "minLength" : 2,
238 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
239 "type" : "string"
240 }
56122987 241 }
7aacca6f 242 },
44660702
DM
243 "permissions" : {
244 "check" : [
245 "perm",
246 "/",
247 [
248 "Sys.Modify"
249 ]
7aacca6f 250 ]
56122987 251 },
44660702
DM
252 "protected" : 1,
253 "returns" : {
254 "type" : "null"
56122987 255 }
7aacca6f 256 },
7aacca6f 257 "GET" : {
44660702 258 "description" : "List rules.",
7aacca6f 259 "method" : "GET",
44660702
DM
260 "name" : "get_rules",
261 "parameters" : {
262 "additionalProperties" : 0,
7aacca6f 263 "properties" : {
44660702
DM
264 "group" : {
265 "description" : "Security Group name.",
266 "maxLength" : 20,
267 "minLength" : 2,
268 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
269 "type" : "string"
7aacca6f 270 }
44660702 271 }
7aacca6f
DM
272 },
273 "permissions" : {
274 "check" : [
275 "perm",
276 "/",
277 [
278 "Sys.Audit"
279 ]
280 ]
281 },
44660702
DM
282 "proxyto" : null,
283 "returns" : {
284 "items" : {
285 "properties" : {
286 "pos" : {
287 "type" : "integer"
288 }
289 },
290 "type" : "object"
291 },
292 "links" : [
293 {
294 "href" : "{pos}",
295 "rel" : "child"
296 }
297 ],
298 "type" : "array"
299 }
300 },
301 "POST" : {
302 "description" : "Create new rule.",
303 "method" : "POST",
304 "name" : "create_rule",
7aacca6f
DM
305 "parameters" : {
306 "additionalProperties" : 0,
307 "properties" : {
44660702
DM
308 "action" : {
309 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
310 "maxLength" : 20,
56122987 311 "minLength" : 2,
44660702
DM
312 "optional" : 0,
313 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 314 "type" : "string"
56122987 315 },
44660702 316 "comment" : {
56122987 317 "optional" : 1,
7aacca6f 318 "type" : "string"
56122987 319 },
44660702
DM
320 "dest" : {
321 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
56122987
DM
322 "format" : "pve-fw-addr-spec",
323 "optional" : 1,
44660702 324 "type" : "string"
56122987 325 },
44660702
DM
326 "digest" : {
327 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
328 "maxLength" : 40,
7aacca6f 329 "optional" : 1,
44660702 330 "type" : "string"
56122987 331 },
44660702
DM
332 "dport" : {
333 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
334 "format" : "pve-fw-dport-spec",
56122987 335 "optional" : 1,
44660702 336 "type" : "string"
56122987 337 },
7aacca6f 338 "enable" : {
44660702 339 "minimum" : 0,
7aacca6f 340 "optional" : 1,
44660702 341 "type" : "integer"
56122987 342 },
44660702
DM
343 "group" : {
344 "description" : "Security Group name.",
345 "maxLength" : 20,
346 "minLength" : 2,
7aacca6f 347 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702
DM
348 "type" : "string"
349 },
350 "iface" : {
351 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
352 "format" : "pve-iface",
353 "maxLength" : 20,
7aacca6f 354 "minLength" : 2,
44660702
DM
355 "optional" : 1,
356 "type" : "string"
56122987 357 },
7aacca6f 358 "macro" : {
44660702 359 "maxLength" : 128,
7aacca6f 360 "optional" : 1,
44660702 361 "type" : "string"
7aacca6f
DM
362 },
363 "pos" : {
364 "description" : "Update rule at position <pos>.",
44660702 365 "minimum" : 0,
56122987 366 "optional" : 1,
44660702 367 "type" : "integer"
7aacca6f
DM
368 },
369 "proto" : {
370 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
44660702 371 "format" : "pve-fw-protocol-spec",
7aacca6f 372 "optional" : 1,
44660702
DM
373 "type" : "string"
374 },
375 "source" : {
376 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
377 "format" : "pve-fw-addr-spec",
378 "optional" : 1,
379 "type" : "string"
380 },
381 "sport" : {
382 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
383 "format" : "pve-fw-sport-spec",
384 "optional" : 1,
385 "type" : "string"
386 },
387 "type" : {
388 "enum" : [
389 "in",
390 "out",
391 "group"
392 ],
393 "optional" : 0,
394 "type" : "string"
56122987 395 }
44660702 396 }
56122987 397 },
56122987
DM
398 "permissions" : {
399 "check" : [
400 "perm",
401 "/",
402 [
403 "Sys.Modify"
404 ]
405 ]
406 },
44660702
DM
407 "protected" : 1,
408 "proxyto" : null,
56122987
DM
409 "returns" : {
410 "type" : "null"
7aacca6f 411 }
44660702
DM
412 }
413 },
414 "leaf" : 0,
415 "path" : "/cluster/firewall/groups/{group}",
416 "text" : "{group}"
417 }
418 ],
419 "info" : {
420 "GET" : {
421 "description" : "List security groups.",
422 "method" : "GET",
423 "name" : "list_security_groups",
424 "parameters" : {
425 "additionalProperties" : 0
426 },
427 "permissions" : {
428 "user" : "all"
429 },
430 "returns" : {
431 "items" : {
432 "properties" : {
433 "comment" : {
434 "optional" : 1,
435 "type" : "string"
436 },
437 "digest" : {
438 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
439 "maxLength" : 40,
440 "optional" : 0,
441 "type" : "string"
442 },
443 "group" : {
444 "description" : "Security Group name.",
445 "maxLength" : 20,
446 "minLength" : 2,
447 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
448 "type" : "string"
449 }
450 },
451 "type" : "object"
56122987 452 },
44660702
DM
453 "links" : [
454 {
455 "href" : "{group}",
456 "rel" : "child"
457 }
458 ],
459 "type" : "array"
460 }
461 },
462 "POST" : {
463 "description" : "Create new security group.",
464 "method" : "POST",
465 "name" : "create_security_group",
466 "parameters" : {
467 "additionalProperties" : 0,
468 "properties" : {
469 "comment" : {
470 "optional" : 1,
471 "type" : "string"
472 },
473 "digest" : {
474 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
475 "maxLength" : 40,
476 "optional" : 1,
477 "type" : "string"
478 },
479 "group" : {
480 "description" : "Security Group name.",
481 "maxLength" : 20,
482 "minLength" : 2,
483 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
484 "type" : "string"
485 },
486 "rename" : {
487 "description" : "Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.",
488 "maxLength" : 20,
489 "minLength" : 2,
490 "optional" : 1,
491 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
492 "type" : "string"
493 }
494 }
495 },
496 "permissions" : {
497 "check" : [
498 "perm",
499 "/",
500 [
501 "Sys.Modify"
502 ]
503 ]
504 },
505 "protected" : 1,
506 "returns" : {
507 "type" : "null"
508 }
509 }
510 },
511 "leaf" : 0,
512 "path" : "/cluster/firewall/groups",
513 "text" : "groups"
514 },
515 {
516 "children" : [
517 {
518 "info" : {
7aacca6f 519 "DELETE" : {
44660702
DM
520 "description" : "Delete rule.",
521 "method" : "DELETE",
522 "name" : "delete_rule",
523 "parameters" : {
524 "additionalProperties" : 0,
525 "properties" : {
526 "digest" : {
527 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
528 "maxLength" : 40,
529 "optional" : 1,
530 "type" : "string"
531 },
532 "pos" : {
533 "description" : "Update rule at position <pos>.",
534 "minimum" : 0,
535 "optional" : 1,
536 "type" : "integer"
537 }
538 }
539 },
56122987
DM
540 "permissions" : {
541 "check" : [
542 "perm",
543 "/",
544 [
7aacca6f 545 "Sys.Modify"
56122987
DM
546 ]
547 ]
548 },
44660702 549 "protected" : 1,
56122987
DM
550 "proxyto" : null,
551 "returns" : {
7aacca6f 552 "type" : "null"
44660702
DM
553 }
554 },
555 "GET" : {
556 "description" : "Get single rule data.",
557 "method" : "GET",
558 "name" : "get_rule",
56122987
DM
559 "parameters" : {
560 "additionalProperties" : 0,
561 "properties" : {
562 "pos" : {
7aacca6f 563 "description" : "Update rule at position <pos>.",
44660702 564 "minimum" : 0,
56122987 565 "optional" : 1,
44660702 566 "type" : "integer"
7aacca6f
DM
567 }
568 }
569 },
7aacca6f
DM
570 "permissions" : {
571 "check" : [
572 "perm",
573 "/",
574 [
575 "Sys.Audit"
576 ]
577 ]
56122987 578 },
44660702
DM
579 "proxyto" : null,
580 "returns" : {
7aacca6f 581 "properties" : {
44660702
DM
582 "pos" : {
583 "type" : "integer"
7aacca6f 584 }
44660702
DM
585 },
586 "type" : "object"
587 }
56122987 588 },
44660702
DM
589 "PUT" : {
590 "description" : "Modify rule data.",
591 "method" : "PUT",
592 "name" : "update_rule",
7aacca6f
DM
593 "parameters" : {
594 "additionalProperties" : 0,
595 "properties" : {
44660702
DM
596 "action" : {
597 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
598 "maxLength" : 20,
599 "minLength" : 2,
600 "optional" : 1,
601 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
602 "type" : "string"
7aacca6f 603 },
44660702
DM
604 "comment" : {
605 "optional" : 1,
606 "type" : "string"
7aacca6f 607 },
44660702
DM
608 "delete" : {
609 "description" : "A list of settings you want to delete.",
610 "format" : "pve-configid-list",
611 "optional" : 1,
612 "type" : "string"
613 },
614 "dest" : {
615 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
616 "format" : "pve-fw-addr-spec",
617 "optional" : 1,
618 "type" : "string"
619 },
620 "digest" : {
621 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
622 "maxLength" : 40,
623 "optional" : 1,
624 "type" : "string"
625 },
626 "dport" : {
627 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
628 "format" : "pve-fw-dport-spec",
629 "optional" : 1,
630 "type" : "string"
631 },
632 "enable" : {
633 "minimum" : 0,
634 "optional" : 1,
635 "type" : "integer"
636 },
637 "iface" : {
638 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
639 "format" : "pve-iface",
640 "maxLength" : 20,
7aacca6f 641 "minLength" : 2,
44660702
DM
642 "optional" : 1,
643 "type" : "string"
7aacca6f 644 },
44660702
DM
645 "macro" : {
646 "maxLength" : 128,
647 "optional" : 1,
648 "type" : "string"
649 },
650 "moveto" : {
651 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
652 "minimum" : 0,
653 "optional" : 1,
654 "type" : "integer"
655 },
656 "pos" : {
657 "description" : "Update rule at position <pos>.",
658 "minimum" : 0,
659 "optional" : 1,
660 "type" : "integer"
661 },
662 "proto" : {
663 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
664 "format" : "pve-fw-protocol-spec",
665 "optional" : 1,
666 "type" : "string"
667 },
668 "source" : {
669 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
670 "format" : "pve-fw-addr-spec",
671 "optional" : 1,
672 "type" : "string"
673 },
674 "sport" : {
675 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
676 "format" : "pve-fw-sport-spec",
677 "optional" : 1,
678 "type" : "string"
679 },
680 "type" : {
681 "enum" : [
682 "in",
683 "out",
684 "group"
685 ],
686 "optional" : 1,
687 "type" : "string"
7aacca6f 688 }
56122987
DM
689 }
690 },
7aacca6f
DM
691 "permissions" : {
692 "check" : [
693 "perm",
694 "/",
695 [
696 "Sys.Modify"
697 ]
698 ]
699 },
44660702
DM
700 "protected" : 1,
701 "proxyto" : null,
702 "returns" : {
703 "type" : "null"
704 }
7aacca6f 705 }
56122987 706 },
44660702
DM
707 "leaf" : 1,
708 "path" : "/cluster/firewall/rules/{pos}",
709 "text" : "{pos}"
7aacca6f
DM
710 }
711 ],
7aacca6f 712 "info" : {
44660702
DM
713 "GET" : {
714 "description" : "List rules.",
715 "method" : "GET",
716 "name" : "get_rules",
7aacca6f 717 "parameters" : {
44660702 718 "additionalProperties" : 0
7aacca6f
DM
719 },
720 "permissions" : {
721 "check" : [
722 "perm",
723 "/",
724 [
44660702 725 "Sys.Audit"
7aacca6f
DM
726 ]
727 ]
728 },
44660702 729 "proxyto" : null,
7aacca6f 730 "returns" : {
7aacca6f
DM
731 "items" : {
732 "properties" : {
44660702
DM
733 "pos" : {
734 "type" : "integer"
7aacca6f
DM
735 }
736 },
737 "type" : "object"
56122987 738 },
7aacca6f
DM
739 "links" : [
740 {
44660702 741 "href" : "{pos}",
7aacca6f
DM
742 "rel" : "child"
743 }
44660702
DM
744 ],
745 "type" : "array"
7aacca6f 746 }
44660702 747 },
7aacca6f 748 "POST" : {
44660702 749 "description" : "Create new rule.",
7aacca6f 750 "method" : "POST",
44660702 751 "name" : "create_rule",
7aacca6f
DM
752 "parameters" : {
753 "additionalProperties" : 0,
754 "properties" : {
44660702
DM
755 "action" : {
756 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
757 "maxLength" : 20,
7aacca6f 758 "minLength" : 2,
44660702
DM
759 "optional" : 0,
760 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
761 "type" : "string"
7aacca6f
DM
762 },
763 "comment" : {
764 "optional" : 1,
765 "type" : "string"
44660702
DM
766 },
767 "dest" : {
768 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
769 "format" : "pve-fw-addr-spec",
770 "optional" : 1,
771 "type" : "string"
772 },
773 "digest" : {
774 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
775 "maxLength" : 40,
776 "optional" : 1,
777 "type" : "string"
778 },
779 "dport" : {
780 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
781 "format" : "pve-fw-dport-spec",
782 "optional" : 1,
783 "type" : "string"
784 },
785 "enable" : {
786 "minimum" : 0,
787 "optional" : 1,
788 "type" : "integer"
789 },
790 "iface" : {
791 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
792 "format" : "pve-iface",
793 "maxLength" : 20,
794 "minLength" : 2,
795 "optional" : 1,
796 "type" : "string"
797 },
798 "macro" : {
799 "maxLength" : 128,
800 "optional" : 1,
801 "type" : "string"
802 },
803 "pos" : {
804 "description" : "Update rule at position <pos>.",
805 "minimum" : 0,
806 "optional" : 1,
807 "type" : "integer"
808 },
809 "proto" : {
810 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
811 "format" : "pve-fw-protocol-spec",
812 "optional" : 1,
813 "type" : "string"
814 },
815 "source" : {
816 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
817 "format" : "pve-fw-addr-spec",
818 "optional" : 1,
819 "type" : "string"
820 },
821 "sport" : {
822 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
823 "format" : "pve-fw-sport-spec",
824 "optional" : 1,
825 "type" : "string"
826 },
827 "type" : {
828 "enum" : [
829 "in",
830 "out",
831 "group"
832 ],
833 "optional" : 0,
834 "type" : "string"
7aacca6f
DM
835 }
836 }
837 },
838 "permissions" : {
839 "check" : [
840 "perm",
841 "/",
842 [
843 "Sys.Modify"
844 ]
845 ]
846 },
44660702
DM
847 "protected" : 1,
848 "proxyto" : null,
7aacca6f 849 "returns" : {
44660702
DM
850 "type" : "null"
851 }
852 }
853 },
854 "leaf" : 0,
855 "path" : "/cluster/firewall/rules",
856 "text" : "rules"
857 },
858 {
859 "children" : [
860 {
861 "children" : [
862 {
863 "info" : {
864 "DELETE" : {
865 "description" : "Remove IP or Network from IPSet.",
866 "method" : "DELETE",
867 "name" : "remove_ip",
868 "parameters" : {
869 "additionalProperties" : 0,
870 "properties" : {
871 "cidr" : {
872 "description" : "Network/IP specification in CIDR format.",
873 "format" : "IPorCIDRorAlias",
874 "type" : "string"
875 },
876 "digest" : {
877 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
878 "maxLength" : 40,
879 "optional" : 1,
880 "type" : "string"
881 },
882 "name" : {
883 "description" : "IP set name.",
884 "maxLength" : 64,
885 "minLength" : 2,
886 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
887 "type" : "string"
888 }
889 }
890 },
891 "permissions" : {
892 "check" : [
893 "perm",
894 "/",
895 [
896 "Sys.Modify"
897 ]
898 ]
899 },
900 "protected" : 1,
901 "returns" : {
902 "type" : "null"
903 }
7aacca6f 904 },
44660702
DM
905 "GET" : {
906 "description" : "Read IP or Network settings from IPSet.",
907 "method" : "GET",
908 "name" : "read_ip",
909 "parameters" : {
910 "additionalProperties" : 0,
911 "properties" : {
912 "cidr" : {
913 "description" : "Network/IP specification in CIDR format.",
914 "format" : "IPorCIDRorAlias",
915 "type" : "string"
916 },
917 "name" : {
918 "description" : "IP set name.",
919 "maxLength" : 64,
920 "minLength" : 2,
921 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
922 "type" : "string"
923 }
924 }
925 },
926 "permissions" : {
927 "check" : [
928 "perm",
929 "/",
930 [
931 "Sys.Audit"
932 ]
933 ]
934 },
935 "protected" : 1,
936 "returns" : {
937 "type" : "object"
938 }
7aacca6f 939 },
44660702
DM
940 "PUT" : {
941 "description" : "Update IP or Network settings",
942 "method" : "PUT",
943 "name" : "update_ip",
944 "parameters" : {
945 "additionalProperties" : 0,
946 "properties" : {
947 "cidr" : {
948 "description" : "Network/IP specification in CIDR format.",
949 "format" : "IPorCIDRorAlias",
950 "type" : "string"
951 },
952 "comment" : {
953 "optional" : 1,
954 "type" : "string"
955 },
956 "digest" : {
957 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
958 "maxLength" : 40,
959 "optional" : 1,
960 "type" : "string"
961 },
962 "name" : {
963 "description" : "IP set name.",
964 "maxLength" : 64,
965 "minLength" : 2,
966 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
967 "type" : "string"
968 },
969 "nomatch" : {
970 "optional" : 1,
971 "type" : "boolean"
972 }
973 }
974 },
975 "permissions" : {
976 "check" : [
977 "perm",
978 "/",
979 [
980 "Sys.Modify"
981 ]
982 ]
983 },
984 "protected" : 1,
985 "returns" : {
986 "type" : "null"
987 }
7aacca6f
DM
988 }
989 },
44660702
DM
990 "leaf" : 1,
991 "path" : "/cluster/firewall/ipset/{name}/{cidr}",
992 "text" : "{cidr}"
7aacca6f 993 }
44660702 994 ],
7aacca6f
DM
995 "info" : {
996 "DELETE" : {
44660702
DM
997 "description" : "Delete IPSet",
998 "method" : "DELETE",
999 "name" : "delete_ipset",
56122987 1000 "parameters" : {
44660702 1001 "additionalProperties" : 0,
56122987
DM
1002 "properties" : {
1003 "name" : {
44660702 1004 "description" : "IP set name.",
56122987 1005 "maxLength" : 64,
44660702 1006 "minLength" : 2,
56122987 1007 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 1008 "type" : "string"
56122987 1009 }
44660702 1010 }
7aacca6f 1011 },
56122987
DM
1012 "permissions" : {
1013 "check" : [
1014 "perm",
1015 "/",
1016 [
1017 "Sys.Modify"
1018 ]
1019 ]
1020 },
7aacca6f
DM
1021 "protected" : 1,
1022 "returns" : {
1023 "type" : "null"
44660702 1024 }
7aacca6f 1025 },
44660702
DM
1026 "GET" : {
1027 "description" : "List IPSet content",
1028 "method" : "GET",
1029 "name" : "get_ipset",
56122987
DM
1030 "parameters" : {
1031 "additionalProperties" : 0,
1032 "properties" : {
7aacca6f 1033 "name" : {
44660702 1034 "description" : "IP set name.",
7aacca6f 1035 "maxLength" : 64,
7aacca6f 1036 "minLength" : 2,
44660702 1037 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 1038 "type" : "string"
56122987 1039 }
7aacca6f 1040 }
56122987 1041 },
56122987
DM
1042 "permissions" : {
1043 "check" : [
1044 "perm",
1045 "/",
1046 [
44660702 1047 "Sys.Audit"
56122987
DM
1048 ]
1049 ]
44660702
DM
1050 },
1051 "returns" : {
1052 "items" : {
1053 "properties" : {
1054 "cidr" : {
1055 "type" : "string"
1056 },
1057 "comment" : {
1058 "optional" : 1,
1059 "type" : "string"
1060 },
1061 "digest" : {
1062 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1063 "maxLength" : 40,
1064 "optional" : 0,
1065 "type" : "string"
1066 },
1067 "nomatch" : {
1068 "optional" : 1,
1069 "type" : "boolean"
1070 }
1071 },
1072 "type" : "object"
1073 },
1074 "links" : [
1075 {
1076 "href" : "{cidr}",
1077 "rel" : "child"
1078 }
1079 ],
1080 "type" : "array"
7aacca6f
DM
1081 }
1082 },
44660702
DM
1083 "POST" : {
1084 "description" : "Add IP or Network to IPSet.",
1085 "method" : "POST",
1086 "name" : "create_ip",
56122987
DM
1087 "parameters" : {
1088 "additionalProperties" : 0,
1089 "properties" : {
44660702
DM
1090 "cidr" : {
1091 "description" : "Network/IP specification in CIDR format.",
1092 "format" : "IPorCIDRorAlias",
1093 "type" : "string"
1094 },
1095 "comment" : {
1096 "optional" : 1,
1097 "type" : "string"
1098 },
1099 "name" : {
1100 "description" : "IP set name.",
1101 "maxLength" : 64,
1102 "minLength" : 2,
1103 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1104 "type" : "string"
1105 },
1106 "nomatch" : {
1107 "optional" : 1,
1108 "type" : "boolean"
56122987
DM
1109 }
1110 }
1111 },
56122987
DM
1112 "permissions" : {
1113 "check" : [
1114 "perm",
1115 "/",
1116 [
44660702 1117 "Sys.Modify"
56122987
DM
1118 ]
1119 ]
1120 },
44660702 1121 "protected" : 1,
56122987 1122 "returns" : {
44660702
DM
1123 "type" : "null"
1124 }
56122987
DM
1125 }
1126 },
44660702
DM
1127 "leaf" : 0,
1128 "path" : "/cluster/firewall/ipset/{name}",
1129 "text" : "{name}"
56122987
DM
1130 }
1131 ],
56122987 1132 "info" : {
44660702
DM
1133 "GET" : {
1134 "description" : "List IPSets",
1135 "method" : "GET",
1136 "name" : "ipset_index",
56122987 1137 "parameters" : {
7aacca6f 1138 "additionalProperties" : 0
56122987 1139 },
56122987
DM
1140 "permissions" : {
1141 "check" : [
1142 "perm",
1143 "/",
1144 [
7aacca6f 1145 "Sys.Audit"
56122987
DM
1146 ]
1147 ]
1148 },
56122987
DM
1149 "returns" : {
1150 "items" : {
1151 "properties" : {
44660702
DM
1152 "comment" : {
1153 "optional" : 1,
1154 "type" : "string"
56122987 1155 },
44660702
DM
1156 "digest" : {
1157 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1158 "maxLength" : 40,
1159 "optional" : 0,
1160 "type" : "string"
1161 },
1162 "name" : {
1163 "description" : "IP set name.",
1164 "maxLength" : 64,
1165 "minLength" : 2,
1166 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 1167 "type" : "string"
56122987
DM
1168 }
1169 },
1170 "type" : "object"
44660702
DM
1171 },
1172 "links" : [
1173 {
1174 "href" : "{name}",
1175 "rel" : "child"
1176 }
1177 ],
1178 "type" : "array"
56122987 1179 }
44660702
DM
1180 },
1181 "POST" : {
1182 "description" : "Create new IPSet",
1183 "method" : "POST",
1184 "name" : "create_ipset",
7aacca6f
DM
1185 "parameters" : {
1186 "additionalProperties" : 0,
1187 "properties" : {
44660702
DM
1188 "comment" : {
1189 "optional" : 1,
1190 "type" : "string"
1191 },
1192 "digest" : {
1193 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1194 "maxLength" : 40,
1195 "optional" : 1,
1196 "type" : "string"
1197 },
1198 "name" : {
1199 "description" : "IP set name.",
1200 "maxLength" : 64,
1201 "minLength" : 2,
1202 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1203 "type" : "string"
1204 },
1205 "rename" : {
1206 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
1207 "maxLength" : 64,
1208 "minLength" : 2,
1209 "optional" : 1,
1210 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1211 "type" : "string"
7aacca6f
DM
1212 }
1213 }
1214 },
56122987
DM
1215 "permissions" : {
1216 "check" : [
1217 "perm",
1218 "/",
1219 [
44660702 1220 "Sys.Modify"
56122987
DM
1221 ]
1222 ]
1223 },
44660702 1224 "protected" : 1,
56122987 1225 "returns" : {
44660702
DM
1226 "type" : "null"
1227 }
56122987 1228 }
7aacca6f 1229 },
44660702
DM
1230 "leaf" : 0,
1231 "path" : "/cluster/firewall/ipset",
1232 "text" : "ipset"
1233 },
56122987 1234 {
44660702
DM
1235 "children" : [
1236 {
1237 "info" : {
1238 "DELETE" : {
1239 "description" : "Remove IP or Network alias.",
1240 "method" : "DELETE",
1241 "name" : "remove_alias",
1242 "parameters" : {
1243 "additionalProperties" : 0,
1244 "properties" : {
1245 "digest" : {
1246 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1247 "maxLength" : 40,
1248 "optional" : 1,
1249 "type" : "string"
1250 },
1251 "name" : {
1252 "description" : "Alias name.",
1253 "maxLength" : 64,
1254 "minLength" : 2,
1255 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1256 "type" : "string"
1257 }
1258 }
1259 },
1260 "permissions" : {
1261 "check" : [
1262 "perm",
1263 "/",
1264 [
1265 "Sys.Modify"
1266 ]
1267 ]
1268 },
1269 "protected" : 1,
1270 "returns" : {
1271 "type" : "null"
1272 }
1273 },
1274 "GET" : {
1275 "description" : "Read alias.",
1276 "method" : "GET",
1277 "name" : "read_alias",
1278 "parameters" : {
1279 "additionalProperties" : 0,
1280 "properties" : {
1281 "name" : {
1282 "description" : "Alias name.",
1283 "maxLength" : 64,
1284 "minLength" : 2,
1285 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1286 "type" : "string"
1287 }
1288 }
1289 },
1290 "permissions" : {
1291 "check" : [
1292 "perm",
1293 "/",
1294 [
1295 "Sys.Audit"
1296 ]
1297 ]
1298 },
1299 "returns" : {
1300 "type" : "object"
1301 }
1302 },
1303 "PUT" : {
1304 "description" : "Update IP or Network alias.",
1305 "method" : "PUT",
1306 "name" : "update_alias",
1307 "parameters" : {
1308 "additionalProperties" : 0,
1309 "properties" : {
1310 "cidr" : {
1311 "description" : "Network/IP specification in CIDR format.",
1312 "format" : "IPorCIDR",
1313 "type" : "string"
1314 },
1315 "comment" : {
1316 "optional" : 1,
1317 "type" : "string"
1318 },
1319 "digest" : {
1320 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1321 "maxLength" : 40,
1322 "optional" : 1,
1323 "type" : "string"
1324 },
1325 "name" : {
1326 "description" : "Alias name.",
1327 "maxLength" : 64,
1328 "minLength" : 2,
1329 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1330 "type" : "string"
1331 },
1332 "rename" : {
1333 "description" : "Rename an existing alias.",
1334 "maxLength" : 64,
1335 "minLength" : 2,
1336 "optional" : 1,
1337 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1338 "type" : "string"
1339 }
1340 }
1341 },
1342 "permissions" : {
1343 "check" : [
1344 "perm",
1345 "/",
1346 [
1347 "Sys.Modify"
1348 ]
1349 ]
1350 },
1351 "protected" : 1,
1352 "returns" : {
1353 "type" : "null"
1354 }
1355 }
1356 },
1357 "leaf" : 1,
1358 "path" : "/cluster/firewall/aliases/{name}",
1359 "text" : "{name}"
1360 }
1361 ],
1362 "info" : {
1363 "GET" : {
1364 "description" : "List aliases",
1365 "method" : "GET",
1366 "name" : "get_aliases",
1367 "parameters" : {
1368 "additionalProperties" : 0
1369 },
1370 "permissions" : {
1371 "check" : [
1372 "perm",
1373 "/",
1374 [
1375 "Sys.Audit"
1376 ]
1377 ]
1378 },
1379 "returns" : {
1380 "items" : {
1381 "properties" : {
1382 "cidr" : {
1383 "type" : "string"
1384 },
1385 "comment" : {
1386 "optional" : 1,
1387 "type" : "string"
1388 },
1389 "digest" : {
1390 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1391 "maxLength" : 40,
1392 "optional" : 0,
1393 "type" : "string"
1394 },
1395 "name" : {
1396 "type" : "string"
1397 }
1398 },
1399 "type" : "object"
1400 },
1401 "links" : [
1402 {
1403 "href" : "{name}",
1404 "rel" : "child"
1405 }
1406 ],
1407 "type" : "array"
1408 }
1409 },
1410 "POST" : {
1411 "description" : "Create IP or Network Alias.",
1412 "method" : "POST",
1413 "name" : "create_alias",
56122987
DM
1414 "parameters" : {
1415 "additionalProperties" : 0,
1416 "properties" : {
44660702
DM
1417 "cidr" : {
1418 "description" : "Network/IP specification in CIDR format.",
1419 "format" : "IPorCIDR",
1420 "type" : "string"
1421 },
1422 "comment" : {
1423 "optional" : 1,
1424 "type" : "string"
1425 },
1426 "name" : {
1427 "description" : "Alias name.",
1428 "maxLength" : 64,
1429 "minLength" : 2,
1430 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1431 "type" : "string"
56122987
DM
1432 }
1433 }
1434 },
56122987
DM
1435 "permissions" : {
1436 "check" : [
1437 "perm",
1438 "/",
1439 [
1440 "Sys.Modify"
1441 ]
1442 ]
1443 },
44660702 1444 "protected" : 1,
56122987
DM
1445 "returns" : {
1446 "type" : "null"
1447 }
44660702
DM
1448 }
1449 },
1450 "leaf" : 0,
1451 "path" : "/cluster/firewall/aliases",
1452 "text" : "aliases"
1453 },
1454 {
1455 "info" : {
1456 "GET" : {
1457 "description" : "Get Firewall options.",
1458 "method" : "GET",
1459 "name" : "get_options",
1460 "parameters" : {
1461 "additionalProperties" : 0
7aacca6f 1462 },
56122987
DM
1463 "permissions" : {
1464 "check" : [
1465 "perm",
1466 "/",
1467 [
44660702 1468 "Sys.Audit"
56122987
DM
1469 ]
1470 ]
1471 },
44660702 1472 "returns" : {
56122987 1473 "properties" : {
44660702
DM
1474 "enable" : {
1475 "description" : "Enable or disable the firewall cluster wide.",
1476 "minimum" : 0,
56122987 1477 "optional" : 1,
7aacca6f 1478 "type" : "integer"
56122987 1479 },
44660702
DM
1480 "policy_in" : {
1481 "description" : "Input policy.",
1482 "enum" : [
1483 "ACCEPT",
1484 "REJECT",
1485 "DROP"
1486 ],
56122987 1487 "optional" : 1,
44660702 1488 "type" : "string"
7aacca6f 1489 },
44660702
DM
1490 "policy_out" : {
1491 "description" : "Output policy.",
1492 "enum" : [
1493 "ACCEPT",
1494 "REJECT",
1495 "DROP"
1496 ],
7aacca6f 1497 "optional" : 1,
44660702
DM
1498 "type" : "string"
1499 }
1500 },
1501 "type" : "object"
1502 }
1503 },
1504 "PUT" : {
1505 "description" : "Set Firewall options.",
1506 "method" : "PUT",
1507 "name" : "set_options",
1508 "parameters" : {
1509 "additionalProperties" : 0,
1510 "properties" : {
1511 "delete" : {
1512 "description" : "A list of settings you want to delete.",
1513 "format" : "pve-configid-list",
56122987 1514 "optional" : 1,
44660702 1515 "type" : "string"
56122987 1516 },
44660702
DM
1517 "digest" : {
1518 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1519 "maxLength" : 40,
56122987 1520 "optional" : 1,
44660702 1521 "type" : "string"
56122987 1522 },
44660702
DM
1523 "enable" : {
1524 "description" : "Enable or disable the firewall cluster wide.",
7aacca6f 1525 "minimum" : 0,
56122987 1526 "optional" : 1,
44660702 1527 "type" : "integer"
56122987 1528 },
44660702
DM
1529 "policy_in" : {
1530 "description" : "Input policy.",
56122987 1531 "enum" : [
44660702
DM
1532 "ACCEPT",
1533 "REJECT",
1534 "DROP"
56122987 1535 ],
56122987 1536 "optional" : 1,
44660702 1537 "type" : "string"
56122987 1538 },
44660702
DM
1539 "policy_out" : {
1540 "description" : "Output policy.",
56122987 1541 "enum" : [
44660702
DM
1542 "ACCEPT",
1543 "REJECT",
1544 "DROP"
56122987 1545 ],
7aacca6f 1546 "optional" : 1,
44660702 1547 "type" : "string"
56122987 1548 }
44660702
DM
1549 }
1550 },
1551 "permissions" : {
1552 "check" : [
1553 "perm",
1554 "/",
1555 [
1556 "Sys.Modify"
1557 ]
1558 ]
7aacca6f
DM
1559 },
1560 "protected" : 1,
44660702
DM
1561 "returns" : {
1562 "type" : "null"
1563 }
1564 }
1565 },
1566 "leaf" : 1,
1567 "path" : "/cluster/firewall/options",
1568 "text" : "options"
1569 },
1570 {
1571 "info" : {
7aacca6f 1572 "GET" : {
44660702 1573 "description" : "List available macros",
7aacca6f 1574 "method" : "GET",
44660702
DM
1575 "name" : "get_macros",
1576 "parameters" : {
1577 "additionalProperties" : 0
7aacca6f 1578 },
44660702
DM
1579 "permissions" : {
1580 "user" : "all"
1581 },
1582 "returns" : {
1583 "items" : {
1584 "properties" : {
1585 "descr" : {
1586 "description" : "More verbose description (if available).",
1587 "type" : "string"
1588 },
1589 "macro" : {
1590 "description" : "Macro name.",
1591 "type" : "string"
1592 }
1593 },
1594 "type" : "object"
1595 },
1596 "type" : "array"
1597 }
1598 }
1599 },
1600 "leaf" : 1,
1601 "path" : "/cluster/firewall/macros",
1602 "text" : "macros"
1603 },
1604 {
1605 "info" : {
1606 "GET" : {
1607 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
1608 "method" : "GET",
1609 "name" : "refs",
7aacca6f 1610 "parameters" : {
44660702 1611 "additionalProperties" : 0,
7aacca6f 1612 "properties" : {
44660702
DM
1613 "type" : {
1614 "description" : "Only list references of specified type.",
1615 "enum" : [
1616 "alias",
1617 "ipset"
1618 ],
1619 "optional" : 1,
1620 "type" : "string"
7aacca6f 1621 }
44660702 1622 }
7aacca6f
DM
1623 },
1624 "permissions" : {
1625 "check" : [
1626 "perm",
1627 "/",
1628 [
1629 "Sys.Audit"
1630 ]
1631 ]
1632 },
44660702
DM
1633 "returns" : {
1634 "items" : {
1635 "properties" : {
1636 "comment" : {
1637 "optional" : 1,
1638 "type" : "string"
1639 },
1640 "name" : {
1641 "type" : "string"
1642 },
1643 "ref" : {
1644 "type" : "string"
1645 },
1646 "type" : {
1647 "enum" : [
1648 "alias",
1649 "ipset"
1650 ],
1651 "type" : "string"
1652 }
1653 },
1654 "type" : "object"
1655 },
1656 "type" : "array"
1657 }
56122987
DM
1658 }
1659 },
7aacca6f 1660 "leaf" : 1,
44660702
DM
1661 "path" : "/cluster/firewall/refs",
1662 "text" : "refs"
56122987
DM
1663 }
1664 ],
56122987 1665 "info" : {
44660702
DM
1666 "GET" : {
1667 "description" : "Directory index.",
1668 "method" : "GET",
1669 "name" : "index",
56122987 1670 "parameters" : {
56122987
DM
1671 "additionalProperties" : 0
1672 },
44660702
DM
1673 "permissions" : {
1674 "user" : "all"
1675 },
56122987 1676 "returns" : {
44660702
DM
1677 "items" : {
1678 "properties" : {},
1679 "type" : "object"
1680 },
7aacca6f
DM
1681 "links" : [
1682 {
44660702
DM
1683 "href" : "{name}",
1684 "rel" : "child"
7aacca6f
DM
1685 }
1686 ],
7aacca6f 1687 "type" : "array"
7aacca6f 1688 }
56122987
DM
1689 }
1690 },
44660702
DM
1691 "leaf" : 0,
1692 "path" : "/cluster/firewall",
1693 "text" : "firewall"
7aacca6f
DM
1694 },
1695 {
56122987
DM
1696 "children" : [
1697 {
56122987 1698 "info" : {
44660702
DM
1699 "DELETE" : {
1700 "description" : "Delete vzdump backup job definition.",
1701 "method" : "DELETE",
1702 "name" : "delete_job",
1703 "parameters" : {
1704 "additionalProperties" : 0,
1705 "properties" : {
1706 "id" : {
1707 "description" : "The job ID.",
1708 "maxLength" : 50,
1709 "type" : "string"
1710 }
1711 }
1712 },
1713 "permissions" : {
1714 "check" : [
1715 "perm",
1716 "/",
1717 [
1718 "Sys.Modify"
1719 ]
1720 ]
1721 },
1722 "protected" : 1,
56122987
DM
1723 "returns" : {
1724 "type" : "null"
44660702
DM
1725 }
1726 },
1727 "GET" : {
1728 "description" : "Read vzdump backup job definition.",
1729 "method" : "GET",
1730 "name" : "read_job",
1731 "parameters" : {
1732 "additionalProperties" : 0,
1733 "properties" : {
1734 "id" : {
1735 "description" : "The job ID.",
1736 "maxLength" : 50,
1737 "type" : "string"
1738 }
1739 }
56122987 1740 },
7aacca6f
DM
1741 "permissions" : {
1742 "check" : [
1743 "perm",
1744 "/",
1745 [
44660702 1746 "Sys.Audit"
7aacca6f
DM
1747 ]
1748 ]
1749 },
44660702
DM
1750 "returns" : {
1751 "type" : "object"
1752 }
1753 },
1754 "PUT" : {
1755 "description" : "Update vzdump backup job definition.",
1756 "method" : "PUT",
1757 "name" : "update_job",
56122987 1758 "parameters" : {
44660702 1759 "additionalProperties" : 0,
56122987 1760 "properties" : {
44660702
DM
1761 "all" : {
1762 "default" : 0,
1763 "description" : "Backup all known guest systems on this host.",
7aacca6f 1764 "optional" : 1,
44660702 1765 "type" : "boolean"
7aacca6f 1766 },
44660702
DM
1767 "bwlimit" : {
1768 "default" : 0,
1769 "description" : "Limit I/O bandwidth (KBytes per second).",
1770 "minimum" : 0,
1771 "optional" : 1,
1772 "type" : "integer"
1773 },
1774 "compress" : {
1775 "default" : "0",
1776 "description" : "Compress dump file.",
7aacca6f 1777 "enum" : [
44660702
DM
1778 "0",
1779 "1",
1780 "gzip",
1781 "lzo"
7aacca6f 1782 ],
44660702
DM
1783 "optional" : 1,
1784 "type" : "string"
7aacca6f 1785 },
44660702
DM
1786 "delete" : {
1787 "description" : "A list of settings you want to delete.",
1788 "format" : "pve-configid-list",
7aacca6f 1789 "optional" : 1,
44660702 1790 "type" : "string"
56122987 1791 },
44660702
DM
1792 "dow" : {
1793 "description" : "Day of week selection.",
1794 "format" : "pve-day-of-week-list",
7aacca6f 1795 "optional" : 1,
44660702 1796 "type" : "string"
56122987 1797 },
44660702
DM
1798 "dumpdir" : {
1799 "description" : "Store resulting files to specified directory.",
56122987 1800 "optional" : 1,
44660702 1801 "type" : "string"
56122987 1802 },
44660702
DM
1803 "enabled" : {
1804 "default" : "1",
1805 "description" : "Enable or disable the job.",
1806 "optional" : 1,
1807 "type" : "boolean"
1808 },
1809 "exclude" : {
1810 "description" : "Exclude specified guest systems (assumes --all)",
1811 "format" : "pve-vmid-list",
1812 "optional" : 1,
1813 "type" : "string"
1814 },
1815 "exclude-path" : {
1816 "description" : "Exclude certain files/directories (shell globs).",
1817 "format" : "string-alist",
1818 "optional" : 1,
1819 "type" : "string"
1820 },
1821 "id" : {
1822 "description" : "The job ID.",
1823 "maxLength" : 50,
1824 "type" : "string"
1825 },
1826 "ionice" : {
1827 "default" : 7,
1828 "description" : "Set CFQ ionice priority.",
1829 "maximum" : 8,
1830 "minimum" : 0,
1831 "optional" : 1,
1832 "type" : "integer"
1833 },
1834 "lockwait" : {
1835 "default" : 180,
1836 "description" : "Maximal time to wait for the global lock (minutes).",
1837 "minimum" : 0,
1838 "optional" : 1,
1839 "type" : "integer"
1840 },
1841 "mailnotification" : {
1842 "default" : "always",
1843 "description" : "Specify when to send an email",
56122987 1844 "enum" : [
44660702
DM
1845 "always",
1846 "failure"
56122987 1847 ],
44660702
DM
1848 "optional" : 1,
1849 "type" : "string"
1850 },
1851 "mailto" : {
1852 "description" : "Comma-separated list of email addresses that should receive email notifications.",
1853 "format" : "string-list",
1854 "optional" : 1,
1855 "type" : "string"
1856 },
1857 "maxfiles" : {
1858 "default" : 1,
1859 "description" : "Maximal number of backup files per guest system.",
1860 "minimum" : 1,
1861 "optional" : 1,
1862 "type" : "integer"
1863 },
1864 "mode" : {
1865 "default" : "snapshot",
1866 "description" : "Backup mode.",
1867 "enum" : [
1868 "snapshot",
1869 "suspend",
1870 "stop"
1871 ],
1872 "optional" : 1,
1873 "type" : "string"
1874 },
1875 "node" : {
1876 "description" : "Only run if executed on this node.",
1877 "format" : "pve-node",
1878 "optional" : 1,
1879 "type" : "string"
1880 },
1881 "pigz" : {
1882 "default" : 0,
1883 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
1884 "optional" : 1,
1885 "type" : "integer"
1886 },
1887 "quiet" : {
1888 "default" : 0,
1889 "description" : "Be quiet.",
1890 "optional" : 1,
1891 "type" : "boolean"
1892 },
1893 "remove" : {
1894 "default" : 1,
1895 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
1896 "optional" : 1,
1897 "type" : "boolean"
1898 },
1899 "script" : {
1900 "description" : "Use specified hook script.",
1901 "optional" : 1,
1902 "type" : "string"
1903 },
1904 "size" : {
1905 "default" : 1024,
1906 "description" : "Unused, will be removed in a future release.",
1907 "minimum" : 500,
1908 "optional" : 1,
1909 "type" : "integer"
1910 },
1911 "starttime" : {
1912 "description" : "Job Start time.",
1913 "pattern" : "\\d{1,2}:\\d{1,2}",
56122987 1914 "type" : "string",
44660702 1915 "typetext" : "HH:MM"
7aacca6f 1916 },
44660702
DM
1917 "stdexcludes" : {
1918 "default" : 1,
1919 "description" : "Exclude temporary files and logs.",
1920 "optional" : 1,
1921 "type" : "boolean"
1922 },
1923 "stop" : {
1924 "default" : 0,
1925 "description" : "Stop runnig backup jobs on this host.",
1926 "optional" : 1,
1927 "type" : "boolean"
1928 },
1929 "stopwait" : {
1930 "default" : 10,
1931 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
1932 "minimum" : 0,
1933 "optional" : 1,
1934 "type" : "integer"
1935 },
1936 "storage" : {
1937 "description" : "Store resulting file to this storage.",
1938 "format" : "pve-storage-id",
1939 "optional" : 1,
7aacca6f 1940 "type" : "string"
56122987 1941 },
44660702
DM
1942 "tmpdir" : {
1943 "description" : "Store temporary files to specified directory.",
1944 "optional" : 1,
1945 "type" : "string"
1946 },
1947 "vmid" : {
1948 "description" : "The ID of the guest system you want to backup.",
1949 "format" : "pve-vmid-list",
1950 "optional" : 1,
1951 "type" : "string"
56122987 1952 }
44660702 1953 }
56122987
DM
1954 },
1955 "permissions" : {
1956 "check" : [
1957 "perm",
1958 "/",
1959 [
44660702 1960 "Sys.Modify"
56122987
DM
1961 ]
1962 ]
1963 },
44660702
DM
1964 "protected" : 1,
1965 "returns" : {
1966 "type" : "null"
7aacca6f 1967 }
56122987
DM
1968 }
1969 },
44660702
DM
1970 "leaf" : 1,
1971 "path" : "/cluster/backup/{id}",
1972 "text" : "{id}"
1973 }
1974 ],
1975 "info" : {
1976 "GET" : {
1977 "description" : "List vzdump backup schedule.",
1978 "method" : "GET",
1979 "name" : "index",
1980 "parameters" : {
1981 "additionalProperties" : 0
1982 },
1983 "permissions" : {
1984 "check" : [
1985 "perm",
1986 "/",
1987 [
1988 "Sys.Audit"
1989 ]
1990 ]
1991 },
1992 "returns" : {
1993 "items" : {
1994 "properties" : {
1995 "id" : {
1996 "type" : "string"
1997 }
1998 },
1999 "type" : "object"
2000 },
2001 "links" : [
2002 {
2003 "href" : "{id}",
2004 "rel" : "child"
2005 }
2006 ],
2007 "type" : "array"
2008 }
2009 },
2010 "POST" : {
2011 "description" : "Create new vzdump backup job.",
2012 "method" : "POST",
2013 "name" : "create_job",
2014 "parameters" : {
2015 "additionalProperties" : 0,
2016 "properties" : {
2017 "all" : {
2018 "default" : 0,
2019 "description" : "Backup all known guest systems on this host.",
2020 "optional" : 1,
2021 "type" : "boolean"
2022 },
2023 "bwlimit" : {
2024 "default" : 0,
2025 "description" : "Limit I/O bandwidth (KBytes per second).",
2026 "minimum" : 0,
2027 "optional" : 1,
2028 "type" : "integer"
2029 },
2030 "compress" : {
2031 "default" : "0",
2032 "description" : "Compress dump file.",
2033 "enum" : [
2034 "0",
2035 "1",
2036 "gzip",
2037 "lzo"
2038 ],
2039 "optional" : 1,
2040 "type" : "string"
2041 },
2042 "dow" : {
2043 "default" : "mon,tue,wed,thu,fri,sat,sun",
2044 "description" : "Day of week selection.",
2045 "format" : "pve-day-of-week-list",
2046 "optional" : 1,
2047 "type" : "string"
2048 },
2049 "dumpdir" : {
2050 "description" : "Store resulting files to specified directory.",
2051 "optional" : 1,
2052 "type" : "string"
2053 },
2054 "enabled" : {
2055 "default" : "1",
2056 "description" : "Enable or disable the job.",
2057 "optional" : 1,
2058 "type" : "boolean"
2059 },
2060 "exclude" : {
2061 "description" : "Exclude specified guest systems (assumes --all)",
2062 "format" : "pve-vmid-list",
2063 "optional" : 1,
2064 "type" : "string"
2065 },
2066 "exclude-path" : {
2067 "description" : "Exclude certain files/directories (shell globs).",
2068 "format" : "string-alist",
2069 "optional" : 1,
2070 "type" : "string"
2071 },
2072 "ionice" : {
2073 "default" : 7,
2074 "description" : "Set CFQ ionice priority.",
2075 "maximum" : 8,
2076 "minimum" : 0,
2077 "optional" : 1,
2078 "type" : "integer"
2079 },
2080 "lockwait" : {
2081 "default" : 180,
2082 "description" : "Maximal time to wait for the global lock (minutes).",
2083 "minimum" : 0,
2084 "optional" : 1,
2085 "type" : "integer"
2086 },
2087 "mailnotification" : {
2088 "default" : "always",
2089 "description" : "Specify when to send an email",
2090 "enum" : [
2091 "always",
2092 "failure"
2093 ],
2094 "optional" : 1,
2095 "type" : "string"
2096 },
2097 "mailto" : {
2098 "description" : "Comma-separated list of email addresses that should receive email notifications.",
2099 "format" : "string-list",
2100 "optional" : 1,
2101 "type" : "string"
2102 },
2103 "maxfiles" : {
2104 "default" : 1,
2105 "description" : "Maximal number of backup files per guest system.",
2106 "minimum" : 1,
2107 "optional" : 1,
2108 "type" : "integer"
2109 },
2110 "mode" : {
2111 "default" : "snapshot",
2112 "description" : "Backup mode.",
2113 "enum" : [
2114 "snapshot",
2115 "suspend",
2116 "stop"
2117 ],
2118 "optional" : 1,
2119 "type" : "string"
2120 },
2121 "node" : {
2122 "description" : "Only run if executed on this node.",
2123 "format" : "pve-node",
2124 "optional" : 1,
2125 "type" : "string"
2126 },
2127 "pigz" : {
2128 "default" : 0,
2129 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
2130 "optional" : 1,
2131 "type" : "integer"
2132 },
2133 "quiet" : {
2134 "default" : 0,
2135 "description" : "Be quiet.",
2136 "optional" : 1,
2137 "type" : "boolean"
2138 },
2139 "remove" : {
2140 "default" : 1,
2141 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
2142 "optional" : 1,
2143 "type" : "boolean"
2144 },
2145 "script" : {
2146 "description" : "Use specified hook script.",
2147 "optional" : 1,
2148 "type" : "string"
2149 },
2150 "size" : {
2151 "default" : 1024,
2152 "description" : "Unused, will be removed in a future release.",
2153 "minimum" : 500,
2154 "optional" : 1,
2155 "type" : "integer"
2156 },
2157 "starttime" : {
2158 "description" : "Job Start time.",
2159 "pattern" : "\\d{1,2}:\\d{1,2}",
2160 "type" : "string",
2161 "typetext" : "HH:MM"
2162 },
2163 "stdexcludes" : {
2164 "default" : 1,
2165 "description" : "Exclude temporary files and logs.",
2166 "optional" : 1,
2167 "type" : "boolean"
2168 },
2169 "stop" : {
2170 "default" : 0,
2171 "description" : "Stop runnig backup jobs on this host.",
2172 "optional" : 1,
2173 "type" : "boolean"
2174 },
2175 "stopwait" : {
2176 "default" : 10,
2177 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
2178 "minimum" : 0,
2179 "optional" : 1,
2180 "type" : "integer"
2181 },
2182 "storage" : {
2183 "description" : "Store resulting file to this storage.",
2184 "format" : "pve-storage-id",
2185 "optional" : 1,
2186 "type" : "string"
2187 },
2188 "tmpdir" : {
2189 "description" : "Store temporary files to specified directory.",
2190 "optional" : 1,
2191 "type" : "string"
2192 },
2193 "vmid" : {
2194 "description" : "The ID of the guest system you want to backup.",
2195 "format" : "pve-vmid-list",
2196 "optional" : 1,
2197 "type" : "string"
2198 }
2199 }
2200 },
2201 "permissions" : {
2202 "check" : [
2203 "perm",
2204 "/",
2205 [
2206 "Sys.Modify"
2207 ]
2208 ]
2209 },
2210 "protected" : 1,
2211 "returns" : {
2212 "type" : "null"
2213 }
2214 }
2215 },
2216 "leaf" : 0,
2217 "path" : "/cluster/backup",
2218 "text" : "backup"
2219 },
2220 {
2221 "children" : [
2222 {
2223 "children" : [
2224 {
2225 "children" : [
56122987 2226 {
56122987
DM
2227 "info" : {
2228 "POST" : {
44660702
DM
2229 "description" : "Request resource migration (online) to another node.",
2230 "method" : "POST",
2231 "name" : "migrate",
56122987 2232 "parameters" : {
7aacca6f 2233 "additionalProperties" : 0,
56122987
DM
2234 "properties" : {
2235 "node" : {
7aacca6f 2236 "description" : "The cluster node name.",
44660702 2237 "format" : "pve-node",
7aacca6f 2238 "type" : "string"
56122987
DM
2239 },
2240 "sid" : {
44660702 2241 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
56122987 2242 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2243 "type" : "string",
44660702 2244 "typetext" : "<type>:<name>"
56122987 2245 }
7aacca6f 2246 }
56122987 2247 },
56122987
DM
2248 "permissions" : {
2249 "check" : [
2250 "perm",
2251 "/",
2252 [
2253 "Sys.Console"
2254 ]
2255 ]
2256 },
7aacca6f 2257 "protected" : 1,
7aacca6f
DM
2258 "returns" : {
2259 "type" : "null"
44660702 2260 }
56122987 2261 }
44660702
DM
2262 },
2263 "leaf" : 1,
2264 "path" : "/cluster/ha/resources/{sid}/migrate",
2265 "text" : "migrate"
2266 },
2267 {
2268 "info" : {
2269 "POST" : {
2270 "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.",
2271 "method" : "POST",
2272 "name" : "relocate",
2273 "parameters" : {
2274 "additionalProperties" : 0,
2275 "properties" : {
2276 "node" : {
2277 "description" : "The cluster node name.",
2278 "format" : "pve-node",
2279 "type" : "string"
2280 },
2281 "sid" : {
2282 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2283 "format" : "pve-ha-resource-or-vm-id",
2284 "type" : "string",
2285 "typetext" : "<type>:<name>"
2286 }
2287 }
2288 },
2289 "permissions" : {
2290 "check" : [
2291 "perm",
2292 "/",
2293 [
2294 "Sys.Console"
2295 ]
2296 ]
2297 },
2298 "protected" : 1,
2299 "returns" : {
2300 "type" : "null"
2301 }
2302 }
2303 },
2304 "leaf" : 1,
2305 "path" : "/cluster/ha/resources/{sid}/relocate",
2306 "text" : "relocate"
2307 }
2308 ],
2309 "info" : {
2310 "DELETE" : {
2311 "description" : "Delete resource configuration.",
2312 "method" : "DELETE",
2313 "name" : "delete",
7aacca6f 2314 "parameters" : {
44660702 2315 "additionalProperties" : 0,
7aacca6f
DM
2316 "properties" : {
2317 "sid" : {
2318 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
44660702 2319 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2320 "type" : "string",
44660702
DM
2321 "typetext" : "<type>:<name>"
2322 }
2323 }
2324 },
2325 "permissions" : {
2326 "check" : [
2327 "perm",
2328 "/",
2329 [
2330 "Sys.Console"
2331 ]
2332 ]
2333 },
2334 "protected" : 1,
2335 "returns" : {
2336 "type" : "null"
2337 }
2338 },
2339 "GET" : {
2340 "description" : "Read resource configuration.",
2341 "method" : "GET",
2342 "name" : "read",
2343 "parameters" : {
2344 "additionalProperties" : 0,
2345 "properties" : {
2346 "sid" : {
2347 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
7aacca6f 2348 "format" : "pve-ha-resource-or-vm-id",
44660702 2349 "type" : "string",
7aacca6f
DM
2350 "typetext" : "<type>:<name>"
2351 }
44660702 2352 }
7aacca6f
DM
2353 },
2354 "permissions" : {
2355 "check" : [
2356 "perm",
2357 "/",
2358 [
2359 "Sys.Audit"
2360 ]
2361 ]
2362 },
44660702 2363 "returns" : {}
7aacca6f 2364 },
56122987 2365 "PUT" : {
44660702 2366 "description" : "Update resource configuration.",
7aacca6f 2367 "method" : "PUT",
44660702 2368 "name" : "update",
56122987
DM
2369 "parameters" : {
2370 "additionalProperties" : 0,
2371 "properties" : {
44660702
DM
2372 "comment" : {
2373 "description" : "Description.",
2374 "maxLength" : 4096,
56122987 2375 "optional" : 1,
44660702 2376 "type" : "string"
56122987 2377 },
7aacca6f
DM
2378 "delete" : {
2379 "description" : "A list of settings you want to delete.",
7aacca6f 2380 "format" : "pve-configid-list",
44660702
DM
2381 "maxLength" : 4096,
2382 "optional" : 1,
2383 "type" : "string"
56122987 2384 },
44660702
DM
2385 "digest" : {
2386 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2387 "maxLength" : 40,
2388 "optional" : 1,
2389 "type" : "string"
56122987 2390 },
44660702
DM
2391 "group" : {
2392 "description" : "The HA group identifier.",
2393 "format" : "pve-configid",
7aacca6f 2394 "optional" : 1,
44660702 2395 "type" : "string"
56122987
DM
2396 },
2397 "max_relocate" : {
7aacca6f 2398 "default" : 1,
56122987 2399 "description" : "Maximal number of service relocate tries when a service failes to start.",
44660702
DM
2400 "minimum" : 0,
2401 "optional" : 1,
2402 "type" : "integer"
7aacca6f 2403 },
44660702
DM
2404 "max_restart" : {
2405 "default" : 1,
2406 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2407 "minimum" : 0,
7aacca6f 2408 "optional" : 1,
44660702
DM
2409 "type" : "integer"
2410 },
2411 "sid" : {
2412 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2413 "format" : "pve-ha-resource-or-vm-id",
2414 "type" : "string",
2415 "typetext" : "<type>:<name>"
7aacca6f
DM
2416 },
2417 "state" : {
44660702
DM
2418 "default" : "enabled",
2419 "description" : "Resource state.",
7aacca6f
DM
2420 "enum" : [
2421 "enabled",
2422 "disabled"
2423 ],
7aacca6f 2424 "optional" : 1,
44660702 2425 "type" : "string"
56122987 2426 }
44660702
DM
2427 },
2428 "type" : "object"
56122987 2429 },
56122987
DM
2430 "permissions" : {
2431 "check" : [
2432 "perm",
2433 "/",
2434 [
2435 "Sys.Console"
2436 ]
2437 ]
2438 },
7aacca6f 2439 "protected" : 1,
56122987
DM
2440 "returns" : {
2441 "type" : "null"
2442 }
2443 }
2444 },
44660702 2445 "leaf" : 0,
7aacca6f 2446 "path" : "/cluster/ha/resources/{sid}",
44660702 2447 "text" : "{sid}"
56122987
DM
2448 }
2449 ],
7aacca6f
DM
2450 "info" : {
2451 "GET" : {
44660702
DM
2452 "description" : "List HA resources.",
2453 "method" : "GET",
2454 "name" : "index",
7aacca6f 2455 "parameters" : {
44660702
DM
2456 "additionalProperties" : 0,
2457 "properties" : {
2458 "type" : {
2459 "description" : "Only list resources of specific type",
2460 "enum" : [
2461 "ct",
2462 "vm"
2463 ],
2464 "optional" : 1,
2465 "type" : "string"
2466 }
2467 }
7aacca6f 2468 },
7aacca6f
DM
2469 "permissions" : {
2470 "check" : [
2471 "perm",
2472 "/",
2473 [
2474 "Sys.Audit"
2475 ]
2476 ]
2477 },
7aacca6f 2478 "returns" : {
7aacca6f 2479 "items" : {
7aacca6f 2480 "properties" : {
44660702 2481 "sid" : {
7aacca6f
DM
2482 "type" : "string"
2483 }
44660702
DM
2484 },
2485 "type" : "object"
7aacca6f
DM
2486 },
2487 "links" : [
2488 {
44660702 2489 "href" : "{sid}",
7aacca6f
DM
2490 "rel" : "child"
2491 }
44660702
DM
2492 ],
2493 "type" : "array"
7aacca6f
DM
2494 }
2495 },
2496 "POST" : {
44660702 2497 "description" : "Create a new HA resource.",
7aacca6f 2498 "method" : "POST",
44660702 2499 "name" : "create",
7aacca6f 2500 "parameters" : {
44660702 2501 "additionalProperties" : 0,
7aacca6f
DM
2502 "properties" : {
2503 "comment" : {
7aacca6f 2504 "description" : "Description.",
44660702 2505 "maxLength" : 4096,
7aacca6f
DM
2506 "optional" : 1,
2507 "type" : "string"
2508 },
44660702
DM
2509 "group" : {
2510 "description" : "The HA group identifier.",
2511 "format" : "pve-configid",
7aacca6f 2512 "optional" : 1,
44660702 2513 "type" : "string"
7aacca6f 2514 },
44660702
DM
2515 "max_relocate" : {
2516 "default" : 1,
2517 "description" : "Maximal number of service relocate tries when a service failes to start.",
2518 "minimum" : 0,
7aacca6f 2519 "optional" : 1,
44660702 2520 "type" : "integer"
7aacca6f 2521 },
44660702
DM
2522 "max_restart" : {
2523 "default" : 1,
2524 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2525 "minimum" : 0,
2526 "optional" : 1,
2527 "type" : "integer"
2528 },
2529 "sid" : {
2530 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2531 "format" : "pve-ha-resource-or-vm-id",
2532 "type" : "string",
2533 "typetext" : "<type>:<name>"
2534 },
2535 "state" : {
2536 "default" : "enabled",
2537 "description" : "Resource state.",
7aacca6f 2538 "enum" : [
44660702
DM
2539 "enabled",
2540 "disabled"
7aacca6f 2541 ],
7aacca6f
DM
2542 "optional" : 1,
2543 "type" : "string"
2544 },
44660702
DM
2545 "type" : {
2546 "description" : "Resource type.",
2547 "enum" : [
2548 "ct",
2549 "vm"
2550 ],
2551 "optional" : 1,
2552 "type" : "string"
2553 }
7aacca6f 2554 },
44660702 2555 "type" : "object"
7aacca6f
DM
2556 },
2557 "permissions" : {
2558 "check" : [
2559 "perm",
2560 "/",
2561 [
2562 "Sys.Console"
2563 ]
2564 ]
2565 },
44660702
DM
2566 "protected" : 1,
2567 "returns" : {
2568 "type" : "null"
2569 }
7aacca6f
DM
2570 }
2571 },
44660702
DM
2572 "leaf" : 0,
2573 "path" : "/cluster/ha/resources",
2574 "text" : "resources"
2575 },
2576 {
56122987
DM
2577 "children" : [
2578 {
56122987 2579 "info" : {
44660702
DM
2580 "DELETE" : {
2581 "description" : "Delete ha group configuration.",
2582 "method" : "DELETE",
2583 "name" : "delete",
56122987 2584 "parameters" : {
7aacca6f 2585 "additionalProperties" : 0,
56122987 2586 "properties" : {
7aacca6f
DM
2587 "group" : {
2588 "description" : "The HA group identifier.",
44660702
DM
2589 "format" : "pve-configid",
2590 "type" : "string"
56122987 2591 }
7aacca6f 2592 }
56122987 2593 },
56122987
DM
2594 "permissions" : {
2595 "check" : [
2596 "perm",
2597 "/",
2598 [
7aacca6f 2599 "Sys.Console"
56122987
DM
2600 ]
2601 ]
2602 },
44660702 2603 "protected" : 1,
7aacca6f
DM
2604 "returns" : {
2605 "type" : "null"
56122987
DM
2606 }
2607 },
44660702
DM
2608 "GET" : {
2609 "description" : "Read ha group configuration.",
2610 "method" : "GET",
2611 "name" : "read",
56122987 2612 "parameters" : {
44660702 2613 "additionalProperties" : 0,
56122987
DM
2614 "properties" : {
2615 "group" : {
2616 "description" : "The HA group identifier.",
44660702
DM
2617 "format" : "pve-configid",
2618 "type" : "string"
56122987 2619 }
44660702 2620 }
56122987 2621 },
56122987
DM
2622 "permissions" : {
2623 "check" : [
2624 "perm",
2625 "/",
2626 [
44660702 2627 "Sys.Audit"
56122987
DM
2628 ]
2629 ]
2630 },
44660702 2631 "returns" : {}
7aacca6f 2632 },
44660702
DM
2633 "PUT" : {
2634 "description" : "Update ha group configuration.",
2635 "method" : "PUT",
2636 "name" : "update",
7aacca6f 2637 "parameters" : {
44660702 2638 "additionalProperties" : 0,
7aacca6f 2639 "properties" : {
44660702
DM
2640 "comment" : {
2641 "description" : "Description.",
2642 "maxLength" : 4096,
2643 "optional" : 1,
2644 "type" : "string"
2645 },
2646 "delete" : {
2647 "description" : "A list of settings you want to delete.",
2648 "format" : "pve-configid-list",
2649 "maxLength" : 4096,
2650 "optional" : 1,
2651 "type" : "string"
2652 },
2653 "digest" : {
2654 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2655 "maxLength" : 40,
2656 "optional" : 1,
2657 "type" : "string"
2658 },
7aacca6f
DM
2659 "group" : {
2660 "description" : "The HA group identifier.",
44660702
DM
2661 "format" : "pve-configid",
2662 "type" : "string"
2663 },
2664 "nodes" : {
2665 "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').",
2666 "format" : "pve-ha-group-node-list",
2667 "optional" : 1,
7aacca6f 2668 "type" : "string",
44660702
DM
2669 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2670 },
2671 "nofailback" : {
2672 "default" : 0,
2673 "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.",
2674 "optional" : 1,
2675 "type" : "boolean"
2676 },
2677 "restricted" : {
2678 "default" : 0,
2679 "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.",
2680 "optional" : 1,
2681 "type" : "boolean"
7aacca6f
DM
2682 }
2683 },
44660702 2684 "type" : "object"
7aacca6f 2685 },
7aacca6f
DM
2686 "permissions" : {
2687 "check" : [
2688 "perm",
2689 "/",
2690 [
44660702 2691 "Sys.Console"
7aacca6f
DM
2692 ]
2693 ]
2694 },
44660702
DM
2695 "protected" : 1,
2696 "returns" : {
2697 "type" : "null"
2698 }
56122987
DM
2699 }
2700 },
2701 "leaf" : 1,
44660702
DM
2702 "path" : "/cluster/ha/groups/{group}",
2703 "text" : "{group}"
56122987 2704 }
44660702
DM
2705 ],
2706 "info" : {
2707 "GET" : {
2708 "description" : "Get HA groups.",
2709 "method" : "GET",
2710 "name" : "index",
2711 "parameters" : {
2712 "additionalProperties" : 0
2713 },
2714 "permissions" : {
2715 "check" : [
2716 "perm",
2717 "/",
2718 [
2719 "Sys.Audit"
2720 ]
2721 ]
2722 },
2723 "returns" : {
2724 "items" : {
2725 "properties" : {
2726 "group" : {
2727 "type" : "string"
2728 }
2729 },
2730 "type" : "object"
2731 },
2732 "links" : [
2733 {
2734 "href" : "{group}",
2735 "rel" : "child"
2736 }
2737 ],
2738 "type" : "array"
2739 }
2740 },
2741 "POST" : {
2742 "description" : "Create a new HA group.",
2743 "method" : "POST",
2744 "name" : "create",
2745 "parameters" : {
2746 "additionalProperties" : 0,
2747 "properties" : {
2748 "comment" : {
2749 "description" : "Description.",
2750 "maxLength" : 4096,
2751 "optional" : 1,
2752 "type" : "string"
2753 },
2754 "group" : {
2755 "description" : "The HA group identifier.",
2756 "format" : "pve-configid",
2757 "type" : "string"
2758 },
2759 "nodes" : {
2760 "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').",
2761 "format" : "pve-ha-group-node-list",
2762 "optional" : 0,
2763 "type" : "string",
2764 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2765 },
2766 "nofailback" : {
2767 "default" : 0,
2768 "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.",
2769 "optional" : 1,
2770 "type" : "boolean"
2771 },
2772 "restricted" : {
2773 "default" : 0,
2774 "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.",
2775 "optional" : 1,
2776 "type" : "boolean"
2777 },
2778 "type" : {
2779 "description" : "Group type.",
2780 "enum" : [
2781 "group"
2782 ],
2783 "optional" : 1,
2784 "type" : "string"
2785 }
2786 },
2787 "type" : "object"
2788 },
2789 "permissions" : {
2790 "check" : [
2791 "perm",
2792 "/",
2793 [
2794 "Sys.Console"
2795 ]
2796 ]
2797 },
2798 "protected" : 1,
2799 "returns" : {
2800 "type" : "null"
2801 }
2802 }
2803 },
2804 "leaf" : 0,
2805 "path" : "/cluster/ha/groups",
2806 "text" : "groups"
7aacca6f
DM
2807 },
2808 {
7aacca6f
DM
2809 "children" : [
2810 {
2811 "info" : {
2812 "GET" : {
56122987 2813 "description" : "Get HA manger status.",
44660702 2814 "method" : "GET",
7aacca6f 2815 "name" : "status",
44660702
DM
2816 "parameters" : {
2817 "additionalProperties" : 0
2818 },
56122987
DM
2819 "permissions" : {
2820 "check" : [
2821 "perm",
2822 "/",
2823 [
2824 "Sys.Audit"
2825 ]
2826 ]
7aacca6f 2827 },
44660702
DM
2828 "returns" : {
2829 "type" : "array"
56122987
DM
2830 }
2831 }
7aacca6f 2832 },
7aacca6f 2833 "leaf" : 1,
44660702
DM
2834 "path" : "/cluster/ha/status/current",
2835 "text" : "current"
56122987
DM
2836 },
2837 {
2838 "info" : {
2839 "GET" : {
7aacca6f 2840 "description" : "Get full HA manger status, including LRM status.",
44660702
DM
2841 "method" : "GET",
2842 "name" : "manager_status",
7aacca6f
DM
2843 "parameters" : {
2844 "additionalProperties" : 0
2845 },
56122987
DM
2846 "permissions" : {
2847 "check" : [
2848 "perm",
2849 "/",
2850 [
2851 "Sys.Audit"
2852 ]
2853 ]
44660702
DM
2854 },
2855 "returns" : {
2856 "type" : "object"
7aacca6f 2857 }
56122987
DM
2858 }
2859 },
56122987 2860 "leaf" : 1,
44660702
DM
2861 "path" : "/cluster/ha/status/manager_status",
2862 "text" : "manager_status"
56122987
DM
2863 }
2864 ],
56122987
DM
2865 "info" : {
2866 "GET" : {
44660702 2867 "description" : "Directory index.",
7aacca6f 2868 "method" : "GET",
44660702
DM
2869 "name" : "index",
2870 "parameters" : {
2871 "additionalProperties" : 0
2872 },
2873 "permissions" : {
2874 "user" : "all"
2875 },
56122987 2876 "returns" : {
56122987
DM
2877 "items" : {
2878 "properties" : {},
2879 "type" : "object"
2880 },
2881 "links" : [
2882 {
44660702
DM
2883 "href" : "{name}",
2884 "rel" : "child"
56122987 2885 }
7aacca6f
DM
2886 ],
2887 "type" : "array"
44660702 2888 }
56122987 2889 }
7aacca6f 2890 },
44660702 2891 "leaf" : 0,
7aacca6f 2892 "path" : "/cluster/ha/status",
44660702 2893 "text" : "status"
56122987
DM
2894 }
2895 ],
56122987
DM
2896 "info" : {
2897 "GET" : {
7aacca6f 2898 "description" : "Directory index.",
44660702
DM
2899 "method" : "GET",
2900 "name" : "index",
2901 "parameters" : {
2902 "additionalProperties" : 0
2903 },
7aacca6f
DM
2904 "permissions" : {
2905 "check" : [
2906 "perm",
2907 "/",
2908 [
2909 "Sys.Audit"
2910 ]
2911 ]
2912 },
56122987 2913 "returns" : {
56122987 2914 "items" : {
7aacca6f
DM
2915 "properties" : {
2916 "id" : {
2917 "type" : "string"
2918 }
44660702
DM
2919 },
2920 "type" : "object"
7aacca6f
DM
2921 },
2922 "links" : [
2923 {
2924 "href" : "{id}",
2925 "rel" : "child"
2926 }
44660702
DM
2927 ],
2928 "type" : "array"
7aacca6f
DM
2929 }
2930 }
44660702
DM
2931 },
2932 "leaf" : 0,
2933 "path" : "/cluster/ha",
2934 "text" : "ha"
7aacca6f
DM
2935 },
2936 {
7aacca6f
DM
2937 "info" : {
2938 "GET" : {
2939 "description" : "Read cluster log",
44660702
DM
2940 "method" : "GET",
2941 "name" : "log",
56122987 2942 "parameters" : {
7aacca6f 2943 "additionalProperties" : 0,
56122987
DM
2944 "properties" : {
2945 "max" : {
7aacca6f 2946 "description" : "Maximum number of entries.",
44660702
DM
2947 "minimum" : 1,
2948 "optional" : 1,
2949 "type" : "integer"
56122987 2950 }
7aacca6f 2951 }
56122987 2952 },
44660702
DM
2953 "permissions" : {
2954 "user" : "all"
2955 },
7aacca6f 2956 "returns" : {
7aacca6f 2957 "items" : {
44660702
DM
2958 "properties" : {},
2959 "type" : "object"
2960 },
2961 "type" : "array"
7aacca6f 2962 }
56122987 2963 }
44660702
DM
2964 },
2965 "leaf" : 1,
2966 "path" : "/cluster/log",
2967 "text" : "log"
56122987
DM
2968 },
2969 {
56122987
DM
2970 "info" : {
2971 "GET" : {
44660702 2972 "description" : "Resources index (cluster wide).",
7aacca6f 2973 "method" : "GET",
7aacca6f 2974 "name" : "resources",
56122987
DM
2975 "parameters" : {
2976 "additionalProperties" : 0,
2977 "properties" : {
2978 "type" : {
2979 "enum" : [
2980 "vm",
2981 "storage",
2982 "node"
44660702
DM
2983 ],
2984 "optional" : 1,
2985 "type" : "string"
56122987
DM
2986 }
2987 }
2988 },
44660702
DM
2989 "permissions" : {
2990 "user" : "all"
2991 },
2992 "returns" : {
2993 "items" : {
2994 "properties" : {},
2995 "type" : "object"
2996 },
2997 "type" : "array"
2998 }
56122987
DM
2999 }
3000 },
7aacca6f 3001 "leaf" : 1,
44660702
DM
3002 "path" : "/cluster/resources",
3003 "text" : "resources"
56122987
DM
3004 },
3005 {
56122987
DM
3006 "info" : {
3007 "GET" : {
7aacca6f 3008 "description" : "List recent tasks (cluster wide).",
44660702 3009 "method" : "GET",
7aacca6f 3010 "name" : "tasks",
56122987
DM
3011 "parameters" : {
3012 "additionalProperties" : 0
3013 },
44660702
DM
3014 "permissions" : {
3015 "user" : "all"
3016 },
56122987
DM
3017 "returns" : {
3018 "items" : {
3019 "properties" : {
3020 "upid" : {
3021 "type" : "string"
3022 }
44660702
DM
3023 },
3024 "type" : "object"
3025 },
3026 "type" : "array"
7aacca6f 3027 }
56122987
DM
3028 }
3029 },
7aacca6f 3030 "leaf" : 1,
44660702
DM
3031 "path" : "/cluster/tasks",
3032 "text" : "tasks"
56122987
DM
3033 },
3034 {
56122987 3035 "info" : {
7aacca6f 3036 "GET" : {
44660702
DM
3037 "description" : "Get datacenter options.",
3038 "method" : "GET",
3039 "name" : "get_options",
56122987 3040 "parameters" : {
7aacca6f
DM
3041 "additionalProperties" : 0
3042 },
3043 "permissions" : {
3044 "check" : [
3045 "perm",
3046 "/",
3047 [
3048 "Sys.Audit"
3049 ]
3050 ]
3051 },
7aacca6f 3052 "returns" : {
44660702
DM
3053 "properties" : {},
3054 "type" : "object"
7aacca6f
DM
3055 }
3056 },
3057 "PUT" : {
44660702
DM
3058 "description" : "Set datacenter options.",
3059 "method" : "PUT",
7aacca6f
DM
3060 "name" : "set_options",
3061 "parameters" : {
3062 "additionalProperties" : 0,
3063 "properties" : {
56122987 3064 "console" : {
56122987 3065 "description" : "Select the default Console viewer. You can either use the builtin java applet (VNC), an external virt-viewer comtatible application (SPICE), or an HTML5 based viewer (noVNC).",
56122987
DM
3066 "enum" : [
3067 "applet",
3068 "vv",
3069 "html5"
44660702
DM
3070 ],
3071 "optional" : 1,
3072 "type" : "string"
56122987 3073 },
7aacca6f 3074 "delete" : {
7aacca6f 3075 "description" : "A list of settings you want to delete.",
44660702 3076 "format" : "pve-configid-list",
7aacca6f
DM
3077 "optional" : 1,
3078 "type" : "string"
3079 },
44660702
DM
3080 "email_from" : {
3081 "description" : "Specify email address to send notification from (default is root@$hostname)",
3082 "format" : "email-opt",
7aacca6f 3083 "optional" : 1,
44660702
DM
3084 "type" : "string"
3085 },
3086 "fencing" : {
3087 "default" : "watchdog",
3088 "description" : "Set the fencing mode of the HA cluster. Hardware mode needs a valid configuration of fence devices in /etc/pve/ha/fence.cfg. With both all two modes are used.\n\nWARNING: 'hardware' and 'both' are EXPERIMENTAL & WIP",
7aacca6f 3089 "enum" : [
44660702
DM
3090 "watchdog",
3091 "hardware",
3092 "both"
7aacca6f 3093 ],
44660702
DM
3094 "optional" : 1,
3095 "type" : "string"
3096 },
3097 "http_proxy" : {
3098 "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')",
3099 "optional" : 1,
3100 "pattern" : "http://.*",
3101 "type" : "string"
7aacca6f 3102 },
56122987 3103 "keyboard" : {
44660702 3104 "description" : "Default keybord layout for vnc server.",
56122987 3105 "enum" : [
44660702
DM
3106 "de",
3107 "de-ch",
7aacca6f 3108 "da",
56122987 3109 "en-gb",
44660702
DM
3110 "en-us",
3111 "es",
3112 "fi",
3113 "fr",
3114 "fr-be",
3115 "fr-ca",
3116 "fr-ch",
3117 "hu",
7aacca6f 3118 "is",
44660702
DM
3119 "it",
3120 "ja",
3121 "lt",
56122987 3122 "mk",
7aacca6f 3123 "nl",
56122987 3124 "no",
44660702 3125 "pl",
7aacca6f 3126 "pt",
44660702
DM
3127 "pt-br",
3128 "sv",
3129 "sl",
3130 "tr"
56122987 3131 ],
56122987
DM
3132 "optional" : 1,
3133 "type" : "string"
3134 },
44660702
DM
3135 "language" : {
3136 "description" : "Default GUI language.",
3137 "enum" : [
3138 "en",
3139 "de"
3140 ],
56122987 3141 "optional" : 1,
44660702 3142 "type" : "string"
56122987 3143 },
44660702
DM
3144 "max_workers" : {
3145 "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.",
3146 "minimum" : 1,
56122987 3147 "optional" : 1,
44660702 3148 "type" : "integer"
56122987 3149 },
7aacca6f 3150 "migration_unsecure" : {
44660702 3151 "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration.",
56122987 3152 "optional" : 1,
44660702 3153 "type" : "boolean"
56122987
DM
3154 }
3155 }
3156 },
44660702
DM
3157 "permissions" : {
3158 "check" : [
3159 "perm",
3160 "/",
3161 [
3162 "Sys.Modify"
3163 ]
3164 ]
3165 },
56122987 3166 "protected" : 1,
7aacca6f
DM
3167 "returns" : {
3168 "type" : "null"
44660702 3169 }
7aacca6f
DM
3170 }
3171 },
44660702
DM
3172 "leaf" : 1,
3173 "path" : "/cluster/options",
7aacca6f
DM
3174 "text" : "options"
3175 },
3176 {
7aacca6f 3177 "info" : {
56122987 3178 "GET" : {
44660702
DM
3179 "description" : "Get cluster status informations.",
3180 "method" : "GET",
3181 "name" : "get_status",
56122987
DM
3182 "parameters" : {
3183 "additionalProperties" : 0
3184 },
56122987
DM
3185 "permissions" : {
3186 "check" : [
3187 "perm",
3188 "/",
3189 [
3190 "Sys.Audit"
3191 ]
3192 ]
3193 },
7aacca6f 3194 "protected" : 1,
56122987 3195 "returns" : {
56122987 3196 "items" : {
56122987
DM
3197 "properties" : {
3198 "type" : {
3199 "type" : "string"
3200 }
44660702
DM
3201 },
3202 "type" : "object"
7aacca6f
DM
3203 },
3204 "type" : "array"
56122987
DM
3205 }
3206 }
3207 },
44660702 3208 "leaf" : 1,
7aacca6f 3209 "path" : "/cluster/status",
44660702 3210 "text" : "status"
56122987
DM
3211 },
3212 {
56122987
DM
3213 "info" : {
3214 "GET" : {
56122987 3215 "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.",
44660702
DM
3216 "method" : "GET",
3217 "name" : "nextid",
56122987 3218 "parameters" : {
44660702 3219 "additionalProperties" : 0,
56122987
DM
3220 "properties" : {
3221 "vmid" : {
44660702 3222 "description" : "The (unique) ID of the VM.",
56122987 3223 "format" : "pve-vmid",
7aacca6f 3224 "minimum" : 1,
7aacca6f
DM
3225 "optional" : 1,
3226 "type" : "integer"
56122987 3227 }
44660702 3228 }
56122987 3229 },
7aacca6f
DM
3230 "permissions" : {
3231 "user" : "all"
44660702
DM
3232 },
3233 "returns" : {
3234 "description" : "The next free VMID.",
3235 "type" : "integer"
7aacca6f 3236 }
56122987
DM
3237 }
3238 },
7aacca6f 3239 "leaf" : 1,
44660702
DM
3240 "path" : "/cluster/nextid",
3241 "text" : "nextid"
56122987
DM
3242 }
3243 ],
44660702
DM
3244 "info" : {
3245 "GET" : {
3246 "description" : "Cluster index.",
3247 "method" : "GET",
3248 "name" : "index",
3249 "parameters" : {
3250 "additionalProperties" : 0
3251 },
3252 "permissions" : {
3253 "user" : "all"
3254 },
3255 "returns" : {
3256 "items" : {
3257 "properties" : {},
3258 "type" : "object"
3259 },
3260 "links" : [
3261 {
3262 "href" : "{name}",
3263 "rel" : "child"
3264 }
3265 ],
3266 "type" : "array"
3267 }
3268 }
3269 },
3270 "leaf" : 0,
3271 "path" : "/cluster",
7aacca6f 3272 "text" : "cluster"
56122987
DM
3273 },
3274 {
56122987
DM
3275 "children" : [
3276 {
7aacca6f
DM
3277 "children" : [
3278 {
3279 "children" : [
3280 {
56122987
DM
3281 "children" : [
3282 {
56122987
DM
3283 "children" : [
3284 {
3285 "children" : [
3286 {
56122987
DM
3287 "info" : {
3288 "DELETE" : {
44660702 3289 "description" : "Delete rule.",
7aacca6f 3290 "method" : "DELETE",
44660702 3291 "name" : "delete_rule",
56122987 3292 "parameters" : {
44660702 3293 "additionalProperties" : 0,
56122987 3294 "properties" : {
44660702
DM
3295 "digest" : {
3296 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3297 "maxLength" : 40,
3298 "optional" : 1,
3299 "type" : "string"
3300 },
56122987 3301 "node" : {
7aacca6f 3302 "description" : "The cluster node name.",
44660702
DM
3303 "format" : "pve-node",
3304 "type" : "string"
7aacca6f 3305 },
56122987 3306 "pos" : {
7aacca6f 3307 "description" : "Update rule at position <pos>.",
44660702 3308 "minimum" : 0,
56122987 3309 "optional" : 1,
44660702
DM
3310 "type" : "integer"
3311 },
3312 "vmid" : {
3313 "description" : "The (unique) ID of the VM.",
3314 "format" : "pve-vmid",
3315 "minimum" : 1,
3316 "type" : "integer"
56122987 3317 }
44660702 3318 }
7aacca6f 3319 },
56122987
DM
3320 "permissions" : {
3321 "check" : [
3322 "perm",
3323 "/vms/{vmid}",
3324 [
3325 "VM.Config.Network"
3326 ]
3327 ]
3328 },
44660702
DM
3329 "protected" : 1,
3330 "proxyto" : null,
56122987
DM
3331 "returns" : {
3332 "type" : "null"
44660702
DM
3333 }
3334 },
3335 "GET" : {
3336 "description" : "Get single rule data.",
3337 "method" : "GET",
3338 "name" : "get_rule",
3339 "parameters" : {
3340 "additionalProperties" : 0,
3341 "properties" : {
3342 "node" : {
3343 "description" : "The cluster node name.",
3344 "format" : "pve-node",
3345 "type" : "string"
3346 },
3347 "pos" : {
3348 "description" : "Update rule at position <pos>.",
3349 "minimum" : 0,
3350 "optional" : 1,
3351 "type" : "integer"
3352 },
3353 "vmid" : {
3354 "description" : "The (unique) ID of the VM.",
3355 "format" : "pve-vmid",
3356 "minimum" : 1,
3357 "type" : "integer"
3358 }
3359 }
56122987 3360 },
56122987
DM
3361 "permissions" : {
3362 "check" : [
3363 "perm",
3364 "/vms/{vmid}",
3365 [
44660702 3366 "VM.Audit"
56122987
DM
3367 ]
3368 ]
3369 },
56122987 3370 "proxyto" : null,
44660702
DM
3371 "returns" : {
3372 "properties" : {
3373 "pos" : {
3374 "type" : "integer"
3375 }
3376 },
3377 "type" : "object"
3378 }
3379 },
3380 "PUT" : {
7aacca6f
DM
3381 "description" : "Modify rule data.",
3382 "method" : "PUT",
44660702 3383 "name" : "update_rule",
56122987 3384 "parameters" : {
44660702 3385 "additionalProperties" : 0,
56122987 3386 "properties" : {
44660702
DM
3387 "action" : {
3388 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3389 "maxLength" : 20,
3390 "minLength" : 2,
56122987 3391 "optional" : 1,
44660702 3392 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
3393 "type" : "string"
3394 },
7aacca6f
DM
3395 "comment" : {
3396 "optional" : 1,
3397 "type" : "string"
3398 },
3399 "delete" : {
7aacca6f 3400 "description" : "A list of settings you want to delete.",
44660702
DM
3401 "format" : "pve-configid-list",
3402 "optional" : 1,
3403 "type" : "string"
7aacca6f
DM
3404 },
3405 "dest" : {
44660702 3406 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
7aacca6f 3407 "format" : "pve-fw-addr-spec",
56122987 3408 "optional" : 1,
44660702 3409 "type" : "string"
56122987 3410 },
7aacca6f 3411 "digest" : {
44660702 3412 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 3413 "maxLength" : 40,
56122987 3414 "optional" : 1,
44660702
DM
3415 "type" : "string"
3416 },
3417 "dport" : {
3418 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
3419 "format" : "pve-fw-dport-spec",
3420 "optional" : 1,
3421 "type" : "string"
56122987 3422 },
7aacca6f 3423 "enable" : {
44660702 3424 "minimum" : 0,
56122987 3425 "optional" : 1,
44660702 3426 "type" : "integer"
7aacca6f 3427 },
44660702
DM
3428 "iface" : {
3429 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
3430 "format" : "pve-iface",
3431 "maxLength" : 20,
7aacca6f 3432 "minLength" : 2,
56122987 3433 "optional" : 1,
44660702 3434 "type" : "string"
56122987 3435 },
44660702
DM
3436 "macro" : {
3437 "maxLength" : 128,
56122987 3438 "optional" : 1,
44660702 3439 "type" : "string"
56122987 3440 },
44660702
DM
3441 "moveto" : {
3442 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
3443 "minimum" : 0,
56122987 3444 "optional" : 1,
44660702 3445 "type" : "integer"
56122987 3446 },
44660702
DM
3447 "node" : {
3448 "description" : "The cluster node name.",
3449 "format" : "pve-node",
3450 "type" : "string"
3451 },
3452 "pos" : {
3453 "description" : "Update rule at position <pos>.",
3454 "minimum" : 0,
3455 "optional" : 1,
7aacca6f 3456 "type" : "integer"
56122987 3457 },
44660702
DM
3458 "proto" : {
3459 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3460 "format" : "pve-fw-protocol-spec",
3461 "optional" : 1,
3462 "type" : "string"
7aacca6f 3463 },
44660702
DM
3464 "source" : {
3465 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
3466 "format" : "pve-fw-addr-spec",
56122987 3467 "optional" : 1,
7aacca6f 3468 "type" : "string"
56122987
DM
3469 },
3470 "sport" : {
3471 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
44660702
DM
3472 "format" : "pve-fw-sport-spec",
3473 "optional" : 1,
3474 "type" : "string"
3475 },
3476 "type" : {
3477 "enum" : [
3478 "in",
3479 "out",
3480 "group"
3481 ],
56122987 3482 "optional" : 1,
56122987 3483 "type" : "string"
44660702
DM
3484 },
3485 "vmid" : {
3486 "description" : "The (unique) ID of the VM.",
3487 "format" : "pve-vmid",
3488 "minimum" : 1,
3489 "type" : "integer"
56122987 3490 }
44660702 3491 }
56122987 3492 },
56122987
DM
3493 "permissions" : {
3494 "check" : [
3495 "perm",
3496 "/vms/{vmid}",
3497 [
44660702 3498 "VM.Config.Network"
56122987
DM
3499 ]
3500 ]
7aacca6f 3501 },
44660702 3502 "protected" : 1,
7aacca6f 3503 "proxyto" : null,
7aacca6f 3504 "returns" : {
44660702
DM
3505 "type" : "null"
3506 }
56122987 3507 }
7aacca6f 3508 },
44660702 3509 "leaf" : 1,
7aacca6f 3510 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}",
44660702 3511 "text" : "{pos}"
56122987
DM
3512 }
3513 ],
56122987 3514 "info" : {
44660702
DM
3515 "GET" : {
3516 "description" : "List rules.",
3517 "method" : "GET",
3518 "name" : "get_rules",
3519 "parameters" : {
3520 "additionalProperties" : 0,
3521 "properties" : {
3522 "node" : {
3523 "description" : "The cluster node name.",
3524 "format" : "pve-node",
3525 "type" : "string"
3526 },
3527 "vmid" : {
3528 "description" : "The (unique) ID of the VM.",
3529 "format" : "pve-vmid",
3530 "minimum" : 1,
3531 "type" : "integer"
3532 }
3533 }
56122987 3534 },
56122987
DM
3535 "permissions" : {
3536 "check" : [
3537 "perm",
3538 "/vms/{vmid}",
3539 [
44660702 3540 "VM.Audit"
56122987
DM
3541 ]
3542 ]
7aacca6f 3543 },
44660702
DM
3544 "proxyto" : null,
3545 "returns" : {
3546 "items" : {
3547 "properties" : {
3548 "pos" : {
3549 "type" : "integer"
3550 }
3551 },
3552 "type" : "object"
3553 },
3554 "links" : [
3555 {
3556 "href" : "{pos}",
3557 "rel" : "child"
3558 }
3559 ],
3560 "type" : "array"
3561 }
3562 },
3563 "POST" : {
3564 "description" : "Create new rule.",
7aacca6f 3565 "method" : "POST",
44660702 3566 "name" : "create_rule",
56122987 3567 "parameters" : {
44660702 3568 "additionalProperties" : 0,
56122987 3569 "properties" : {
44660702
DM
3570 "action" : {
3571 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3572 "maxLength" : 20,
3573 "minLength" : 2,
3574 "optional" : 0,
3575 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3576 "type" : "string"
56122987 3577 },
44660702 3578 "comment" : {
56122987 3579 "optional" : 1,
56122987
DM
3580 "type" : "string"
3581 },
44660702
DM
3582 "dest" : {
3583 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
3584 "format" : "pve-fw-addr-spec",
3585 "optional" : 1,
3586 "type" : "string"
56122987 3587 },
44660702
DM
3588 "digest" : {
3589 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3590 "maxLength" : 40,
56122987 3591 "optional" : 1,
44660702 3592 "type" : "string"
56122987 3593 },
7aacca6f
DM
3594 "dport" : {
3595 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
44660702 3596 "format" : "pve-fw-dport-spec",
7aacca6f 3597 "optional" : 1,
44660702 3598 "type" : "string"
56122987
DM
3599 },
3600 "enable" : {
3601 "minimum" : 0,
44660702
DM
3602 "optional" : 1,
3603 "type" : "integer"
56122987 3604 },
44660702
DM
3605 "iface" : {
3606 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
3607 "format" : "pve-iface",
3608 "maxLength" : 20,
7aacca6f 3609 "minLength" : 2,
44660702
DM
3610 "optional" : 1,
3611 "type" : "string"
56122987 3612 },
44660702
DM
3613 "macro" : {
3614 "maxLength" : 128,
56122987 3615 "optional" : 1,
44660702 3616 "type" : "string"
7aacca6f 3617 },
44660702
DM
3618 "node" : {
3619 "description" : "The cluster node name.",
3620 "format" : "pve-node",
3621 "type" : "string"
3622 },
3623 "pos" : {
3624 "description" : "Update rule at position <pos>.",
3625 "minimum" : 0,
3626 "optional" : 1,
3627 "type" : "integer"
3628 },
3629 "proto" : {
3630 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3631 "format" : "pve-fw-protocol-spec",
7aacca6f 3632 "optional" : 1,
56122987 3633 "type" : "string"
7aacca6f
DM
3634 },
3635 "source" : {
3636 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
44660702 3637 "format" : "pve-fw-addr-spec",
7aacca6f 3638 "optional" : 1,
44660702 3639 "type" : "string"
7aacca6f 3640 },
44660702
DM
3641 "sport" : {
3642 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
3643 "format" : "pve-fw-sport-spec",
7aacca6f 3644 "optional" : 1,
44660702 3645 "type" : "string"
7aacca6f 3646 },
44660702
DM
3647 "type" : {
3648 "enum" : [
3649 "in",
3650 "out",
3651 "group"
3652 ],
3653 "optional" : 0,
3654 "type" : "string"
7aacca6f 3655 },
7aacca6f 3656 "vmid" : {
44660702 3657 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
3658 "format" : "pve-vmid",
3659 "minimum" : 1,
7aacca6f 3660 "type" : "integer"
7aacca6f
DM
3661 }
3662 }
3663 },
56122987
DM
3664 "permissions" : {
3665 "check" : [
3666 "perm",
3667 "/vms/{vmid}",
3668 [
44660702 3669 "VM.Config.Network"
56122987
DM
3670 ]
3671 ]
3672 },
44660702
DM
3673 "protected" : 1,
3674 "proxyto" : null,
56122987 3675 "returns" : {
44660702
DM
3676 "type" : "null"
3677 }
56122987
DM
3678 }
3679 },
44660702 3680 "leaf" : 0,
7aacca6f 3681 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules",
44660702 3682 "text" : "rules"
56122987
DM
3683 },
3684 {
3685 "children" : [
3686 {
56122987 3687 "info" : {
44660702
DM
3688 "DELETE" : {
3689 "description" : "Remove IP or Network alias.",
3690 "method" : "DELETE",
3691 "name" : "remove_alias",
56122987 3692 "parameters" : {
44660702 3693 "additionalProperties" : 0,
56122987 3694 "properties" : {
44660702
DM
3695 "digest" : {
3696 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3697 "maxLength" : 40,
3698 "optional" : 1,
3699 "type" : "string"
56122987
DM
3700 },
3701 "name" : {
56122987 3702 "description" : "Alias name.",
44660702 3703 "maxLength" : 64,
7aacca6f 3704 "minLength" : 2,
44660702 3705 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
3706 "type" : "string"
3707 },
7aacca6f 3708 "node" : {
44660702 3709 "description" : "The cluster node name.",
7aacca6f 3710 "format" : "pve-node",
44660702
DM
3711 "type" : "string"
3712 },
3713 "vmid" : {
3714 "description" : "The (unique) ID of the VM.",
3715 "format" : "pve-vmid",
3716 "minimum" : 1,
3717 "type" : "integer"
56122987 3718 }
44660702 3719 }
56122987 3720 },
7aacca6f
DM
3721 "permissions" : {
3722 "check" : [
3723 "perm",
3724 "/vms/{vmid}",
3725 [
3726 "VM.Config.Network"
3727 ]
3728 ]
56122987 3729 },
44660702
DM
3730 "protected" : 1,
3731 "returns" : {
3732 "type" : "null"
3733 }
3734 },
3735 "GET" : {
3736 "description" : "Read alias.",
3737 "method" : "GET",
3738 "name" : "read_alias",
56122987 3739 "parameters" : {
44660702 3740 "additionalProperties" : 0,
56122987 3741 "properties" : {
56122987 3742 "name" : {
7aacca6f 3743 "description" : "Alias name.",
44660702 3744 "maxLength" : 64,
56122987 3745 "minLength" : 2,
44660702 3746 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 3747 "type" : "string"
7aacca6f
DM
3748 },
3749 "node" : {
3750 "description" : "The cluster node name.",
44660702
DM
3751 "format" : "pve-node",
3752 "type" : "string"
3753 },
3754 "vmid" : {
3755 "description" : "The (unique) ID of the VM.",
3756 "format" : "pve-vmid",
3757 "minimum" : 1,
3758 "type" : "integer"
56122987 3759 }
44660702 3760 }
56122987 3761 },
44660702
DM
3762 "permissions" : {
3763 "check" : [
3764 "perm",
3765 "/vms/{vmid}",
3766 [
3767 "VM.Audit"
3768 ]
3769 ]
56122987 3770 },
44660702
DM
3771 "returns" : {
3772 "type" : "object"
3773 }
7aacca6f 3774 },
44660702
DM
3775 "PUT" : {
3776 "description" : "Update IP or Network alias.",
3777 "method" : "PUT",
3778 "name" : "update_alias",
56122987
DM
3779 "parameters" : {
3780 "additionalProperties" : 0,
3781 "properties" : {
44660702
DM
3782 "cidr" : {
3783 "description" : "Network/IP specification in CIDR format.",
3784 "format" : "IPorCIDR",
3785 "type" : "string"
3786 },
3787 "comment" : {
3788 "optional" : 1,
3789 "type" : "string"
56122987
DM
3790 },
3791 "digest" : {
44660702 3792 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987
DM
3793 "maxLength" : 40,
3794 "optional" : 1,
44660702 3795 "type" : "string"
56122987 3796 },
7aacca6f 3797 "name" : {
44660702 3798 "description" : "Alias name.",
56122987
DM
3799 "maxLength" : 64,
3800 "minLength" : 2,
3801 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 3802 "type" : "string"
7aacca6f
DM
3803 },
3804 "node" : {
7aacca6f 3805 "description" : "The cluster node name.",
44660702
DM
3806 "format" : "pve-node",
3807 "type" : "string"
3808 },
3809 "rename" : {
3810 "description" : "Rename an existing alias.",
3811 "maxLength" : 64,
3812 "minLength" : 2,
3813 "optional" : 1,
3814 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3815 "type" : "string"
3816 },
3817 "vmid" : {
3818 "description" : "The (unique) ID of the VM.",
3819 "format" : "pve-vmid",
3820 "minimum" : 1,
3821 "type" : "integer"
56122987
DM
3822 }
3823 }
3824 },
7aacca6f
DM
3825 "permissions" : {
3826 "check" : [
3827 "perm",
3828 "/vms/{vmid}",
3829 [
3830 "VM.Config.Network"
3831 ]
3832 ]
3833 },
3834 "protected" : 1,
7aacca6f
DM
3835 "returns" : {
3836 "type" : "null"
44660702 3837 }
56122987
DM
3838 }
3839 },
44660702 3840 "leaf" : 1,
7aacca6f 3841 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}",
44660702 3842 "text" : "{name}"
56122987
DM
3843 }
3844 ],
3845 "info" : {
44660702
DM
3846 "GET" : {
3847 "description" : "List aliases",
3848 "method" : "GET",
3849 "name" : "get_aliases",
56122987 3850 "parameters" : {
44660702 3851 "additionalProperties" : 0,
56122987 3852 "properties" : {
7aacca6f 3853 "node" : {
7aacca6f 3854 "description" : "The cluster node name.",
44660702 3855 "format" : "pve-node",
7aacca6f 3856 "type" : "string"
56122987 3857 },
44660702
DM
3858 "vmid" : {
3859 "description" : "The (unique) ID of the VM.",
3860 "format" : "pve-vmid",
3861 "minimum" : 1,
3862 "type" : "integer"
56122987 3863 }
44660702 3864 }
56122987 3865 },
56122987
DM
3866 "permissions" : {
3867 "check" : [
3868 "perm",
3869 "/vms/{vmid}",
3870 [
44660702 3871 "VM.Audit"
56122987
DM
3872 ]
3873 ]
3874 },
56122987
DM
3875 "returns" : {
3876 "items" : {
3877 "properties" : {
44660702 3878 "cidr" : {
56122987
DM
3879 "type" : "string"
3880 },
44660702
DM
3881 "comment" : {
3882 "optional" : 1,
7aacca6f 3883 "type" : "string"
56122987
DM
3884 },
3885 "digest" : {
56122987 3886 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 3887 "maxLength" : 40,
56122987
DM
3888 "optional" : 0,
3889 "type" : "string"
3890 },
44660702 3891 "name" : {
56122987
DM
3892 "type" : "string"
3893 }
44660702
DM
3894 },
3895 "type" : "object"
56122987 3896 },
56122987
DM
3897 "links" : [
3898 {
3899 "href" : "{name}",
3900 "rel" : "child"
3901 }
44660702
DM
3902 ],
3903 "type" : "array"
3904 }
3905 },
3906 "POST" : {
3907 "description" : "Create IP or Network Alias.",
3908 "method" : "POST",
3909 "name" : "create_alias",
56122987 3910 "parameters" : {
7aacca6f 3911 "additionalProperties" : 0,
56122987 3912 "properties" : {
44660702
DM
3913 "cidr" : {
3914 "description" : "Network/IP specification in CIDR format.",
3915 "format" : "IPorCIDR",
3916 "type" : "string"
3917 },
3918 "comment" : {
3919 "optional" : 1,
3920 "type" : "string"
3921 },
3922 "name" : {
3923 "description" : "Alias name.",
3924 "maxLength" : 64,
3925 "minLength" : 2,
3926 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3927 "type" : "string"
56122987
DM
3928 },
3929 "node" : {
7aacca6f 3930 "description" : "The cluster node name.",
44660702 3931 "format" : "pve-node",
56122987 3932 "type" : "string"
44660702
DM
3933 },
3934 "vmid" : {
3935 "description" : "The (unique) ID of the VM.",
3936 "format" : "pve-vmid",
3937 "minimum" : 1,
3938 "type" : "integer"
56122987 3939 }
7aacca6f 3940 }
56122987 3941 },
44660702
DM
3942 "permissions" : {
3943 "check" : [
3944 "perm",
3945 "/vms/{vmid}",
3946 [
3947 "VM.Config.Network"
3948 ]
3949 ]
3950 },
3951 "protected" : 1,
3952 "returns" : {
3953 "type" : "null"
3954 }
56122987 3955 }
44660702
DM
3956 },
3957 "leaf" : 0,
3958 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases",
3959 "text" : "aliases"
56122987
DM
3960 },
3961 {
56122987
DM
3962 "children" : [
3963 {
7aacca6f
DM
3964 "children" : [
3965 {
3966 "info" : {
3967 "DELETE" : {
44660702 3968 "description" : "Remove IP or Network from IPSet.",
7aacca6f 3969 "method" : "DELETE",
44660702 3970 "name" : "remove_ip",
7aacca6f 3971 "parameters" : {
44660702 3972 "additionalProperties" : 0,
7aacca6f 3973 "properties" : {
44660702
DM
3974 "cidr" : {
3975 "description" : "Network/IP specification in CIDR format.",
3976 "format" : "IPorCIDRorAlias",
3977 "type" : "string"
3978 },
3979 "digest" : {
3980 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3981 "maxLength" : 40,
3982 "optional" : 1,
3983 "type" : "string"
3984 },
7aacca6f 3985 "name" : {
7aacca6f 3986 "description" : "IP set name.",
44660702
DM
3987 "maxLength" : 64,
3988 "minLength" : 2,
7aacca6f 3989 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 3990 "type" : "string"
7aacca6f
DM
3991 },
3992 "node" : {
3993 "description" : "The cluster node name.",
44660702
DM
3994 "format" : "pve-node",
3995 "type" : "string"
7aacca6f
DM
3996 },
3997 "vmid" : {
44660702 3998 "description" : "The (unique) ID of the VM.",
7aacca6f 3999 "format" : "pve-vmid",
44660702
DM
4000 "minimum" : 1,
4001 "type" : "integer"
7aacca6f 4002 }
44660702 4003 }
7aacca6f 4004 },
7aacca6f
DM
4005 "permissions" : {
4006 "check" : [
4007 "perm",
4008 "/vms/{vmid}",
4009 [
4010 "VM.Config.Network"
4011 ]
4012 ]
4013 },
4014 "protected" : 1,
44660702
DM
4015 "returns" : {
4016 "type" : "null"
4017 }
56122987 4018 },
44660702
DM
4019 "GET" : {
4020 "description" : "Read IP or Network settings from IPSet.",
4021 "method" : "GET",
4022 "name" : "read_ip",
7aacca6f 4023 "parameters" : {
44660702 4024 "additionalProperties" : 0,
7aacca6f 4025 "properties" : {
7aacca6f 4026 "cidr" : {
44660702 4027 "description" : "Network/IP specification in CIDR format.",
7aacca6f 4028 "format" : "IPorCIDRorAlias",
44660702 4029 "type" : "string"
7aacca6f
DM
4030 },
4031 "name" : {
7aacca6f 4032 "description" : "IP set name.",
44660702 4033 "maxLength" : 64,
7aacca6f 4034 "minLength" : 2,
44660702
DM
4035 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4036 "type" : "string"
7aacca6f 4037 },
44660702
DM
4038 "node" : {
4039 "description" : "The cluster node name.",
4040 "format" : "pve-node",
7aacca6f
DM
4041 "type" : "string"
4042 },
44660702
DM
4043 "vmid" : {
4044 "description" : "The (unique) ID of the VM.",
4045 "format" : "pve-vmid",
4046 "minimum" : 1,
4047 "type" : "integer"
7aacca6f 4048 }
44660702 4049 }
7aacca6f 4050 },
44660702
DM
4051 "permissions" : {
4052 "check" : [
4053 "perm",
4054 "/vms/{vmid}",
4055 [
4056 "VM.Audit"
4057 ]
4058 ]
4059 },
4060 "protected" : 1,
7aacca6f 4061 "returns" : {
44660702 4062 "type" : "object"
7aacca6f 4063 }
56122987 4064 },
44660702
DM
4065 "PUT" : {
4066 "description" : "Update IP or Network settings",
4067 "method" : "PUT",
4068 "name" : "update_ip",
7aacca6f
DM
4069 "parameters" : {
4070 "additionalProperties" : 0,
4071 "properties" : {
44660702
DM
4072 "cidr" : {
4073 "description" : "Network/IP specification in CIDR format.",
4074 "format" : "IPorCIDRorAlias",
4075 "type" : "string"
4076 },
4077 "comment" : {
4078 "optional" : 1,
4079 "type" : "string"
4080 },
4081 "digest" : {
4082 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4083 "maxLength" : 40,
4084 "optional" : 1,
4085 "type" : "string"
4086 },
7aacca6f 4087 "name" : {
7aacca6f 4088 "description" : "IP set name.",
44660702 4089 "maxLength" : 64,
7aacca6f 4090 "minLength" : 2,
44660702
DM
4091 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4092 "type" : "string"
7aacca6f
DM
4093 },
4094 "node" : {
7aacca6f 4095 "description" : "The cluster node name.",
44660702 4096 "format" : "pve-node",
7aacca6f
DM
4097 "type" : "string"
4098 },
44660702
DM
4099 "nomatch" : {
4100 "optional" : 1,
4101 "type" : "boolean"
7aacca6f
DM
4102 },
4103 "vmid" : {
4104 "description" : "The (unique) ID of the VM.",
44660702 4105 "format" : "pve-vmid",
7aacca6f 4106 "minimum" : 1,
44660702 4107 "type" : "integer"
7aacca6f
DM
4108 }
4109 }
4110 },
4111 "permissions" : {
4112 "check" : [
4113 "perm",
4114 "/vms/{vmid}",
4115 [
44660702 4116 "VM.Config.Network"
7aacca6f
DM
4117 ]
4118 ]
4119 },
7aacca6f 4120 "protected" : 1,
7aacca6f 4121 "returns" : {
44660702 4122 "type" : "null"
7aacca6f 4123 }
56122987 4124 }
7aacca6f 4125 },
7aacca6f 4126 "leaf" : 1,
44660702
DM
4127 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}",
4128 "text" : "{cidr}"
7aacca6f 4129 }
44660702
DM
4130 ],
4131 "info" : {
4132 "DELETE" : {
4133 "description" : "Delete IPSet",
4134 "method" : "DELETE",
4135 "name" : "delete_ipset",
4136 "parameters" : {
4137 "additionalProperties" : 0,
4138 "properties" : {
4139 "name" : {
4140 "description" : "IP set name.",
4141 "maxLength" : 64,
4142 "minLength" : 2,
4143 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4144 "type" : "string"
4145 },
4146 "node" : {
4147 "description" : "The cluster node name.",
4148 "format" : "pve-node",
4149 "type" : "string"
4150 },
4151 "vmid" : {
4152 "description" : "The (unique) ID of the VM.",
4153 "format" : "pve-vmid",
4154 "minimum" : 1,
4155 "type" : "integer"
4156 }
4157 }
7aacca6f 4158 },
44660702
DM
4159 "permissions" : {
4160 "check" : [
4161 "perm",
4162 "/vms/{vmid}",
4163 [
4164 "VM.Config.Network"
4165 ]
4166 ]
7aacca6f 4167 },
44660702
DM
4168 "protected" : 1,
4169 "returns" : {
4170 "type" : "null"
4171 }
4172 },
4173 "GET" : {
4174 "description" : "List IPSet content",
4175 "method" : "GET",
4176 "name" : "get_ipset",
4177 "parameters" : {
4178 "additionalProperties" : 0,
4179 "properties" : {
4180 "name" : {
4181 "description" : "IP set name.",
4182 "maxLength" : 64,
4183 "minLength" : 2,
4184 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4185 "type" : "string"
4186 },
4187 "node" : {
4188 "description" : "The cluster node name.",
4189 "format" : "pve-node",
4190 "type" : "string"
4191 },
4192 "vmid" : {
4193 "description" : "The (unique) ID of the VM.",
4194 "format" : "pve-vmid",
4195 "minimum" : 1,
4196 "type" : "integer"
4197 }
4198 }
7aacca6f 4199 },
44660702
DM
4200 "permissions" : {
4201 "check" : [
4202 "perm",
4203 "/vms/{vmid}",
4204 [
4205 "VM.Audit"
4206 ]
4207 ]
7aacca6f 4208 },
44660702
DM
4209 "returns" : {
4210 "items" : {
4211 "properties" : {
4212 "cidr" : {
4213 "type" : "string"
4214 },
4215 "comment" : {
4216 "optional" : 1,
4217 "type" : "string"
4218 },
4219 "digest" : {
4220 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4221 "maxLength" : 40,
4222 "optional" : 0,
4223 "type" : "string"
4224 },
4225 "nomatch" : {
4226 "optional" : 1,
4227 "type" : "boolean"
4228 }
4229 },
4230 "type" : "object"
4231 },
4232 "links" : [
4233 {
4234 "href" : "{cidr}",
4235 "rel" : "child"
4236 }
4237 ],
4238 "type" : "array"
56122987
DM
4239 }
4240 },
44660702
DM
4241 "POST" : {
4242 "description" : "Add IP or Network to IPSet.",
4243 "method" : "POST",
4244 "name" : "create_ip",
4245 "parameters" : {
4246 "additionalProperties" : 0,
4247 "properties" : {
4248 "cidr" : {
4249 "description" : "Network/IP specification in CIDR format.",
4250 "format" : "IPorCIDRorAlias",
4251 "type" : "string"
4252 },
4253 "comment" : {
4254 "optional" : 1,
4255 "type" : "string"
4256 },
4257 "name" : {
4258 "description" : "IP set name.",
4259 "maxLength" : 64,
4260 "minLength" : 2,
4261 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4262 "type" : "string"
4263 },
4264 "node" : {
4265 "description" : "The cluster node name.",
4266 "format" : "pve-node",
4267 "type" : "string"
4268 },
4269 "nomatch" : {
4270 "optional" : 1,
4271 "type" : "boolean"
4272 },
4273 "vmid" : {
4274 "description" : "The (unique) ID of the VM.",
4275 "format" : "pve-vmid",
4276 "minimum" : 1,
4277 "type" : "integer"
4278 }
4279 }
4280 },
4281 "permissions" : {
4282 "check" : [
4283 "perm",
4284 "/vms/{vmid}",
4285 [
4286 "VM.Config.Network"
4287 ]
4288 ]
4289 },
4290 "protected" : 1,
4291 "returns" : {
4292 "type" : "null"
4293 }
4294 }
4295 },
4296 "leaf" : 0,
4297 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}",
4298 "text" : "{name}"
4299 }
4300 ],
4301 "info" : {
4302 "GET" : {
4303 "description" : "List IPSets",
4304 "method" : "GET",
4305 "name" : "ipset_index",
4306 "parameters" : {
4307 "additionalProperties" : 0,
4308 "properties" : {
4309 "node" : {
4310 "description" : "The cluster node name.",
4311 "format" : "pve-node",
4312 "type" : "string"
4313 },
4314 "vmid" : {
4315 "description" : "The (unique) ID of the VM.",
4316 "format" : "pve-vmid",
4317 "minimum" : 1,
4318 "type" : "integer"
4319 }
4320 }
56122987
DM
4321 },
4322 "permissions" : {
4323 "check" : [
4324 "perm",
4325 "/vms/{vmid}",
4326 [
44660702 4327 "VM.Audit"
56122987
DM
4328 ]
4329 ]
4330 },
7aacca6f 4331 "returns" : {
7aacca6f
DM
4332 "items" : {
4333 "properties" : {
7aacca6f
DM
4334 "comment" : {
4335 "optional" : 1,
4336 "type" : "string"
4337 },
4338 "digest" : {
7aacca6f 4339 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
4340 "maxLength" : 40,
4341 "optional" : 0,
4342 "type" : "string"
4343 },
4344 "name" : {
4345 "description" : "IP set name.",
4346 "maxLength" : 64,
4347 "minLength" : 2,
4348 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4349 "type" : "string"
7aacca6f
DM
4350 }
4351 },
4352 "type" : "object"
4353 },
4354 "links" : [
4355 {
44660702
DM
4356 "href" : "{name}",
4357 "rel" : "child"
7aacca6f 4358 }
44660702
DM
4359 ],
4360 "type" : "array"
4361 }
4362 },
4363 "POST" : {
4364 "description" : "Create new IPSet",
4365 "method" : "POST",
4366 "name" : "create_ipset",
56122987
DM
4367 "parameters" : {
4368 "additionalProperties" : 0,
4369 "properties" : {
44660702
DM
4370 "comment" : {
4371 "optional" : 1,
4372 "type" : "string"
56122987 4373 },
44660702
DM
4374 "digest" : {
4375 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4376 "maxLength" : 40,
4377 "optional" : 1,
4378 "type" : "string"
4379 },
4380 "name" : {
4381 "description" : "IP set name.",
4382 "maxLength" : 64,
4383 "minLength" : 2,
4384 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4385 "type" : "string"
4386 },
4387 "node" : {
4388 "description" : "The cluster node name.",
4389 "format" : "pve-node",
4390 "type" : "string"
4391 },
4392 "rename" : {
4393 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
4394 "maxLength" : 64,
4395 "minLength" : 2,
4396 "optional" : 1,
4397 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4398 "type" : "string"
4399 },
4400 "vmid" : {
4401 "description" : "The (unique) ID of the VM.",
4402 "format" : "pve-vmid",
4403 "minimum" : 1,
4404 "type" : "integer"
4405 }
4406 }
4407 },
7aacca6f
DM
4408 "permissions" : {
4409 "check" : [
4410 "perm",
4411 "/vms/{vmid}",
4412 [
4413 "VM.Config.Network"
4414 ]
4415 ]
4416 },
44660702 4417 "protected" : 1,
56122987 4418 "returns" : {
7aacca6f 4419 "type" : "null"
44660702
DM
4420 }
4421 }
4422 },
4423 "leaf" : 0,
4424 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset",
4425 "text" : "ipset"
4426 },
4427 {
4428 "info" : {
4429 "GET" : {
4430 "description" : "Get VM firewall options.",
4431 "method" : "GET",
4432 "name" : "get_options",
7aacca6f
DM
4433 "parameters" : {
4434 "additionalProperties" : 0,
56122987 4435 "properties" : {
7aacca6f
DM
4436 "node" : {
4437 "description" : "The cluster node name.",
44660702
DM
4438 "format" : "pve-node",
4439 "type" : "string"
7aacca6f 4440 },
44660702
DM
4441 "vmid" : {
4442 "description" : "The (unique) ID of the VM.",
4443 "format" : "pve-vmid",
4444 "minimum" : 1,
4445 "type" : "integer"
4446 }
4447 }
4448 },
4449 "permissions" : {
4450 "check" : [
4451 "perm",
4452 "/vms/{vmid}",
4453 [
4454 "VM.Audit"
4455 ]
4456 ]
4457 },
4458 "proxyto" : "node",
4459 "returns" : {
4460 "properties" : {
4461 "dhcp" : {
4462 "description" : "Enable DHCP.",
56122987 4463 "optional" : 1,
44660702 4464 "type" : "boolean"
56122987 4465 },
44660702
DM
4466 "enable" : {
4467 "description" : "Enable/disable firewall rules.",
7aacca6f 4468 "optional" : 1,
44660702 4469 "type" : "boolean"
56122987 4470 },
44660702
DM
4471 "ipfilter" : {
4472 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
7aacca6f 4473 "optional" : 1,
44660702 4474 "type" : "boolean"
7aacca6f 4475 },
56122987 4476 "log_level_in" : {
7aacca6f 4477 "description" : "Log level for incoming traffic.",
56122987
DM
4478 "enum" : [
4479 "emerg",
4480 "alert",
4481 "crit",
4482 "err",
4483 "warning",
4484 "notice",
4485 "info",
4486 "debug",
4487 "nolog"
4488 ],
56122987
DM
4489 "optional" : 1,
4490 "type" : "string"
4491 },
44660702
DM
4492 "log_level_out" : {
4493 "description" : "Log level for outgoing traffic.",
4494 "enum" : [
4495 "emerg",
4496 "alert",
4497 "crit",
4498 "err",
4499 "warning",
4500 "notice",
4501 "info",
4502 "debug",
4503 "nolog"
4504 ],
4505 "optional" : 1,
4506 "type" : "string"
4507 },
4508 "macfilter" : {
4509 "description" : "Enable/disable MAC address filter.",
56122987 4510 "optional" : 1,
7aacca6f 4511 "type" : "boolean"
56122987
DM
4512 },
4513 "ndp" : {
44660702 4514 "description" : "Enable NDP.",
56122987 4515 "optional" : 1,
44660702 4516 "type" : "boolean"
56122987
DM
4517 },
4518 "policy_in" : {
56122987
DM
4519 "description" : "Input policy.",
4520 "enum" : [
4521 "ACCEPT",
4522 "REJECT",
4523 "DROP"
44660702
DM
4524 ],
4525 "optional" : 1,
4526 "type" : "string"
56122987 4527 },
44660702
DM
4528 "policy_out" : {
4529 "description" : "Output policy.",
4530 "enum" : [
4531 "ACCEPT",
4532 "REJECT",
4533 "DROP"
4534 ],
4535 "optional" : 1,
4536 "type" : "string"
4537 },
4538 "radv" : {
4539 "description" : "Allow sending Router Advertisement.",
4540 "optional" : 1,
4541 "type" : "boolean"
4542 }
4543 },
4544 "type" : "object"
4545 }
4546 },
4547 "PUT" : {
4548 "description" : "Set Firewall options.",
4549 "method" : "PUT",
4550 "name" : "set_options",
4551 "parameters" : {
4552 "additionalProperties" : 0,
4553 "properties" : {
4554 "delete" : {
4555 "description" : "A list of settings you want to delete.",
4556 "format" : "pve-configid-list",
4557 "optional" : 1,
4558 "type" : "string"
4559 },
4560 "dhcp" : {
4561 "description" : "Enable DHCP.",
7aacca6f 4562 "optional" : 1,
44660702 4563 "type" : "boolean"
7aacca6f
DM
4564 },
4565 "digest" : {
4566 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 4567 "maxLength" : 40,
7aacca6f 4568 "optional" : 1,
44660702 4569 "type" : "string"
7aacca6f
DM
4570 },
4571 "enable" : {
4572 "description" : "Enable/disable firewall rules.",
56122987 4573 "optional" : 1,
7aacca6f
DM
4574 "type" : "boolean"
4575 },
44660702
DM
4576 "ipfilter" : {
4577 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
4578 "optional" : 1,
4579 "type" : "boolean"
4580 },
4581 "log_level_in" : {
4582 "description" : "Log level for incoming traffic.",
56122987
DM
4583 "enum" : [
4584 "emerg",
4585 "alert",
4586 "crit",
4587 "err",
4588 "warning",
4589 "notice",
4590 "info",
4591 "debug",
4592 "nolog"
7aacca6f 4593 ],
7aacca6f 4594 "optional" : 1,
44660702 4595 "type" : "string"
7aacca6f 4596 },
44660702
DM
4597 "log_level_out" : {
4598 "description" : "Log level for outgoing traffic.",
56122987
DM
4599 "enum" : [
4600 "emerg",
4601 "alert",
4602 "crit",
4603 "err",
4604 "warning",
4605 "notice",
4606 "info",
4607 "debug",
4608 "nolog"
4609 ],
56122987 4610 "optional" : 1,
44660702 4611 "type" : "string"
56122987
DM
4612 },
4613 "macfilter" : {
56122987 4614 "description" : "Enable/disable MAC address filter.",
7aacca6f
DM
4615 "optional" : 1,
4616 "type" : "boolean"
56122987 4617 },
44660702
DM
4618 "ndp" : {
4619 "description" : "Enable NDP.",
4620 "optional" : 1,
4621 "type" : "boolean"
4622 },
4623 "node" : {
4624 "description" : "The cluster node name.",
4625 "format" : "pve-node",
4626 "type" : "string"
4627 },
56122987 4628 "policy_in" : {
44660702 4629 "description" : "Input policy.",
56122987
DM
4630 "enum" : [
4631 "ACCEPT",
4632 "REJECT",
4633 "DROP"
7aacca6f 4634 ],
56122987 4635 "optional" : 1,
7aacca6f 4636 "type" : "string"
56122987 4637 },
44660702
DM
4638 "policy_out" : {
4639 "description" : "Output policy.",
4640 "enum" : [
4641 "ACCEPT",
4642 "REJECT",
4643 "DROP"
4644 ],
56122987 4645 "optional" : 1,
44660702 4646 "type" : "string"
56122987 4647 },
44660702
DM
4648 "radv" : {
4649 "description" : "Allow sending Router Advertisement.",
56122987 4650 "optional" : 1,
44660702 4651 "type" : "boolean"
7aacca6f
DM
4652 },
4653 "vmid" : {
4654 "description" : "The (unique) ID of the VM.",
44660702 4655 "format" : "pve-vmid",
7aacca6f 4656 "minimum" : 1,
44660702 4657 "type" : "integer"
56122987
DM
4658 }
4659 }
4660 },
56122987
DM
4661 "permissions" : {
4662 "check" : [
4663 "perm",
4664 "/vms/{vmid}",
4665 [
44660702 4666 "VM.Config.Network"
56122987
DM
4667 ]
4668 ]
7aacca6f 4669 },
44660702 4670 "protected" : 1,
7aacca6f 4671 "proxyto" : "node",
44660702
DM
4672 "returns" : {
4673 "type" : "null"
4674 }
56122987
DM
4675 }
4676 },
44660702 4677 "leaf" : 1,
7aacca6f 4678 "path" : "/nodes/{node}/qemu/{vmid}/firewall/options",
44660702 4679 "text" : "options"
56122987
DM
4680 },
4681 {
56122987
DM
4682 "info" : {
4683 "GET" : {
44660702
DM
4684 "description" : "Read firewall log",
4685 "method" : "GET",
4686 "name" : "log",
4687 "parameters" : {
4688 "additionalProperties" : 0,
4689 "properties" : {
4690 "limit" : {
4691 "minimum" : 0,
4692 "optional" : 1,
4693 "type" : "integer"
56122987 4694 },
44660702
DM
4695 "node" : {
4696 "description" : "The cluster node name.",
4697 "format" : "pve-node",
4698 "type" : "string"
4699 },
4700 "start" : {
4701 "minimum" : 0,
4702 "optional" : 1,
4703 "type" : "integer"
4704 },
4705 "vmid" : {
4706 "description" : "The (unique) ID of the VM.",
4707 "format" : "pve-vmid",
4708 "minimum" : 1,
4709 "type" : "integer"
4710 }
4711 }
7aacca6f 4712 },
7aacca6f
DM
4713 "permissions" : {
4714 "check" : [
4715 "perm",
4716 "/vms/{vmid}",
4717 [
4718 "VM.Console"
4719 ]
4720 ]
56122987 4721 },
7aacca6f 4722 "protected" : 1,
44660702
DM
4723 "proxyto" : "node",
4724 "returns" : {
4725 "items" : {
4726 "properties" : {
4727 "n" : {
4728 "description" : "Line number",
4729 "type" : "integer"
4730 },
4731 "t" : {
4732 "description" : "Line text",
4733 "type" : "string"
4734 }
56122987 4735 },
44660702 4736 "type" : "object"
7aacca6f 4737 },
44660702 4738 "type" : "array"
7aacca6f
DM
4739 }
4740 }
4741 },
44660702 4742 "leaf" : 1,
7aacca6f 4743 "path" : "/nodes/{node}/qemu/{vmid}/firewall/log",
44660702 4744 "text" : "log"
7aacca6f
DM
4745 },
4746 {
7aacca6f
DM
4747 "info" : {
4748 "GET" : {
4749 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
4750 "method" : "GET",
4751 "name" : "refs",
56122987 4752 "parameters" : {
44660702 4753 "additionalProperties" : 0,
56122987
DM
4754 "properties" : {
4755 "node" : {
7aacca6f 4756 "description" : "The cluster node name.",
44660702 4757 "format" : "pve-node",
7aacca6f 4758 "type" : "string"
56122987
DM
4759 },
4760 "type" : {
56122987
DM
4761 "description" : "Only list references of specified type.",
4762 "enum" : [
4763 "alias",
4764 "ipset"
7aacca6f 4765 ],
44660702
DM
4766 "optional" : 1,
4767 "type" : "string"
4768 },
4769 "vmid" : {
4770 "description" : "The (unique) ID of the VM.",
4771 "format" : "pve-vmid",
4772 "minimum" : 1,
4773 "type" : "integer"
56122987 4774 }
44660702
DM
4775 }
4776 },
4777 "permissions" : {
4778 "check" : [
4779 "perm",
4780 "/vms/{vmid}",
4781 [
4782 "VM.Audit"
4783 ]
4784 ]
56122987
DM
4785 },
4786 "returns" : {
56122987
DM
4787 "items" : {
4788 "properties" : {
44660702
DM
4789 "comment" : {
4790 "optional" : 1,
56122987
DM
4791 "type" : "string"
4792 },
4793 "name" : {
4794 "type" : "string"
4795 },
44660702
DM
4796 "type" : {
4797 "enum" : [
4798 "alias",
4799 "ipset"
4800 ],
7aacca6f 4801 "type" : "string"
56122987
DM
4802 }
4803 },
4804 "type" : "object"
7aacca6f
DM
4805 },
4806 "type" : "array"
4807 }
56122987 4808 }
44660702
DM
4809 },
4810 "leaf" : 1,
4811 "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs",
4812 "text" : "refs"
56122987
DM
4813 }
4814 ],
56122987
DM
4815 "info" : {
4816 "GET" : {
44660702 4817 "description" : "Directory index.",
56122987 4818 "method" : "GET",
44660702 4819 "name" : "index",
56122987 4820 "parameters" : {
44660702 4821 "additionalProperties" : 0,
56122987
DM
4822 "properties" : {
4823 "node" : {
4824 "description" : "The cluster node name.",
44660702
DM
4825 "format" : "pve-node",
4826 "type" : "string"
56122987
DM
4827 },
4828 "vmid" : {
44660702 4829 "description" : "The (unique) ID of the VM.",
56122987
DM
4830 "format" : "pve-vmid",
4831 "minimum" : 1,
44660702 4832 "type" : "integer"
56122987 4833 }
44660702 4834 }
56122987 4835 },
56122987
DM
4836 "permissions" : {
4837 "user" : "all"
7aacca6f 4838 },
44660702
DM
4839 "returns" : {
4840 "items" : {
4841 "properties" : {},
4842 "type" : "object"
4843 },
4844 "links" : [
4845 {
4846 "href" : "{name}",
4847 "rel" : "child"
4848 }
4849 ],
4850 "type" : "array"
4851 }
56122987 4852 }
44660702
DM
4853 },
4854 "leaf" : 0,
4855 "path" : "/nodes/{node}/qemu/{vmid}/firewall",
4856 "text" : "firewall"
56122987
DM
4857 },
4858 {
56122987
DM
4859 "info" : {
4860 "GET" : {
44660702
DM
4861 "description" : "Read VM RRD statistics (returns PNG)",
4862 "method" : "GET",
7aacca6f 4863 "name" : "rrd",
56122987
DM
4864 "parameters" : {
4865 "additionalProperties" : 0,
4866 "properties" : {
7aacca6f 4867 "cf" : {
44660702 4868 "description" : "The RRD consolidation function",
7aacca6f
DM
4869 "enum" : [
4870 "AVERAGE",
4871 "MAX"
4872 ],
7aacca6f
DM
4873 "optional" : 1,
4874 "type" : "string"
4875 },
44660702
DM
4876 "ds" : {
4877 "description" : "The list of datasources you want to display.",
4878 "format" : "pve-configid-list",
4879 "type" : "string"
56122987
DM
4880 },
4881 "node" : {
44660702 4882 "description" : "The cluster node name.",
56122987 4883 "format" : "pve-node",
44660702 4884 "type" : "string"
56122987
DM
4885 },
4886 "timeframe" : {
44660702 4887 "description" : "Specify the time frame you are interested in.",
56122987
DM
4888 "enum" : [
4889 "hour",
4890 "day",
4891 "week",
4892 "month",
4893 "year"
4894 ],
56122987
DM
4895 "type" : "string"
4896 },
44660702
DM
4897 "vmid" : {
4898 "description" : "The (unique) ID of the VM.",
4899 "format" : "pve-vmid",
4900 "minimum" : 1,
4901 "type" : "integer"
56122987
DM
4902 }
4903 }
4904 },
56122987
DM
4905 "permissions" : {
4906 "check" : [
4907 "perm",
4908 "/vms/{vmid}",
4909 [
4910 "VM.Audit"
4911 ]
4912 ]
4913 },
7aacca6f
DM
4914 "protected" : 1,
4915 "returns" : {
4916 "properties" : {
4917 "filename" : {
4918 "type" : "string"
4919 }
4920 },
4921 "type" : "object"
44660702 4922 }
56122987 4923 }
44660702
DM
4924 },
4925 "leaf" : 1,
4926 "path" : "/nodes/{node}/qemu/{vmid}/rrd",
4927 "text" : "rrd"
56122987
DM
4928 },
4929 {
7aacca6f 4930 "info" : {
56122987 4931 "GET" : {
7aacca6f 4932 "description" : "Read VM RRD statistics",
44660702 4933 "method" : "GET",
56122987 4934 "name" : "rrddata",
56122987 4935 "parameters" : {
44660702 4936 "additionalProperties" : 0,
56122987 4937 "properties" : {
44660702
DM
4938 "cf" : {
4939 "description" : "The RRD consolidation function",
4940 "enum" : [
4941 "AVERAGE",
4942 "MAX"
4943 ],
4944 "optional" : 1,
4945 "type" : "string"
4946 },
56122987 4947 "node" : {
44660702 4948 "description" : "The cluster node name.",
56122987 4949 "format" : "pve-node",
44660702 4950 "type" : "string"
56122987
DM
4951 },
4952 "timeframe" : {
44660702 4953 "description" : "Specify the time frame you are interested in.",
56122987
DM
4954 "enum" : [
4955 "hour",
4956 "day",
4957 "week",
4958 "month",
4959 "year"
7aacca6f 4960 ],
44660702 4961 "type" : "string"
7aacca6f
DM
4962 },
4963 "vmid" : {
7aacca6f
DM
4964 "description" : "The (unique) ID of the VM.",
4965 "format" : "pve-vmid",
44660702
DM
4966 "minimum" : 1,
4967 "type" : "integer"
56122987 4968 }
44660702 4969 }
56122987 4970 },
56122987
DM
4971 "permissions" : {
4972 "check" : [
4973 "perm",
4974 "/vms/{vmid}",
4975 [
4976 "VM.Audit"
4977 ]
4978 ]
4979 },
44660702 4980 "protected" : 1,
7aacca6f 4981 "returns" : {
7aacca6f 4982 "items" : {
44660702
DM
4983 "properties" : {},
4984 "type" : "object"
4985 },
4986 "type" : "array"
7aacca6f 4987 }
56122987
DM
4988 }
4989 },
44660702
DM
4990 "leaf" : 1,
4991 "path" : "/nodes/{node}/qemu/{vmid}/rrddata",
56122987
DM
4992 "text" : "rrddata"
4993 },
4994 {
56122987 4995 "info" : {
44660702
DM
4996 "GET" : {
4997 "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API).",
4998 "method" : "GET",
4999 "name" : "vm_config",
5000 "parameters" : {
5001 "additionalProperties" : 0,
5002 "properties" : {
5003 "current" : {
5004 "default" : 0,
5005 "description" : "Get current values (instead of pending values).",
5006 "optional" : 1,
5007 "type" : "boolean"
5008 },
5009 "node" : {
5010 "description" : "The cluster node name.",
5011 "format" : "pve-node",
5012 "type" : "string"
5013 },
5014 "vmid" : {
5015 "description" : "The (unique) ID of the VM.",
5016 "format" : "pve-vmid",
5017 "minimum" : 1,
5018 "type" : "integer"
5019 }
5020 }
7aacca6f 5021 },
56122987
DM
5022 "permissions" : {
5023 "check" : [
5024 "perm",
5025 "/vms/{vmid}",
5026 [
44660702
DM
5027 "VM.Audit"
5028 ]
56122987
DM
5029 ]
5030 },
56122987 5031 "proxyto" : "node",
44660702
DM
5032 "returns" : {
5033 "properties" : {
5034 "digest" : {
5035 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
5036 "type" : "string"
5037 }
5038 },
5039 "type" : "object"
5040 }
5041 },
5042 "POST" : {
7aacca6f
DM
5043 "description" : "Set virtual machine options (asynchrounous API).",
5044 "method" : "POST",
44660702 5045 "name" : "update_vm_async",
56122987 5046 "parameters" : {
44660702 5047 "additionalProperties" : 0,
56122987 5048 "properties" : {
44660702
DM
5049 "acpi" : {
5050 "default" : 1,
5051 "description" : "Enable/disable ACPI.",
5052 "optional" : 1,
5053 "type" : "boolean"
5054 },
5055 "agent" : {
7aacca6f 5056 "default" : 0,
44660702 5057 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 5058 "optional" : 1,
44660702 5059 "type" : "boolean"
7aacca6f 5060 },
44660702 5061 "args" : {
c2993fe5 5062 "description" : "Arbitrary arguments passed to kvm.",
44660702 5063 "optional" : 1,
c2993fe5
DM
5064 "type" : "string",
5065 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
7aacca6f 5066 },
44660702
DM
5067 "autostart" : {
5068 "default" : 0,
5069 "description" : "Automatic restart after crash (currently ignored).",
56122987 5070 "optional" : 1,
44660702 5071 "type" : "boolean"
56122987 5072 },
44660702
DM
5073 "background_delay" : {
5074 "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.",
5075 "maximum" : 30,
5076 "minimum" : 1,
7aacca6f 5077 "optional" : 1,
44660702 5078 "type" : "integer"
56122987 5079 },
44660702
DM
5080 "balloon" : {
5081 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
5082 "minimum" : 0,
7aacca6f 5083 "optional" : 1,
44660702 5084 "type" : "integer"
7aacca6f 5085 },
44660702
DM
5086 "bios" : {
5087 "default" : "seabios",
5088 "description" : "Select BIOS implementation.",
5089 "enum" : [
5090 "seabios",
5091 "ovmf"
5092 ],
56122987 5093 "optional" : 1,
44660702 5094 "type" : "string"
7aacca6f 5095 },
44660702
DM
5096 "boot" : {
5097 "default" : "cdn",
5098 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
5099 "optional" : 1,
5100 "pattern" : "[acdn]{1,4}",
5101 "type" : "string"
5102 },
5103 "bootdisk" : {
5104 "description" : "Enable booting from specified disk.",
5105 "format" : "pve-qm-bootdisk",
5106 "optional" : 1,
5107 "pattern" : "(ide|sata|scsi|virtio)\\d+",
5108 "type" : "string"
5109 },
5110 "cdrom" : {
5111 "description" : "This is an alias for option -ide2",
5112 "format" : "pve-qm-drive",
5113 "optional" : 1,
7aacca6f 5114 "type" : "string",
44660702
DM
5115 "typetext" : "volume"
5116 },
5117 "cores" : {
5118 "default" : 1,
5119 "description" : "The number of cores per socket.",
5120 "minimum" : 1,
7aacca6f 5121 "optional" : 1,
44660702 5122 "type" : "integer"
7aacca6f 5123 },
44660702
DM
5124 "cpu" : {
5125 "description" : "Emulated CPU type.",
56122987 5126 "format" : {
44660702
DM
5127 "cputype" : {
5128 "default" : "kvm64",
7aacca6f 5129 "default_key" : 1,
44660702 5130 "description" : "Emulated CPU type.",
56122987 5131 "enum" : [
44660702
DM
5132 "486",
5133 "athlon",
f004f5b9
DM
5134 "Broadwell",
5135 "Broadwell-noTSX",
5136 "Conroe",
44660702 5137 "core2duo",
f004f5b9
DM
5138 "coreduo",
5139 "Haswell",
5140 "Haswell-noTSX",
5141 "host",
5142 "IvyBridge",
44660702
DM
5143 "kvm32",
5144 "kvm64",
44660702 5145 "Nehalem",
44660702
DM
5146 "Opteron_G1",
5147 "Opteron_G2",
5148 "Opteron_G3",
5149 "Opteron_G4",
5150 "Opteron_G5",
f004f5b9
DM
5151 "Penryn",
5152 "pentium",
5153 "pentium2",
5154 "pentium3",
5155 "phenom",
5156 "qemu32",
5157 "qemu64",
5158 "SandyBridge",
5159 "Westmere"
56122987 5160 ],
44660702 5161 "format_description" : "cputype",
56122987
DM
5162 "type" : "string"
5163 },
44660702
DM
5164 "hidden" : {
5165 "default" : 0,
5166 "description" : "Do not identify as a KVM virtual machine.",
56122987 5167 "optional" : 1,
44660702
DM
5168 "type" : "boolean"
5169 }
5170 },
5171 "optional" : 1,
5172 "type" : "string"
5173 },
5174 "cpulimit" : {
5175 "default" : 0,
c2993fe5 5176 "description" : "Limit of CPU usage.",
44660702
DM
5177 "maximum" : 128,
5178 "minimum" : 0,
5179 "optional" : 1,
c2993fe5
DM
5180 "type" : "number",
5181 "verbose_description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."
44660702
DM
5182 },
5183 "cpuunits" : {
5184 "default" : 1000,
c2993fe5 5185 "description" : "CPU weight for a VM.",
44660702
DM
5186 "maximum" : 500000,
5187 "minimum" : 0,
5188 "optional" : 1,
c2993fe5
DM
5189 "type" : "integer",
5190 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
5191 },
5192 "delete" : {
5193 "description" : "A list of settings you want to delete.",
5194 "format" : "pve-configid-list",
5195 "optional" : 1,
5196 "type" : "string"
5197 },
5198 "description" : {
5199 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
5200 "optional" : 1,
5201 "type" : "string"
5202 },
5203 "digest" : {
5204 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
5205 "maxLength" : 40,
5206 "optional" : 1,
5207 "type" : "string"
5208 },
5209 "force" : {
5210 "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.",
5211 "optional" : 1,
5212 "requires" : "delete",
5213 "type" : "boolean"
5214 },
5215 "freeze" : {
5216 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
5217 "optional" : 1,
5218 "type" : "boolean"
5219 },
5220 "hostpci[n]" : {
c2993fe5 5221 "description" : "Map host PCI devices into guest.",
44660702
DM
5222 "format" : "pve-qm-hostpci",
5223 "optional" : 1,
5224 "type" : "string"
5225 },
5226 "hotplug" : {
5227 "default" : "network,disk,usb",
5228 "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'.",
5229 "format" : "pve-hotplug-features",
5230 "optional" : 1,
5231 "type" : "string"
5232 },
5233 "ide[n]" : {
5234 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
5235 "format" : {
5236 "aio" : {
5237 "description" : "AIO type to use.",
5238 "enum" : [
5239 "native",
5240 "threads"
56122987 5241 ],
56122987 5242 "optional" : 1,
44660702 5243 "type" : "string"
56122987 5244 },
44660702
DM
5245 "backup" : {
5246 "description" : "Whether the drive should be included when making backups.",
56122987 5247 "optional" : 1,
44660702 5248 "type" : "boolean"
56122987 5249 },
7aacca6f
DM
5250 "bps" : {
5251 "description" : "Maximum r/w speed speed in bytes per second.",
44660702
DM
5252 "format_description" : "bps",
5253 "optional" : 1,
5254 "type" : "integer"
5255 },
5256 "bps_rd" : {
5257 "description" : "Maximum read speed speed in bytes per second.",
5258 "format_description" : "bps",
56122987 5259 "optional" : 1,
44660702 5260 "type" : "integer"
56122987 5261 },
44660702
DM
5262 "bps_wr" : {
5263 "description" : "Maximum write speed speed in bytes per second.",
5264 "format_description" : "bps",
5265 "optional" : 1,
5266 "type" : "integer"
5267 },
5268 "cache" : {
5269 "description" : "The drive's cache mode",
5270 "enum" : [
5271 "none",
5272 "writethrough",
5273 "writeback",
5274 "unsafe",
5275 "directsync"
5276 ],
44660702
DM
5277 "optional" : 1,
5278 "type" : "string"
5279 },
5280 "cyls" : {
5281 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
5282 "optional" : 1,
5283 "type" : "integer"
5284 },
5285 "detect_zeroes" : {
5286 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
5287 "optional" : 1,
5288 "type" : "boolean"
5289 },
5290 "discard" : {
5291 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5292 "enum" : [
5293 "ignore",
5294 "on"
5295 ],
56122987 5296 "optional" : 1,
44660702
DM
5297 "type" : "string"
5298 },
5299 "file" : {
5300 "default_key" : 1,
5301 "description" : "The drive's backing volume.",
5302 "format" : "pve-volume-id-or-qm-path",
5303 "format_description" : "volume",
5304 "type" : "string"
56122987 5305 },
7aacca6f 5306 "format" : {
7aacca6f 5307 "description" : "The drive's backing file's data format.",
56122987 5308 "enum" : [
7aacca6f
DM
5309 "raw",
5310 "cow",
5311 "qcow",
5312 "qed",
5313 "qcow2",
5314 "vmdk",
5315 "cloop"
56122987 5316 ],
f004f5b9 5317 "format_description" : "image format",
56122987 5318 "optional" : 1,
56122987
DM
5319 "type" : "string"
5320 },
44660702
DM
5321 "heads" : {
5322 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
5323 "optional" : 1,
5324 "type" : "integer"
7aacca6f 5325 },
44660702
DM
5326 "iops" : {
5327 "description" : "Maximum r/w I/O speed in operations per second.",
5328 "format_description" : "iops",
56122987 5329 "optional" : 1,
44660702 5330 "type" : "integer"
56122987 5331 },
44660702
DM
5332 "iops_max" : {
5333 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5334 "format_description" : "iops",
56122987 5335 "optional" : 1,
44660702 5336 "type" : "integer"
56122987 5337 },
44660702
DM
5338 "iops_rd" : {
5339 "description" : "Maximum read I/O speed in operations per second.",
5340 "format_description" : "iops",
5341 "optional" : 1,
5342 "type" : "integer"
5343 },
5344 "iops_rd_max" : {
5345 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 5346 "format_description" : "iops",
44660702
DM
5347 "optional" : 1,
5348 "type" : "integer"
5349 },
5350 "iops_wr" : {
7aacca6f 5351 "description" : "Maximum write I/O speed in operations per second.",
44660702 5352 "format_description" : "iops",
56122987 5353 "optional" : 1,
7aacca6f 5354 "type" : "integer"
56122987 5355 },
44660702
DM
5356 "iops_wr_max" : {
5357 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
5358 "format_description" : "iops",
7aacca6f 5359 "optional" : 1,
44660702 5360 "type" : "integer"
56122987 5361 },
44660702
DM
5362 "mbps" : {
5363 "description" : "Maximum r/w speed speed in megabytes per second.",
5364 "format_description" : "mbps",
5365 "optional" : 1,
5366 "type" : "number"
5367 },
5368 "mbps_max" : {
5369 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5370 "format_description" : "mbps",
5371 "optional" : 1,
5372 "type" : "number"
5373 },
5374 "mbps_rd" : {
5375 "description" : "Maximum read speed speed in megabytes per second.",
5376 "format_description" : "mbps",
5377 "optional" : 1,
5378 "type" : "number"
5379 },
5380 "mbps_rd_max" : {
5381 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5382 "format_description" : "mbps",
5383 "optional" : 1,
5384 "type" : "number"
5385 },
5386 "mbps_wr" : {
5387 "description" : "Maximum write speed speed in megabytes per second.",
5388 "format_description" : "mbps",
5389 "optional" : 1,
5390 "type" : "number"
5391 },
5392 "mbps_wr_max" : {
5393 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5394 "format_description" : "mbps",
56122987 5395 "optional" : 1,
44660702 5396 "type" : "number"
56122987 5397 },
7aacca6f 5398 "media" : {
7aacca6f 5399 "default" : "disk",
7aacca6f
DM
5400 "description" : "The drive's media type.",
5401 "enum" : [
5402 "cdrom",
5403 "disk"
44660702 5404 ],
44660702
DM
5405 "optional" : 1,
5406 "type" : "string"
56122987 5407 },
44660702
DM
5408 "model" : {
5409 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
5410 "format" : "urlencoded",
5411 "format_description" : "model",
5412 "maxLength" : 120,
56122987 5413 "optional" : 1,
44660702 5414 "type" : "string"
56122987 5415 },
44660702
DM
5416 "rerror" : {
5417 "description" : "Read error action.",
5418 "enum" : [
5419 "ignore",
5420 "report",
5421 "stop"
5422 ],
56122987 5423 "optional" : 1,
44660702
DM
5424 "type" : "string"
5425 },
5426 "secs" : {
5427 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
5428 "optional" : 1,
5429 "type" : "integer"
5430 },
5431 "serial" : {
5432 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5433 "format" : "urlencoded",
5434 "format_description" : "serial",
5435 "maxLength" : 60,
5436 "optional" : 1,
5437 "type" : "string"
5438 },
5439 "size" : {
5440 "description" : "Disk size. This is purely informational and has no effect.",
5441 "format" : "disk-size",
f004f5b9 5442 "format_description" : "DiskSize",
44660702
DM
5443 "optional" : 1,
5444 "type" : "string"
5445 },
5446 "snapshot" : {
5447 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
5448 "optional" : 1,
5449 "type" : "boolean"
5450 },
5451 "trans" : {
5452 "description" : "Force disk geometry bios translation mode.",
5453 "enum" : [
5454 "none",
5455 "lba",
5456 "auto"
5457 ],
44660702
DM
5458 "optional" : 1,
5459 "type" : "string"
5460 },
5461 "volume" : {
5462 "alias" : "file"
5463 },
5464 "werror" : {
5465 "description" : "Write error action.",
5466 "enum" : [
5467 "enospc",
5468 "ignore",
5469 "report",
5470 "stop"
5471 ],
44660702
DM
5472 "optional" : 1,
5473 "type" : "string"
56122987
DM
5474 }
5475 },
44660702
DM
5476 "optional" : 1,
5477 "type" : "string"
56122987 5478 },
44660702
DM
5479 "keyboard" : {
5480 "default" : "en-us",
c2993fe5 5481 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
44660702
DM
5482 "enum" : [
5483 "de",
5484 "de-ch",
5485 "da",
5486 "en-gb",
5487 "en-us",
5488 "es",
5489 "fi",
5490 "fr",
5491 "fr-be",
5492 "fr-ca",
5493 "fr-ch",
5494 "hu",
5495 "is",
5496 "it",
5497 "ja",
5498 "lt",
5499 "mk",
5500 "nl",
5501 "no",
5502 "pl",
5503 "pt",
5504 "pt-br",
5505 "sv",
5506 "sl",
5507 "tr"
5508 ],
56122987 5509 "optional" : 1,
44660702
DM
5510 "type" : "string"
5511 },
5512 "kvm" : {
7aacca6f 5513 "default" : 1,
44660702
DM
5514 "description" : "Enable/disable KVM hardware virtualization.",
5515 "optional" : 1,
5516 "type" : "boolean"
56122987 5517 },
44660702
DM
5518 "localtime" : {
5519 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 5520 "optional" : 1,
44660702 5521 "type" : "boolean"
56122987 5522 },
44660702
DM
5523 "lock" : {
5524 "description" : "Lock/unlock the VM.",
5525 "enum" : [
5526 "migrate",
5527 "backup",
5528 "snapshot",
5529 "rollback"
5530 ],
7aacca6f 5531 "optional" : 1,
44660702
DM
5532 "type" : "string"
5533 },
5534 "machine" : {
5535 "description" : "Specific the Qemu machine type.",
5536 "maxLength" : 40,
5537 "optional" : 1,
5538 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
5539 "type" : "string"
5540 },
5541 "memory" : {
5542 "default" : 512,
5543 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
5544 "minimum" : 16,
5545 "optional" : 1,
5546 "type" : "integer"
5547 },
5548 "migrate_downtime" : {
5549 "default" : 0.1,
5550 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
5551 "minimum" : 0,
5552 "optional" : 1,
5553 "type" : "number"
5554 },
5555 "migrate_speed" : {
5556 "default" : 0,
5557 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
5558 "minimum" : 0,
5559 "optional" : 1,
5560 "type" : "integer"
5561 },
5562 "name" : {
5563 "description" : "Set a name for the VM. Only used on the configuration web interface.",
5564 "format" : "dns-name",
5565 "optional" : 1,
5566 "type" : "string"
5567 },
5568 "net[n]" : {
c2993fe5 5569 "description" : "Specify network devices.",
f004f5b9
DM
5570 "format" : {
5571 "bridge" : {
c2993fe5 5572 "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n",
f004f5b9
DM
5573 "format_description" : "bridge",
5574 "optional" : 1,
5575 "type" : "string"
5576 },
5577 "e1000" : {
5578 "alias" : "macaddr",
5579 "keyAlias" : "model"
5580 },
5581 "e1000-82540em" : {
5582 "alias" : "macaddr",
5583 "keyAlias" : "model"
5584 },
5585 "e1000-82544gc" : {
5586 "alias" : "macaddr",
5587 "keyAlias" : "model"
5588 },
5589 "e1000-82545em" : {
5590 "alias" : "macaddr",
5591 "keyAlias" : "model"
5592 },
5593 "firewall" : {
5594 "description" : "Whether this interface should be protected by the firewall.",
5595 "optional" : 1,
5596 "type" : "boolean"
5597 },
5598 "i82551" : {
5599 "alias" : "macaddr",
5600 "keyAlias" : "model"
5601 },
5602 "i82557b" : {
5603 "alias" : "macaddr",
5604 "keyAlias" : "model"
5605 },
5606 "i82559er" : {
5607 "alias" : "macaddr",
5608 "keyAlias" : "model"
5609 },
5610 "link_down" : {
c2993fe5 5611 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
5612 "optional" : 1,
5613 "type" : "boolean"
5614 },
5615 "macaddr" : {
c2993fe5 5616 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 5617 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
5618 "optional" : 1,
5619 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
5620 "type" : "string"
5621 },
5622 "model" : {
5623 "default_key" : 1,
c2993fe5 5624 "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.",
f004f5b9
DM
5625 "enum" : [
5626 "rtl8139",
5627 "ne2k_pci",
5628 "e1000",
5629 "pcnet",
5630 "virtio",
5631 "ne2k_isa",
5632 "i82551",
5633 "i82557b",
5634 "i82559er",
5635 "vmxnet3",
5636 "e1000-82540em",
5637 "e1000-82544gc",
5638 "e1000-82545em"
5639 ],
5640 "format_description" : "model",
5641 "type" : "string"
5642 },
5643 "ne2k_isa" : {
5644 "alias" : "macaddr",
5645 "keyAlias" : "model"
5646 },
5647 "ne2k_pci" : {
5648 "alias" : "macaddr",
5649 "keyAlias" : "model"
5650 },
5651 "pcnet" : {
5652 "alias" : "macaddr",
5653 "keyAlias" : "model"
5654 },
5655 "queues" : {
5656 "description" : "Number of packet queues to be used on the device.",
5657 "maximum" : 16,
5658 "minimum" : 0,
5659 "optional" : 1,
5660 "type" : "integer"
5661 },
5662 "rate" : {
c2993fe5 5663 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
5664 "minimum" : 0,
5665 "optional" : 1,
5666 "type" : "number"
5667 },
5668 "rtl8139" : {
5669 "alias" : "macaddr",
5670 "keyAlias" : "model"
5671 },
5672 "tag" : {
5673 "description" : "VLAN tag to apply to packets on this interface.",
5674 "maximum" : 4094,
c2993fe5 5675 "minimum" : 1,
f004f5b9
DM
5676 "optional" : 1,
5677 "type" : "integer"
5678 },
5679 "trunks" : {
5680 "description" : "VLAN trunks to pass through this interface.",
5681 "format_description" : "vlanid[;vlanid...]",
5682 "optional" : 1,
5683 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5684 "type" : "string"
5685 },
5686 "virtio" : {
5687 "alias" : "macaddr",
5688 "keyAlias" : "model"
5689 },
5690 "vmxnet3" : {
5691 "alias" : "macaddr",
5692 "keyAlias" : "model"
5693 }
5694 },
44660702
DM
5695 "optional" : 1,
5696 "type" : "string"
5697 },
5698 "node" : {
5699 "description" : "The cluster node name.",
5700 "format" : "pve-node",
5701 "type" : "string"
5702 },
5703 "numa" : {
5704 "default" : 0,
5705 "description" : "Enable/disable NUMA.",
5706 "optional" : 1,
5707 "type" : "boolean"
5708 },
5709 "numa[n]" : {
c2993fe5 5710 "description" : "NUMA topology.",
56122987 5711 "format" : {
7aacca6f 5712 "cpus" : {
c2993fe5 5713 "description" : "CPUs accessing this NUMA node.",
44660702
DM
5714 "format_description" : "id[-id];...",
5715 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5716 "type" : "string"
7aacca6f
DM
5717 },
5718 "hostnodes" : {
c2993fe5 5719 "description" : "Host NUMA nodes to use.",
44660702 5720 "format_description" : "id[-id];...",
7aacca6f 5721 "optional" : 1,
7aacca6f 5722 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
44660702 5723 "type" : "string"
7aacca6f 5724 },
44660702 5725 "memory" : {
c2993fe5 5726 "description" : "Amount of memory this NUMA node provides.",
7aacca6f 5727 "optional" : 1,
44660702
DM
5728 "type" : "number"
5729 },
5730 "policy" : {
c2993fe5 5731 "description" : "NUMA allocation policy.",
7aacca6f
DM
5732 "enum" : [
5733 "preferred",
5734 "bind",
5735 "interleave"
5736 ],
44660702
DM
5737 "optional" : 1,
5738 "type" : "string"
56122987 5739 }
44660702 5740 },
56122987 5741 "optional" : 1,
44660702 5742 "type" : "string"
56122987 5743 },
44660702 5744 "onboot" : {
7aacca6f 5745 "default" : 0,
44660702
DM
5746 "description" : "Specifies whether a VM will be started during system bootup.",
5747 "optional" : 1,
5748 "type" : "boolean"
7aacca6f
DM
5749 },
5750 "ostype" : {
c2993fe5 5751 "description" : "Specify guest operating system.",
7aacca6f
DM
5752 "enum" : [
5753 "other",
5754 "wxp",
5755 "w2k",
5756 "w2k3",
5757 "w2k8",
5758 "wvista",
5759 "win7",
5760 "win8",
5761 "l24",
5762 "l26",
5763 "solaris"
5764 ],
7aacca6f 5765 "optional" : 1,
c2993fe5
DM
5766 "type" : "string",
5767 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
56122987 5768 },
44660702 5769 "parallel[n]" : {
c2993fe5 5770 "description" : "Map host parallel devices (n is 0 to 2).",
7aacca6f 5771 "optional" : 1,
44660702 5772 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
5773 "type" : "string",
5774 "verbose_description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
7aacca6f
DM
5775 },
5776 "protection" : {
5777 "default" : 0,
c2993fe5 5778 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
7aacca6f 5779 "optional" : 1,
44660702 5780 "type" : "boolean"
7aacca6f 5781 },
44660702
DM
5782 "reboot" : {
5783 "default" : 1,
5784 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 5785 "optional" : 1,
44660702 5786 "type" : "boolean"
7aacca6f 5787 },
44660702
DM
5788 "revert" : {
5789 "description" : "Revert a pending change.",
5790 "format" : "pve-configid-list",
7aacca6f 5791 "optional" : 1,
44660702
DM
5792 "type" : "string"
5793 },
5794 "sata[n]" : {
5795 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 5796 "format" : {
44660702
DM
5797 "aio" : {
5798 "description" : "AIO type to use.",
7aacca6f 5799 "enum" : [
44660702
DM
5800 "native",
5801 "threads"
7aacca6f 5802 ],
44660702
DM
5803 "optional" : 1,
5804 "type" : "string"
7aacca6f 5805 },
44660702
DM
5806 "backup" : {
5807 "description" : "Whether the drive should be included when making backups.",
56122987 5808 "optional" : 1,
7aacca6f 5809 "type" : "boolean"
44660702
DM
5810 },
5811 "bps" : {
5812 "description" : "Maximum r/w speed speed in bytes per second.",
5813 "format_description" : "bps",
7aacca6f 5814 "optional" : 1,
44660702 5815 "type" : "integer"
56122987 5816 },
44660702
DM
5817 "bps_rd" : {
5818 "description" : "Maximum read speed speed in bytes per second.",
5819 "format_description" : "bps",
56122987 5820 "optional" : 1,
44660702 5821 "type" : "integer"
56122987 5822 },
44660702
DM
5823 "bps_wr" : {
5824 "description" : "Maximum write speed speed in bytes per second.",
5825 "format_description" : "bps",
56122987 5826 "optional" : 1,
44660702 5827 "type" : "integer"
56122987
DM
5828 },
5829 "cache" : {
44660702 5830 "description" : "The drive's cache mode",
56122987
DM
5831 "enum" : [
5832 "none",
5833 "writethrough",
5834 "writeback",
5835 "unsafe",
5836 "directsync"
5837 ],
56122987 5838 "optional" : 1,
44660702 5839 "type" : "string"
56122987 5840 },
44660702
DM
5841 "cyls" : {
5842 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 5843 "optional" : 1,
44660702 5844 "type" : "integer"
7aacca6f
DM
5845 },
5846 "detect_zeroes" : {
5847 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 5848 "optional" : 1,
44660702 5849 "type" : "boolean"
56122987 5850 },
44660702
DM
5851 "discard" : {
5852 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5853 "enum" : [
5854 "ignore",
5855 "on"
5856 ],
56122987 5857 "optional" : 1,
44660702 5858 "type" : "string"
7aacca6f 5859 },
44660702
DM
5860 "file" : {
5861 "default_key" : 1,
5862 "description" : "The drive's backing volume.",
5863 "format" : "pve-volume-id-or-qm-path",
5864 "format_description" : "volume",
5865 "type" : "string"
56122987 5866 },
7aacca6f 5867 "format" : {
44660702 5868 "description" : "The drive's backing file's data format.",
7aacca6f
DM
5869 "enum" : [
5870 "raw",
5871 "cow",
5872 "qcow",
5873 "qed",
5874 "qcow2",
5875 "vmdk",
5876 "cloop"
5877 ],
f004f5b9 5878 "format_description" : "image format",
7aacca6f 5879 "optional" : 1,
44660702 5880 "type" : "string"
56122987 5881 },
7aacca6f 5882 "heads" : {
7aacca6f 5883 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 5884 "optional" : 1,
7aacca6f 5885 "type" : "integer"
56122987 5886 },
44660702
DM
5887 "iops" : {
5888 "description" : "Maximum r/w I/O speed in operations per second.",
5889 "format_description" : "iops",
56122987 5890 "optional" : 1,
44660702 5891 "type" : "integer"
56122987 5892 },
44660702
DM
5893 "iops_max" : {
5894 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5895 "format_description" : "iops",
56122987 5896 "optional" : 1,
44660702 5897 "type" : "integer"
56122987 5898 },
44660702
DM
5899 "iops_rd" : {
5900 "description" : "Maximum read I/O speed in operations per second.",
5901 "format_description" : "iops",
7aacca6f 5902 "optional" : 1,
44660702 5903 "type" : "integer"
56122987 5904 },
44660702
DM
5905 "iops_rd_max" : {
5906 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
5907 "format_description" : "iops",
56122987 5908 "optional" : 1,
44660702 5909 "type" : "integer"
7aacca6f 5910 },
44660702
DM
5911 "iops_wr" : {
5912 "description" : "Maximum write I/O speed in operations per second.",
5913 "format_description" : "iops",
56122987 5914 "optional" : 1,
44660702 5915 "type" : "integer"
56122987
DM
5916 },
5917 "iops_wr_max" : {
5918 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
44660702 5919 "format_description" : "iops",
56122987 5920 "optional" : 1,
44660702 5921 "type" : "integer"
56122987 5922 },
44660702
DM
5923 "mbps" : {
5924 "description" : "Maximum r/w speed speed in megabytes per second.",
5925 "format_description" : "mbps",
56122987 5926 "optional" : 1,
44660702 5927 "type" : "number"
56122987 5928 },
44660702
DM
5929 "mbps_max" : {
5930 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5931 "format_description" : "mbps",
5932 "optional" : 1,
5933 "type" : "number"
56122987 5934 },
44660702
DM
5935 "mbps_rd" : {
5936 "description" : "Maximum read speed speed in megabytes per second.",
5937 "format_description" : "mbps",
56122987 5938 "optional" : 1,
44660702 5939 "type" : "number"
56122987 5940 },
44660702
DM
5941 "mbps_rd_max" : {
5942 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5943 "format_description" : "mbps",
56122987 5944 "optional" : 1,
44660702 5945 "type" : "number"
56122987 5946 },
44660702
DM
5947 "mbps_wr" : {
5948 "description" : "Maximum write speed speed in megabytes per second.",
56122987 5949 "format_description" : "mbps",
44660702
DM
5950 "optional" : 1,
5951 "type" : "number"
56122987 5952 },
44660702
DM
5953 "mbps_wr_max" : {
5954 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5955 "format_description" : "mbps",
5956 "optional" : 1,
5957 "type" : "number"
7aacca6f 5958 },
44660702
DM
5959 "media" : {
5960 "default" : "disk",
5961 "description" : "The drive's media type.",
5962 "enum" : [
5963 "cdrom",
5964 "disk"
5965 ],
56122987 5966 "optional" : 1,
44660702
DM
5967 "type" : "string"
5968 },
5969 "rerror" : {
5970 "description" : "Read error action.",
7aacca6f 5971 "enum" : [
44660702
DM
5972 "ignore",
5973 "report",
5974 "stop"
5975 ],
7aacca6f 5976 "optional" : 1,
44660702 5977 "type" : "string"
56122987 5978 },
44660702
DM
5979 "secs" : {
5980 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 5981 "optional" : 1,
44660702 5982 "type" : "integer"
56122987 5983 },
44660702
DM
5984 "serial" : {
5985 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5986 "format" : "urlencoded",
5987 "format_description" : "serial",
5988 "maxLength" : 60,
56122987 5989 "optional" : 1,
44660702 5990 "type" : "string"
56122987 5991 },
44660702
DM
5992 "size" : {
5993 "description" : "Disk size. This is purely informational and has no effect.",
5994 "format" : "disk-size",
f004f5b9 5995 "format_description" : "DiskSize",
44660702
DM
5996 "optional" : 1,
5997 "type" : "string"
5998 },
5999 "snapshot" : {
6000 "description" : "Whether the drive should be included when making snapshots.",
56122987 6001 "optional" : 1,
44660702
DM
6002 "type" : "boolean"
6003 },
6004 "trans" : {
6005 "description" : "Force disk geometry bios translation mode.",
56122987 6006 "enum" : [
7aacca6f
DM
6007 "none",
6008 "lba",
6009 "auto"
56122987 6010 ],
44660702
DM
6011 "optional" : 1,
6012 "type" : "string"
56122987 6013 },
7aacca6f
DM
6014 "volume" : {
6015 "alias" : "file"
56122987 6016 },
44660702
DM
6017 "werror" : {
6018 "description" : "Write error action.",
6019 "enum" : [
6020 "enospc",
6021 "ignore",
6022 "report",
6023 "stop"
6024 ],
7aacca6f 6025 "optional" : 1,
44660702
DM
6026 "type" : "string"
6027 }
6028 },
6029 "optional" : 1,
6030 "type" : "string"
6031 },
6032 "scsi[n]" : {
6033 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
6034 "format" : {
56122987 6035 "aio" : {
56122987
DM
6036 "description" : "AIO type to use.",
6037 "enum" : [
6038 "native",
6039 "threads"
6040 ],
7aacca6f 6041 "optional" : 1,
44660702 6042 "type" : "string"
56122987 6043 },
44660702
DM
6044 "backup" : {
6045 "description" : "Whether the drive should be included when making backups.",
56122987 6046 "optional" : 1,
44660702 6047 "type" : "boolean"
56122987 6048 },
44660702
DM
6049 "bps" : {
6050 "description" : "Maximum r/w speed speed in bytes per second.",
6051 "format_description" : "bps",
56122987 6052 "optional" : 1,
44660702 6053 "type" : "integer"
56122987 6054 },
44660702
DM
6055 "bps_rd" : {
6056 "description" : "Maximum read speed speed in bytes per second.",
6057 "format_description" : "bps",
56122987 6058 "optional" : 1,
44660702 6059 "type" : "integer"
56122987 6060 },
7aacca6f 6061 "bps_wr" : {
44660702 6062 "description" : "Maximum write speed speed in bytes per second.",
7aacca6f 6063 "format_description" : "bps",
56122987 6064 "optional" : 1,
44660702 6065 "type" : "integer"
56122987 6066 },
44660702
DM
6067 "cache" : {
6068 "description" : "The drive's cache mode",
7aacca6f 6069 "enum" : [
44660702
DM
6070 "none",
6071 "writethrough",
6072 "writeback",
6073 "unsafe",
6074 "directsync"
7aacca6f 6075 ],
56122987 6076 "optional" : 1,
44660702 6077 "type" : "string"
56122987 6078 },
44660702
DM
6079 "cyls" : {
6080 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 6081 "optional" : 1,
44660702 6082 "type" : "integer"
56122987 6083 },
44660702
DM
6084 "detect_zeroes" : {
6085 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 6086 "optional" : 1,
44660702 6087 "type" : "boolean"
56122987 6088 },
44660702
DM
6089 "discard" : {
6090 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6091 "enum" : [
6092 "ignore",
6093 "on"
6094 ],
7aacca6f 6095 "optional" : 1,
44660702 6096 "type" : "string"
56122987 6097 },
44660702
DM
6098 "file" : {
6099 "default_key" : 1,
6100 "description" : "The drive's backing volume.",
6101 "format" : "pve-volume-id-or-qm-path",
6102 "format_description" : "volume",
6103 "type" : "string"
56122987 6104 },
7aacca6f 6105 "format" : {
44660702 6106 "description" : "The drive's backing file's data format.",
56122987 6107 "enum" : [
7aacca6f
DM
6108 "raw",
6109 "cow",
6110 "qcow",
6111 "qed",
6112 "qcow2",
6113 "vmdk",
6114 "cloop"
6115 ],
f004f5b9 6116 "format_description" : "image format",
44660702
DM
6117 "optional" : 1,
6118 "type" : "string"
56122987 6119 },
44660702
DM
6120 "heads" : {
6121 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6122 "optional" : 1,
7aacca6f 6123 "type" : "integer"
56122987 6124 },
44660702
DM
6125 "iops" : {
6126 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6127 "format_description" : "iops",
44660702
DM
6128 "optional" : 1,
6129 "type" : "integer"
7aacca6f 6130 },
44660702
DM
6131 "iops_max" : {
6132 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6133 "format_description" : "iops",
56122987 6134 "optional" : 1,
44660702 6135 "type" : "integer"
7aacca6f 6136 },
44660702
DM
6137 "iops_rd" : {
6138 "description" : "Maximum read I/O speed in operations per second.",
6139 "format_description" : "iops",
7aacca6f 6140 "optional" : 1,
44660702 6141 "type" : "integer"
56122987 6142 },
44660702
DM
6143 "iops_rd_max" : {
6144 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6145 "format_description" : "iops",
6146 "optional" : 1,
6147 "type" : "integer"
6148 },
6149 "iops_wr" : {
6150 "description" : "Maximum write I/O speed in operations per second.",
6151 "format_description" : "iops",
56122987 6152 "optional" : 1,
44660702
DM
6153 "type" : "integer"
6154 },
6155 "iops_wr_max" : {
6156 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6157 "format_description" : "iops",
6158 "optional" : 1,
6159 "type" : "integer"
56122987 6160 },
7aacca6f 6161 "iothread" : {
7aacca6f 6162 "description" : "Whether to use iothreads for this drive",
56122987 6163 "optional" : 1,
56122987
DM
6164 "type" : "boolean"
6165 },
44660702
DM
6166 "mbps" : {
6167 "description" : "Maximum r/w speed speed in megabytes per second.",
6168 "format_description" : "mbps",
6169 "optional" : 1,
6170 "type" : "number"
6171 },
6172 "mbps_max" : {
6173 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6174 "format_description" : "mbps",
6175 "optional" : 1,
6176 "type" : "number"
6177 },
6178 "mbps_rd" : {
6179 "description" : "Maximum read speed speed in megabytes per second.",
6180 "format_description" : "mbps",
6181 "optional" : 1,
6182 "type" : "number"
6183 },
6184 "mbps_rd_max" : {
6185 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6186 "format_description" : "mbps",
6187 "optional" : 1,
6188 "type" : "number"
6189 },
6190 "mbps_wr" : {
6191 "description" : "Maximum write speed speed in megabytes per second.",
6192 "format_description" : "mbps",
6193 "optional" : 1,
6194 "type" : "number"
6195 },
6196 "mbps_wr_max" : {
6197 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6198 "format_description" : "mbps",
6199 "optional" : 1,
6200 "type" : "number"
6201 },
7aacca6f 6202 "media" : {
44660702
DM
6203 "default" : "disk",
6204 "description" : "The drive's media type.",
7aacca6f
DM
6205 "enum" : [
6206 "cdrom",
6207 "disk"
6208 ],
56122987 6209 "optional" : 1,
44660702
DM
6210 "type" : "string"
6211 },
6212 "queues" : {
6213 "description" : "Number of queues.",
44660702
DM
6214 "minimum" : 2,
6215 "optional" : 1,
6216 "type" : "integer"
6217 },
6218 "secs" : {
6219 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6220 "optional" : 1,
6221 "type" : "integer"
6222 },
6223 "serial" : {
6224 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6225 "format" : "urlencoded",
6226 "format_description" : "serial",
6227 "maxLength" : 60,
6228 "optional" : 1,
6229 "type" : "string"
6230 },
6231 "size" : {
6232 "description" : "Disk size. This is purely informational and has no effect.",
6233 "format" : "disk-size",
f004f5b9 6234 "format_description" : "DiskSize",
44660702
DM
6235 "optional" : 1,
6236 "type" : "string"
56122987 6237 },
7aacca6f
DM
6238 "snapshot" : {
6239 "description" : "Whether the drive should be included when making snapshots.",
6240 "optional" : 1,
44660702 6241 "type" : "boolean"
7aacca6f 6242 },
44660702
DM
6243 "trans" : {
6244 "description" : "Force disk geometry bios translation mode.",
6245 "enum" : [
6246 "none",
6247 "lba",
6248 "auto"
6249 ],
44660702
DM
6250 "optional" : 1,
6251 "type" : "string"
6252 },
6253 "volume" : {
6254 "alias" : "file"
6255 },
6256 "werror" : {
6257 "description" : "Write error action.",
6258 "enum" : [
6259 "enospc",
6260 "ignore",
6261 "report",
6262 "stop"
6263 ],
56122987 6264 "optional" : 1,
44660702 6265 "type" : "string"
56122987 6266 }
44660702 6267 },
7aacca6f 6268 "optional" : 1,
44660702
DM
6269 "type" : "string"
6270 },
6271 "scsihw" : {
6272 "default" : "lsi",
c2993fe5 6273 "description" : "SCSI controller model",
7aacca6f 6274 "enum" : [
44660702
DM
6275 "lsi",
6276 "lsi53c810",
6277 "virtio-scsi-pci",
6278 "virtio-scsi-single",
6279 "megasas",
6280 "pvscsi"
7aacca6f 6281 ],
44660702
DM
6282 "optional" : 1,
6283 "type" : "string"
56122987 6284 },
44660702 6285 "serial[n]" : {
c2993fe5 6286 "description" : "Create a serial device inside the VM (n is 0 to 3)",
7aacca6f 6287 "optional" : 1,
44660702 6288 "pattern" : "(/dev/.+|socket)",
c2993fe5
DM
6289 "type" : "string",
6290 "verbose_description" : "\nCreate a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
7aacca6f 6291 },
44660702
DM
6292 "shares" : {
6293 "default" : 1000,
6294 "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",
6295 "maximum" : 50000,
6296 "minimum" : 0,
56122987 6297 "optional" : 1,
44660702 6298 "type" : "integer"
56122987 6299 },
44660702
DM
6300 "skiplock" : {
6301 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 6302 "optional" : 1,
44660702 6303 "type" : "boolean"
56122987 6304 },
44660702
DM
6305 "smbios1" : {
6306 "description" : "Specify SMBIOS type 1 fields.",
6307 "format" : "pve-qm-smbios1",
6308 "maxLength" : 256,
56122987 6309 "optional" : 1,
44660702 6310 "type" : "string"
56122987 6311 },
44660702
DM
6312 "smp" : {
6313 "default" : 1,
6314 "description" : "The number of CPUs. Please use option -sockets instead.",
7aacca6f 6315 "minimum" : 1,
7aacca6f 6316 "optional" : 1,
44660702 6317 "type" : "integer"
7aacca6f 6318 },
44660702
DM
6319 "sockets" : {
6320 "default" : 1,
6321 "description" : "The number of CPU sockets.",
6322 "minimum" : 1,
7aacca6f 6323 "optional" : 1,
44660702 6324 "type" : "integer"
56122987 6325 },
44660702
DM
6326 "startdate" : {
6327 "default" : "now",
6328 "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 6329 "optional" : 1,
44660702 6330 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 6331 "type" : "string",
44660702 6332 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
56122987 6333 },
7aacca6f 6334 "startup" : {
7aacca6f 6335 "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 6336 "format" : "pve-startup-order",
56122987 6337 "optional" : 1,
44660702
DM
6338 "type" : "string",
6339 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
56122987 6340 },
44660702 6341 "tablet" : {
7aacca6f 6342 "default" : 1,
c2993fe5 6343 "description" : "Enable/disable the USB tablet device.",
7aacca6f 6344 "optional" : 1,
c2993fe5
DM
6345 "type" : "boolean",
6346 "verbose_description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)."
56122987 6347 },
44660702
DM
6348 "tdf" : {
6349 "default" : 0,
6350 "description" : "Enable/disable time drift fix.",
7aacca6f 6351 "optional" : 1,
44660702 6352 "type" : "boolean"
7aacca6f 6353 },
44660702
DM
6354 "template" : {
6355 "default" : 0,
6356 "description" : "Enable/disable Template.",
7aacca6f 6357 "optional" : 1,
44660702 6358 "type" : "boolean"
7aacca6f 6359 },
44660702 6360 "unused[n]" : {
c2993fe5 6361 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 6362 "format" : "pve-volume-id",
7aacca6f 6363 "optional" : 1,
44660702 6364 "type" : "string"
7aacca6f 6365 },
44660702 6366 "usb[n]" : {
c2993fe5 6367 "description" : "Configure an USB device (n is 0 to 4).",
44660702
DM
6368 "format" : {
6369 "host" : {
6370 "default_key" : 1,
c2993fe5 6371 "description" : "The Host USB device or port or the value 'spice'. HOSTUSBDEVICE syntax is:\n\n 'bus-port(.port)*' (decimal numbers) or\n 'vendor_id:product_id' (hexadeciaml numbers) or\n 'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n",
44660702
DM
6372 "format" : "pve-qm-usb-device",
6373 "format_description" : "HOSTUSBDEVICE|spice",
6374 "type" : "string"
6375 },
6376 "usb3" : {
c2993fe5
DM
6377 "default" : 0,
6378 "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).",
44660702
DM
6379 "optional" : 1,
6380 "type" : "boolean"
6381 }
6382 },
7aacca6f 6383 "optional" : 1,
44660702 6384 "type" : "string"
56122987 6385 },
44660702
DM
6386 "vcpus" : {
6387 "default" : 0,
6388 "description" : "Number of hotplugged vcpus.",
6389 "minimum" : 1,
56122987 6390 "optional" : 1,
44660702 6391 "type" : "integer"
56122987 6392 },
44660702 6393 "vga" : {
c2993fe5 6394 "description" : "Select the VGA type.",
44660702
DM
6395 "enum" : [
6396 "std",
6397 "cirrus",
6398 "vmware",
6399 "qxl",
6400 "serial0",
6401 "serial1",
6402 "serial2",
6403 "serial3",
6404 "qxl2",
6405 "qxl3",
6406 "qxl4"
6407 ],
56122987 6408 "optional" : 1,
c2993fe5
DM
6409 "type" : "string",
6410 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
56122987 6411 },
44660702
DM
6412 "virtio[n]" : {
6413 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
56122987 6414 "format" : {
44660702
DM
6415 "aio" : {
6416 "description" : "AIO type to use.",
56122987 6417 "enum" : [
44660702
DM
6418 "native",
6419 "threads"
56122987 6420 ],
56122987
DM
6421 "optional" : 1,
6422 "type" : "string"
6423 },
44660702
DM
6424 "backup" : {
6425 "description" : "Whether the drive should be included when making backups.",
44660702
DM
6426 "optional" : 1,
6427 "type" : "boolean"
7aacca6f 6428 },
44660702
DM
6429 "bps" : {
6430 "description" : "Maximum r/w speed speed in bytes per second.",
6431 "format_description" : "bps",
6432 "optional" : 1,
6433 "type" : "integer"
56122987 6434 },
44660702
DM
6435 "bps_rd" : {
6436 "description" : "Maximum read speed speed in bytes per second.",
6437 "format_description" : "bps",
56122987 6438 "optional" : 1,
44660702 6439 "type" : "integer"
56122987 6440 },
44660702
DM
6441 "bps_wr" : {
6442 "description" : "Maximum write speed speed in bytes per second.",
6443 "format_description" : "bps",
56122987 6444 "optional" : 1,
44660702
DM
6445 "type" : "integer"
6446 },
6447 "cache" : {
6448 "description" : "The drive's cache mode",
56122987 6449 "enum" : [
44660702
DM
6450 "none",
6451 "writethrough",
6452 "writeback",
6453 "unsafe",
6454 "directsync"
56122987 6455 ],
56122987 6456 "optional" : 1,
44660702 6457 "type" : "string"
56122987 6458 },
44660702
DM
6459 "cyls" : {
6460 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 6461 "optional" : 1,
44660702 6462 "type" : "integer"
7aacca6f 6463 },
44660702
DM
6464 "detect_zeroes" : {
6465 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6466 "optional" : 1,
6467 "type" : "boolean"
7aacca6f 6468 },
44660702
DM
6469 "discard" : {
6470 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6471 "enum" : [
6472 "ignore",
6473 "on"
6474 ],
56122987 6475 "optional" : 1,
44660702 6476 "type" : "string"
56122987
DM
6477 },
6478 "file" : {
7aacca6f 6479 "default_key" : 1,
44660702 6480 "description" : "The drive's backing volume.",
7aacca6f 6481 "format" : "pve-volume-id-or-qm-path",
44660702
DM
6482 "format_description" : "volume",
6483 "type" : "string"
7aacca6f
DM
6484 },
6485 "format" : {
7aacca6f
DM
6486 "description" : "The drive's backing file's data format.",
6487 "enum" : [
6488 "raw",
6489 "cow",
6490 "qcow",
6491 "qed",
6492 "qcow2",
6493 "vmdk",
6494 "cloop"
56122987 6495 ],
f004f5b9 6496 "format_description" : "image format",
56122987 6497 "optional" : 1,
56122987
DM
6498 "type" : "string"
6499 },
44660702
DM
6500 "heads" : {
6501 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6502 "optional" : 1,
44660702 6503 "type" : "integer"
56122987 6504 },
44660702
DM
6505 "iops" : {
6506 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6507 "format_description" : "iops",
56122987 6508 "optional" : 1,
44660702 6509 "type" : "integer"
56122987 6510 },
44660702
DM
6511 "iops_max" : {
6512 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6513 "format_description" : "iops",
56122987 6514 "optional" : 1,
56122987
DM
6515 "type" : "integer"
6516 },
44660702
DM
6517 "iops_rd" : {
6518 "description" : "Maximum read I/O speed in operations per second.",
6519 "format_description" : "iops",
56122987 6520 "optional" : 1,
44660702 6521 "type" : "integer"
56122987 6522 },
44660702
DM
6523 "iops_rd_max" : {
6524 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6525 "format_description" : "iops",
7aacca6f 6526 "optional" : 1,
44660702 6527 "type" : "integer"
56122987 6528 },
44660702
DM
6529 "iops_wr" : {
6530 "description" : "Maximum write I/O speed in operations per second.",
6531 "format_description" : "iops",
7aacca6f 6532 "optional" : 1,
44660702 6533 "type" : "integer"
56122987 6534 },
44660702
DM
6535 "iops_wr_max" : {
6536 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6537 "format_description" : "iops",
56122987
DM
6538 "optional" : 1,
6539 "type" : "integer"
6540 },
44660702
DM
6541 "iothread" : {
6542 "description" : "Whether to use iothreads for this drive",
44660702
DM
6543 "optional" : 1,
6544 "type" : "boolean"
6545 },
6546 "mbps" : {
6547 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 6548 "format_description" : "mbps",
44660702
DM
6549 "optional" : 1,
6550 "type" : "number"
6551 },
6552 "mbps_max" : {
7aacca6f 6553 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702
DM
6554 "format_description" : "mbps",
6555 "optional" : 1,
6556 "type" : "number"
7aacca6f 6557 },
44660702
DM
6558 "mbps_rd" : {
6559 "description" : "Maximum read speed speed in megabytes per second.",
6560 "format_description" : "mbps",
56122987 6561 "optional" : 1,
44660702 6562 "type" : "number"
56122987 6563 },
44660702
DM
6564 "mbps_rd_max" : {
6565 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6566 "format_description" : "mbps",
7aacca6f 6567 "optional" : 1,
44660702 6568 "type" : "number"
56122987 6569 },
44660702
DM
6570 "mbps_wr" : {
6571 "description" : "Maximum write speed speed in megabytes per second.",
6572 "format_description" : "mbps",
56122987 6573 "optional" : 1,
44660702 6574 "type" : "number"
56122987 6575 },
44660702
DM
6576 "mbps_wr_max" : {
6577 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6578 "format_description" : "mbps",
56122987 6579 "optional" : 1,
44660702 6580 "type" : "number"
56122987
DM
6581 },
6582 "media" : {
7aacca6f 6583 "default" : "disk",
44660702 6584 "description" : "The drive's media type.",
56122987
DM
6585 "enum" : [
6586 "cdrom",
6587 "disk"
6588 ],
44660702
DM
6589 "optional" : 1,
6590 "type" : "string"
56122987 6591 },
7aacca6f 6592 "rerror" : {
44660702 6593 "description" : "Read error action.",
56122987 6594 "enum" : [
7aacca6f
DM
6595 "ignore",
6596 "report",
6597 "stop"
56122987 6598 ],
56122987 6599 "optional" : 1,
44660702 6600 "type" : "string"
56122987 6601 },
44660702
DM
6602 "secs" : {
6603 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6604 "optional" : 1,
6605 "type" : "integer"
6606 },
6607 "serial" : {
6608 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6609 "format" : "urlencoded",
6610 "format_description" : "serial",
6611 "maxLength" : 60,
56122987 6612 "optional" : 1,
7aacca6f 6613 "type" : "string"
56122987 6614 },
44660702
DM
6615 "size" : {
6616 "description" : "Disk size. This is purely informational and has no effect.",
6617 "format" : "disk-size",
f004f5b9 6618 "format_description" : "DiskSize",
56122987 6619 "optional" : 1,
44660702 6620 "type" : "string"
56122987 6621 },
44660702
DM
6622 "snapshot" : {
6623 "description" : "Whether the drive should be included when making snapshots.",
56122987 6624 "optional" : 1,
44660702 6625 "type" : "boolean"
56122987 6626 },
44660702
DM
6627 "trans" : {
6628 "description" : "Force disk geometry bios translation mode.",
6629 "enum" : [
6630 "none",
6631 "lba",
6632 "auto"
6633 ],
44660702
DM
6634 "optional" : 1,
6635 "type" : "string"
6636 },
6637 "volume" : {
6638 "alias" : "file"
6639 },
6640 "werror" : {
6641 "description" : "Write error action.",
6642 "enum" : [
6643 "enospc",
6644 "ignore",
6645 "report",
6646 "stop"
6647 ],
56122987 6648 "optional" : 1,
44660702 6649 "type" : "string"
56122987 6650 }
44660702 6651 },
56122987 6652 "optional" : 1,
44660702 6653 "type" : "string"
56122987 6654 },
7aacca6f
DM
6655 "vmid" : {
6656 "description" : "The (unique) ID of the VM.",
7aacca6f 6657 "format" : "pve-vmid",
44660702
DM
6658 "minimum" : 1,
6659 "type" : "integer"
56122987 6660 },
44660702 6661 "watchdog" : {
c2993fe5 6662 "description" : "Create a virtual hardware watchdog device.",
44660702 6663 "format" : "pve-qm-watchdog",
56122987 6664 "optional" : 1,
c2993fe5
DM
6665 "type" : "string",
6666 "verbose_description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"
56122987 6667 }
44660702 6668 }
56122987 6669 },
7aacca6f
DM
6670 "permissions" : {
6671 "check" : [
6672 "perm",
6673 "/vms/{vmid}",
6674 [
44660702
DM
6675 "VM.Config.Disk",
6676 "VM.Config.CDROM",
6677 "VM.Config.CPU",
6678 "VM.Config.Memory",
6679 "VM.Config.Network",
6680 "VM.Config.HWType",
6681 "VM.Config.Options"
6682 ],
6683 "any",
6684 1
7aacca6f 6685 ]
56122987 6686 },
44660702 6687 "protected" : 1,
7aacca6f 6688 "proxyto" : "node",
44660702
DM
6689 "returns" : {
6690 "optional" : 1,
6691 "type" : "string"
6692 }
56122987 6693 },
7aacca6f 6694 "PUT" : {
44660702
DM
6695 "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.",
6696 "method" : "PUT",
6697 "name" : "update_vm",
56122987 6698 "parameters" : {
7aacca6f 6699 "additionalProperties" : 0,
56122987 6700 "properties" : {
44660702
DM
6701 "acpi" : {
6702 "default" : 1,
6703 "description" : "Enable/disable ACPI.",
7aacca6f 6704 "optional" : 1,
44660702 6705 "type" : "boolean"
7aacca6f 6706 },
44660702
DM
6707 "agent" : {
6708 "default" : 0,
6709 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 6710 "optional" : 1,
44660702 6711 "type" : "boolean"
56122987 6712 },
44660702 6713 "args" : {
c2993fe5 6714 "description" : "Arbitrary arguments passed to kvm.",
7aacca6f 6715 "optional" : 1,
c2993fe5
DM
6716 "type" : "string",
6717 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
7aacca6f 6718 },
44660702
DM
6719 "autostart" : {
6720 "default" : 0,
6721 "description" : "Automatic restart after crash (currently ignored).",
7aacca6f
DM
6722 "optional" : 1,
6723 "type" : "boolean"
6724 },
44660702
DM
6725 "balloon" : {
6726 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
6727 "minimum" : 0,
6728 "optional" : 1,
6729 "type" : "integer"
6730 },
6731 "bios" : {
6732 "default" : "seabios",
6733 "description" : "Select BIOS implementation.",
7aacca6f 6734 "enum" : [
44660702
DM
6735 "seabios",
6736 "ovmf"
7aacca6f 6737 ],
56122987 6738 "optional" : 1,
7aacca6f
DM
6739 "type" : "string"
6740 },
44660702
DM
6741 "boot" : {
6742 "default" : "cdn",
6743 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
7aacca6f 6744 "optional" : 1,
44660702
DM
6745 "pattern" : "[acdn]{1,4}",
6746 "type" : "string"
56122987 6747 },
44660702
DM
6748 "bootdisk" : {
6749 "description" : "Enable booting from specified disk.",
6750 "format" : "pve-qm-bootdisk",
6751 "optional" : 1,
6752 "pattern" : "(ide|sata|scsi|virtio)\\d+",
6753 "type" : "string"
6754 },
6755 "cdrom" : {
6756 "description" : "This is an alias for option -ide2",
6757 "format" : "pve-qm-drive",
56122987 6758 "optional" : 1,
7aacca6f 6759 "type" : "string",
44660702
DM
6760 "typetext" : "volume"
6761 },
6762 "cores" : {
6763 "default" : 1,
6764 "description" : "The number of cores per socket.",
6765 "minimum" : 1,
6766 "optional" : 1,
6767 "type" : "integer"
6768 },
6769 "cpu" : {
6770 "description" : "Emulated CPU type.",
6771 "format" : {
6772 "cputype" : {
6773 "default" : "kvm64",
6774 "default_key" : 1,
6775 "description" : "Emulated CPU type.",
6776 "enum" : [
6777 "486",
6778 "athlon",
f004f5b9
DM
6779 "Broadwell",
6780 "Broadwell-noTSX",
6781 "Conroe",
44660702 6782 "core2duo",
f004f5b9
DM
6783 "coreduo",
6784 "Haswell",
6785 "Haswell-noTSX",
6786 "host",
6787 "IvyBridge",
44660702
DM
6788 "kvm32",
6789 "kvm64",
44660702 6790 "Nehalem",
44660702
DM
6791 "Opteron_G1",
6792 "Opteron_G2",
6793 "Opteron_G3",
6794 "Opteron_G4",
6795 "Opteron_G5",
f004f5b9
DM
6796 "Penryn",
6797 "pentium",
6798 "pentium2",
6799 "pentium3",
6800 "phenom",
6801 "qemu32",
6802 "qemu64",
6803 "SandyBridge",
6804 "Westmere"
44660702
DM
6805 ],
6806 "format_description" : "cputype",
6807 "type" : "string"
6808 },
6809 "hidden" : {
6810 "default" : 0,
6811 "description" : "Do not identify as a KVM virtual machine.",
6812 "optional" : 1,
6813 "type" : "boolean"
6814 }
6815 },
6816 "optional" : 1,
6817 "type" : "string"
6818 },
6819 "cpulimit" : {
6820 "default" : 0,
c2993fe5 6821 "description" : "Limit of CPU usage.",
44660702
DM
6822 "maximum" : 128,
6823 "minimum" : 0,
6824 "optional" : 1,
c2993fe5
DM
6825 "type" : "number",
6826 "verbose_description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."
44660702
DM
6827 },
6828 "cpuunits" : {
6829 "default" : 1000,
c2993fe5 6830 "description" : "CPU weight for a VM.",
44660702
DM
6831 "maximum" : 500000,
6832 "minimum" : 0,
6833 "optional" : 1,
c2993fe5
DM
6834 "type" : "integer",
6835 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
6836 },
6837 "delete" : {
6838 "description" : "A list of settings you want to delete.",
6839 "format" : "pve-configid-list",
6840 "optional" : 1,
6841 "type" : "string"
6842 },
6843 "description" : {
6844 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
6845 "optional" : 1,
6846 "type" : "string"
6847 },
6848 "digest" : {
6849 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
6850 "maxLength" : 40,
6851 "optional" : 1,
6852 "type" : "string"
6853 },
6854 "force" : {
6855 "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.",
6856 "optional" : 1,
6857 "requires" : "delete",
6858 "type" : "boolean"
6859 },
6860 "freeze" : {
6861 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
6862 "optional" : 1,
6863 "type" : "boolean"
6864 },
6865 "hostpci[n]" : {
c2993fe5 6866 "description" : "Map host PCI devices into guest.",
44660702
DM
6867 "format" : "pve-qm-hostpci",
6868 "optional" : 1,
6869 "type" : "string"
56122987 6870 },
7aacca6f 6871 "hotplug" : {
7aacca6f 6872 "default" : "network,disk,usb",
44660702
DM
6873 "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'.",
6874 "format" : "pve-hotplug-features",
56122987 6875 "optional" : 1,
56122987
DM
6876 "type" : "string"
6877 },
6878 "ide[n]" : {
7aacca6f 6879 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 6880 "format" : {
44660702
DM
6881 "aio" : {
6882 "description" : "AIO type to use.",
6883 "enum" : [
6884 "native",
6885 "threads"
6886 ],
56122987 6887 "optional" : 1,
44660702 6888 "type" : "string"
56122987 6889 },
44660702
DM
6890 "backup" : {
6891 "description" : "Whether the drive should be included when making backups.",
44660702
DM
6892 "optional" : 1,
6893 "type" : "boolean"
6894 },
6895 "bps" : {
6896 "description" : "Maximum r/w speed speed in bytes per second.",
6897 "format_description" : "bps",
56122987 6898 "optional" : 1,
44660702 6899 "type" : "integer"
56122987 6900 },
44660702
DM
6901 "bps_rd" : {
6902 "description" : "Maximum read speed speed in bytes per second.",
6903 "format_description" : "bps",
56122987 6904 "optional" : 1,
44660702 6905 "type" : "integer"
56122987 6906 },
7aacca6f 6907 "bps_wr" : {
7aacca6f 6908 "description" : "Maximum write speed speed in bytes per second.",
44660702
DM
6909 "format_description" : "bps",
6910 "optional" : 1,
6911 "type" : "integer"
7aacca6f 6912 },
44660702
DM
6913 "cache" : {
6914 "description" : "The drive's cache mode",
6915 "enum" : [
6916 "none",
6917 "writethrough",
6918 "writeback",
6919 "unsafe",
6920 "directsync"
6921 ],
56122987 6922 "optional" : 1,
44660702
DM
6923 "type" : "string"
6924 },
6925 "cyls" : {
6926 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
6927 "optional" : 1,
6928 "type" : "integer"
6929 },
6930 "detect_zeroes" : {
6931 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6932 "optional" : 1,
6933 "type" : "boolean"
56122987 6934 },
7aacca6f 6935 "discard" : {
7aacca6f 6936 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 6937 "enum" : [
7aacca6f
DM
6938 "ignore",
6939 "on"
56122987
DM
6940 ],
6941 "optional" : 1,
44660702 6942 "type" : "string"
7aacca6f 6943 },
44660702
DM
6944 "file" : {
6945 "default_key" : 1,
6946 "description" : "The drive's backing volume.",
6947 "format" : "pve-volume-id-or-qm-path",
6948 "format_description" : "volume",
6949 "type" : "string"
7aacca6f
DM
6950 },
6951 "format" : {
44660702 6952 "description" : "The drive's backing file's data format.",
7aacca6f
DM
6953 "enum" : [
6954 "raw",
6955 "cow",
6956 "qcow",
6957 "qed",
6958 "qcow2",
6959 "vmdk",
6960 "cloop"
6961 ],
f004f5b9 6962 "format_description" : "image format",
7aacca6f 6963 "optional" : 1,
44660702 6964 "type" : "string"
56122987 6965 },
7aacca6f 6966 "heads" : {
44660702 6967 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6968 "optional" : 1,
44660702 6969 "type" : "integer"
7aacca6f 6970 },
44660702
DM
6971 "iops" : {
6972 "description" : "Maximum r/w I/O speed in operations per second.",
6973 "format_description" : "iops",
7aacca6f 6974 "optional" : 1,
44660702 6975 "type" : "integer"
56122987 6976 },
44660702
DM
6977 "iops_max" : {
6978 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6979 "format_description" : "iops",
56122987 6980 "optional" : 1,
44660702 6981 "type" : "integer"
56122987 6982 },
44660702
DM
6983 "iops_rd" : {
6984 "description" : "Maximum read I/O speed in operations per second.",
6985 "format_description" : "iops",
56122987 6986 "optional" : 1,
44660702 6987 "type" : "integer"
7aacca6f 6988 },
44660702
DM
6989 "iops_rd_max" : {
6990 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6991 "format_description" : "iops",
7aacca6f 6992 "optional" : 1,
44660702 6993 "type" : "integer"
7aacca6f 6994 },
44660702
DM
6995 "iops_wr" : {
6996 "description" : "Maximum write I/O speed in operations per second.",
6997 "format_description" : "iops",
7aacca6f 6998 "optional" : 1,
44660702 6999 "type" : "integer"
56122987 7000 },
44660702
DM
7001 "iops_wr_max" : {
7002 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7003 "format_description" : "iops",
7aacca6f 7004 "optional" : 1,
44660702 7005 "type" : "integer"
7aacca6f
DM
7006 },
7007 "mbps" : {
44660702 7008 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 7009 "format_description" : "mbps",
7aacca6f 7010 "optional" : 1,
44660702 7011 "type" : "number"
7aacca6f 7012 },
44660702
DM
7013 "mbps_max" : {
7014 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7015 "format_description" : "mbps",
7aacca6f 7016 "optional" : 1,
44660702 7017 "type" : "number"
7aacca6f 7018 },
44660702
DM
7019 "mbps_rd" : {
7020 "description" : "Maximum read speed speed in megabytes per second.",
7021 "format_description" : "mbps",
7aacca6f 7022 "optional" : 1,
44660702 7023 "type" : "number"
7aacca6f 7024 },
44660702
DM
7025 "mbps_rd_max" : {
7026 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7027 "format_description" : "mbps",
7028 "optional" : 1,
7029 "type" : "number"
7aacca6f 7030 },
44660702
DM
7031 "mbps_wr" : {
7032 "description" : "Maximum write speed speed in megabytes per second.",
7033 "format_description" : "mbps",
7aacca6f 7034 "optional" : 1,
44660702
DM
7035 "type" : "number"
7036 },
7037 "mbps_wr_max" : {
7038 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7039 "format_description" : "mbps",
7040 "optional" : 1,
7041 "type" : "number"
7042 },
7043 "media" : {
7044 "default" : "disk",
7045 "description" : "The drive's media type.",
56122987 7046 "enum" : [
44660702
DM
7047 "cdrom",
7048 "disk"
56122987 7049 ],
44660702
DM
7050 "optional" : 1,
7051 "type" : "string"
56122987 7052 },
7aacca6f 7053 "model" : {
44660702 7054 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
56122987 7055 "format" : "urlencoded",
7aacca6f 7056 "format_description" : "model",
44660702 7057 "maxLength" : 120,
56122987 7058 "optional" : 1,
44660702 7059 "type" : "string"
56122987 7060 },
44660702
DM
7061 "rerror" : {
7062 "description" : "Read error action.",
7063 "enum" : [
7064 "ignore",
7065 "report",
7066 "stop"
7067 ],
56122987 7068 "optional" : 1,
44660702 7069 "type" : "string"
56122987 7070 },
44660702
DM
7071 "secs" : {
7072 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
7073 "optional" : 1,
7074 "type" : "integer"
56122987 7075 },
44660702
DM
7076 "serial" : {
7077 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7078 "format" : "urlencoded",
7079 "format_description" : "serial",
7080 "maxLength" : 60,
56122987 7081 "optional" : 1,
44660702 7082 "type" : "string"
56122987 7083 },
44660702
DM
7084 "size" : {
7085 "description" : "Disk size. This is purely informational and has no effect.",
7086 "format" : "disk-size",
f004f5b9 7087 "format_description" : "DiskSize",
56122987 7088 "optional" : 1,
44660702 7089 "type" : "string"
56122987 7090 },
44660702
DM
7091 "snapshot" : {
7092 "description" : "Whether the drive should be included when making snapshots.",
56122987 7093 "optional" : 1,
44660702 7094 "type" : "boolean"
56122987 7095 },
44660702
DM
7096 "trans" : {
7097 "description" : "Force disk geometry bios translation mode.",
7098 "enum" : [
7099 "none",
7100 "lba",
7101 "auto"
7102 ],
56122987 7103 "optional" : 1,
44660702
DM
7104 "type" : "string"
7105 },
7106 "volume" : {
7107 "alias" : "file"
56122987 7108 },
7aacca6f 7109 "werror" : {
44660702 7110 "description" : "Write error action.",
7aacca6f
DM
7111 "enum" : [
7112 "enospc",
7113 "ignore",
7114 "report",
7115 "stop"
7116 ],
56122987 7117 "optional" : 1,
44660702 7118 "type" : "string"
7aacca6f 7119 }
44660702
DM
7120 },
7121 "optional" : 1,
7122 "type" : "string"
7aacca6f 7123 },
44660702
DM
7124 "keyboard" : {
7125 "default" : "en-us",
c2993fe5 7126 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
44660702
DM
7127 "enum" : [
7128 "de",
7129 "de-ch",
7130 "da",
7131 "en-gb",
7132 "en-us",
7133 "es",
7134 "fi",
7135 "fr",
7136 "fr-be",
7137 "fr-ca",
7138 "fr-ch",
7139 "hu",
7140 "is",
7141 "it",
7142 "ja",
7143 "lt",
7144 "mk",
7145 "nl",
7146 "no",
7147 "pl",
7148 "pt",
7149 "pt-br",
7150 "sv",
7151 "sl",
7152 "tr"
7153 ],
7aacca6f 7154 "optional" : 1,
44660702 7155 "type" : "string"
7aacca6f 7156 },
44660702 7157 "kvm" : {
7aacca6f 7158 "default" : 1,
44660702 7159 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 7160 "optional" : 1,
44660702 7161 "type" : "boolean"
7aacca6f 7162 },
44660702
DM
7163 "localtime" : {
7164 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
7aacca6f 7165 "optional" : 1,
44660702 7166 "type" : "boolean"
7aacca6f 7167 },
44660702
DM
7168 "lock" : {
7169 "description" : "Lock/unlock the VM.",
7170 "enum" : [
7171 "migrate",
7172 "backup",
7173 "snapshot",
7174 "rollback"
7175 ],
7aacca6f 7176 "optional" : 1,
44660702 7177 "type" : "string"
7aacca6f 7178 },
44660702
DM
7179 "machine" : {
7180 "description" : "Specific the Qemu machine type.",
7181 "maxLength" : 40,
7aacca6f 7182 "optional" : 1,
44660702
DM
7183 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
7184 "type" : "string"
7aacca6f 7185 },
44660702
DM
7186 "memory" : {
7187 "default" : 512,
7188 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
7189 "minimum" : 16,
7aacca6f 7190 "optional" : 1,
44660702 7191 "type" : "integer"
7aacca6f 7192 },
44660702
DM
7193 "migrate_downtime" : {
7194 "default" : 0.1,
7195 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
7196 "minimum" : 0,
7aacca6f 7197 "optional" : 1,
44660702 7198 "type" : "number"
7aacca6f 7199 },
44660702 7200 "migrate_speed" : {
7aacca6f 7201 "default" : 0,
44660702
DM
7202 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
7203 "minimum" : 0,
7204 "optional" : 1,
7205 "type" : "integer"
7aacca6f 7206 },
44660702
DM
7207 "name" : {
7208 "description" : "Set a name for the VM. Only used on the configuration web interface.",
7209 "format" : "dns-name",
7aacca6f 7210 "optional" : 1,
44660702 7211 "type" : "string"
7aacca6f 7212 },
44660702 7213 "net[n]" : {
c2993fe5 7214 "description" : "Specify network devices.",
f004f5b9
DM
7215 "format" : {
7216 "bridge" : {
c2993fe5 7217 "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n",
f004f5b9
DM
7218 "format_description" : "bridge",
7219 "optional" : 1,
7220 "type" : "string"
7221 },
7222 "e1000" : {
7223 "alias" : "macaddr",
7224 "keyAlias" : "model"
7225 },
7226 "e1000-82540em" : {
7227 "alias" : "macaddr",
7228 "keyAlias" : "model"
7229 },
7230 "e1000-82544gc" : {
7231 "alias" : "macaddr",
7232 "keyAlias" : "model"
7233 },
7234 "e1000-82545em" : {
7235 "alias" : "macaddr",
7236 "keyAlias" : "model"
7237 },
7238 "firewall" : {
7239 "description" : "Whether this interface should be protected by the firewall.",
7240 "optional" : 1,
7241 "type" : "boolean"
7242 },
7243 "i82551" : {
7244 "alias" : "macaddr",
7245 "keyAlias" : "model"
7246 },
7247 "i82557b" : {
7248 "alias" : "macaddr",
7249 "keyAlias" : "model"
7250 },
7251 "i82559er" : {
7252 "alias" : "macaddr",
7253 "keyAlias" : "model"
7254 },
7255 "link_down" : {
c2993fe5 7256 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
7257 "optional" : 1,
7258 "type" : "boolean"
7259 },
7260 "macaddr" : {
c2993fe5 7261 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 7262 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
7263 "optional" : 1,
7264 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
7265 "type" : "string"
7266 },
7267 "model" : {
7268 "default_key" : 1,
c2993fe5 7269 "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.",
f004f5b9
DM
7270 "enum" : [
7271 "rtl8139",
7272 "ne2k_pci",
7273 "e1000",
7274 "pcnet",
7275 "virtio",
7276 "ne2k_isa",
7277 "i82551",
7278 "i82557b",
7279 "i82559er",
7280 "vmxnet3",
7281 "e1000-82540em",
7282 "e1000-82544gc",
7283 "e1000-82545em"
7284 ],
7285 "format_description" : "model",
7286 "type" : "string"
7287 },
7288 "ne2k_isa" : {
7289 "alias" : "macaddr",
7290 "keyAlias" : "model"
7291 },
7292 "ne2k_pci" : {
7293 "alias" : "macaddr",
7294 "keyAlias" : "model"
7295 },
7296 "pcnet" : {
7297 "alias" : "macaddr",
7298 "keyAlias" : "model"
7299 },
7300 "queues" : {
7301 "description" : "Number of packet queues to be used on the device.",
7302 "maximum" : 16,
7303 "minimum" : 0,
7304 "optional" : 1,
7305 "type" : "integer"
7306 },
7307 "rate" : {
c2993fe5 7308 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
7309 "minimum" : 0,
7310 "optional" : 1,
7311 "type" : "number"
7312 },
7313 "rtl8139" : {
7314 "alias" : "macaddr",
7315 "keyAlias" : "model"
7316 },
7317 "tag" : {
7318 "description" : "VLAN tag to apply to packets on this interface.",
7319 "maximum" : 4094,
c2993fe5 7320 "minimum" : 1,
f004f5b9
DM
7321 "optional" : 1,
7322 "type" : "integer"
7323 },
7324 "trunks" : {
7325 "description" : "VLAN trunks to pass through this interface.",
7326 "format_description" : "vlanid[;vlanid...]",
7327 "optional" : 1,
7328 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7329 "type" : "string"
7330 },
7331 "virtio" : {
7332 "alias" : "macaddr",
7333 "keyAlias" : "model"
7334 },
7335 "vmxnet3" : {
7336 "alias" : "macaddr",
7337 "keyAlias" : "model"
7338 }
7339 },
7aacca6f 7340 "optional" : 1,
44660702 7341 "type" : "string"
7aacca6f 7342 },
44660702
DM
7343 "node" : {
7344 "description" : "The cluster node name.",
7345 "format" : "pve-node",
7346 "type" : "string"
7347 },
7348 "numa" : {
7349 "default" : 0,
7350 "description" : "Enable/disable NUMA.",
7aacca6f
DM
7351 "optional" : 1,
7352 "type" : "boolean"
7353 },
44660702 7354 "numa[n]" : {
c2993fe5 7355 "description" : "NUMA topology.",
44660702
DM
7356 "format" : {
7357 "cpus" : {
c2993fe5 7358 "description" : "CPUs accessing this NUMA node.",
44660702
DM
7359 "format_description" : "id[-id];...",
7360 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7361 "type" : "string"
7362 },
7363 "hostnodes" : {
c2993fe5 7364 "description" : "Host NUMA nodes to use.",
44660702
DM
7365 "format_description" : "id[-id];...",
7366 "optional" : 1,
7367 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7368 "type" : "string"
7369 },
7370 "memory" : {
c2993fe5 7371 "description" : "Amount of memory this NUMA node provides.",
44660702
DM
7372 "optional" : 1,
7373 "type" : "number"
7374 },
7375 "policy" : {
c2993fe5 7376 "description" : "NUMA allocation policy.",
44660702
DM
7377 "enum" : [
7378 "preferred",
7379 "bind",
7380 "interleave"
7381 ],
44660702
DM
7382 "optional" : 1,
7383 "type" : "string"
7384 }
7385 },
7aacca6f 7386 "optional" : 1,
44660702 7387 "type" : "string"
7aacca6f 7388 },
44660702
DM
7389 "onboot" : {
7390 "default" : 0,
7391 "description" : "Specifies whether a VM will be started during system bootup.",
7aacca6f 7392 "optional" : 1,
44660702 7393 "type" : "boolean"
7aacca6f 7394 },
44660702 7395 "ostype" : {
c2993fe5 7396 "description" : "Specify guest operating system.",
44660702
DM
7397 "enum" : [
7398 "other",
7399 "wxp",
7400 "w2k",
7401 "w2k3",
7402 "w2k8",
7403 "wvista",
7404 "win7",
7405 "win8",
7406 "l24",
7407 "l26",
7408 "solaris"
7409 ],
7aacca6f 7410 "optional" : 1,
c2993fe5
DM
7411 "type" : "string",
7412 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
7aacca6f 7413 },
44660702 7414 "parallel[n]" : {
c2993fe5 7415 "description" : "Map host parallel devices (n is 0 to 2).",
7aacca6f 7416 "optional" : 1,
44660702 7417 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
7418 "type" : "string",
7419 "verbose_description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
7aacca6f 7420 },
44660702
DM
7421 "protection" : {
7422 "default" : 0,
c2993fe5 7423 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
7aacca6f 7424 "optional" : 1,
44660702 7425 "type" : "boolean"
7aacca6f 7426 },
44660702
DM
7427 "reboot" : {
7428 "default" : 1,
7429 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 7430 "optional" : 1,
44660702 7431 "type" : "boolean"
7aacca6f 7432 },
44660702
DM
7433 "revert" : {
7434 "description" : "Revert a pending change.",
7435 "format" : "pve-configid-list",
7aacca6f 7436 "optional" : 1,
44660702 7437 "type" : "string"
7aacca6f 7438 },
44660702
DM
7439 "sata[n]" : {
7440 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
7aacca6f 7441 "format" : {
44660702
DM
7442 "aio" : {
7443 "description" : "AIO type to use.",
7444 "enum" : [
7445 "native",
7446 "threads"
7447 ],
44660702
DM
7448 "optional" : 1,
7449 "type" : "string"
7450 },
7451 "backup" : {
7452 "description" : "Whether the drive should be included when making backups.",
44660702
DM
7453 "optional" : 1,
7454 "type" : "boolean"
7455 },
7456 "bps" : {
7457 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 7458 "format_description" : "bps",
7aacca6f
DM
7459 "optional" : 1,
7460 "type" : "integer"
56122987 7461 },
44660702
DM
7462 "bps_rd" : {
7463 "description" : "Maximum read speed speed in bytes per second.",
7464 "format_description" : "bps",
7aacca6f 7465 "optional" : 1,
44660702 7466 "type" : "integer"
7aacca6f 7467 },
44660702
DM
7468 "bps_wr" : {
7469 "description" : "Maximum write speed speed in bytes per second.",
7470 "format_description" : "bps",
7aacca6f 7471 "optional" : 1,
44660702 7472 "type" : "integer"
7aacca6f 7473 },
44660702
DM
7474 "cache" : {
7475 "description" : "The drive's cache mode",
7476 "enum" : [
7477 "none",
7478 "writethrough",
7479 "writeback",
7480 "unsafe",
7481 "directsync"
7482 ],
7aacca6f 7483 "optional" : 1,
44660702 7484 "type" : "string"
7aacca6f 7485 },
44660702
DM
7486 "cyls" : {
7487 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 7488 "optional" : 1,
44660702 7489 "type" : "integer"
7aacca6f 7490 },
44660702
DM
7491 "detect_zeroes" : {
7492 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7aacca6f 7493 "optional" : 1,
44660702 7494 "type" : "boolean"
7aacca6f 7495 },
44660702
DM
7496 "discard" : {
7497 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7498 "enum" : [
7499 "ignore",
7500 "on"
7501 ],
7aacca6f 7502 "optional" : 1,
44660702
DM
7503 "type" : "string"
7504 },
7505 "file" : {
7506 "default_key" : 1,
7507 "description" : "The drive's backing volume.",
7508 "format" : "pve-volume-id-or-qm-path",
7509 "format_description" : "volume",
7510 "type" : "string"
7aacca6f
DM
7511 },
7512 "format" : {
7aacca6f 7513 "description" : "The drive's backing file's data format.",
56122987
DM
7514 "enum" : [
7515 "raw",
7516 "cow",
7517 "qcow",
7518 "qed",
7519 "qcow2",
7520 "vmdk",
7521 "cloop"
7522 ],
f004f5b9 7523 "format_description" : "image format",
56122987 7524 "optional" : 1,
7aacca6f 7525 "type" : "string"
56122987 7526 },
7aacca6f 7527 "heads" : {
7aacca6f 7528 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
7529 "optional" : 1,
7530 "type" : "integer"
56122987 7531 },
44660702
DM
7532 "iops" : {
7533 "description" : "Maximum r/w I/O speed in operations per second.",
7534 "format_description" : "iops",
56122987 7535 "optional" : 1,
44660702 7536 "type" : "integer"
7aacca6f 7537 },
44660702
DM
7538 "iops_max" : {
7539 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7540 "format_description" : "iops",
7aacca6f 7541 "optional" : 1,
44660702 7542 "type" : "integer"
56122987 7543 },
44660702
DM
7544 "iops_rd" : {
7545 "description" : "Maximum read I/O speed in operations per second.",
7546 "format_description" : "iops",
56122987 7547 "optional" : 1,
44660702 7548 "type" : "integer"
7aacca6f 7549 },
44660702
DM
7550 "iops_rd_max" : {
7551 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7552 "format_description" : "iops",
56122987 7553 "optional" : 1,
44660702 7554 "type" : "integer"
56122987 7555 },
44660702
DM
7556 "iops_wr" : {
7557 "description" : "Maximum write I/O speed in operations per second.",
7558 "format_description" : "iops",
7559 "optional" : 1,
7560 "type" : "integer"
56122987 7561 },
44660702
DM
7562 "iops_wr_max" : {
7563 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7564 "format_description" : "iops",
7565 "optional" : 1,
7566 "type" : "integer"
7567 },
7568 "mbps" : {
7569 "description" : "Maximum r/w speed speed in megabytes per second.",
7570 "format_description" : "mbps",
7571 "optional" : 1,
7572 "type" : "number"
7573 },
7574 "mbps_max" : {
7575 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7576 "format_description" : "mbps",
7577 "optional" : 1,
7578 "type" : "number"
7579 },
7580 "mbps_rd" : {
7581 "description" : "Maximum read speed speed in megabytes per second.",
7582 "format_description" : "mbps",
7583 "optional" : 1,
7584 "type" : "number"
7585 },
7586 "mbps_rd_max" : {
7587 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7588 "format_description" : "mbps",
7589 "optional" : 1,
7590 "type" : "number"
7591 },
7592 "mbps_wr" : {
7593 "description" : "Maximum write speed speed in megabytes per second.",
7594 "format_description" : "mbps",
7595 "optional" : 1,
7596 "type" : "number"
7597 },
7598 "mbps_wr_max" : {
7599 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7600 "format_description" : "mbps",
7601 "optional" : 1,
7602 "type" : "number"
7603 },
7604 "media" : {
7605 "default" : "disk",
7606 "description" : "The drive's media type.",
7607 "enum" : [
7608 "cdrom",
7609 "disk"
7610 ],
56122987 7611 "optional" : 1,
44660702
DM
7612 "type" : "string"
7613 },
7614 "rerror" : {
7aacca6f
DM
7615 "description" : "Read error action.",
7616 "enum" : [
7617 "ignore",
7618 "report",
7619 "stop"
44660702 7620 ],
56122987 7621 "optional" : 1,
44660702 7622 "type" : "string"
56122987 7623 },
7aacca6f 7624 "secs" : {
44660702 7625 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7626 "optional" : 1,
44660702 7627 "type" : "integer"
56122987 7628 },
44660702
DM
7629 "serial" : {
7630 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7631 "format" : "urlencoded",
7632 "format_description" : "serial",
7633 "maxLength" : 60,
56122987 7634 "optional" : 1,
44660702 7635 "type" : "string"
56122987 7636 },
44660702
DM
7637 "size" : {
7638 "description" : "Disk size. This is purely informational and has no effect.",
7639 "format" : "disk-size",
f004f5b9 7640 "format_description" : "DiskSize",
56122987 7641 "optional" : 1,
44660702 7642 "type" : "string"
56122987
DM
7643 },
7644 "snapshot" : {
7aacca6f 7645 "description" : "Whether the drive should be included when making snapshots.",
56122987 7646 "optional" : 1,
44660702 7647 "type" : "boolean"
56122987 7648 },
56122987 7649 "trans" : {
7aacca6f 7650 "description" : "Force disk geometry bios translation mode.",
56122987
DM
7651 "enum" : [
7652 "none",
7653 "lba",
7654 "auto"
7655 ],
7656 "optional" : 1,
44660702 7657 "type" : "string"
56122987 7658 },
44660702
DM
7659 "volume" : {
7660 "alias" : "file"
56122987 7661 },
7aacca6f 7662 "werror" : {
44660702 7663 "description" : "Write error action.",
56122987 7664 "enum" : [
7aacca6f 7665 "enospc",
56122987 7666 "ignore",
7aacca6f
DM
7667 "report",
7668 "stop"
7669 ],
7aacca6f 7670 "optional" : 1,
44660702
DM
7671 "type" : "string"
7672 }
7673 },
7674 "optional" : 1,
7675 "type" : "string"
7676 },
7677 "scsi[n]" : {
7678 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
7679 "format" : {
7680 "aio" : {
7aacca6f 7681 "description" : "AIO type to use.",
56122987
DM
7682 "enum" : [
7683 "native",
7684 "threads"
44660702 7685 ],
56122987 7686 "optional" : 1,
44660702 7687 "type" : "string"
56122987 7688 },
7aacca6f 7689 "backup" : {
7aacca6f 7690 "description" : "Whether the drive should be included when making backups.",
7aacca6f 7691 "optional" : 1,
44660702 7692 "type" : "boolean"
56122987 7693 },
44660702
DM
7694 "bps" : {
7695 "description" : "Maximum r/w speed speed in bytes per second.",
7696 "format_description" : "bps",
7aacca6f 7697 "optional" : 1,
44660702 7698 "type" : "integer"
7aacca6f 7699 },
44660702
DM
7700 "bps_rd" : {
7701 "description" : "Maximum read speed speed in bytes per second.",
7702 "format_description" : "bps",
56122987 7703 "optional" : 1,
44660702 7704 "type" : "integer"
56122987 7705 },
44660702
DM
7706 "bps_wr" : {
7707 "description" : "Maximum write speed speed in bytes per second.",
7708 "format_description" : "bps",
56122987 7709 "optional" : 1,
44660702 7710 "type" : "integer"
56122987 7711 },
44660702
DM
7712 "cache" : {
7713 "description" : "The drive's cache mode",
7714 "enum" : [
7715 "none",
7716 "writethrough",
7717 "writeback",
7718 "unsafe",
7719 "directsync"
7720 ],
56122987 7721 "optional" : 1,
44660702
DM
7722 "type" : "string"
7723 },
7724 "cyls" : {
7725 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
7726 "optional" : 1,
7727 "type" : "integer"
7728 },
7729 "detect_zeroes" : {
7730 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7731 "optional" : 1,
7732 "type" : "boolean"
7733 },
7734 "discard" : {
7735 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7736 "enum" : [
7737 "ignore",
7738 "on"
7739 ],
44660702
DM
7740 "optional" : 1,
7741 "type" : "string"
7742 },
7743 "file" : {
7744 "default_key" : 1,
7745 "description" : "The drive's backing volume.",
7746 "format" : "pve-volume-id-or-qm-path",
7747 "format_description" : "volume",
7748 "type" : "string"
56122987 7749 },
7aacca6f 7750 "format" : {
44660702 7751 "description" : "The drive's backing file's data format.",
7aacca6f
DM
7752 "enum" : [
7753 "raw",
7754 "cow",
7755 "qcow",
7756 "qed",
7757 "qcow2",
7758 "vmdk",
7759 "cloop"
7760 ],
f004f5b9 7761 "format_description" : "image format",
56122987 7762 "optional" : 1,
44660702 7763 "type" : "string"
56122987 7764 },
44660702
DM
7765 "heads" : {
7766 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 7767 "optional" : 1,
44660702 7768 "type" : "integer"
56122987 7769 },
44660702
DM
7770 "iops" : {
7771 "description" : "Maximum r/w I/O speed in operations per second.",
7772 "format_description" : "iops",
7aacca6f 7773 "optional" : 1,
44660702 7774 "type" : "integer"
56122987 7775 },
44660702
DM
7776 "iops_max" : {
7777 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7aacca6f 7778 "format_description" : "iops",
7aacca6f 7779 "optional" : 1,
44660702 7780 "type" : "integer"
56122987 7781 },
44660702
DM
7782 "iops_rd" : {
7783 "description" : "Maximum read I/O speed in operations per second.",
7784 "format_description" : "iops",
56122987 7785 "optional" : 1,
44660702 7786 "type" : "integer"
56122987 7787 },
44660702
DM
7788 "iops_rd_max" : {
7789 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7790 "format_description" : "iops",
56122987 7791 "optional" : 1,
44660702 7792 "type" : "integer"
56122987 7793 },
44660702
DM
7794 "iops_wr" : {
7795 "description" : "Maximum write I/O speed in operations per second.",
7796 "format_description" : "iops",
56122987 7797 "optional" : 1,
44660702 7798 "type" : "integer"
56122987 7799 },
44660702
DM
7800 "iops_wr_max" : {
7801 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7aacca6f 7802 "format_description" : "iops",
44660702
DM
7803 "optional" : 1,
7804 "type" : "integer"
7aacca6f
DM
7805 },
7806 "iothread" : {
44660702 7807 "description" : "Whether to use iothreads for this drive",
56122987 7808 "optional" : 1,
44660702 7809 "type" : "boolean"
56122987 7810 },
44660702
DM
7811 "mbps" : {
7812 "description" : "Maximum r/w speed speed in megabytes per second.",
7813 "format_description" : "mbps",
56122987 7814 "optional" : 1,
44660702 7815 "type" : "number"
56122987 7816 },
44660702
DM
7817 "mbps_max" : {
7818 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7819 "format_description" : "mbps",
56122987 7820 "optional" : 1,
44660702 7821 "type" : "number"
56122987 7822 },
44660702
DM
7823 "mbps_rd" : {
7824 "description" : "Maximum read speed speed in megabytes per second.",
7825 "format_description" : "mbps",
7aacca6f 7826 "optional" : 1,
44660702 7827 "type" : "number"
56122987 7828 },
44660702
DM
7829 "mbps_rd_max" : {
7830 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7831 "format_description" : "mbps",
7aacca6f 7832 "optional" : 1,
44660702 7833 "type" : "number"
7aacca6f 7834 },
44660702
DM
7835 "mbps_wr" : {
7836 "description" : "Maximum write speed speed in megabytes per second.",
7837 "format_description" : "mbps",
56122987 7838 "optional" : 1,
44660702 7839 "type" : "number"
56122987 7840 },
44660702
DM
7841 "mbps_wr_max" : {
7842 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7843 "format_description" : "mbps",
56122987 7844 "optional" : 1,
44660702
DM
7845 "type" : "number"
7846 },
7847 "media" : {
7848 "default" : "disk",
7849 "description" : "The drive's media type.",
7aacca6f 7850 "enum" : [
44660702
DM
7851 "cdrom",
7852 "disk"
7aacca6f 7853 ],
56122987 7854 "optional" : 1,
44660702 7855 "type" : "string"
56122987 7856 },
7aacca6f 7857 "queues" : {
44660702 7858 "description" : "Number of queues.",
7aacca6f 7859 "minimum" : 2,
7aacca6f
DM
7860 "optional" : 1,
7861 "type" : "integer"
56122987 7862 },
44660702
DM
7863 "secs" : {
7864 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7865 "optional" : 1,
44660702 7866 "type" : "integer"
56122987 7867 },
44660702
DM
7868 "serial" : {
7869 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7870 "format" : "urlencoded",
7871 "format_description" : "serial",
7872 "maxLength" : 60,
56122987 7873 "optional" : 1,
44660702 7874 "type" : "string"
56122987 7875 },
44660702
DM
7876 "size" : {
7877 "description" : "Disk size. This is purely informational and has no effect.",
7878 "format" : "disk-size",
f004f5b9 7879 "format_description" : "DiskSize",
44660702
DM
7880 "optional" : 1,
7881 "type" : "string"
7882 },
7883 "snapshot" : {
7884 "description" : "Whether the drive should be included when making snapshots.",
56122987 7885 "optional" : 1,
44660702
DM
7886 "type" : "boolean"
7887 },
7888 "trans" : {
7889 "description" : "Force disk geometry bios translation mode.",
56122987 7890 "enum" : [
44660702
DM
7891 "none",
7892 "lba",
7893 "auto"
56122987 7894 ],
44660702
DM
7895 "optional" : 1,
7896 "type" : "string"
7897 },
7898 "volume" : {
7899 "alias" : "file"
56122987 7900 },
7aacca6f 7901 "werror" : {
7aacca6f
DM
7902 "description" : "Write error action.",
7903 "enum" : [
7904 "enospc",
7905 "ignore",
7906 "report",
7907 "stop"
44660702 7908 ],
56122987 7909 "optional" : 1,
7aacca6f 7910 "type" : "string"
56122987 7911 }
44660702 7912 },
56122987 7913 "optional" : 1,
44660702 7914 "type" : "string"
56122987
DM
7915 },
7916 "scsihw" : {
44660702 7917 "default" : "lsi",
c2993fe5 7918 "description" : "SCSI controller model",
56122987
DM
7919 "enum" : [
7920 "lsi",
7921 "lsi53c810",
7922 "virtio-scsi-pci",
7923 "virtio-scsi-single",
7924 "megasas",
7925 "pvscsi"
7926 ],
7927 "optional" : 1,
56122987
DM
7928 "type" : "string"
7929 },
44660702 7930 "serial[n]" : {
c2993fe5 7931 "description" : "Create a serial device inside the VM (n is 0 to 3)",
56122987 7932 "optional" : 1,
44660702 7933 "pattern" : "(/dev/.+|socket)",
c2993fe5
DM
7934 "type" : "string",
7935 "verbose_description" : "\nCreate a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
56122987 7936 },
44660702
DM
7937 "shares" : {
7938 "default" : 1000,
7939 "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",
7940 "maximum" : 50000,
7941 "minimum" : 0,
7aacca6f 7942 "optional" : 1,
44660702 7943 "type" : "integer"
56122987 7944 },
7aacca6f
DM
7945 "skiplock" : {
7946 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
7947 "optional" : 1,
7948 "type" : "boolean"
56122987 7949 },
44660702
DM
7950 "smbios1" : {
7951 "description" : "Specify SMBIOS type 1 fields.",
7952 "format" : "pve-qm-smbios1",
7953 "maxLength" : 256,
56122987 7954 "optional" : 1,
44660702 7955 "type" : "string"
56122987 7956 },
44660702
DM
7957 "smp" : {
7958 "default" : 1,
7959 "description" : "The number of CPUs. Please use option -sockets instead.",
7960 "minimum" : 1,
56122987 7961 "optional" : 1,
44660702 7962 "type" : "integer"
56122987 7963 },
44660702
DM
7964 "sockets" : {
7965 "default" : 1,
7966 "description" : "The number of CPU sockets.",
7967 "minimum" : 1,
56122987 7968 "optional" : 1,
44660702 7969 "type" : "integer"
56122987 7970 },
44660702
DM
7971 "startdate" : {
7972 "default" : "now",
7973 "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'.",
7974 "optional" : 1,
7975 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 7976 "type" : "string",
44660702
DM
7977 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
7978 },
7979 "startup" : {
7980 "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.",
7981 "format" : "pve-startup-order",
7aacca6f 7982 "optional" : 1,
44660702
DM
7983 "type" : "string",
7984 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 7985 },
44660702
DM
7986 "tablet" : {
7987 "default" : 1,
c2993fe5 7988 "description" : "Enable/disable the USB tablet device.",
7aacca6f 7989 "optional" : 1,
c2993fe5
DM
7990 "type" : "boolean",
7991 "verbose_description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)."
7aacca6f 7992 },
44660702
DM
7993 "tdf" : {
7994 "default" : 0,
7995 "description" : "Enable/disable time drift fix.",
7aacca6f 7996 "optional" : 1,
44660702 7997 "type" : "boolean"
7aacca6f 7998 },
44660702
DM
7999 "template" : {
8000 "default" : 0,
8001 "description" : "Enable/disable Template.",
7aacca6f 8002 "optional" : 1,
44660702 8003 "type" : "boolean"
7aacca6f 8004 },
44660702 8005 "unused[n]" : {
c2993fe5 8006 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 8007 "format" : "pve-volume-id",
7aacca6f
DM
8008 "optional" : 1,
8009 "type" : "string"
8010 },
44660702 8011 "usb[n]" : {
c2993fe5 8012 "description" : "Configure an USB device (n is 0 to 4).",
56122987 8013 "format" : {
44660702
DM
8014 "host" : {
8015 "default_key" : 1,
c2993fe5 8016 "description" : "The Host USB device or port or the value 'spice'. HOSTUSBDEVICE syntax is:\n\n 'bus-port(.port)*' (decimal numbers) or\n 'vendor_id:product_id' (hexadeciaml numbers) or\n 'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n",
44660702
DM
8017 "format" : "pve-qm-usb-device",
8018 "format_description" : "HOSTUSBDEVICE|spice",
8019 "type" : "string"
7aacca6f 8020 },
44660702 8021 "usb3" : {
c2993fe5
DM
8022 "default" : 0,
8023 "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).",
7aacca6f 8024 "optional" : 1,
44660702 8025 "type" : "boolean"
7aacca6f 8026 }
44660702 8027 },
7aacca6f 8028 "optional" : 1,
44660702 8029 "type" : "string"
7aacca6f 8030 },
44660702 8031 "vcpus" : {
7aacca6f 8032 "default" : 0,
44660702
DM
8033 "description" : "Number of hotplugged vcpus.",
8034 "minimum" : 1,
7aacca6f 8035 "optional" : 1,
44660702 8036 "type" : "integer"
7aacca6f 8037 },
44660702 8038 "vga" : {
c2993fe5 8039 "description" : "Select the VGA type.",
44660702
DM
8040 "enum" : [
8041 "std",
8042 "cirrus",
8043 "vmware",
8044 "qxl",
8045 "serial0",
8046 "serial1",
8047 "serial2",
8048 "serial3",
8049 "qxl2",
8050 "qxl3",
8051 "qxl4"
8052 ],
7aacca6f 8053 "optional" : 1,
c2993fe5
DM
8054 "type" : "string",
8055 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
7aacca6f 8056 },
44660702
DM
8057 "virtio[n]" : {
8058 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
7aacca6f 8059 "format" : {
7aacca6f 8060 "aio" : {
7aacca6f 8061 "description" : "AIO type to use.",
56122987 8062 "enum" : [
7aacca6f
DM
8063 "native",
8064 "threads"
7aacca6f 8065 ],
44660702
DM
8066 "optional" : 1,
8067 "type" : "string"
56122987 8068 },
44660702
DM
8069 "backup" : {
8070 "description" : "Whether the drive should be included when making backups.",
56122987 8071 "optional" : 1,
44660702 8072 "type" : "boolean"
7aacca6f 8073 },
44660702
DM
8074 "bps" : {
8075 "description" : "Maximum r/w speed speed in bytes per second.",
8076 "format_description" : "bps",
7aacca6f 8077 "optional" : 1,
44660702 8078 "type" : "integer"
56122987
DM
8079 },
8080 "bps_rd" : {
7aacca6f 8081 "description" : "Maximum read speed speed in bytes per second.",
44660702 8082 "format_description" : "bps",
56122987 8083 "optional" : 1,
7aacca6f 8084 "type" : "integer"
56122987 8085 },
44660702
DM
8086 "bps_wr" : {
8087 "description" : "Maximum write speed speed in bytes per second.",
8088 "format_description" : "bps",
56122987 8089 "optional" : 1,
7aacca6f 8090 "type" : "integer"
56122987 8091 },
7aacca6f 8092 "cache" : {
44660702 8093 "description" : "The drive's cache mode",
7aacca6f
DM
8094 "enum" : [
8095 "none",
8096 "writethrough",
8097 "writeback",
8098 "unsafe",
8099 "directsync"
8100 ],
56122987 8101 "optional" : 1,
44660702 8102 "type" : "string"
7aacca6f 8103 },
44660702
DM
8104 "cyls" : {
8105 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
8106 "optional" : 1,
8107 "type" : "integer"
8108 },
8109 "detect_zeroes" : {
8110 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
8111 "optional" : 1,
8112 "type" : "boolean"
8113 },
8114 "discard" : {
8115 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 8116 "enum" : [
44660702
DM
8117 "ignore",
8118 "on"
56122987
DM
8119 ],
8120 "optional" : 1,
44660702 8121 "type" : "string"
56122987 8122 },
44660702
DM
8123 "file" : {
8124 "default_key" : 1,
8125 "description" : "The drive's backing volume.",
8126 "format" : "pve-volume-id-or-qm-path",
8127 "format_description" : "volume",
8128 "type" : "string"
8129 },
8130 "format" : {
8131 "description" : "The drive's backing file's data format.",
8132 "enum" : [
8133 "raw",
8134 "cow",
8135 "qcow",
8136 "qed",
8137 "qcow2",
8138 "vmdk",
8139 "cloop"
8140 ],
f004f5b9 8141 "format_description" : "image format",
56122987 8142 "optional" : 1,
44660702 8143 "type" : "string"
56122987 8144 },
44660702
DM
8145 "heads" : {
8146 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
8147 "optional" : 1,
8148 "type" : "integer"
8149 },
8150 "iops" : {
8151 "description" : "Maximum r/w I/O speed in operations per second.",
8152 "format_description" : "iops",
56122987 8153 "optional" : 1,
44660702
DM
8154 "type" : "integer"
8155 },
8156 "iops_max" : {
7aacca6f 8157 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
44660702
DM
8158 "format_description" : "iops",
8159 "optional" : 1,
8160 "type" : "integer"
56122987 8161 },
7aacca6f 8162 "iops_rd" : {
44660702 8163 "description" : "Maximum read I/O speed in operations per second.",
7aacca6f 8164 "format_description" : "iops",
7aacca6f 8165 "optional" : 1,
44660702 8166 "type" : "integer"
56122987 8167 },
44660702
DM
8168 "iops_rd_max" : {
8169 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
8170 "format_description" : "iops",
8171 "optional" : 1,
8172 "type" : "integer"
8173 },
8174 "iops_wr" : {
8175 "description" : "Maximum write I/O speed in operations per second.",
8176 "format_description" : "iops",
8177 "optional" : 1,
8178 "type" : "integer"
8179 },
8180 "iops_wr_max" : {
8181 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
8182 "format_description" : "iops",
8183 "optional" : 1,
8184 "type" : "integer"
8185 },
8186 "iothread" : {
8187 "description" : "Whether to use iothreads for this drive",
44660702
DM
8188 "optional" : 1,
8189 "type" : "boolean"
8190 },
8191 "mbps" : {
8192 "description" : "Maximum r/w speed speed in megabytes per second.",
8193 "format_description" : "mbps",
7aacca6f 8194 "optional" : 1,
44660702 8195 "type" : "number"
7aacca6f
DM
8196 },
8197 "mbps_max" : {
8198 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 8199 "format_description" : "mbps",
56122987 8200 "optional" : 1,
44660702 8201 "type" : "number"
56122987 8202 },
44660702
DM
8203 "mbps_rd" : {
8204 "description" : "Maximum read speed speed in megabytes per second.",
8205 "format_description" : "mbps",
56122987 8206 "optional" : 1,
44660702 8207 "type" : "number"
56122987 8208 },
44660702
DM
8209 "mbps_rd_max" : {
8210 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
8211 "format_description" : "mbps",
8212 "optional" : 1,
8213 "type" : "number"
8214 },
8215 "mbps_wr" : {
8216 "description" : "Maximum write speed speed in megabytes per second.",
8217 "format_description" : "mbps",
8218 "optional" : 1,
8219 "type" : "number"
8220 },
8221 "mbps_wr_max" : {
8222 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
8223 "format_description" : "mbps",
8224 "optional" : 1,
8225 "type" : "number"
8226 },
8227 "media" : {
8228 "default" : "disk",
8229 "description" : "The drive's media type.",
56122987 8230 "enum" : [
44660702
DM
8231 "cdrom",
8232 "disk"
56122987
DM
8233 ],
8234 "optional" : 1,
44660702 8235 "type" : "string"
56122987 8236 },
44660702
DM
8237 "rerror" : {
8238 "description" : "Read error action.",
8239 "enum" : [
8240 "ignore",
8241 "report",
8242 "stop"
8243 ],
56122987 8244 "optional" : 1,
44660702 8245 "type" : "string"
56122987 8246 },
44660702
DM
8247 "secs" : {
8248 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 8249 "optional" : 1,
44660702 8250 "type" : "integer"
56122987 8251 },
7aacca6f
DM
8252 "serial" : {
8253 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7aacca6f 8254 "format" : "urlencoded",
44660702 8255 "format_description" : "serial",
7aacca6f 8256 "maxLength" : 60,
44660702
DM
8257 "optional" : 1,
8258 "type" : "string"
56122987 8259 },
44660702
DM
8260 "size" : {
8261 "description" : "Disk size. This is purely informational and has no effect.",
8262 "format" : "disk-size",
f004f5b9 8263 "format_description" : "DiskSize",
44660702
DM
8264 "optional" : 1,
8265 "type" : "string"
56122987 8266 },
44660702
DM
8267 "snapshot" : {
8268 "description" : "Whether the drive should be included when making snapshots.",
56122987 8269 "optional" : 1,
44660702 8270 "type" : "boolean"
56122987 8271 },
44660702
DM
8272 "trans" : {
8273 "description" : "Force disk geometry bios translation mode.",
8274 "enum" : [
8275 "none",
8276 "lba",
8277 "auto"
8278 ],
7aacca6f 8279 "optional" : 1,
44660702 8280 "type" : "string"
7aacca6f 8281 },
44660702
DM
8282 "volume" : {
8283 "alias" : "file"
8284 },
8285 "werror" : {
8286 "description" : "Write error action.",
8287 "enum" : [
8288 "enospc",
8289 "ignore",
8290 "report",
8291 "stop"
8292 ],
7aacca6f 8293 "optional" : 1,
44660702 8294 "type" : "string"
56122987
DM
8295 }
8296 },
7aacca6f 8297 "optional" : 1,
44660702 8298 "type" : "string"
7aacca6f 8299 },
44660702
DM
8300 "vmid" : {
8301 "description" : "The (unique) ID of the VM.",
8302 "format" : "pve-vmid",
8303 "minimum" : 1,
8304 "type" : "integer"
56122987 8305 },
44660702 8306 "watchdog" : {
c2993fe5 8307 "description" : "Create a virtual hardware watchdog device.",
44660702 8308 "format" : "pve-qm-watchdog",
56122987 8309 "optional" : 1,
c2993fe5
DM
8310 "type" : "string",
8311 "verbose_description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"
56122987 8312 }
7aacca6f 8313 }
56122987 8314 },
56122987
DM
8315 "permissions" : {
8316 "check" : [
8317 "perm",
8318 "/vms/{vmid}",
8319 [
8320 "VM.Config.Disk",
8321 "VM.Config.CDROM",
8322 "VM.Config.CPU",
8323 "VM.Config.Memory",
8324 "VM.Config.Network",
8325 "VM.Config.HWType",
8326 "VM.Config.Options"
8327 ],
8328 "any",
8329 1
8330 ]
8331 },
44660702 8332 "protected" : 1,
7aacca6f 8333 "proxyto" : "node",
56122987 8334 "returns" : {
7aacca6f
DM
8335 "type" : "null"
8336 }
8337 }
8338 },
44660702
DM
8339 "leaf" : 1,
8340 "path" : "/nodes/{node}/qemu/{vmid}/config",
7aacca6f
DM
8341 "text" : "config"
8342 },
8343 {
8344 "info" : {
56122987 8345 "GET" : {
44660702 8346 "description" : "Get virtual machine configuration, including pending changes.",
56122987 8347 "method" : "GET",
44660702 8348 "name" : "vm_pending",
7aacca6f 8349 "parameters" : {
44660702 8350 "additionalProperties" : 0,
7aacca6f
DM
8351 "properties" : {
8352 "node" : {
7aacca6f 8353 "description" : "The cluster node name.",
44660702 8354 "format" : "pve-node",
7aacca6f
DM
8355 "type" : "string"
8356 },
8357 "vmid" : {
44660702 8358 "description" : "The (unique) ID of the VM.",
7aacca6f 8359 "format" : "pve-vmid",
44660702
DM
8360 "minimum" : 1,
8361 "type" : "integer"
7aacca6f 8362 }
44660702 8363 }
7aacca6f 8364 },
56122987
DM
8365 "permissions" : {
8366 "check" : [
8367 "perm",
8368 "/vms/{vmid}",
8369 [
8370 "VM.Audit"
8371 ]
8372 ]
8373 },
7aacca6f 8374 "proxyto" : "node",
44660702
DM
8375 "returns" : {
8376 "items" : {
8377 "properties" : {
8378 "delete" : {
8379 "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.",
8380 "maximum" : 2,
8381 "minimum" : 0,
8382 "optional" : 1,
8383 "type" : "integer"
8384 },
8385 "key" : {
8386 "description" : "Configuration option name.",
8387 "type" : "string"
8388 },
8389 "pending" : {
8390 "description" : "Pending value.",
8391 "optional" : 1,
8392 "type" : "string"
8393 },
8394 "value" : {
8395 "description" : "Current value.",
8396 "optional" : 1,
8397 "type" : "string"
8398 }
8399 },
8400 "type" : "object"
8401 },
8402 "type" : "array"
8403 }
56122987
DM
8404 }
8405 },
7aacca6f 8406 "leaf" : 1,
44660702
DM
8407 "path" : "/nodes/{node}/qemu/{vmid}/pending",
8408 "text" : "pending"
56122987
DM
8409 },
8410 {
56122987
DM
8411 "info" : {
8412 "PUT" : {
7aacca6f 8413 "description" : "Unlink/delete disk images.",
7aacca6f 8414 "method" : "PUT",
7aacca6f 8415 "name" : "unlink",
56122987 8416 "parameters" : {
44660702 8417 "additionalProperties" : 0,
56122987 8418 "properties" : {
7aacca6f 8419 "force" : {
44660702 8420 "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 8421 "optional" : 1,
44660702 8422 "type" : "boolean"
7aacca6f 8423 },
56122987
DM
8424 "idlist" : {
8425 "description" : "A list of disk IDs you want to delete.",
44660702
DM
8426 "format" : "pve-configid-list",
8427 "type" : "string"
8428 },
8429 "node" : {
8430 "description" : "The cluster node name.",
8431 "format" : "pve-node",
8432 "type" : "string"
56122987
DM
8433 },
8434 "vmid" : {
7aacca6f 8435 "description" : "The (unique) ID of the VM.",
44660702 8436 "format" : "pve-vmid",
7aacca6f 8437 "minimum" : 1,
44660702 8438 "type" : "integer"
56122987 8439 }
44660702
DM
8440 }
8441 },
8442 "permissions" : {
8443 "check" : [
8444 "perm",
8445 "/vms/{vmid}",
8446 [
8447 "VM.Config.Disk"
8448 ]
8449 ]
8450 },
8451 "protected" : 1,
8452 "proxyto" : "node",
8453 "returns" : {
8454 "type" : "null"
7aacca6f 8455 }
56122987 8456 }
7aacca6f 8457 },
44660702 8458 "leaf" : 1,
7aacca6f 8459 "path" : "/nodes/{node}/qemu/{vmid}/unlink",
44660702 8460 "text" : "unlink"
56122987
DM
8461 },
8462 {
56122987
DM
8463 "info" : {
8464 "POST" : {
7aacca6f 8465 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
8466 "method" : "POST",
8467 "name" : "vncproxy",
56122987 8468 "parameters" : {
44660702 8469 "additionalProperties" : 0,
56122987 8470 "properties" : {
44660702
DM
8471 "node" : {
8472 "description" : "The cluster node name.",
8473 "format" : "pve-node",
8474 "type" : "string"
8475 },
56122987 8476 "vmid" : {
7aacca6f 8477 "description" : "The (unique) ID of the VM.",
44660702 8478 "format" : "pve-vmid",
56122987 8479 "minimum" : 1,
44660702 8480 "type" : "integer"
7aacca6f
DM
8481 },
8482 "websocket" : {
8483 "description" : "starts websockify instead of vncproxy",
44660702
DM
8484 "optional" : 1,
8485 "type" : "boolean"
56122987 8486 }
44660702 8487 }
56122987 8488 },
44660702
DM
8489 "permissions" : {
8490 "check" : [
8491 "perm",
8492 "/vms/{vmid}",
8493 [
8494 "VM.Console"
8495 ]
8496 ]
8497 },
8498 "protected" : 1,
56122987 8499 "returns" : {
7aacca6f 8500 "additionalProperties" : 0,
56122987 8501 "properties" : {
7aacca6f 8502 "cert" : {
56122987
DM
8503 "type" : "string"
8504 },
56122987
DM
8505 "port" : {
8506 "type" : "integer"
8507 },
7aacca6f
DM
8508 "ticket" : {
8509 "type" : "string"
8510 },
44660702
DM
8511 "upid" : {
8512 "type" : "string"
8513 },
7aacca6f 8514 "user" : {
56122987
DM
8515 "type" : "string"
8516 }
7aacca6f 8517 }
56122987
DM
8518 }
8519 }
8520 },
44660702
DM
8521 "leaf" : 1,
8522 "path" : "/nodes/{node}/qemu/{vmid}/vncproxy",
7aacca6f 8523 "text" : "vncproxy"
56122987
DM
8524 },
8525 {
56122987
DM
8526 "info" : {
8527 "GET" : {
44660702
DM
8528 "description" : "Opens a weksocket for VNC traffic.",
8529 "method" : "GET",
8530 "name" : "vncwebsocket",
56122987 8531 "parameters" : {
44660702 8532 "additionalProperties" : 0,
56122987 8533 "properties" : {
7aacca6f 8534 "node" : {
7aacca6f 8535 "description" : "The cluster node name.",
44660702 8536 "format" : "pve-node",
7aacca6f
DM
8537 "type" : "string"
8538 },
44660702
DM
8539 "port" : {
8540 "description" : "Port number returned by previous vncproxy call.",
8541 "maximum" : 5999,
8542 "minimum" : 5900,
8543 "type" : "integer"
56122987 8544 },
7aacca6f 8545 "vmid" : {
44660702 8546 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8547 "format" : "pve-vmid",
8548 "minimum" : 1,
44660702
DM
8549 "type" : "integer"
8550 },
8551 "vncticket" : {
8552 "description" : "Ticket from previous call to vncproxy.",
8553 "maxLength" : 512,
8554 "type" : "string"
56122987 8555 }
44660702
DM
8556 }
8557 },
8558 "permissions" : {
8559 "check" : [
8560 "perm",
8561 "/vms/{vmid}",
8562 [
8563 "VM.Console"
8564 ]
8565 ],
8566 "description" : "You also need to pass a valid ticket (vncticket)."
56122987 8567 },
7aacca6f
DM
8568 "returns" : {
8569 "properties" : {
8570 "port" : {
8571 "type" : "string"
8572 }
8573 },
8574 "type" : "object"
8575 }
56122987
DM
8576 }
8577 },
7aacca6f 8578 "leaf" : 1,
44660702
DM
8579 "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket",
8580 "text" : "vncwebsocket"
56122987
DM
8581 },
8582 {
8583 "info" : {
8584 "POST" : {
44660702
DM
8585 "description" : "Returns a SPICE configuration to connect to the VM.",
8586 "method" : "POST",
7aacca6f
DM
8587 "name" : "spiceproxy",
8588 "parameters" : {
44660702 8589 "additionalProperties" : 0,
56122987 8590 "properties" : {
44660702
DM
8591 "node" : {
8592 "description" : "The cluster node name.",
8593 "format" : "pve-node",
8594 "type" : "string"
8595 },
7aacca6f 8596 "proxy" : {
44660702 8597 "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 8598 "format" : "address",
7aacca6f 8599 "optional" : 1,
44660702 8600 "type" : "string"
56122987 8601 },
7aacca6f 8602 "vmid" : {
44660702 8603 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8604 "format" : "pve-vmid",
8605 "minimum" : 1,
44660702 8606 "type" : "integer"
56122987 8607 }
44660702 8608 }
56122987 8609 },
56122987
DM
8610 "permissions" : {
8611 "check" : [
8612 "perm",
8613 "/vms/{vmid}",
8614 [
8615 "VM.Console"
8616 ]
8617 ]
8618 },
44660702
DM
8619 "protected" : 1,
8620 "proxyto" : "node",
7aacca6f 8621 "returns" : {
44660702
DM
8622 "additionalProperties" : 1,
8623 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 8624 "properties" : {
44660702 8625 "host" : {
7aacca6f
DM
8626 "type" : "string"
8627 },
7aacca6f
DM
8628 "password" : {
8629 "type" : "string"
8630 },
44660702 8631 "proxy" : {
7aacca6f
DM
8632 "type" : "string"
8633 },
44660702
DM
8634 "tls-port" : {
8635 "type" : "integer"
8636 },
8637 "type" : {
7aacca6f
DM
8638 "type" : "string"
8639 }
44660702 8640 }
7aacca6f
DM
8641 }
8642 }
8643 },
44660702
DM
8644 "leaf" : 1,
8645 "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy",
7aacca6f
DM
8646 "text" : "spiceproxy"
8647 },
8648 {
56122987
DM
8649 "children" : [
8650 {
56122987
DM
8651 "info" : {
8652 "GET" : {
44660702
DM
8653 "description" : "Get virtual machine status.",
8654 "method" : "GET",
8655 "name" : "vm_status",
56122987 8656 "parameters" : {
44660702 8657 "additionalProperties" : 0,
56122987 8658 "properties" : {
44660702
DM
8659 "node" : {
8660 "description" : "The cluster node name.",
8661 "format" : "pve-node",
8662 "type" : "string"
8663 },
56122987 8664 "vmid" : {
44660702 8665 "description" : "The (unique) ID of the VM.",
7aacca6f 8666 "format" : "pve-vmid",
56122987 8667 "minimum" : 1,
7aacca6f 8668 "type" : "integer"
56122987 8669 }
44660702 8670 }
56122987
DM
8671 },
8672 "permissions" : {
8673 "check" : [
8674 "perm",
8675 "/vms/{vmid}",
8676 [
8677 "VM.Audit"
8678 ]
8679 ]
8680 },
44660702 8681 "protected" : 1,
7aacca6f 8682 "proxyto" : "node",
56122987
DM
8683 "returns" : {
8684 "type" : "object"
7aacca6f 8685 }
56122987 8686 }
7aacca6f 8687 },
7aacca6f 8688 "leaf" : 1,
44660702
DM
8689 "path" : "/nodes/{node}/qemu/{vmid}/status/current",
8690 "text" : "current"
56122987
DM
8691 },
8692 {
56122987
DM
8693 "info" : {
8694 "POST" : {
44660702 8695 "description" : "Start virtual machine.",
56122987 8696 "method" : "POST",
44660702 8697 "name" : "vm_start",
56122987 8698 "parameters" : {
44660702 8699 "additionalProperties" : 0,
56122987 8700 "properties" : {
44660702
DM
8701 "machine" : {
8702 "description" : "Specific the Qemu machine type.",
8703 "maxLength" : 40,
8704 "optional" : 1,
8705 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
8706 "type" : "string"
8707 },
8708 "migratedfrom" : {
8709 "description" : "The cluster node name.",
8710 "format" : "pve-node",
56122987 8711 "optional" : 1,
44660702 8712 "type" : "string"
56122987 8713 },
7aacca6f 8714 "node" : {
7aacca6f 8715 "description" : "The cluster node name.",
44660702
DM
8716 "format" : "pve-node",
8717 "type" : "string"
7aacca6f 8718 },
44660702
DM
8719 "skiplock" : {
8720 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8721 "optional" : 1,
44660702 8722 "type" : "boolean"
56122987 8723 },
44660702
DM
8724 "stateuri" : {
8725 "description" : "Some command save/restore state from this location.",
8726 "maxLength" : 128,
56122987 8727 "optional" : 1,
44660702 8728 "type" : "string"
56122987
DM
8729 },
8730 "vmid" : {
7aacca6f 8731 "description" : "The (unique) ID of the VM.",
44660702
DM
8732 "format" : "pve-vmid",
8733 "minimum" : 1,
7aacca6f 8734 "type" : "integer"
56122987 8735 }
44660702 8736 }
7aacca6f 8737 },
56122987
DM
8738 "permissions" : {
8739 "check" : [
8740 "perm",
8741 "/vms/{vmid}",
8742 [
8743 "VM.PowerMgmt"
8744 ]
8745 ]
44660702
DM
8746 },
8747 "protected" : 1,
8748 "proxyto" : "node",
8749 "returns" : {
8750 "type" : "string"
56122987
DM
8751 }
8752 }
44660702
DM
8753 },
8754 "leaf" : 1,
8755 "path" : "/nodes/{node}/qemu/{vmid}/status/start",
8756 "text" : "start"
56122987
DM
8757 },
8758 {
56122987
DM
8759 "info" : {
8760 "POST" : {
7aacca6f 8761 "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
8762 "method" : "POST",
8763 "name" : "vm_stop",
56122987 8764 "parameters" : {
44660702 8765 "additionalProperties" : 0,
56122987 8766 "properties" : {
44660702
DM
8767 "keepActive" : {
8768 "default" : 0,
8769 "description" : "Do not decativate storage volumes.",
56122987 8770 "optional" : 1,
44660702 8771 "type" : "boolean"
56122987
DM
8772 },
8773 "migratedfrom" : {
56122987 8774 "description" : "The cluster node name.",
44660702 8775 "format" : "pve-node",
7aacca6f 8776 "optional" : 1,
44660702 8777 "type" : "string"
7aacca6f 8778 },
44660702
DM
8779 "node" : {
8780 "description" : "The cluster node name.",
8781 "format" : "pve-node",
8782 "type" : "string"
56122987
DM
8783 },
8784 "skiplock" : {
8785 "description" : "Ignore locks - only root is allowed to use this option.",
8786 "optional" : 1,
8787 "type" : "boolean"
8788 },
44660702
DM
8789 "timeout" : {
8790 "description" : "Wait maximal timeout seconds.",
8791 "minimum" : 0,
56122987 8792 "optional" : 1,
44660702 8793 "type" : "integer"
7aacca6f 8794 },
44660702
DM
8795 "vmid" : {
8796 "description" : "The (unique) ID of the VM.",
8797 "format" : "pve-vmid",
8798 "minimum" : 1,
8799 "type" : "integer"
56122987 8800 }
44660702 8801 }
56122987 8802 },
56122987
DM
8803 "permissions" : {
8804 "check" : [
8805 "perm",
8806 "/vms/{vmid}",
8807 [
8808 "VM.PowerMgmt"
8809 ]
8810 ]
8811 },
44660702
DM
8812 "protected" : 1,
8813 "proxyto" : "node",
7aacca6f
DM
8814 "returns" : {
8815 "type" : "string"
44660702
DM
8816 }
8817 }
8818 },
8819 "leaf" : 1,
8820 "path" : "/nodes/{node}/qemu/{vmid}/status/stop",
8821 "text" : "stop"
8822 },
8823 {
8824 "info" : {
8825 "POST" : {
8826 "description" : "Reset virtual machine.",
8827 "method" : "POST",
8828 "name" : "vm_reset",
56122987 8829 "parameters" : {
7aacca6f 8830 "additionalProperties" : 0,
56122987 8831 "properties" : {
56122987
DM
8832 "node" : {
8833 "description" : "The cluster node name.",
44660702
DM
8834 "format" : "pve-node",
8835 "type" : "string"
56122987
DM
8836 },
8837 "skiplock" : {
44660702 8838 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8839 "optional" : 1,
44660702 8840 "type" : "boolean"
7aacca6f
DM
8841 },
8842 "vmid" : {
44660702 8843 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8844 "format" : "pve-vmid",
8845 "minimum" : 1,
44660702 8846 "type" : "integer"
56122987 8847 }
7aacca6f 8848 }
56122987 8849 },
7aacca6f
DM
8850 "permissions" : {
8851 "check" : [
8852 "perm",
8853 "/vms/{vmid}",
8854 [
8855 "VM.PowerMgmt"
8856 ]
8857 ]
8858 },
44660702 8859 "protected" : 1,
7aacca6f 8860 "proxyto" : "node",
56122987
DM
8861 "returns" : {
8862 "type" : "string"
44660702
DM
8863 }
8864 }
8865 },
8866 "leaf" : 1,
8867 "path" : "/nodes/{node}/qemu/{vmid}/status/reset",
8868 "text" : "reset"
8869 },
8870 {
8871 "info" : {
8872 "POST" : {
8873 "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.",
8874 "method" : "POST",
56122987 8875 "name" : "vm_shutdown",
56122987 8876 "parameters" : {
7aacca6f 8877 "additionalProperties" : 0,
56122987 8878 "properties" : {
56122987 8879 "forceStop" : {
56122987 8880 "default" : 0,
44660702 8881 "description" : "Make sure the VM stops.",
7aacca6f 8882 "optional" : 1,
44660702 8883 "type" : "boolean"
56122987
DM
8884 },
8885 "keepActive" : {
7aacca6f 8886 "default" : 0,
44660702
DM
8887 "description" : "Do not decativate storage volumes.",
8888 "optional" : 1,
8889 "type" : "boolean"
8890 },
8891 "node" : {
8892 "description" : "The cluster node name.",
8893 "format" : "pve-node",
8894 "type" : "string"
8895 },
8896 "skiplock" : {
8897 "description" : "Ignore locks - only root is allowed to use this option.",
8898 "optional" : 1,
8899 "type" : "boolean"
56122987 8900 },
7aacca6f 8901 "timeout" : {
7aacca6f 8902 "description" : "Wait maximal timeout seconds.",
44660702 8903 "minimum" : 0,
7aacca6f
DM
8904 "optional" : 1,
8905 "type" : "integer"
8906 },
56122987 8907 "vmid" : {
7aacca6f 8908 "description" : "The (unique) ID of the VM.",
44660702
DM
8909 "format" : "pve-vmid",
8910 "minimum" : 1,
7aacca6f 8911 "type" : "integer"
56122987 8912 }
7aacca6f 8913 }
56122987 8914 },
44660702
DM
8915 "permissions" : {
8916 "check" : [
8917 "perm",
8918 "/vms/{vmid}",
8919 [
8920 "VM.PowerMgmt"
8921 ]
8922 ]
8923 },
7aacca6f 8924 "protected" : 1,
44660702
DM
8925 "proxyto" : "node",
8926 "returns" : {
8927 "type" : "string"
8928 }
56122987
DM
8929 }
8930 },
44660702 8931 "leaf" : 1,
7aacca6f 8932 "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown",
44660702 8933 "text" : "shutdown"
56122987
DM
8934 },
8935 {
56122987
DM
8936 "info" : {
8937 "POST" : {
44660702 8938 "description" : "Suspend virtual machine.",
56122987 8939 "method" : "POST",
44660702 8940 "name" : "vm_suspend",
7aacca6f 8941 "parameters" : {
44660702 8942 "additionalProperties" : 0,
7aacca6f
DM
8943 "properties" : {
8944 "node" : {
7aacca6f 8945 "description" : "The cluster node name.",
44660702
DM
8946 "format" : "pve-node",
8947 "type" : "string"
7aacca6f
DM
8948 },
8949 "skiplock" : {
8950 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
8951 "optional" : 1,
8952 "type" : "boolean"
8953 },
8954 "vmid" : {
8955 "description" : "The (unique) ID of the VM.",
8956 "format" : "pve-vmid",
8957 "minimum" : 1,
8958 "type" : "integer"
8959 }
8960 }
56122987
DM
8961 },
8962 "permissions" : {
8963 "check" : [
8964 "perm",
8965 "/vms/{vmid}",
8966 [
8967 "VM.PowerMgmt"
8968 ]
8969 ]
8970 },
44660702
DM
8971 "protected" : 1,
8972 "proxyto" : "node",
8973 "returns" : {
8974 "type" : "string"
8975 }
56122987
DM
8976 }
8977 },
44660702 8978 "leaf" : 1,
7aacca6f 8979 "path" : "/nodes/{node}/qemu/{vmid}/status/suspend",
44660702 8980 "text" : "suspend"
56122987
DM
8981 },
8982 {
56122987
DM
8983 "info" : {
8984 "POST" : {
44660702
DM
8985 "description" : "Resume virtual machine.",
8986 "method" : "POST",
7aacca6f 8987 "name" : "vm_resume",
56122987
DM
8988 "parameters" : {
8989 "additionalProperties" : 0,
8990 "properties" : {
44660702
DM
8991 "nocheck" : {
8992 "optional" : 1,
8993 "type" : "boolean"
8994 },
7aacca6f 8995 "node" : {
44660702 8996 "description" : "The cluster node name.",
7aacca6f 8997 "format" : "pve-node",
44660702 8998 "type" : "string"
56122987
DM
8999 },
9000 "skiplock" : {
56122987 9001 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
9002 "optional" : 1,
9003 "type" : "boolean"
56122987 9004 },
7aacca6f 9005 "vmid" : {
7aacca6f
DM
9006 "description" : "The (unique) ID of the VM.",
9007 "format" : "pve-vmid",
44660702
DM
9008 "minimum" : 1,
9009 "type" : "integer"
56122987
DM
9010 }
9011 }
9012 },
9013 "permissions" : {
9014 "check" : [
9015 "perm",
9016 "/vms/{vmid}",
9017 [
9018 "VM.PowerMgmt"
9019 ]
9020 ]
9021 },
44660702
DM
9022 "protected" : 1,
9023 "proxyto" : "node",
56122987
DM
9024 "returns" : {
9025 "type" : "string"
7aacca6f 9026 }
56122987
DM
9027 }
9028 },
44660702
DM
9029 "leaf" : 1,
9030 "path" : "/nodes/{node}/qemu/{vmid}/status/resume",
7aacca6f 9031 "text" : "resume"
56122987
DM
9032 }
9033 ],
9034 "info" : {
44660702
DM
9035 "GET" : {
9036 "description" : "Directory index",
9037 "method" : "GET",
9038 "name" : "vmcmdidx",
56122987 9039 "parameters" : {
44660702 9040 "additionalProperties" : 0,
56122987 9041 "properties" : {
44660702
DM
9042 "node" : {
9043 "description" : "The cluster node name.",
9044 "format" : "pve-node",
7aacca6f
DM
9045 "type" : "string"
9046 },
56122987 9047 "vmid" : {
7aacca6f 9048 "description" : "The (unique) ID of the VM.",
44660702
DM
9049 "format" : "pve-vmid",
9050 "minimum" : 1,
7aacca6f 9051 "type" : "integer"
56122987 9052 }
44660702 9053 }
56122987 9054 },
44660702
DM
9055 "permissions" : {
9056 "user" : "all"
9057 },
9058 "proxyto" : "node",
9059 "returns" : {
9060 "items" : {
9061 "properties" : {
9062 "subdir" : {
9063 "type" : "string"
9064 }
9065 },
9066 "type" : "object"
9067 },
9068 "links" : [
9069 {
9070 "href" : "{subdir}",
9071 "rel" : "child"
9072 }
9073 ],
9074 "type" : "array"
9075 }
56122987 9076 }
7aacca6f 9077 },
44660702
DM
9078 "leaf" : 0,
9079 "path" : "/nodes/{node}/qemu/{vmid}/status",
9080 "text" : "status"
56122987
DM
9081 },
9082 {
56122987 9083 "info" : {
44660702
DM
9084 "PUT" : {
9085 "description" : "Send key event to virtual machine.",
9086 "method" : "PUT",
9087 "name" : "vm_sendkey",
9088 "parameters" : {
9089 "additionalProperties" : 0,
56122987 9090 "properties" : {
44660702
DM
9091 "key" : {
9092 "description" : "The key (qemu monitor encoding).",
9093 "type" : "string"
9094 },
9095 "node" : {
9096 "description" : "The cluster node name.",
9097 "format" : "pve-node",
9098 "type" : "string"
9099 },
9100 "skiplock" : {
9101 "description" : "Ignore locks - only root is allowed to use this option.",
9102 "optional" : 1,
56122987 9103 "type" : "boolean"
7aacca6f 9104 },
44660702
DM
9105 "vmid" : {
9106 "description" : "The (unique) ID of the VM.",
9107 "format" : "pve-vmid",
9108 "minimum" : 1,
9109 "type" : "integer"
56122987 9110 }
7aacca6f 9111 }
56122987 9112 },
56122987
DM
9113 "permissions" : {
9114 "check" : [
9115 "perm",
9116 "/vms/{vmid}",
9117 [
44660702 9118 "VM.Console"
56122987
DM
9119 ]
9120 ]
9121 },
7aacca6f 9122 "protected" : 1,
44660702
DM
9123 "proxyto" : "node",
9124 "returns" : {
9125 "type" : "null"
9126 }
9127 }
9128 },
9129 "leaf" : 1,
9130 "path" : "/nodes/{node}/qemu/{vmid}/sendkey",
9131 "text" : "sendkey"
9132 },
9133 {
9134 "info" : {
9135 "GET" : {
9136 "description" : "Check if feature for virtual machine is available.",
9137 "method" : "GET",
7aacca6f 9138 "name" : "vm_feature",
56122987 9139 "parameters" : {
44660702 9140 "additionalProperties" : 0,
56122987 9141 "properties" : {
56122987 9142 "feature" : {
44660702 9143 "description" : "Feature to check.",
56122987
DM
9144 "enum" : [
9145 "snapshot",
9146 "clone",
9147 "copy"
9148 ],
44660702
DM
9149 "type" : "string"
9150 },
9151 "node" : {
9152 "description" : "The cluster node name.",
9153 "format" : "pve-node",
7aacca6f 9154 "type" : "string"
56122987
DM
9155 },
9156 "snapname" : {
56122987 9157 "description" : "The name of the snapshot.",
44660702
DM
9158 "format" : "pve-configid",
9159 "maxLength" : 40,
7aacca6f
DM
9160 "optional" : 1,
9161 "type" : "string"
9162 },
44660702
DM
9163 "vmid" : {
9164 "description" : "The (unique) ID of the VM.",
9165 "format" : "pve-vmid",
9166 "minimum" : 1,
9167 "type" : "integer"
9168 }
9169 }
9170 },
9171 "permissions" : {
9172 "check" : [
9173 "perm",
9174 "/vms/{vmid}",
9175 [
9176 "VM.Audit"
9177 ]
9178 ]
9179 },
9180 "protected" : 1,
9181 "proxyto" : "node",
9182 "returns" : {
9183 "properties" : {
9184 "hasFeature" : {
9185 "type" : "boolean"
9186 },
9187 "nodes" : {
9188 "items" : {
9189 "type" : "string"
9190 },
9191 "type" : "array"
56122987
DM
9192 }
9193 },
44660702 9194 "type" : "object"
56122987
DM
9195 }
9196 }
9197 },
7aacca6f 9198 "leaf" : 1,
44660702
DM
9199 "path" : "/nodes/{node}/qemu/{vmid}/feature",
9200 "text" : "feature"
56122987
DM
9201 },
9202 {
56122987
DM
9203 "info" : {
9204 "POST" : {
44660702 9205 "description" : "Create a copy of virtual machine/template.",
56122987 9206 "method" : "POST",
7aacca6f 9207 "name" : "clone_vm",
56122987
DM
9208 "parameters" : {
9209 "additionalProperties" : 0,
9210 "properties" : {
44660702
DM
9211 "description" : {
9212 "description" : "Description for the new VM.",
56122987 9213 "optional" : 1,
7aacca6f 9214 "type" : "string"
56122987 9215 },
44660702
DM
9216 "format" : {
9217 "description" : "Target format for file storage.",
9218 "enum" : [
9219 "raw",
9220 "qcow2",
9221 "vmdk"
9222 ],
9223 "optional" : 1,
9224 "requires" : "full",
56122987
DM
9225 "type" : "string"
9226 },
44660702
DM
9227 "full" : {
9228 "default" : 0,
9229 "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 9230 "optional" : 1,
44660702
DM
9231 "type" : "boolean"
9232 },
9233 "name" : {
56122987 9234 "description" : "Set a name for the new VM.",
44660702
DM
9235 "format" : "dns-name",
9236 "optional" : 1,
9237 "type" : "string"
9238 },
9239 "newid" : {
9240 "description" : "VMID for the clone.",
9241 "format" : "pve-vmid",
9242 "minimum" : 1,
9243 "type" : "integer"
9244 },
9245 "node" : {
9246 "description" : "The cluster node name.",
9247 "format" : "pve-node",
9248 "type" : "string"
7aacca6f
DM
9249 },
9250 "pool" : {
9251 "description" : "Add the new VM to the specified pool.",
44660702 9252 "format" : "pve-poolid",
56122987 9253 "optional" : 1,
44660702 9254 "type" : "string"
56122987 9255 },
44660702
DM
9256 "snapname" : {
9257 "description" : "The name of the snapshot.",
9258 "format" : "pve-configid",
9259 "maxLength" : 40,
7aacca6f
DM
9260 "optional" : 1,
9261 "type" : "string"
56122987 9262 },
44660702
DM
9263 "storage" : {
9264 "description" : "Target storage for full clone.",
9265 "format" : "pve-storage-id",
7aacca6f 9266 "optional" : 1,
44660702
DM
9267 "requires" : "full",
9268 "type" : "string"
56122987 9269 },
44660702
DM
9270 "target" : {
9271 "description" : "Target node. Only allowed if the original VM is on shared storage.",
9272 "format" : "pve-node",
56122987 9273 "optional" : 1,
56122987 9274 "type" : "string"
44660702
DM
9275 },
9276 "vmid" : {
9277 "description" : "The (unique) ID of the VM.",
9278 "format" : "pve-vmid",
9279 "minimum" : 1,
9280 "type" : "integer"
56122987
DM
9281 }
9282 }
9283 },
56122987
DM
9284 "permissions" : {
9285 "check" : [
9286 "and",
9287 [
9288 "perm",
9289 "/vms/{vmid}",
9290 [
9291 "VM.Clone"
9292 ]
9293 ],
9294 [
9295 "or",
9296 [
9297 "perm",
9298 "/vms/{newid}",
9299 [
9300 "VM.Allocate"
9301 ]
9302 ],
9303 [
9304 "perm",
9305 "/pool/{pool}",
9306 [
9307 "VM.Allocate"
9308 ],
9309 "require_param",
9310 "pool"
9311 ]
9312 ]
44660702
DM
9313 ],
9314 "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."
9315 },
9316 "protected" : 1,
9317 "proxyto" : "node",
9318 "returns" : {
9319 "type" : "string"
56122987
DM
9320 }
9321 }
9322 },
44660702
DM
9323 "leaf" : 1,
9324 "path" : "/nodes/{node}/qemu/{vmid}/clone",
56122987
DM
9325 "text" : "clone"
9326 },
9327 {
56122987
DM
9328 "info" : {
9329 "POST" : {
7aacca6f 9330 "description" : "Move volume to different storage.",
44660702
DM
9331 "method" : "POST",
9332 "name" : "move_vm_disk",
56122987
DM
9333 "parameters" : {
9334 "additionalProperties" : 0,
9335 "properties" : {
9336 "delete" : {
44660702 9337 "default" : 0,
56122987 9338 "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.",
7aacca6f 9339 "optional" : 1,
44660702 9340 "type" : "boolean"
56122987 9341 },
44660702
DM
9342 "digest" : {
9343 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9344 "maxLength" : 40,
9345 "optional" : 1,
9346 "type" : "string"
56122987 9347 },
56122987 9348 "disk" : {
56122987
DM
9349 "description" : "The disk you want to move.",
9350 "enum" : [
9351 "ide0",
9352 "ide1",
9353 "ide2",
9354 "ide3",
9355 "scsi0",
9356 "scsi1",
9357 "scsi2",
9358 "scsi3",
9359 "scsi4",
9360 "scsi5",
9361 "scsi6",
9362 "scsi7",
9363 "scsi8",
9364 "scsi9",
9365 "scsi10",
9366 "scsi11",
9367 "scsi12",
9368 "scsi13",
9369 "virtio0",
9370 "virtio1",
9371 "virtio2",
9372 "virtio3",
9373 "virtio4",
9374 "virtio5",
9375 "virtio6",
9376 "virtio7",
9377 "virtio8",
9378 "virtio9",
9379 "virtio10",
9380 "virtio11",
9381 "virtio12",
9382 "virtio13",
9383 "virtio14",
9384 "virtio15",
9385 "sata0",
9386 "sata1",
9387 "sata2",
9388 "sata3",
9389 "sata4",
9390 "sata5"
44660702
DM
9391 ],
9392 "type" : "string"
7aacca6f
DM
9393 },
9394 "format" : {
9395 "description" : "Target Format.",
9396 "enum" : [
9397 "raw",
9398 "qcow2",
9399 "vmdk"
9400 ],
9401 "optional" : 1,
9402 "type" : "string"
44660702
DM
9403 },
9404 "node" : {
9405 "description" : "The cluster node name.",
9406 "format" : "pve-node",
9407 "type" : "string"
9408 },
9409 "storage" : {
9410 "description" : "Target storage.",
9411 "format" : "pve-storage-id",
9412 "type" : "string"
9413 },
9414 "vmid" : {
9415 "description" : "The (unique) ID of the VM.",
9416 "format" : "pve-vmid",
9417 "minimum" : 1,
9418 "type" : "integer"
56122987
DM
9419 }
9420 }
9421 },
44660702
DM
9422 "permissions" : {
9423 "check" : [
9424 "and",
9425 [
9426 "perm",
9427 "/vms/{vmid}",
9428 [
9429 "VM.Config.Disk"
9430 ]
9431 ],
9432 [
9433 "perm",
9434 "/storage/{storage}",
9435 [
9436 "Datastore.AllocateSpace"
9437 ]
9438 ]
9439 ],
9440 "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage."
9441 },
9442 "protected" : 1,
9443 "proxyto" : "node",
9444 "returns" : {
9445 "description" : "the task ID.",
9446 "type" : "string"
9447 }
56122987 9448 }
7aacca6f 9449 },
44660702 9450 "leaf" : 1,
7aacca6f 9451 "path" : "/nodes/{node}/qemu/{vmid}/move_disk",
44660702 9452 "text" : "move_disk"
56122987
DM
9453 },
9454 {
56122987
DM
9455 "info" : {
9456 "POST" : {
7aacca6f 9457 "description" : "Migrate virtual machine. Creates a new migration task.",
44660702 9458 "method" : "POST",
7aacca6f 9459 "name" : "migrate_vm",
56122987 9460 "parameters" : {
44660702 9461 "additionalProperties" : 0,
56122987 9462 "properties" : {
44660702
DM
9463 "force" : {
9464 "description" : "Allow to migrate VMs which use local devices. Only root may use this option.",
9465 "optional" : 1,
9466 "type" : "boolean"
9467 },
7aacca6f 9468 "node" : {
44660702 9469 "description" : "The cluster node name.",
7aacca6f 9470 "format" : "pve-node",
44660702 9471 "type" : "string"
56122987
DM
9472 },
9473 "online" : {
44660702 9474 "description" : "Use online/live migration.",
56122987 9475 "optional" : 1,
44660702 9476 "type" : "boolean"
56122987 9477 },
44660702
DM
9478 "target" : {
9479 "description" : "Target node.",
9480 "format" : "pve-node",
9481 "type" : "string"
56122987 9482 },
7aacca6f 9483 "vmid" : {
7aacca6f 9484 "description" : "The (unique) ID of the VM.",
44660702 9485 "format" : "pve-vmid",
7aacca6f 9486 "minimum" : 1,
44660702 9487 "type" : "integer"
56122987 9488 }
44660702
DM
9489 }
9490 },
9491 "permissions" : {
9492 "check" : [
9493 "perm",
9494 "/vms/{vmid}",
9495 [
9496 "VM.Migrate"
9497 ]
9498 ]
56122987
DM
9499 },
9500 "protected" : 1,
44660702
DM
9501 "proxyto" : "node",
9502 "returns" : {
9503 "description" : "the task ID.",
9504 "type" : "string"
9505 }
56122987 9506 }
7aacca6f 9507 },
44660702
DM
9508 "leaf" : 1,
9509 "path" : "/nodes/{node}/qemu/{vmid}/migrate",
7aacca6f 9510 "text" : "migrate"
56122987
DM
9511 },
9512 {
9513 "info" : {
9514 "POST" : {
44660702 9515 "description" : "Execute Qemu monitor commands.",
56122987 9516 "method" : "POST",
44660702 9517 "name" : "monitor",
56122987 9518 "parameters" : {
7aacca6f 9519 "additionalProperties" : 0,
56122987 9520 "properties" : {
44660702
DM
9521 "command" : {
9522 "description" : "The monitor command.",
9523 "type" : "string"
9524 },
56122987 9525 "node" : {
44660702 9526 "description" : "The cluster node name.",
7aacca6f 9527 "format" : "pve-node",
44660702 9528 "type" : "string"
56122987
DM
9529 },
9530 "vmid" : {
44660702 9531 "description" : "The (unique) ID of the VM.",
56122987 9532 "format" : "pve-vmid",
7aacca6f 9533 "minimum" : 1,
44660702 9534 "type" : "integer"
56122987 9535 }
7aacca6f 9536 }
56122987 9537 },
56122987
DM
9538 "permissions" : {
9539 "check" : [
9540 "perm",
9541 "/vms/{vmid}",
9542 [
9543 "VM.Monitor"
9544 ]
9545 ]
7aacca6f 9546 },
44660702
DM
9547 "protected" : 1,
9548 "proxyto" : "node",
9549 "returns" : {
9550 "type" : "string"
9551 }
56122987 9552 }
44660702
DM
9553 },
9554 "leaf" : 1,
9555 "path" : "/nodes/{node}/qemu/{vmid}/monitor",
9556 "text" : "monitor"
56122987
DM
9557 },
9558 {
56122987
DM
9559 "info" : {
9560 "PUT" : {
44660702
DM
9561 "description" : "Extend volume size.",
9562 "method" : "PUT",
9563 "name" : "resize_vm",
56122987 9564 "parameters" : {
44660702 9565 "additionalProperties" : 0,
56122987 9566 "properties" : {
44660702
DM
9567 "digest" : {
9568 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9569 "maxLength" : 40,
9570 "optional" : 1,
56122987
DM
9571 "type" : "string"
9572 },
56122987
DM
9573 "disk" : {
9574 "description" : "The disk you want to resize.",
9575 "enum" : [
9576 "ide0",
9577 "ide1",
9578 "ide2",
9579 "ide3",
9580 "scsi0",
9581 "scsi1",
9582 "scsi2",
9583 "scsi3",
9584 "scsi4",
9585 "scsi5",
9586 "scsi6",
9587 "scsi7",
9588 "scsi8",
9589 "scsi9",
9590 "scsi10",
9591 "scsi11",
9592 "scsi12",
9593 "scsi13",
9594 "virtio0",
9595 "virtio1",
9596 "virtio2",
9597 "virtio3",
9598 "virtio4",
9599 "virtio5",
9600 "virtio6",
9601 "virtio7",
9602 "virtio8",
9603 "virtio9",
9604 "virtio10",
9605 "virtio11",
9606 "virtio12",
9607 "virtio13",
9608 "virtio14",
9609 "virtio15",
9610 "sata0",
9611 "sata1",
9612 "sata2",
9613 "sata3",
9614 "sata4",
9615 "sata5"
44660702
DM
9616 ],
9617 "type" : "string"
56122987 9618 },
44660702
DM
9619 "node" : {
9620 "description" : "The cluster node name.",
9621 "format" : "pve-node",
9622 "type" : "string"
7aacca6f 9623 },
44660702
DM
9624 "size" : {
9625 "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.",
9626 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
9627 "type" : "string"
56122987
DM
9628 },
9629 "skiplock" : {
9630 "description" : "Ignore locks - only root is allowed to use this option.",
9631 "optional" : 1,
9632 "type" : "boolean"
56122987
DM
9633 },
9634 "vmid" : {
7aacca6f 9635 "description" : "The (unique) ID of the VM.",
56122987 9636 "format" : "pve-vmid",
44660702
DM
9637 "minimum" : 1,
9638 "type" : "integer"
56122987
DM
9639 }
9640 }
9641 },
9642 "permissions" : {
9643 "check" : [
9644 "perm",
9645 "/vms/{vmid}",
9646 [
44660702 9647 "VM.Config.Disk"
56122987
DM
9648 ]
9649 ]
9650 },
7aacca6f 9651 "protected" : 1,
7aacca6f 9652 "proxyto" : "node",
44660702
DM
9653 "returns" : {
9654 "type" : "null"
9655 }
7aacca6f
DM
9656 }
9657 },
44660702
DM
9658 "leaf" : 1,
9659 "path" : "/nodes/{node}/qemu/{vmid}/resize",
9660 "text" : "resize"
9661 },
9662 {
56122987
DM
9663 "children" : [
9664 {
9665 "children" : [
9666 {
56122987 9667 "info" : {
44660702
DM
9668 "GET" : {
9669 "description" : "Get snapshot configuration",
9670 "method" : "GET",
9671 "name" : "get_snapshot_config",
56122987 9672 "parameters" : {
44660702 9673 "additionalProperties" : 0,
56122987 9674 "properties" : {
56122987 9675 "node" : {
44660702 9676 "description" : "The cluster node name.",
56122987 9677 "format" : "pve-node",
44660702 9678 "type" : "string"
7aacca6f
DM
9679 },
9680 "snapname" : {
44660702 9681 "description" : "The name of the snapshot.",
7aacca6f 9682 "format" : "pve-configid",
44660702
DM
9683 "maxLength" : 40,
9684 "type" : "string"
7aacca6f
DM
9685 },
9686 "vmid" : {
44660702 9687 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
9688 "format" : "pve-vmid",
9689 "minimum" : 1,
44660702 9690 "type" : "integer"
56122987 9691 }
44660702 9692 }
56122987
DM
9693 },
9694 "permissions" : {
9695 "check" : [
9696 "perm",
9697 "/vms/{vmid}",
9698 [
9699 "VM.Snapshot"
9700 ]
9701 ]
9702 },
44660702 9703 "proxyto" : "node",
56122987 9704 "returns" : {
44660702 9705 "type" : "object"
7aacca6f
DM
9706 }
9707 },
44660702
DM
9708 "PUT" : {
9709 "description" : "Update snapshot metadata.",
9710 "method" : "PUT",
9711 "name" : "update_snapshot_config",
56122987 9712 "parameters" : {
44660702 9713 "additionalProperties" : 0,
56122987 9714 "properties" : {
44660702
DM
9715 "description" : {
9716 "description" : "A textual description or comment.",
9717 "optional" : 1,
9718 "type" : "string"
9719 },
56122987 9720 "node" : {
7aacca6f 9721 "description" : "The cluster node name.",
44660702
DM
9722 "format" : "pve-node",
9723 "type" : "string"
56122987 9724 },
56122987
DM
9725 "snapname" : {
9726 "description" : "The name of the snapshot.",
44660702 9727 "format" : "pve-configid",
7aacca6f 9728 "maxLength" : 40,
44660702 9729 "type" : "string"
7aacca6f
DM
9730 },
9731 "vmid" : {
9732 "description" : "The (unique) ID of the VM.",
44660702 9733 "format" : "pve-vmid",
7aacca6f 9734 "minimum" : 1,
44660702 9735 "type" : "integer"
56122987 9736 }
44660702 9737 }
56122987 9738 },
7aacca6f
DM
9739 "permissions" : {
9740 "check" : [
9741 "perm",
9742 "/vms/{vmid}",
9743 [
9744 "VM.Snapshot"
9745 ]
9746 ]
44660702
DM
9747 },
9748 "protected" : 1,
9749 "proxyto" : "node",
9750 "returns" : {
9751 "type" : "null"
7aacca6f 9752 }
56122987
DM
9753 }
9754 },
44660702 9755 "leaf" : 1,
7aacca6f 9756 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config",
44660702 9757 "text" : "config"
56122987
DM
9758 },
9759 {
56122987
DM
9760 "info" : {
9761 "POST" : {
44660702 9762 "description" : "Rollback VM state to specified snapshot.",
7aacca6f 9763 "method" : "POST",
44660702 9764 "name" : "rollback",
56122987
DM
9765 "parameters" : {
9766 "additionalProperties" : 0,
9767 "properties" : {
44660702
DM
9768 "node" : {
9769 "description" : "The cluster node name.",
9770 "format" : "pve-node",
9771 "type" : "string"
9772 },
56122987 9773 "snapname" : {
44660702 9774 "description" : "The name of the snapshot.",
56122987
DM
9775 "format" : "pve-configid",
9776 "maxLength" : 40,
7aacca6f
DM
9777 "type" : "string"
9778 },
56122987 9779 "vmid" : {
7aacca6f 9780 "description" : "The (unique) ID of the VM.",
44660702 9781 "format" : "pve-vmid",
56122987 9782 "minimum" : 1,
44660702 9783 "type" : "integer"
56122987
DM
9784 }
9785 }
9786 },
7aacca6f 9787 "permissions" : {
56122987
DM
9788 "check" : [
9789 "perm",
9790 "/vms/{vmid}",
9791 [
9792 "VM.Snapshot"
9793 ]
9794 ]
9795 },
44660702 9796 "protected" : 1,
7aacca6f 9797 "proxyto" : "node",
44660702
DM
9798 "returns" : {
9799 "description" : "the task ID.",
9800 "type" : "string"
9801 }
56122987
DM
9802 }
9803 },
44660702
DM
9804 "leaf" : 1,
9805 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback",
7aacca6f 9806 "text" : "rollback"
56122987 9807 }
44660702
DM
9808 ],
9809 "info" : {
9810 "DELETE" : {
9811 "description" : "Delete a VM snapshot.",
9812 "method" : "DELETE",
9813 "name" : "delsnapshot",
9814 "parameters" : {
9815 "additionalProperties" : 0,
9816 "properties" : {
9817 "force" : {
9818 "description" : "For removal from config file, even if removing disk snapshots fails.",
9819 "optional" : 1,
9820 "type" : "boolean"
9821 },
9822 "node" : {
9823 "description" : "The cluster node name.",
9824 "format" : "pve-node",
9825 "type" : "string"
9826 },
9827 "snapname" : {
9828 "description" : "The name of the snapshot.",
9829 "format" : "pve-configid",
9830 "maxLength" : 40,
9831 "type" : "string"
9832 },
9833 "vmid" : {
9834 "description" : "The (unique) ID of the VM.",
9835 "format" : "pve-vmid",
9836 "minimum" : 1,
9837 "type" : "integer"
9838 }
9839 }
9840 },
9841 "permissions" : {
9842 "check" : [
9843 "perm",
9844 "/vms/{vmid}",
9845 [
9846 "VM.Snapshot"
9847 ]
9848 ]
9849 },
9850 "protected" : 1,
9851 "proxyto" : "node",
9852 "returns" : {
9853 "description" : "the task ID.",
9854 "type" : "string"
9855 }
9856 },
9857 "GET" : {
9858 "description" : "",
9859 "method" : "GET",
9860 "name" : "snapshot_cmd_idx",
9861 "parameters" : {
9862 "additionalProperties" : 0,
9863 "properties" : {
9864 "node" : {
9865 "description" : "The cluster node name.",
9866 "format" : "pve-node",
9867 "type" : "string"
9868 },
9869 "snapname" : {
9870 "description" : "The name of the snapshot.",
9871 "format" : "pve-configid",
9872 "maxLength" : 40,
9873 "type" : "string"
9874 },
9875 "vmid" : {
9876 "description" : "The (unique) ID of the VM.",
9877 "format" : "pve-vmid",
9878 "minimum" : 1,
9879 "type" : "integer"
9880 }
9881 }
9882 },
9883 "permissions" : {
9884 "user" : "all"
9885 },
9886 "returns" : {
9887 "items" : {
9888 "properties" : {},
9889 "type" : "object"
9890 },
9891 "links" : [
9892 {
9893 "href" : "{cmd}",
9894 "rel" : "child"
9895 }
9896 ],
9897 "type" : "array"
9898 }
9899 }
9900 },
9901 "leaf" : 0,
9902 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}",
9903 "text" : "{snapname}"
56122987
DM
9904 }
9905 ],
44660702
DM
9906 "info" : {
9907 "GET" : {
9908 "description" : "List all snapshots.",
9909 "method" : "GET",
9910 "name" : "snapshot_list",
9911 "parameters" : {
9912 "additionalProperties" : 0,
9913 "properties" : {
9914 "node" : {
9915 "description" : "The cluster node name.",
9916 "format" : "pve-node",
9917 "type" : "string"
9918 },
9919 "vmid" : {
9920 "description" : "The (unique) ID of the VM.",
9921 "format" : "pve-vmid",
9922 "minimum" : 1,
9923 "type" : "integer"
9924 }
9925 }
9926 },
9927 "permissions" : {
9928 "check" : [
9929 "perm",
9930 "/vms/{vmid}",
9931 [
9932 "VM.Audit"
9933 ]
9934 ]
9935 },
9936 "protected" : 1,
9937 "proxyto" : "node",
9938 "returns" : {
9939 "items" : {
9940 "properties" : {},
9941 "type" : "object"
9942 },
9943 "links" : [
9944 {
9945 "href" : "{name}",
9946 "rel" : "child"
9947 }
9948 ],
9949 "type" : "array"
9950 }
9951 },
9952 "POST" : {
9953 "description" : "Snapshot a VM.",
9954 "method" : "POST",
9955 "name" : "snapshot",
9956 "parameters" : {
9957 "additionalProperties" : 0,
9958 "properties" : {
9959 "description" : {
9960 "description" : "A textual description or comment.",
9961 "optional" : 1,
9962 "type" : "string"
9963 },
9964 "node" : {
9965 "description" : "The cluster node name.",
9966 "format" : "pve-node",
9967 "type" : "string"
9968 },
9969 "snapname" : {
9970 "description" : "The name of the snapshot.",
9971 "format" : "pve-configid",
9972 "maxLength" : 40,
9973 "type" : "string"
9974 },
9975 "vmid" : {
9976 "description" : "The (unique) ID of the VM.",
9977 "format" : "pve-vmid",
9978 "minimum" : 1,
9979 "type" : "integer"
9980 },
9981 "vmstate" : {
9982 "description" : "Save the vmstate",
9983 "optional" : 1,
9984 "type" : "boolean"
9985 }
9986 }
9987 },
9988 "permissions" : {
9989 "check" : [
9990 "perm",
9991 "/vms/{vmid}",
9992 [
9993 "VM.Snapshot"
9994 ]
9995 ]
9996 },
9997 "protected" : 1,
9998 "proxyto" : "node",
9999 "returns" : {
10000 "description" : "the task ID.",
10001 "type" : "string"
10002 }
10003 }
10004 },
10005 "leaf" : 0,
10006 "path" : "/nodes/{node}/qemu/{vmid}/snapshot",
7aacca6f 10007 "text" : "snapshot"
56122987
DM
10008 },
10009 {
56122987
DM
10010 "info" : {
10011 "POST" : {
44660702
DM
10012 "description" : "Create a Template.",
10013 "method" : "POST",
56122987 10014 "name" : "template",
56122987 10015 "parameters" : {
7aacca6f 10016 "additionalProperties" : 0,
56122987 10017 "properties" : {
56122987 10018 "disk" : {
56122987
DM
10019 "description" : "If you want to convert only 1 disk to base image.",
10020 "enum" : [
10021 "ide0",
10022 "ide1",
10023 "ide2",
10024 "ide3",
10025 "scsi0",
10026 "scsi1",
10027 "scsi2",
10028 "scsi3",
10029 "scsi4",
10030 "scsi5",
10031 "scsi6",
10032 "scsi7",
10033 "scsi8",
10034 "scsi9",
10035 "scsi10",
10036 "scsi11",
10037 "scsi12",
10038 "scsi13",
10039 "virtio0",
10040 "virtio1",
10041 "virtio2",
10042 "virtio3",
10043 "virtio4",
10044 "virtio5",
10045 "virtio6",
10046 "virtio7",
10047 "virtio8",
10048 "virtio9",
10049 "virtio10",
10050 "virtio11",
10051 "virtio12",
10052 "virtio13",
10053 "virtio14",
10054 "virtio15",
10055 "sata0",
10056 "sata1",
10057 "sata2",
10058 "sata3",
10059 "sata4",
10060 "sata5"
10061 ],
7aacca6f 10062 "optional" : 1,
56122987
DM
10063 "type" : "string"
10064 },
44660702
DM
10065 "node" : {
10066 "description" : "The cluster node name.",
10067 "format" : "pve-node",
10068 "type" : "string"
10069 },
10070 "vmid" : {
10071 "description" : "The (unique) ID of the VM.",
7aacca6f 10072 "format" : "pve-vmid",
44660702
DM
10073 "minimum" : 1,
10074 "type" : "integer"
56122987 10075 }
7aacca6f 10076 }
56122987 10077 },
7aacca6f
DM
10078 "permissions" : {
10079 "check" : [
10080 "perm",
10081 "/vms/{vmid}",
10082 [
10083 "VM.Allocate"
10084 ]
10085 ],
10086 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
10087 },
44660702 10088 "protected" : 1,
7aacca6f 10089 "proxyto" : "node",
7aacca6f
DM
10090 "returns" : {
10091 "type" : "null"
10092 }
56122987
DM
10093 }
10094 },
44660702 10095 "leaf" : 1,
7aacca6f 10096 "path" : "/nodes/{node}/qemu/{vmid}/template",
44660702 10097 "text" : "template"
56122987
DM
10098 }
10099 ],
7aacca6f 10100 "info" : {
44660702
DM
10101 "DELETE" : {
10102 "description" : "Destroy the vm (also delete all used/owned volumes).",
10103 "method" : "DELETE",
10104 "name" : "destroy_vm",
7aacca6f 10105 "parameters" : {
44660702 10106 "additionalProperties" : 0,
7aacca6f
DM
10107 "properties" : {
10108 "node" : {
44660702 10109 "description" : "The cluster node name.",
7aacca6f 10110 "format" : "pve-node",
44660702
DM
10111 "type" : "string"
10112 },
10113 "skiplock" : {
10114 "description" : "Ignore locks - only root is allowed to use this option.",
10115 "optional" : 1,
10116 "type" : "boolean"
7aacca6f
DM
10117 },
10118 "vmid" : {
44660702 10119 "description" : "The (unique) ID of the VM.",
7aacca6f 10120 "format" : "pve-vmid",
44660702
DM
10121 "minimum" : 1,
10122 "type" : "integer"
7aacca6f 10123 }
44660702 10124 }
7aacca6f 10125 },
7aacca6f
DM
10126 "permissions" : {
10127 "check" : [
10128 "perm",
10129 "/vms/{vmid}",
10130 [
10131 "VM.Allocate"
10132 ]
10133 ]
10134 },
44660702
DM
10135 "protected" : 1,
10136 "proxyto" : "node",
7aacca6f
DM
10137 "returns" : {
10138 "type" : "string"
44660702
DM
10139 }
10140 },
10141 "GET" : {
10142 "description" : "Directory index",
10143 "method" : "GET",
10144 "name" : "vmdiridx",
7aacca6f 10145 "parameters" : {
44660702 10146 "additionalProperties" : 0,
7aacca6f 10147 "properties" : {
7aacca6f 10148 "node" : {
7aacca6f 10149 "description" : "The cluster node name.",
44660702
DM
10150 "format" : "pve-node",
10151 "type" : "string"
10152 },
10153 "vmid" : {
10154 "description" : "The (unique) ID of the VM.",
10155 "format" : "pve-vmid",
10156 "minimum" : 1,
10157 "type" : "integer"
7aacca6f 10158 }
44660702 10159 }
7aacca6f 10160 },
44660702
DM
10161 "permissions" : {
10162 "user" : "all"
10163 },
10164 "proxyto" : "node",
10165 "returns" : {
10166 "items" : {
10167 "properties" : {
10168 "subdir" : {
10169 "type" : "string"
10170 }
10171 },
10172 "type" : "object"
10173 },
10174 "links" : [
10175 {
10176 "href" : "{subdir}",
10177 "rel" : "child"
10178 }
10179 ],
10180 "type" : "array"
10181 }
7aacca6f 10182 }
44660702
DM
10183 },
10184 "leaf" : 0,
10185 "path" : "/nodes/{node}/qemu/{vmid}",
10186 "text" : "{vmid}"
56122987
DM
10187 }
10188 ],
10189 "info" : {
44660702
DM
10190 "GET" : {
10191 "description" : "Virtual machine index (per node).",
10192 "method" : "GET",
10193 "name" : "vmlist",
56122987 10194 "parameters" : {
44660702 10195 "additionalProperties" : 0,
56122987 10196 "properties" : {
44660702
DM
10197 "full" : {
10198 "description" : "Determine the full status of active VMs.",
56122987 10199 "optional" : 1,
44660702 10200 "type" : "boolean"
56122987 10201 },
44660702
DM
10202 "node" : {
10203 "description" : "The cluster node name.",
10204 "format" : "pve-node",
7aacca6f 10205 "type" : "string"
44660702
DM
10206 }
10207 }
10208 },
10209 "permissions" : {
10210 "description" : "Only list VMs where you have VM.Audit permissons on /vms/<vmid>.",
10211 "user" : "all"
10212 },
10213 "protected" : 1,
10214 "proxyto" : "node",
10215 "returns" : {
10216 "items" : {
10217 "properties" : {},
10218 "type" : "object"
10219 },
10220 "links" : [
10221 {
10222 "href" : "{vmid}",
10223 "rel" : "child"
10224 }
10225 ],
10226 "type" : "array"
10227 }
10228 },
10229 "POST" : {
10230 "description" : "Create or restore a virtual machine.",
10231 "method" : "POST",
10232 "name" : "create_vm",
10233 "parameters" : {
10234 "additionalProperties" : 0,
10235 "properties" : {
7aacca6f 10236 "acpi" : {
7aacca6f 10237 "default" : 1,
44660702 10238 "description" : "Enable/disable ACPI.",
56122987 10239 "optional" : 1,
7aacca6f 10240 "type" : "boolean"
56122987 10241 },
44660702
DM
10242 "agent" : {
10243 "default" : 0,
10244 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 10245 "optional" : 1,
44660702 10246 "type" : "boolean"
56122987 10247 },
44660702
DM
10248 "archive" : {
10249 "description" : "The backup file.",
10250 "maxLength" : 255,
56122987 10251 "optional" : 1,
44660702 10252 "type" : "string"
56122987 10253 },
44660702 10254 "args" : {
c2993fe5 10255 "description" : "Arbitrary arguments passed to kvm.",
56122987 10256 "optional" : 1,
c2993fe5
DM
10257 "type" : "string",
10258 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
56122987 10259 },
44660702 10260 "autostart" : {
7aacca6f 10261 "default" : 0,
44660702
DM
10262 "description" : "Automatic restart after crash (currently ignored).",
10263 "optional" : 1,
10264 "type" : "boolean"
7aacca6f 10265 },
44660702
DM
10266 "balloon" : {
10267 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
10268 "minimum" : 0,
56122987 10269 "optional" : 1,
44660702 10270 "type" : "integer"
56122987 10271 },
44660702
DM
10272 "bios" : {
10273 "default" : "seabios",
10274 "description" : "Select BIOS implementation.",
10275 "enum" : [
10276 "seabios",
10277 "ovmf"
10278 ],
56122987 10279 "optional" : 1,
44660702 10280 "type" : "string"
56122987 10281 },
44660702
DM
10282 "boot" : {
10283 "default" : "cdn",
10284 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
56122987 10285 "optional" : 1,
44660702
DM
10286 "pattern" : "[acdn]{1,4}",
10287 "type" : "string"
56122987 10288 },
7aacca6f
DM
10289 "bootdisk" : {
10290 "description" : "Enable booting from specified disk.",
44660702
DM
10291 "format" : "pve-qm-bootdisk",
10292 "optional" : 1,
7aacca6f 10293 "pattern" : "(ide|sata|scsi|virtio)\\d+",
44660702
DM
10294 "type" : "string"
10295 },
10296 "cdrom" : {
10297 "description" : "This is an alias for option -ide2",
10298 "format" : "pve-qm-drive",
56122987 10299 "optional" : 1,
44660702
DM
10300 "type" : "string",
10301 "typetext" : "volume"
56122987 10302 },
44660702
DM
10303 "cores" : {
10304 "default" : 1,
10305 "description" : "The number of cores per socket.",
7aacca6f 10306 "minimum" : 1,
44660702 10307 "optional" : 1,
7aacca6f
DM
10308 "type" : "integer"
10309 },
44660702
DM
10310 "cpu" : {
10311 "description" : "Emulated CPU type.",
10312 "format" : {
10313 "cputype" : {
10314 "default" : "kvm64",
10315 "default_key" : 1,
10316 "description" : "Emulated CPU type.",
10317 "enum" : [
10318 "486",
10319 "athlon",
f004f5b9
DM
10320 "Broadwell",
10321 "Broadwell-noTSX",
10322 "Conroe",
44660702 10323 "core2duo",
f004f5b9
DM
10324 "coreduo",
10325 "Haswell",
10326 "Haswell-noTSX",
10327 "host",
10328 "IvyBridge",
44660702
DM
10329 "kvm32",
10330 "kvm64",
44660702 10331 "Nehalem",
44660702
DM
10332 "Opteron_G1",
10333 "Opteron_G2",
10334 "Opteron_G3",
10335 "Opteron_G4",
10336 "Opteron_G5",
f004f5b9
DM
10337 "Penryn",
10338 "pentium",
10339 "pentium2",
10340 "pentium3",
10341 "phenom",
10342 "qemu32",
10343 "qemu64",
10344 "SandyBridge",
10345 "Westmere"
44660702
DM
10346 ],
10347 "format_description" : "cputype",
10348 "type" : "string"
10349 },
10350 "hidden" : {
10351 "default" : 0,
10352 "description" : "Do not identify as a KVM virtual machine.",
10353 "optional" : 1,
10354 "type" : "boolean"
10355 }
10356 },
56122987 10357 "optional" : 1,
44660702 10358 "type" : "string"
56122987 10359 },
44660702 10360 "cpulimit" : {
7aacca6f 10361 "default" : 0,
c2993fe5 10362 "description" : "Limit of CPU usage.",
44660702
DM
10363 "maximum" : 128,
10364 "minimum" : 0,
7aacca6f 10365 "optional" : 1,
c2993fe5
DM
10366 "type" : "number",
10367 "verbose_description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit."
7aacca6f
DM
10368 },
10369 "cpuunits" : {
7aacca6f 10370 "default" : 1000,
c2993fe5 10371 "description" : "CPU weight for a VM.",
7aacca6f 10372 "maximum" : 500000,
44660702
DM
10373 "minimum" : 0,
10374 "optional" : 1,
c2993fe5
DM
10375 "type" : "integer",
10376 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
10377 },
10378 "description" : {
10379 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
56122987 10380 "optional" : 1,
44660702
DM
10381 "type" : "string"
10382 },
10383 "force" : {
10384 "description" : "Allow to overwrite existing VM.",
10385 "optional" : 1,
10386 "requires" : "archive",
10387 "type" : "boolean"
10388 },
10389 "freeze" : {
10390 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
10391 "optional" : 1,
10392 "type" : "boolean"
10393 },
10394 "hostpci[n]" : {
c2993fe5 10395 "description" : "Map host PCI devices into guest.",
44660702
DM
10396 "format" : "pve-qm-hostpci",
10397 "optional" : 1,
10398 "type" : "string"
10399 },
10400 "hotplug" : {
10401 "default" : "network,disk,usb",
10402 "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'.",
10403 "format" : "pve-hotplug-features",
10404 "optional" : 1,
10405 "type" : "string"
7aacca6f
DM
10406 },
10407 "ide[n]" : {
44660702 10408 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 10409 "format" : {
44660702
DM
10410 "aio" : {
10411 "description" : "AIO type to use.",
10412 "enum" : [
10413 "native",
10414 "threads"
10415 ],
44660702
DM
10416 "optional" : 1,
10417 "type" : "string"
10418 },
10419 "backup" : {
10420 "description" : "Whether the drive should be included when making backups.",
44660702
DM
10421 "optional" : 1,
10422 "type" : "boolean"
10423 },
10424 "bps" : {
10425 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 10426 "format_description" : "bps",
56122987 10427 "optional" : 1,
44660702 10428 "type" : "integer"
56122987 10429 },
44660702
DM
10430 "bps_rd" : {
10431 "description" : "Maximum read speed speed in bytes per second.",
10432 "format_description" : "bps",
56122987 10433 "optional" : 1,
44660702 10434 "type" : "integer"
56122987 10435 },
44660702
DM
10436 "bps_wr" : {
10437 "description" : "Maximum write speed speed in bytes per second.",
10438 "format_description" : "bps",
56122987 10439 "optional" : 1,
44660702 10440 "type" : "integer"
56122987 10441 },
44660702
DM
10442 "cache" : {
10443 "description" : "The drive's cache mode",
56122987 10444 "enum" : [
7aacca6f 10445 "none",
44660702
DM
10446 "writethrough",
10447 "writeback",
10448 "unsafe",
10449 "directsync"
56122987 10450 ],
56122987 10451 "optional" : 1,
44660702 10452 "type" : "string"
56122987 10453 },
44660702
DM
10454 "cyls" : {
10455 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
10456 "optional" : 1,
10457 "type" : "integer"
7aacca6f 10458 },
44660702
DM
10459 "detect_zeroes" : {
10460 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10461 "optional" : 1,
44660702 10462 "type" : "boolean"
56122987 10463 },
44660702
DM
10464 "discard" : {
10465 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
10466 "enum" : [
10467 "ignore",
10468 "on"
10469 ],
56122987 10470 "optional" : 1,
44660702 10471 "type" : "string"
56122987 10472 },
7aacca6f 10473 "file" : {
44660702 10474 "default_key" : 1,
7aacca6f 10475 "description" : "The drive's backing volume.",
7aacca6f
DM
10476 "format" : "pve-volume-id-or-qm-path",
10477 "format_description" : "volume",
7aacca6f 10478 "type" : "string"
56122987 10479 },
44660702
DM
10480 "format" : {
10481 "description" : "The drive's backing file's data format.",
56122987 10482 "enum" : [
44660702
DM
10483 "raw",
10484 "cow",
10485 "qcow",
10486 "qed",
10487 "qcow2",
10488 "vmdk",
10489 "cloop"
7aacca6f 10490 ],
f004f5b9 10491 "format_description" : "image format",
7aacca6f
DM
10492 "optional" : 1,
10493 "type" : "string"
56122987 10494 },
44660702
DM
10495 "heads" : {
10496 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 10497 "optional" : 1,
44660702 10498 "type" : "integer"
56122987 10499 },
44660702
DM
10500 "iops" : {
10501 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 10502 "format_description" : "iops",
56122987 10503 "optional" : 1,
44660702 10504 "type" : "integer"
56122987 10505 },
44660702
DM
10506 "iops_max" : {
10507 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
10508 "format_description" : "iops",
56122987 10509 "optional" : 1,
44660702 10510 "type" : "integer"
56122987 10511 },
7aacca6f 10512 "iops_rd" : {
7aacca6f 10513 "description" : "Maximum read I/O speed in operations per second.",
44660702
DM
10514 "format_description" : "iops",
10515 "optional" : 1,
10516 "type" : "integer"
7aacca6f 10517 },
44660702
DM
10518 "iops_rd_max" : {
10519 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
10520 "format_description" : "iops",
56122987 10521 "optional" : 1,
44660702 10522 "type" : "integer"
56122987 10523 },
44660702
DM
10524 "iops_wr" : {
10525 "description" : "Maximum write I/O speed in operations per second.",
10526 "format_description" : "iops",
56122987 10527 "optional" : 1,
44660702 10528 "type" : "integer"
7aacca6f 10529 },
44660702
DM
10530 "iops_wr_max" : {
10531 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
10532 "format_description" : "iops",
7aacca6f 10533 "optional" : 1,
44660702 10534 "type" : "integer"
56122987 10535 },
44660702
DM
10536 "mbps" : {
10537 "description" : "Maximum r/w speed speed in megabytes per second.",
10538 "format_description" : "mbps",
7aacca6f 10539 "optional" : 1,
44660702 10540 "type" : "number"
56122987 10541 },
44660702
DM
10542 "mbps_max" : {
10543 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7aacca6f 10544 "format_description" : "mbps",
56122987 10545 "optional" : 1,
44660702 10546 "type" : "number"
56122987 10547 },
44660702
DM
10548 "mbps_rd" : {
10549 "description" : "Maximum read speed speed in megabytes per second.",
10550 "format_description" : "mbps",
7aacca6f 10551 "optional" : 1,
44660702 10552 "type" : "number"
7aacca6f 10553 },
44660702
DM
10554 "mbps_rd_max" : {
10555 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
10556 "format_description" : "mbps",
56122987 10557 "optional" : 1,
44660702 10558 "type" : "number"
56122987 10559 },
44660702
DM
10560 "mbps_wr" : {
10561 "description" : "Maximum write speed speed in megabytes per second.",
10562 "format_description" : "mbps",
7aacca6f 10563 "optional" : 1,
44660702 10564 "type" : "number"
56122987 10565 },
44660702
DM
10566 "mbps_wr_max" : {
10567 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
10568 "format_description" : "mbps",
56122987 10569 "optional" : 1,
44660702 10570 "type" : "number"
7aacca6f
DM
10571 },
10572 "media" : {
44660702
DM
10573 "default" : "disk",
10574 "description" : "The drive's media type.",
56122987 10575 "enum" : [
7aacca6f
DM
10576 "cdrom",
10577 "disk"
56122987 10578 ],
56122987 10579 "optional" : 1,
44660702 10580 "type" : "string"
56122987 10581 },
44660702
DM
10582 "model" : {
10583 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
10584 "format" : "urlencoded",
10585 "format_description" : "model",
10586 "maxLength" : 120,
56122987 10587 "optional" : 1,
44660702 10588 "type" : "string"
56122987 10589 },
7aacca6f 10590 "rerror" : {
7aacca6f
DM
10591 "description" : "Read error action.",
10592 "enum" : [
10593 "ignore",
10594 "report",
10595 "stop"
44660702 10596 ],
44660702
DM
10597 "optional" : 1,
10598 "type" : "string"
56122987 10599 },
44660702
DM
10600 "secs" : {
10601 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 10602 "optional" : 1,
44660702
DM
10603 "type" : "integer"
10604 },
10605 "serial" : {
10606 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
10607 "format" : "urlencoded",
10608 "format_description" : "serial",
10609 "maxLength" : 60,
10610 "optional" : 1,
10611 "type" : "string"
10612 },
10613 "size" : {
10614 "description" : "Disk size. This is purely informational and has no effect.",
10615 "format" : "disk-size",
f004f5b9 10616 "format_description" : "DiskSize",
44660702
DM
10617 "optional" : 1,
10618 "type" : "string"
7aacca6f
DM
10619 },
10620 "snapshot" : {
44660702 10621 "description" : "Whether the drive should be included when making snapshots.",
7aacca6f 10622 "optional" : 1,
44660702 10623 "type" : "boolean"
7aacca6f 10624 },
44660702
DM
10625 "trans" : {
10626 "description" : "Force disk geometry bios translation mode.",
10627 "enum" : [
10628 "none",
10629 "lba",
10630 "auto"
10631 ],
7aacca6f 10632 "optional" : 1,
44660702
DM
10633 "type" : "string"
10634 },
10635 "volume" : {
10636 "alias" : "file"
10637 },
10638 "werror" : {
10639 "description" : "Write error action.",
10640 "enum" : [
10641 "enospc",
10642 "ignore",
10643 "report",
10644 "stop"
10645 ],
44660702
DM
10646 "optional" : 1,
10647 "type" : "string"
56122987
DM
10648 }
10649 },
56122987 10650 "optional" : 1,
7aacca6f 10651 "type" : "string"
56122987 10652 },
56122987 10653 "keyboard" : {
44660702 10654 "default" : "en-us",
c2993fe5 10655 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
56122987 10656 "enum" : [
44660702
DM
10657 "de",
10658 "de-ch",
7aacca6f 10659 "da",
56122987 10660 "en-gb",
44660702
DM
10661 "en-us",
10662 "es",
10663 "fi",
10664 "fr",
10665 "fr-be",
10666 "fr-ca",
10667 "fr-ch",
10668 "hu",
7aacca6f 10669 "is",
44660702
DM
10670 "it",
10671 "ja",
10672 "lt",
56122987 10673 "mk",
7aacca6f 10674 "nl",
56122987 10675 "no",
44660702 10676 "pl",
7aacca6f 10677 "pt",
44660702
DM
10678 "pt-br",
10679 "sv",
10680 "sl",
10681 "tr"
56122987 10682 ],
44660702
DM
10683 "optional" : 1,
10684 "type" : "string"
56122987 10685 },
44660702
DM
10686 "kvm" : {
10687 "default" : 1,
10688 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 10689 "optional" : 1,
44660702 10690 "type" : "boolean"
7aacca6f 10691 },
44660702
DM
10692 "localtime" : {
10693 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 10694 "optional" : 1,
44660702
DM
10695 "type" : "boolean"
10696 },
10697 "lock" : {
10698 "description" : "Lock/unlock the VM.",
7aacca6f
DM
10699 "enum" : [
10700 "migrate",
10701 "backup",
10702 "snapshot",
10703 "rollback"
10704 ],
44660702
DM
10705 "optional" : 1,
10706 "type" : "string"
56122987 10707 },
44660702
DM
10708 "machine" : {
10709 "description" : "Specific the Qemu machine type.",
10710 "maxLength" : 40,
10711 "optional" : 1,
10712 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
10713 "type" : "string"
10714 },
10715 "memory" : {
10716 "default" : 512,
10717 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
10718 "minimum" : 16,
10719 "optional" : 1,
10720 "type" : "integer"
10721 },
10722 "migrate_downtime" : {
10723 "default" : 0.1,
10724 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
10725 "minimum" : 0,
10726 "optional" : 1,
10727 "type" : "number"
10728 },
10729 "migrate_speed" : {
56122987 10730 "default" : 0,
44660702
DM
10731 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
10732 "minimum" : 0,
56122987 10733 "optional" : 1,
44660702 10734 "type" : "integer"
56122987 10735 },
44660702
DM
10736 "name" : {
10737 "description" : "Set a name for the VM. Only used on the configuration web interface.",
10738 "format" : "dns-name",
10739 "optional" : 1,
10740 "type" : "string"
10741 },
10742 "net[n]" : {
c2993fe5 10743 "description" : "Specify network devices.",
f004f5b9
DM
10744 "format" : {
10745 "bridge" : {
c2993fe5 10746 "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n",
f004f5b9
DM
10747 "format_description" : "bridge",
10748 "optional" : 1,
10749 "type" : "string"
10750 },
10751 "e1000" : {
10752 "alias" : "macaddr",
10753 "keyAlias" : "model"
10754 },
10755 "e1000-82540em" : {
10756 "alias" : "macaddr",
10757 "keyAlias" : "model"
10758 },
10759 "e1000-82544gc" : {
10760 "alias" : "macaddr",
10761 "keyAlias" : "model"
10762 },
10763 "e1000-82545em" : {
10764 "alias" : "macaddr",
10765 "keyAlias" : "model"
10766 },
10767 "firewall" : {
10768 "description" : "Whether this interface should be protected by the firewall.",
10769 "optional" : 1,
10770 "type" : "boolean"
10771 },
10772 "i82551" : {
10773 "alias" : "macaddr",
10774 "keyAlias" : "model"
10775 },
10776 "i82557b" : {
10777 "alias" : "macaddr",
10778 "keyAlias" : "model"
10779 },
10780 "i82559er" : {
10781 "alias" : "macaddr",
10782 "keyAlias" : "model"
10783 },
10784 "link_down" : {
c2993fe5 10785 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
10786 "optional" : 1,
10787 "type" : "boolean"
10788 },
10789 "macaddr" : {
c2993fe5 10790 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 10791 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
10792 "optional" : 1,
10793 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
10794 "type" : "string"
10795 },
10796 "model" : {
10797 "default_key" : 1,
c2993fe5 10798 "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.",
f004f5b9
DM
10799 "enum" : [
10800 "rtl8139",
10801 "ne2k_pci",
10802 "e1000",
10803 "pcnet",
10804 "virtio",
10805 "ne2k_isa",
10806 "i82551",
10807 "i82557b",
10808 "i82559er",
10809 "vmxnet3",
10810 "e1000-82540em",
10811 "e1000-82544gc",
10812 "e1000-82545em"
10813 ],
10814 "format_description" : "model",
10815 "type" : "string"
10816 },
10817 "ne2k_isa" : {
10818 "alias" : "macaddr",
10819 "keyAlias" : "model"
10820 },
10821 "ne2k_pci" : {
10822 "alias" : "macaddr",
10823 "keyAlias" : "model"
10824 },
10825 "pcnet" : {
10826 "alias" : "macaddr",
10827 "keyAlias" : "model"
10828 },
10829 "queues" : {
10830 "description" : "Number of packet queues to be used on the device.",
10831 "maximum" : 16,
10832 "minimum" : 0,
10833 "optional" : 1,
10834 "type" : "integer"
10835 },
10836 "rate" : {
c2993fe5 10837 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
10838 "minimum" : 0,
10839 "optional" : 1,
10840 "type" : "number"
10841 },
10842 "rtl8139" : {
10843 "alias" : "macaddr",
10844 "keyAlias" : "model"
10845 },
10846 "tag" : {
10847 "description" : "VLAN tag to apply to packets on this interface.",
10848 "maximum" : 4094,
c2993fe5 10849 "minimum" : 1,
f004f5b9
DM
10850 "optional" : 1,
10851 "type" : "integer"
10852 },
10853 "trunks" : {
10854 "description" : "VLAN trunks to pass through this interface.",
10855 "format_description" : "vlanid[;vlanid...]",
10856 "optional" : 1,
10857 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10858 "type" : "string"
10859 },
10860 "virtio" : {
10861 "alias" : "macaddr",
10862 "keyAlias" : "model"
10863 },
10864 "vmxnet3" : {
10865 "alias" : "macaddr",
10866 "keyAlias" : "model"
10867 }
10868 },
44660702
DM
10869 "optional" : 1,
10870 "type" : "string"
10871 },
10872 "node" : {
10873 "description" : "The cluster node name.",
10874 "format" : "pve-node",
10875 "type" : "string"
10876 },
10877 "numa" : {
7aacca6f 10878 "default" : 0,
44660702
DM
10879 "description" : "Enable/disable NUMA.",
10880 "optional" : 1,
10881 "type" : "boolean"
56122987 10882 },
7aacca6f 10883 "numa[n]" : {
c2993fe5 10884 "description" : "NUMA topology.",
7aacca6f 10885 "format" : {
44660702 10886 "cpus" : {
c2993fe5 10887 "description" : "CPUs accessing this NUMA node.",
44660702
DM
10888 "format_description" : "id[-id];...",
10889 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10890 "type" : "string"
10891 },
7aacca6f 10892 "hostnodes" : {
c2993fe5 10893 "description" : "Host NUMA nodes to use.",
44660702 10894 "format_description" : "id[-id];...",
7aacca6f 10895 "optional" : 1,
44660702
DM
10896 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10897 "type" : "string"
7aacca6f 10898 },
44660702 10899 "memory" : {
c2993fe5 10900 "description" : "Amount of memory this NUMA node provides.",
44660702
DM
10901 "optional" : 1,
10902 "type" : "number"
7aacca6f
DM
10903 },
10904 "policy" : {
c2993fe5 10905 "description" : "NUMA allocation policy.",
7aacca6f
DM
10906 "enum" : [
10907 "preferred",
10908 "bind",
10909 "interleave"
10910 ],
7aacca6f 10911 "optional" : 1,
44660702 10912 "type" : "string"
7aacca6f
DM
10913 }
10914 },
56122987 10915 "optional" : 1,
44660702 10916 "type" : "string"
56122987 10917 },
44660702
DM
10918 "onboot" : {
10919 "default" : 0,
10920 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 10921 "optional" : 1,
44660702 10922 "type" : "boolean"
56122987
DM
10923 },
10924 "ostype" : {
c2993fe5 10925 "description" : "Specify guest operating system.",
56122987
DM
10926 "enum" : [
10927 "other",
10928 "wxp",
10929 "w2k",
10930 "w2k3",
10931 "w2k8",
10932 "wvista",
10933 "win7",
10934 "win8",
10935 "l24",
10936 "l26",
10937 "solaris"
44660702 10938 ],
56122987 10939 "optional" : 1,
c2993fe5
DM
10940 "type" : "string",
10941 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
56122987 10942 },
44660702 10943 "parallel[n]" : {
c2993fe5 10944 "description" : "Map host parallel devices (n is 0 to 2).",
56122987 10945 "optional" : 1,
44660702 10946 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
10947 "type" : "string",
10948 "verbose_description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
56122987 10949 },
44660702
DM
10950 "pool" : {
10951 "description" : "Add the VM to the specified pool.",
10952 "format" : "pve-poolid",
56122987 10953 "optional" : 1,
44660702 10954 "type" : "string"
56122987 10955 },
44660702
DM
10956 "protection" : {
10957 "default" : 0,
c2993fe5 10958 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
56122987 10959 "optional" : 1,
44660702 10960 "type" : "boolean"
56122987 10961 },
44660702 10962 "reboot" : {
7aacca6f 10963 "default" : 1,
44660702
DM
10964 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
10965 "optional" : 1,
10966 "type" : "boolean"
56122987 10967 },
56122987 10968 "sata[n]" : {
44660702 10969 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 10970 "format" : {
7aacca6f 10971 "aio" : {
44660702 10972 "description" : "AIO type to use.",
56122987 10973 "enum" : [
7aacca6f
DM
10974 "native",
10975 "threads"
56122987 10976 ],
7aacca6f 10977 "optional" : 1,
44660702 10978 "type" : "string"
7aacca6f
DM
10979 },
10980 "backup" : {
7aacca6f 10981 "description" : "Whether the drive should be included when making backups.",
7aacca6f 10982 "optional" : 1,
44660702 10983 "type" : "boolean"
56122987 10984 },
44660702
DM
10985 "bps" : {
10986 "description" : "Maximum r/w speed speed in bytes per second.",
10987 "format_description" : "bps",
7aacca6f 10988 "optional" : 1,
44660702 10989 "type" : "integer"
56122987 10990 },
44660702
DM
10991 "bps_rd" : {
10992 "description" : "Maximum read speed speed in bytes per second.",
10993 "format_description" : "bps",
56122987 10994 "optional" : 1,
44660702 10995 "type" : "integer"
7aacca6f 10996 },
44660702
DM
10997 "bps_wr" : {
10998 "description" : "Maximum write speed speed in bytes per second.",
10999 "format_description" : "bps",
56122987 11000 "optional" : 1,
44660702 11001 "type" : "integer"
56122987 11002 },
7aacca6f 11003 "cache" : {
7aacca6f
DM
11004 "description" : "The drive's cache mode",
11005 "enum" : [
11006 "none",
11007 "writethrough",
11008 "writeback",
11009 "unsafe",
11010 "directsync"
11011 ],
44660702
DM
11012 "optional" : 1,
11013 "type" : "string"
56122987 11014 },
44660702
DM
11015 "cyls" : {
11016 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 11017 "optional" : 1,
7aacca6f 11018 "type" : "integer"
56122987 11019 },
7aacca6f
DM
11020 "detect_zeroes" : {
11021 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11022 "optional" : 1,
7aacca6f 11023 "type" : "boolean"
56122987 11024 },
44660702
DM
11025 "discard" : {
11026 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11027 "enum" : [
11028 "ignore",
11029 "on"
11030 ],
56122987 11031 "optional" : 1,
44660702 11032 "type" : "string"
56122987 11033 },
44660702
DM
11034 "file" : {
11035 "default_key" : 1,
11036 "description" : "The drive's backing volume.",
11037 "format" : "pve-volume-id-or-qm-path",
11038 "format_description" : "volume",
11039 "type" : "string"
56122987
DM
11040 },
11041 "format" : {
44660702 11042 "description" : "The drive's backing file's data format.",
56122987
DM
11043 "enum" : [
11044 "raw",
11045 "cow",
11046 "qcow",
11047 "qed",
11048 "qcow2",
11049 "vmdk",
11050 "cloop"
11051 ],
f004f5b9 11052 "format_description" : "image format",
56122987 11053 "optional" : 1,
44660702 11054 "type" : "string"
56122987 11055 },
7aacca6f 11056 "heads" : {
7aacca6f 11057 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11058 "optional" : 1,
11059 "type" : "integer"
56122987 11060 },
44660702
DM
11061 "iops" : {
11062 "description" : "Maximum r/w I/O speed in operations per second.",
11063 "format_description" : "iops",
11064 "optional" : 1,
11065 "type" : "integer"
56122987 11066 },
44660702
DM
11067 "iops_max" : {
11068 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11069 "format_description" : "iops",
56122987 11070 "optional" : 1,
44660702 11071 "type" : "integer"
56122987 11072 },
44660702
DM
11073 "iops_rd" : {
11074 "description" : "Maximum read I/O speed in operations per second.",
11075 "format_description" : "iops",
56122987 11076 "optional" : 1,
44660702 11077 "type" : "integer"
56122987 11078 },
44660702
DM
11079 "iops_rd_max" : {
11080 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 11081 "format_description" : "iops",
56122987 11082 "optional" : 1,
44660702 11083 "type" : "integer"
56122987 11084 },
44660702
DM
11085 "iops_wr" : {
11086 "description" : "Maximum write I/O speed in operations per second.",
11087 "format_description" : "iops",
7aacca6f 11088 "optional" : 1,
44660702 11089 "type" : "integer"
7aacca6f 11090 },
44660702
DM
11091 "iops_wr_max" : {
11092 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11093 "format_description" : "iops",
56122987 11094 "optional" : 1,
7aacca6f 11095 "type" : "integer"
56122987 11096 },
44660702
DM
11097 "mbps" : {
11098 "description" : "Maximum r/w speed speed in megabytes per second.",
11099 "format_description" : "mbps",
56122987 11100 "optional" : 1,
44660702 11101 "type" : "number"
56122987 11102 },
44660702
DM
11103 "mbps_max" : {
11104 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11105 "format_description" : "mbps",
7aacca6f 11106 "optional" : 1,
44660702 11107 "type" : "number"
7aacca6f 11108 },
44660702
DM
11109 "mbps_rd" : {
11110 "description" : "Maximum read speed speed in megabytes per second.",
11111 "format_description" : "mbps",
7aacca6f 11112 "optional" : 1,
44660702 11113 "type" : "number"
7aacca6f 11114 },
44660702
DM
11115 "mbps_rd_max" : {
11116 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11117 "format_description" : "mbps",
7aacca6f 11118 "optional" : 1,
44660702 11119 "type" : "number"
7aacca6f 11120 },
44660702
DM
11121 "mbps_wr" : {
11122 "description" : "Maximum write speed speed in megabytes per second.",
11123 "format_description" : "mbps",
7aacca6f 11124 "optional" : 1,
44660702 11125 "type" : "number"
7aacca6f
DM
11126 },
11127 "mbps_wr_max" : {
7aacca6f 11128 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
44660702 11129 "format_description" : "mbps",
7aacca6f 11130 "optional" : 1,
44660702 11131 "type" : "number"
7aacca6f 11132 },
44660702
DM
11133 "media" : {
11134 "default" : "disk",
11135 "description" : "The drive's media type.",
56122987 11136 "enum" : [
44660702
DM
11137 "cdrom",
11138 "disk"
56122987 11139 ],
56122987 11140 "optional" : 1,
44660702 11141 "type" : "string"
56122987 11142 },
44660702
DM
11143 "rerror" : {
11144 "description" : "Read error action.",
7aacca6f
DM
11145 "enum" : [
11146 "ignore",
44660702
DM
11147 "report",
11148 "stop"
7aacca6f 11149 ],
56122987 11150 "optional" : 1,
44660702 11151 "type" : "string"
56122987 11152 },
44660702
DM
11153 "secs" : {
11154 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 11155 "optional" : 1,
44660702 11156 "type" : "integer"
56122987 11157 },
44660702
DM
11158 "serial" : {
11159 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11160 "format" : "urlencoded",
11161 "format_description" : "serial",
11162 "maxLength" : 60,
11163 "optional" : 1,
11164 "type" : "string"
7aacca6f
DM
11165 },
11166 "size" : {
11167 "description" : "Disk size. This is purely informational and has no effect.",
44660702 11168 "format" : "disk-size",
f004f5b9 11169 "format_description" : "DiskSize",
56122987 11170 "optional" : 1,
44660702 11171 "type" : "string"
56122987 11172 },
44660702
DM
11173 "snapshot" : {
11174 "description" : "Whether the drive should be included when making snapshots.",
56122987 11175 "optional" : 1,
44660702 11176 "type" : "boolean"
56122987 11177 },
44660702
DM
11178 "trans" : {
11179 "description" : "Force disk geometry bios translation mode.",
56122987 11180 "enum" : [
44660702
DM
11181 "none",
11182 "lba",
11183 "auto"
7aacca6f 11184 ],
44660702
DM
11185 "optional" : 1,
11186 "type" : "string"
11187 },
11188 "volume" : {
11189 "alias" : "file"
56122987
DM
11190 },
11191 "werror" : {
56122987
DM
11192 "description" : "Write error action.",
11193 "enum" : [
11194 "enospc",
11195 "ignore",
11196 "report",
11197 "stop"
11198 ],
56122987 11199 "optional" : 1,
44660702
DM
11200 "type" : "string"
11201 }
11202 },
11203 "optional" : 1,
11204 "type" : "string"
11205 },
11206 "scsi[n]" : {
11207 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
11208 "format" : {
11209 "aio" : {
11210 "description" : "AIO type to use.",
11211 "enum" : [
11212 "native",
11213 "threads"
11214 ],
44660702
DM
11215 "optional" : 1,
11216 "type" : "string"
56122987 11217 },
7aacca6f 11218 "backup" : {
44660702 11219 "description" : "Whether the drive should be included when making backups.",
7aacca6f 11220 "optional" : 1,
44660702 11221 "type" : "boolean"
7aacca6f 11222 },
44660702
DM
11223 "bps" : {
11224 "description" : "Maximum r/w speed speed in bytes per second.",
11225 "format_description" : "bps",
7aacca6f 11226 "optional" : 1,
44660702 11227 "type" : "integer"
7aacca6f 11228 },
44660702
DM
11229 "bps_rd" : {
11230 "description" : "Maximum read speed speed in bytes per second.",
11231 "format_description" : "bps",
56122987 11232 "optional" : 1,
44660702 11233 "type" : "integer"
56122987 11234 },
44660702
DM
11235 "bps_wr" : {
11236 "description" : "Maximum write speed speed in bytes per second.",
11237 "format_description" : "bps",
7aacca6f 11238 "optional" : 1,
44660702 11239 "type" : "integer"
56122987 11240 },
44660702
DM
11241 "cache" : {
11242 "description" : "The drive's cache mode",
7aacca6f
DM
11243 "enum" : [
11244 "none",
44660702
DM
11245 "writethrough",
11246 "writeback",
11247 "unsafe",
11248 "directsync"
7aacca6f 11249 ],
56122987 11250 "optional" : 1,
44660702 11251 "type" : "string"
56122987 11252 },
7aacca6f
DM
11253 "cyls" : {
11254 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
11255 "optional" : 1,
44660702 11256 "type" : "integer"
7aacca6f 11257 },
44660702
DM
11258 "detect_zeroes" : {
11259 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11260 "optional" : 1,
44660702 11261 "type" : "boolean"
56122987 11262 },
44660702
DM
11263 "discard" : {
11264 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7aacca6f 11265 "enum" : [
44660702
DM
11266 "ignore",
11267 "on"
7aacca6f 11268 ],
7aacca6f 11269 "optional" : 1,
44660702 11270 "type" : "string"
56122987
DM
11271 },
11272 "file" : {
7aacca6f
DM
11273 "default_key" : 1,
11274 "description" : "The drive's backing volume.",
44660702
DM
11275 "format" : "pve-volume-id-or-qm-path",
11276 "format_description" : "volume",
7aacca6f 11277 "type" : "string"
56122987 11278 },
7aacca6f 11279 "format" : {
44660702 11280 "description" : "The drive's backing file's data format.",
56122987 11281 "enum" : [
7aacca6f
DM
11282 "raw",
11283 "cow",
11284 "qcow",
11285 "qed",
11286 "qcow2",
11287 "vmdk",
11288 "cloop"
56122987 11289 ],
f004f5b9 11290 "format_description" : "image format",
44660702
DM
11291 "optional" : 1,
11292 "type" : "string"
56122987 11293 },
44660702
DM
11294 "heads" : {
11295 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11296 "optional" : 1,
11297 "type" : "integer"
11298 },
11299 "iops" : {
11300 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 11301 "format_description" : "iops",
56122987 11302 "optional" : 1,
44660702 11303 "type" : "integer"
56122987 11304 },
44660702
DM
11305 "iops_max" : {
11306 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11307 "format_description" : "iops",
7aacca6f 11308 "optional" : 1,
44660702 11309 "type" : "integer"
56122987 11310 },
44660702
DM
11311 "iops_rd" : {
11312 "description" : "Maximum read I/O speed in operations per second.",
11313 "format_description" : "iops",
56122987 11314 "optional" : 1,
44660702 11315 "type" : "integer"
56122987 11316 },
44660702
DM
11317 "iops_rd_max" : {
11318 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11319 "format_description" : "iops",
11320 "optional" : 1,
11321 "type" : "integer"
56122987 11322 },
44660702
DM
11323 "iops_wr" : {
11324 "description" : "Maximum write I/O speed in operations per second.",
11325 "format_description" : "iops",
56122987 11326 "optional" : 1,
44660702 11327 "type" : "integer"
56122987 11328 },
44660702
DM
11329 "iops_wr_max" : {
11330 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11331 "format_description" : "iops",
56122987 11332 "optional" : 1,
56122987
DM
11333 "type" : "integer"
11334 },
44660702
DM
11335 "iothread" : {
11336 "description" : "Whether to use iothreads for this drive",
44660702
DM
11337 "optional" : 1,
11338 "type" : "boolean"
11339 },
11340 "mbps" : {
11341 "description" : "Maximum r/w speed speed in megabytes per second.",
11342 "format_description" : "mbps",
11343 "optional" : 1,
11344 "type" : "number"
11345 },
7aacca6f
DM
11346 "mbps_max" : {
11347 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 11348 "format_description" : "mbps",
56122987 11349 "optional" : 1,
44660702 11350 "type" : "number"
56122987 11351 },
44660702
DM
11352 "mbps_rd" : {
11353 "description" : "Maximum read speed speed in megabytes per second.",
11354 "format_description" : "mbps",
11355 "optional" : 1,
11356 "type" : "number"
56122987 11357 },
44660702
DM
11358 "mbps_rd_max" : {
11359 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11360 "format_description" : "mbps",
56122987 11361 "optional" : 1,
44660702 11362 "type" : "number"
56122987 11363 },
44660702
DM
11364 "mbps_wr" : {
11365 "description" : "Maximum write speed speed in megabytes per second.",
11366 "format_description" : "mbps",
56122987 11367 "optional" : 1,
44660702 11368 "type" : "number"
56122987 11369 },
44660702
DM
11370 "mbps_wr_max" : {
11371 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11372 "format_description" : "mbps",
7aacca6f 11373 "optional" : 1,
44660702 11374 "type" : "number"
56122987 11375 },
7aacca6f 11376 "media" : {
44660702 11377 "default" : "disk",
7aacca6f
DM
11378 "description" : "The drive's media type.",
11379 "enum" : [
11380 "cdrom",
11381 "disk"
11382 ],
56122987 11383 "optional" : 1,
44660702 11384 "type" : "string"
56122987 11385 },
44660702
DM
11386 "queues" : {
11387 "description" : "Number of queues.",
44660702
DM
11388 "minimum" : 2,
11389 "optional" : 1,
11390 "type" : "integer"
56122987 11391 },
7aacca6f 11392 "secs" : {
7aacca6f 11393 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11394 "optional" : 1,
11395 "type" : "integer"
11396 },
11397 "serial" : {
11398 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11399 "format" : "urlencoded",
11400 "format_description" : "serial",
11401 "maxLength" : 60,
11402 "optional" : 1,
11403 "type" : "string"
11404 },
11405 "size" : {
11406 "description" : "Disk size. This is purely informational and has no effect.",
11407 "format" : "disk-size",
f004f5b9 11408 "format_description" : "DiskSize",
44660702
DM
11409 "optional" : 1,
11410 "type" : "string"
11411 },
11412 "snapshot" : {
11413 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
11414 "optional" : 1,
11415 "type" : "boolean"
11416 },
11417 "trans" : {
11418 "description" : "Force disk geometry bios translation mode.",
11419 "enum" : [
11420 "none",
11421 "lba",
11422 "auto"
11423 ],
44660702
DM
11424 "optional" : 1,
11425 "type" : "string"
11426 },
11427 "volume" : {
11428 "alias" : "file"
11429 },
11430 "werror" : {
11431 "description" : "Write error action.",
11432 "enum" : [
11433 "enospc",
11434 "ignore",
11435 "report",
11436 "stop"
11437 ],
44660702
DM
11438 "optional" : 1,
11439 "type" : "string"
56122987
DM
11440 }
11441 },
7aacca6f 11442 "optional" : 1,
44660702 11443 "type" : "string"
56122987 11444 },
44660702
DM
11445 "scsihw" : {
11446 "default" : "lsi",
c2993fe5 11447 "description" : "SCSI controller model",
44660702
DM
11448 "enum" : [
11449 "lsi",
11450 "lsi53c810",
11451 "virtio-scsi-pci",
11452 "virtio-scsi-single",
11453 "megasas",
11454 "pvscsi"
11455 ],
7aacca6f 11456 "optional" : 1,
44660702 11457 "type" : "string"
7aacca6f 11458 },
44660702 11459 "serial[n]" : {
c2993fe5 11460 "description" : "Create a serial device inside the VM (n is 0 to 3)",
44660702
DM
11461 "optional" : 1,
11462 "pattern" : "(/dev/.+|socket)",
c2993fe5
DM
11463 "type" : "string",
11464 "verbose_description" : "\nCreate a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n"
44660702
DM
11465 },
11466 "shares" : {
11467 "default" : 1000,
11468 "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",
11469 "maximum" : 50000,
11470 "minimum" : 0,
11471 "optional" : 1,
11472 "type" : "integer"
11473 },
11474 "smbios1" : {
11475 "description" : "Specify SMBIOS type 1 fields.",
11476 "format" : "pve-qm-smbios1",
11477 "maxLength" : 256,
7aacca6f
DM
11478 "optional" : 1,
11479 "type" : "string"
11480 },
11481 "smp" : {
44660702 11482 "default" : 1,
7aacca6f 11483 "description" : "The number of CPUs. Please use option -sockets instead.",
44660702 11484 "minimum" : 1,
56122987 11485 "optional" : 1,
44660702
DM
11486 "type" : "integer"
11487 },
11488 "sockets" : {
7aacca6f 11489 "default" : 1,
44660702
DM
11490 "description" : "The number of CPU sockets.",
11491 "minimum" : 1,
11492 "optional" : 1,
11493 "type" : "integer"
7aacca6f 11494 },
44660702
DM
11495 "startdate" : {
11496 "default" : "now",
11497 "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'.",
11498 "optional" : 1,
11499 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
11500 "type" : "string",
11501 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
11502 },
11503 "startup" : {
11504 "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.",
11505 "format" : "pve-startup-order",
11506 "optional" : 1,
11507 "type" : "string",
11508 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
11509 },
11510 "storage" : {
11511 "description" : "Default storage.",
11512 "format" : "pve-storage-id",
7aacca6f 11513 "optional" : 1,
56122987
DM
11514 "type" : "string"
11515 },
44660702
DM
11516 "tablet" : {
11517 "default" : 1,
c2993fe5 11518 "description" : "Enable/disable the USB tablet device.",
56122987 11519 "optional" : 1,
c2993fe5
DM
11520 "type" : "boolean",
11521 "verbose_description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)."
44660702
DM
11522 },
11523 "tdf" : {
11524 "default" : 0,
11525 "description" : "Enable/disable time drift fix.",
11526 "optional" : 1,
11527 "type" : "boolean"
7aacca6f
DM
11528 },
11529 "template" : {
7aacca6f 11530 "default" : 0,
44660702 11531 "description" : "Enable/disable Template.",
7aacca6f
DM
11532 "optional" : 1,
11533 "type" : "boolean"
11534 },
44660702
DM
11535 "unique" : {
11536 "description" : "Assign a unique random ethernet address.",
7aacca6f 11537 "optional" : 1,
44660702
DM
11538 "requires" : "archive",
11539 "type" : "boolean"
56122987 11540 },
44660702 11541 "unused[n]" : {
c2993fe5 11542 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 11543 "format" : "pve-volume-id",
7aacca6f 11544 "optional" : 1,
44660702
DM
11545 "type" : "string"
11546 },
11547 "usb[n]" : {
c2993fe5 11548 "description" : "Configure an USB device (n is 0 to 4).",
56122987 11549 "format" : {
7aacca6f
DM
11550 "host" : {
11551 "default_key" : 1,
c2993fe5 11552 "description" : "The Host USB device or port or the value 'spice'. HOSTUSBDEVICE syntax is:\n\n 'bus-port(.port)*' (decimal numbers) or\n 'vendor_id:product_id' (hexadeciaml numbers) or\n 'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n",
7aacca6f 11553 "format" : "pve-qm-usb-device",
44660702
DM
11554 "format_description" : "HOSTUSBDEVICE|spice",
11555 "type" : "string"
7aacca6f 11556 },
56122987 11557 "usb3" : {
c2993fe5
DM
11558 "default" : 0,
11559 "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).",
56122987 11560 "optional" : 1,
56122987 11561 "type" : "boolean"
7aacca6f 11562 }
56122987 11563 },
56122987 11564 "optional" : 1,
44660702 11565 "type" : "string"
56122987 11566 },
44660702
DM
11567 "vcpus" : {
11568 "default" : 0,
11569 "description" : "Number of hotplugged vcpus.",
11570 "minimum" : 1,
56122987 11571 "optional" : 1,
44660702 11572 "type" : "integer"
7aacca6f 11573 },
44660702 11574 "vga" : {
c2993fe5 11575 "description" : "Select the VGA type.",
44660702
DM
11576 "enum" : [
11577 "std",
11578 "cirrus",
11579 "vmware",
11580 "qxl",
11581 "serial0",
11582 "serial1",
11583 "serial2",
11584 "serial3",
11585 "qxl2",
11586 "qxl3",
11587 "qxl4"
11588 ],
11589 "optional" : 1,
c2993fe5
DM
11590 "type" : "string",
11591 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
7aacca6f 11592 },
44660702
DM
11593 "virtio[n]" : {
11594 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
11595 "format" : {
11596 "aio" : {
11597 "description" : "AIO type to use.",
11598 "enum" : [
11599 "native",
11600 "threads"
11601 ],
44660702
DM
11602 "optional" : 1,
11603 "type" : "string"
11604 },
11605 "backup" : {
11606 "description" : "Whether the drive should be included when making backups.",
44660702
DM
11607 "optional" : 1,
11608 "type" : "boolean"
11609 },
11610 "bps" : {
11611 "description" : "Maximum r/w speed speed in bytes per second.",
11612 "format_description" : "bps",
11613 "optional" : 1,
11614 "type" : "integer"
11615 },
11616 "bps_rd" : {
11617 "description" : "Maximum read speed speed in bytes per second.",
11618 "format_description" : "bps",
11619 "optional" : 1,
11620 "type" : "integer"
11621 },
11622 "bps_wr" : {
11623 "description" : "Maximum write speed speed in bytes per second.",
11624 "format_description" : "bps",
11625 "optional" : 1,
11626 "type" : "integer"
11627 },
11628 "cache" : {
11629 "description" : "The drive's cache mode",
11630 "enum" : [
11631 "none",
11632 "writethrough",
11633 "writeback",
11634 "unsafe",
11635 "directsync"
11636 ],
44660702
DM
11637 "optional" : 1,
11638 "type" : "string"
11639 },
11640 "cyls" : {
11641 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
11642 "optional" : 1,
11643 "type" : "integer"
11644 },
11645 "detect_zeroes" : {
11646 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
11647 "optional" : 1,
11648 "type" : "boolean"
11649 },
11650 "discard" : {
11651 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11652 "enum" : [
11653 "ignore",
11654 "on"
11655 ],
44660702
DM
11656 "optional" : 1,
11657 "type" : "string"
11658 },
11659 "file" : {
11660 "default_key" : 1,
11661 "description" : "The drive's backing volume.",
11662 "format" : "pve-volume-id-or-qm-path",
11663 "format_description" : "volume",
11664 "type" : "string"
11665 },
11666 "format" : {
11667 "description" : "The drive's backing file's data format.",
11668 "enum" : [
11669 "raw",
11670 "cow",
11671 "qcow",
11672 "qed",
11673 "qcow2",
11674 "vmdk",
11675 "cloop"
11676 ],
f004f5b9 11677 "format_description" : "image format",
44660702
DM
11678 "optional" : 1,
11679 "type" : "string"
11680 },
11681 "heads" : {
11682 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11683 "optional" : 1,
11684 "type" : "integer"
11685 },
11686 "iops" : {
11687 "description" : "Maximum r/w I/O speed in operations per second.",
11688 "format_description" : "iops",
11689 "optional" : 1,
11690 "type" : "integer"
11691 },
11692 "iops_max" : {
11693 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11694 "format_description" : "iops",
11695 "optional" : 1,
11696 "type" : "integer"
11697 },
11698 "iops_rd" : {
11699 "description" : "Maximum read I/O speed in operations per second.",
11700 "format_description" : "iops",
11701 "optional" : 1,
11702 "type" : "integer"
11703 },
11704 "iops_rd_max" : {
11705 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11706 "format_description" : "iops",
11707 "optional" : 1,
11708 "type" : "integer"
11709 },
11710 "iops_wr" : {
11711 "description" : "Maximum write I/O speed in operations per second.",
11712 "format_description" : "iops",
11713 "optional" : 1,
11714 "type" : "integer"
11715 },
11716 "iops_wr_max" : {
11717 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11718 "format_description" : "iops",
11719 "optional" : 1,
11720 "type" : "integer"
11721 },
11722 "iothread" : {
11723 "description" : "Whether to use iothreads for this drive",
44660702
DM
11724 "optional" : 1,
11725 "type" : "boolean"
11726 },
11727 "mbps" : {
11728 "description" : "Maximum r/w speed speed in megabytes per second.",
11729 "format_description" : "mbps",
11730 "optional" : 1,
11731 "type" : "number"
11732 },
11733 "mbps_max" : {
11734 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11735 "format_description" : "mbps",
11736 "optional" : 1,
11737 "type" : "number"
11738 },
11739 "mbps_rd" : {
11740 "description" : "Maximum read speed speed in megabytes per second.",
11741 "format_description" : "mbps",
11742 "optional" : 1,
11743 "type" : "number"
11744 },
11745 "mbps_rd_max" : {
11746 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11747 "format_description" : "mbps",
11748 "optional" : 1,
11749 "type" : "number"
11750 },
11751 "mbps_wr" : {
11752 "description" : "Maximum write speed speed in megabytes per second.",
11753 "format_description" : "mbps",
11754 "optional" : 1,
11755 "type" : "number"
11756 },
11757 "mbps_wr_max" : {
11758 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11759 "format_description" : "mbps",
11760 "optional" : 1,
11761 "type" : "number"
11762 },
11763 "media" : {
11764 "default" : "disk",
11765 "description" : "The drive's media type.",
11766 "enum" : [
11767 "cdrom",
11768 "disk"
11769 ],
44660702
DM
11770 "optional" : 1,
11771 "type" : "string"
11772 },
11773 "rerror" : {
11774 "description" : "Read error action.",
11775 "enum" : [
11776 "ignore",
11777 "report",
11778 "stop"
11779 ],
44660702
DM
11780 "optional" : 1,
11781 "type" : "string"
11782 },
11783 "secs" : {
11784 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11785 "optional" : 1,
11786 "type" : "integer"
11787 },
11788 "serial" : {
11789 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11790 "format" : "urlencoded",
11791 "format_description" : "serial",
11792 "maxLength" : 60,
11793 "optional" : 1,
11794 "type" : "string"
11795 },
11796 "size" : {
11797 "description" : "Disk size. This is purely informational and has no effect.",
11798 "format" : "disk-size",
f004f5b9 11799 "format_description" : "DiskSize",
44660702
DM
11800 "optional" : 1,
11801 "type" : "string"
11802 },
11803 "snapshot" : {
11804 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
11805 "optional" : 1,
11806 "type" : "boolean"
11807 },
11808 "trans" : {
11809 "description" : "Force disk geometry bios translation mode.",
11810 "enum" : [
11811 "none",
11812 "lba",
11813 "auto"
11814 ],
44660702
DM
11815 "optional" : 1,
11816 "type" : "string"
11817 },
11818 "volume" : {
11819 "alias" : "file"
11820 },
11821 "werror" : {
11822 "description" : "Write error action.",
11823 "enum" : [
11824 "enospc",
11825 "ignore",
11826 "report",
11827 "stop"
11828 ],
44660702
DM
11829 "optional" : 1,
11830 "type" : "string"
11831 }
11832 },
11833 "optional" : 1,
11834 "type" : "string"
7aacca6f 11835 },
44660702
DM
11836 "vmid" : {
11837 "description" : "The (unique) ID of the VM.",
11838 "format" : "pve-vmid",
11839 "minimum" : 1,
11840 "type" : "integer"
11841 },
11842 "watchdog" : {
c2993fe5 11843 "description" : "Create a virtual hardware watchdog device.",
44660702 11844 "format" : "pve-qm-watchdog",
7aacca6f 11845 "optional" : 1,
c2993fe5
DM
11846 "type" : "string",
11847 "verbose_description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)"
56122987 11848 }
44660702 11849 }
56122987 11850 },
56122987 11851 "permissions" : {
44660702
DM
11852 "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.",
11853 "user" : "all"
56122987 11854 },
44660702
DM
11855 "protected" : 1,
11856 "proxyto" : "node",
56122987 11857 "returns" : {
44660702 11858 "type" : "string"
7aacca6f 11859 }
56122987 11860 }
7aacca6f 11861 },
44660702 11862 "leaf" : 0,
7aacca6f 11863 "path" : "/nodes/{node}/qemu",
44660702 11864 "text" : "qemu"
56122987
DM
11865 },
11866 {
11867 "children" : [
11868 {
56122987
DM
11869 "children" : [
11870 {
56122987 11871 "info" : {
44660702
DM
11872 "GET" : {
11873 "description" : "Get container configuration.",
11874 "method" : "GET",
11875 "name" : "vm_config",
11876 "parameters" : {
11877 "additionalProperties" : 0,
11878 "properties" : {
11879 "node" : {
11880 "description" : "The cluster node name.",
11881 "format" : "pve-node",
11882 "type" : "string"
11883 },
11884 "vmid" : {
11885 "description" : "The (unique) ID of the VM.",
11886 "format" : "pve-vmid",
11887 "minimum" : 1,
11888 "type" : "integer"
11889 }
11890 }
11891 },
11892 "permissions" : {
11893 "check" : [
11894 "perm",
11895 "/vms/{vmid}",
11896 [
11897 "VM.Audit"
11898 ]
11899 ]
11900 },
11901 "proxyto" : "node",
11902 "returns" : {
11903 "properties" : {
11904 "digest" : {
11905 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
11906 "type" : "string"
11907 }
11908 },
11909 "type" : "object"
11910 }
11911 },
56122987 11912 "PUT" : {
44660702
DM
11913 "description" : "Set container options.",
11914 "method" : "PUT",
11915 "name" : "update_vm",
56122987 11916 "parameters" : {
44660702 11917 "additionalProperties" : 0,
56122987 11918 "properties" : {
44660702
DM
11919 "arch" : {
11920 "default" : "amd64",
11921 "description" : "OS architecture type.",
11922 "enum" : [
11923 "amd64",
11924 "i386"
11925 ],
7aacca6f 11926 "optional" : 1,
44660702
DM
11927 "type" : "string"
11928 },
11929 "cmode" : {
7aacca6f 11930 "default" : "tty",
44660702 11931 "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
11932 "enum" : [
11933 "shell",
11934 "console",
11935 "tty"
11936 ],
44660702
DM
11937 "optional" : 1,
11938 "type" : "string"
7aacca6f 11939 },
44660702
DM
11940 "console" : {
11941 "default" : 1,
11942 "description" : "Attach a console device (/dev/console) to the container.",
7aacca6f 11943 "optional" : 1,
44660702 11944 "type" : "boolean"
7aacca6f 11945 },
44660702
DM
11946 "cpulimit" : {
11947 "default" : 0,
11948 "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.",
11949 "maximum" : 128,
7aacca6f 11950 "minimum" : 0,
7aacca6f 11951 "optional" : 1,
44660702 11952 "type" : "number"
7aacca6f 11953 },
44660702
DM
11954 "cpuunits" : {
11955 "default" : 1024,
11956 "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.",
11957 "maximum" : 500000,
11958 "minimum" : 0,
11959 "optional" : 1,
11960 "type" : "integer"
7aacca6f 11961 },
44660702
DM
11962 "delete" : {
11963 "description" : "A list of settings you want to delete.",
11964 "format" : "pve-configid-list",
7aacca6f 11965 "optional" : 1,
44660702 11966 "type" : "string"
7aacca6f 11967 },
44660702
DM
11968 "description" : {
11969 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 11970 "optional" : 1,
44660702 11971 "type" : "string"
7aacca6f 11972 },
44660702
DM
11973 "digest" : {
11974 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
11975 "maxLength" : 40,
7aacca6f 11976 "optional" : 1,
44660702 11977 "type" : "string"
7aacca6f 11978 },
44660702
DM
11979 "hostname" : {
11980 "description" : "Set a host name for the container.",
11981 "format" : "dns-name",
11982 "maxLength" : 255,
56122987 11983 "optional" : 1,
44660702
DM
11984 "type" : "string"
11985 },
11986 "lock" : {
11987 "description" : "Lock/unlock the VM.",
11988 "enum" : [
11989 "migrate",
11990 "backup",
11991 "snapshot",
11992 "rollback"
11993 ],
11994 "optional" : 1,
11995 "type" : "string"
11996 },
11997 "memory" : {
11998 "default" : 512,
11999 "description" : "Amount of RAM for the VM in MB.",
12000 "minimum" : 16,
12001 "optional" : 1,
12002 "type" : "integer"
7aacca6f
DM
12003 },
12004 "mp[n]" : {
c2993fe5 12005 "description" : "Use volume as container mount point.",
7aacca6f 12006 "format" : {
7aacca6f
DM
12007 "acl" : {
12008 "description" : "Explicitly enable or disable ACL support.",
7aacca6f 12009 "optional" : 1,
44660702 12010 "type" : "boolean"
7aacca6f
DM
12011 },
12012 "backup" : {
12013 "description" : "Whether to include the mountpoint in backups.",
12014 "optional" : 1,
44660702 12015 "type" : "boolean"
7aacca6f
DM
12016 },
12017 "mp" : {
12018 "description" : "Path to the mountpoint as seen from inside the container.",
7aacca6f 12019 "format" : "pve-lxc-mp-string",
44660702
DM
12020 "format_description" : "Path",
12021 "type" : "string"
12022 },
12023 "quota" : {
12024 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12025 "optional" : 1,
12026 "type" : "boolean"
12027 },
12028 "ro" : {
12029 "description" : "Read-only mountpoint (not supported with bind mounts)",
44660702
DM
12030 "optional" : 1,
12031 "type" : "boolean"
12032 },
12033 "size" : {
12034 "description" : "Volume size (read only value).",
12035 "format" : "disk-size",
12036 "format_description" : "DiskSize",
12037 "optional" : 1,
12038 "type" : "string"
12039 },
12040 "volume" : {
12041 "default_key" : 1,
12042 "description" : "Volume, device or directory to mount into the container.",
12043 "format" : "pve-lxc-mp-string",
12044 "format_description" : "volume",
12045 "type" : "string"
12046 }
12047 },
7aacca6f 12048 "optional" : 1,
44660702 12049 "type" : "string"
56122987 12050 },
44660702
DM
12051 "nameserver" : {
12052 "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.",
12053 "format" : "address-list",
56122987 12054 "optional" : 1,
44660702 12055 "type" : "string"
56122987
DM
12056 },
12057 "net[n]" : {
44660702 12058 "description" : "Specifies network interfaces for the container.",
56122987 12059 "format" : {
44660702
DM
12060 "bridge" : {
12061 "description" : "Bridge to attach the network device to.",
f004f5b9 12062 "format_description" : "bridge",
56122987 12063 "optional" : 1,
44660702
DM
12064 "pattern" : "[-_.\\w\\d]+",
12065 "type" : "string"
56122987 12066 },
44660702
DM
12067 "firewall" : {
12068 "description" : "Controls whether this interface's firewall rules should be used.",
56122987 12069 "optional" : 1,
44660702 12070 "type" : "boolean"
56122987 12071 },
44660702
DM
12072 "gw" : {
12073 "description" : "Default gateway for IPv4 traffic.",
12074 "format" : "ipv4",
12075 "format_description" : "GatewayIPv4",
56122987 12076 "optional" : 1,
44660702 12077 "type" : "string"
56122987
DM
12078 },
12079 "gw6" : {
7aacca6f 12080 "description" : "Default gateway for IPv6 traffic.",
44660702
DM
12081 "format" : "ipv6",
12082 "format_description" : "GatewayIPv6",
7aacca6f 12083 "optional" : 1,
56122987
DM
12084 "type" : "string"
12085 },
44660702 12086 "hwaddr" : {
f004f5b9
DM
12087 "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)",
12088 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
12089 "optional" : 1,
12090 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
12091 "type" : "string"
12092 },
12093 "ip" : {
12094 "description" : "IPv4 address in CIDR format.",
12095 "format" : "pve-ipv4-config",
12096 "format_description" : "IPv4Format/CIDR",
56122987 12097 "optional" : 1,
44660702 12098 "type" : "string"
56122987 12099 },
7aacca6f 12100 "ip6" : {
7aacca6f
DM
12101 "description" : "IPv6 address in CIDR format.",
12102 "format" : "pve-ipv6-config",
44660702 12103 "format_description" : "IPv6Format/CIDR",
7aacca6f 12104 "optional" : 1,
44660702 12105 "type" : "string"
56122987 12106 },
44660702
DM
12107 "mtu" : {
12108 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702 12109 "minimum" : 64,
56122987 12110 "optional" : 1,
44660702 12111 "type" : "integer"
56122987
DM
12112 },
12113 "name" : {
44660702 12114 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 12115 "format_description" : "string",
56122987 12116 "pattern" : "[-_.\\w\\d]+",
44660702 12117 "type" : "string"
56122987 12118 },
44660702
DM
12119 "rate" : {
12120 "description" : "Apply rate limiting to the interface",
12121 "format_description" : "mbps",
56122987 12122 "optional" : 1,
44660702 12123 "type" : "number"
7aacca6f 12124 },
44660702
DM
12125 "tag" : {
12126 "description" : "VLAN tag for this interface.",
44660702 12127 "maximum" : "4094",
c2993fe5 12128 "minimum" : "1",
56122987 12129 "optional" : 1,
7aacca6f 12130 "type" : "integer"
56122987 12131 },
44660702
DM
12132 "trunks" : {
12133 "description" : "VLAN ids to pass through the interface",
12134 "format_description" : "vlanid[;vlanid...]",
12135 "optional" : 1,
12136 "pattern" : "(?^:\\d+(?:;\\d+)*)",
12137 "type" : "string"
12138 },
12139 "type" : {
12140 "description" : "Network interface type.",
12141 "enum" : [
12142 "veth"
12143 ],
56122987 12144 "optional" : 1,
44660702 12145 "type" : "string"
56122987
DM
12146 }
12147 },
7aacca6f 12148 "optional" : 1,
56122987
DM
12149 "type" : "string"
12150 },
44660702
DM
12151 "node" : {
12152 "description" : "The cluster node name.",
12153 "format" : "pve-node",
12154 "type" : "string"
56122987 12155 },
44660702
DM
12156 "onboot" : {
12157 "default" : 0,
12158 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 12159 "optional" : 1,
44660702 12160 "type" : "boolean"
56122987 12161 },
44660702
DM
12162 "ostype" : {
12163 "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.",
12164 "enum" : [
12165 "debian",
12166 "ubuntu",
12167 "centos",
12168 "fedora",
12169 "opensuse",
12170 "archlinux",
12171 "alpine",
12172 "unmanaged"
12173 ],
56122987 12174 "optional" : 1,
44660702 12175 "type" : "string"
56122987 12176 },
44660702
DM
12177 "protection" : {
12178 "default" : 0,
12179 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
56122987 12180 "optional" : 1,
44660702 12181 "type" : "boolean"
56122987 12182 },
7aacca6f
DM
12183 "rootfs" : {
12184 "description" : "Use volume as container root.",
56122987
DM
12185 "format" : {
12186 "acl" : {
44660702 12187 "description" : "Explicitly enable or disable ACL support.",
7aacca6f
DM
12188 "optional" : 1,
12189 "type" : "boolean"
56122987 12190 },
44660702
DM
12191 "quota" : {
12192 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12193 "optional" : 1,
12194 "type" : "boolean"
12195 },
12196 "ro" : {
12197 "description" : "Read-only mountpoint (not supported with bind mounts)",
56122987 12198 "optional" : 1,
44660702
DM
12199 "type" : "boolean"
12200 },
12201 "size" : {
7aacca6f 12202 "description" : "Volume size (read only value).",
44660702 12203 "format" : "disk-size",
56122987 12204 "format_description" : "DiskSize",
56122987 12205 "optional" : 1,
44660702 12206 "type" : "string"
7aacca6f
DM
12207 },
12208 "volume" : {
7aacca6f
DM
12209 "default_key" : 1,
12210 "description" : "Volume, device or directory to mount into the container.",
44660702
DM
12211 "format" : "pve-lxc-mp-string",
12212 "format_description" : "volume",
7aacca6f 12213 "type" : "string"
56122987 12214 }
44660702
DM
12215 },
12216 "optional" : 1,
12217 "type" : "string"
12218 },
12219 "searchdomain" : {
12220 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
12221 "format" : "dns-name-list",
12222 "optional" : 1,
12223 "type" : "string"
12224 },
12225 "startup" : {
12226 "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.",
12227 "format" : "pve-startup-order",
12228 "optional" : 1,
12229 "type" : "string",
12230 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
12231 },
12232 "swap" : {
12233 "default" : 512,
12234 "description" : "Amount of SWAP for the VM in MB.",
12235 "minimum" : 0,
12236 "optional" : 1,
12237 "type" : "integer"
56122987 12238 },
56122987 12239 "template" : {
44660702 12240 "default" : 0,
7aacca6f 12241 "description" : "Enable/disable Template.",
56122987 12242 "optional" : 1,
44660702 12243 "type" : "boolean"
56122987 12244 },
44660702
DM
12245 "tty" : {
12246 "default" : 2,
12247 "description" : "Specify the number of tty available to the container",
12248 "maximum" : 6,
12249 "minimum" : 0,
12250 "optional" : 1,
12251 "type" : "integer"
56122987 12252 },
44660702
DM
12253 "unprivileged" : {
12254 "default" : 0,
12255 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
56122987 12256 "optional" : 1,
44660702 12257 "type" : "boolean"
56122987 12258 },
44660702 12259 "unused[n]" : {
c2993fe5 12260 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 12261 "format" : "pve-volume-id",
56122987 12262 "optional" : 1,
44660702
DM
12263 "type" : "string"
12264 },
12265 "vmid" : {
12266 "description" : "The (unique) ID of the VM.",
12267 "format" : "pve-vmid",
12268 "minimum" : 1,
12269 "type" : "integer"
56122987 12270 }
44660702 12271 }
56122987 12272 },
56122987
DM
12273 "permissions" : {
12274 "check" : [
12275 "perm",
12276 "/vms/{vmid}",
12277 [
12278 "VM.Config.Disk",
12279 "VM.Config.CPU",
12280 "VM.Config.Memory",
12281 "VM.Config.Network",
12282 "VM.Config.Options"
12283 ],
12284 "any",
12285 1
12286 ]
12287 },
44660702
DM
12288 "protected" : 1,
12289 "proxyto" : "node",
56122987
DM
12290 "returns" : {
12291 "type" : "null"
7aacca6f 12292 }
56122987 12293 }
7aacca6f 12294 },
44660702 12295 "leaf" : 1,
7aacca6f 12296 "path" : "/nodes/{node}/lxc/{vmid}/config",
44660702 12297 "text" : "config"
56122987
DM
12298 },
12299 {
56122987
DM
12300 "children" : [
12301 {
12302 "info" : {
12303 "GET" : {
44660702 12304 "description" : "Get virtual machine status.",
7aacca6f 12305 "method" : "GET",
44660702 12306 "name" : "vm_status",
56122987 12307 "parameters" : {
44660702 12308 "additionalProperties" : 0,
56122987 12309 "properties" : {
56122987 12310 "node" : {
44660702 12311 "description" : "The cluster node name.",
56122987 12312 "format" : "pve-node",
44660702 12313 "type" : "string"
7aacca6f
DM
12314 },
12315 "vmid" : {
12316 "description" : "The (unique) ID of the VM.",
44660702 12317 "format" : "pve-vmid",
7aacca6f 12318 "minimum" : 1,
44660702 12319 "type" : "integer"
56122987 12320 }
44660702 12321 }
7aacca6f
DM
12322 },
12323 "permissions" : {
12324 "check" : [
12325 "perm",
12326 "/vms/{vmid}",
12327 [
12328 "VM.Audit"
12329 ]
12330 ]
12331 },
44660702 12332 "protected" : 1,
7aacca6f 12333 "proxyto" : "node",
44660702
DM
12334 "returns" : {
12335 "type" : "object"
12336 }
56122987
DM
12337 }
12338 },
44660702
DM
12339 "leaf" : 1,
12340 "path" : "/nodes/{node}/lxc/{vmid}/status/current",
56122987
DM
12341 "text" : "current"
12342 },
12343 {
56122987
DM
12344 "info" : {
12345 "POST" : {
7aacca6f 12346 "description" : "Start the container.",
44660702 12347 "method" : "POST",
7aacca6f 12348 "name" : "vm_start",
56122987
DM
12349 "parameters" : {
12350 "additionalProperties" : 0,
12351 "properties" : {
56122987 12352 "node" : {
7aacca6f 12353 "description" : "The cluster node name.",
44660702
DM
12354 "format" : "pve-node",
12355 "type" : "string"
56122987 12356 },
7aacca6f 12357 "skiplock" : {
44660702 12358 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 12359 "optional" : 1,
44660702 12360 "type" : "boolean"
7aacca6f 12361 },
56122987 12362 "vmid" : {
7aacca6f 12363 "description" : "The (unique) ID of the VM.",
44660702 12364 "format" : "pve-vmid",
56122987 12365 "minimum" : 1,
44660702 12366 "type" : "integer"
56122987
DM
12367 }
12368 }
12369 },
12370 "permissions" : {
12371 "check" : [
12372 "perm",
12373 "/vms/{vmid}",
12374 [
12375 "VM.PowerMgmt"
12376 ]
12377 ]
12378 },
44660702 12379 "protected" : 1,
7aacca6f 12380 "proxyto" : "node",
44660702
DM
12381 "returns" : {
12382 "type" : "string"
12383 }
12384 }
12385 },
12386 "leaf" : 1,
12387 "path" : "/nodes/{node}/lxc/{vmid}/status/start",
12388 "text" : "start"
12389 },
12390 {
12391 "info" : {
12392 "POST" : {
12393 "description" : "Stop the container. This will abruptly stop all processes running in the container.",
7aacca6f
DM
12394 "method" : "POST",
12395 "name" : "vm_stop",
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
DM
12404 "skiplock" : {
12405 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
12406 "optional" : 1,
12407 "type" : "boolean"
7aacca6f
DM
12408 },
12409 "vmid" : {
44660702 12410 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12411 "format" : "pve-vmid",
12412 "minimum" : 1,
7aacca6f 12413 "type" : "integer"
7aacca6f 12414 }
44660702
DM
12415 }
12416 },
12417 "permissions" : {
12418 "check" : [
12419 "perm",
12420 "/vms/{vmid}",
12421 [
12422 "VM.PowerMgmt"
12423 ]
12424 ]
7aacca6f 12425 },
44660702
DM
12426 "protected" : 1,
12427 "proxyto" : "node",
12428 "returns" : {
12429 "type" : "string"
12430 }
56122987 12431 }
7aacca6f 12432 },
7aacca6f 12433 "leaf" : 1,
44660702
DM
12434 "path" : "/nodes/{node}/lxc/{vmid}/status/stop",
12435 "text" : "stop"
56122987
DM
12436 },
12437 {
56122987
DM
12438 "info" : {
12439 "POST" : {
44660702
DM
12440 "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.",
12441 "method" : "POST",
7aacca6f 12442 "name" : "vm_shutdown",
56122987 12443 "parameters" : {
44660702 12444 "additionalProperties" : 0,
56122987 12445 "properties" : {
7aacca6f 12446 "forceStop" : {
44660702 12447 "default" : 0,
7aacca6f
DM
12448 "description" : "Make sure the Container stops.",
12449 "optional" : 1,
44660702
DM
12450 "type" : "boolean"
12451 },
12452 "node" : {
12453 "description" : "The cluster node name.",
12454 "format" : "pve-node",
12455 "type" : "string"
7aacca6f
DM
12456 },
12457 "timeout" : {
7aacca6f 12458 "default" : 60,
44660702
DM
12459 "description" : "Wait maximal timeout seconds.",
12460 "minimum" : 0,
56122987 12461 "optional" : 1,
44660702 12462 "type" : "integer"
56122987
DM
12463 },
12464 "vmid" : {
7aacca6f 12465 "description" : "The (unique) ID of the VM.",
44660702
DM
12466 "format" : "pve-vmid",
12467 "minimum" : 1,
7aacca6f 12468 "type" : "integer"
56122987 12469 }
44660702 12470 }
56122987
DM
12471 },
12472 "permissions" : {
12473 "check" : [
12474 "perm",
12475 "/vms/{vmid}",
12476 [
12477 "VM.PowerMgmt"
12478 ]
12479 ]
12480 },
44660702
DM
12481 "protected" : 1,
12482 "proxyto" : "node",
7aacca6f
DM
12483 "returns" : {
12484 "type" : "string"
12485 }
56122987
DM
12486 }
12487 },
44660702
DM
12488 "leaf" : 1,
12489 "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown",
7aacca6f 12490 "text" : "shutdown"
56122987
DM
12491 },
12492 {
56122987
DM
12493 "info" : {
12494 "POST" : {
7aacca6f 12495 "description" : "Suspend the container.",
7aacca6f 12496 "method" : "POST",
7aacca6f 12497 "name" : "vm_suspend",
56122987
DM
12498 "parameters" : {
12499 "additionalProperties" : 0,
12500 "properties" : {
44660702
DM
12501 "node" : {
12502 "description" : "The cluster node name.",
12503 "format" : "pve-node",
12504 "type" : "string"
12505 },
7aacca6f 12506 "vmid" : {
7aacca6f
DM
12507 "description" : "The (unique) ID of the VM.",
12508 "format" : "pve-vmid",
44660702
DM
12509 "minimum" : 1,
12510 "type" : "integer"
56122987
DM
12511 }
12512 }
7aacca6f 12513 },
56122987
DM
12514 "permissions" : {
12515 "check" : [
12516 "perm",
12517 "/vms/{vmid}",
12518 [
12519 "VM.PowerMgmt"
12520 ]
12521 ]
12522 },
7aacca6f 12523 "protected" : 1,
44660702
DM
12524 "proxyto" : "node",
12525 "returns" : {
12526 "type" : "string"
12527 }
12528 }
12529 },
12530 "leaf" : 1,
12531 "path" : "/nodes/{node}/lxc/{vmid}/status/suspend",
12532 "text" : "suspend"
12533 },
12534 {
12535 "info" : {
12536 "POST" : {
12537 "description" : "Resume the container.",
12538 "method" : "POST",
12539 "name" : "vm_resume",
56122987 12540 "parameters" : {
44660702 12541 "additionalProperties" : 0,
56122987
DM
12542 "properties" : {
12543 "node" : {
7aacca6f 12544 "description" : "The cluster node name.",
44660702
DM
12545 "format" : "pve-node",
12546 "type" : "string"
56122987
DM
12547 },
12548 "vmid" : {
7aacca6f 12549 "description" : "The (unique) ID of the VM.",
56122987 12550 "format" : "pve-vmid",
44660702
DM
12551 "minimum" : 1,
12552 "type" : "integer"
56122987 12553 }
44660702
DM
12554 }
12555 },
12556 "permissions" : {
12557 "check" : [
12558 "perm",
12559 "/vms/{vmid}",
12560 [
12561 "VM.PowerMgmt"
12562 ]
12563 ]
56122987 12564 },
44660702
DM
12565 "protected" : 1,
12566 "proxyto" : "node",
12567 "returns" : {
12568 "type" : "string"
12569 }
7aacca6f
DM
12570 }
12571 },
44660702
DM
12572 "leaf" : 1,
12573 "path" : "/nodes/{node}/lxc/{vmid}/status/resume",
7aacca6f
DM
12574 "text" : "resume"
12575 }
12576 ],
12577 "info" : {
12578 "GET" : {
7aacca6f 12579 "description" : "Directory index",
44660702 12580 "method" : "GET",
7aacca6f 12581 "name" : "vmcmdidx",
7aacca6f
DM
12582 "parameters" : {
12583 "additionalProperties" : 0,
12584 "properties" : {
12585 "node" : {
12586 "description" : "The cluster node name.",
44660702
DM
12587 "format" : "pve-node",
12588 "type" : "string"
56122987 12589 },
7aacca6f 12590 "vmid" : {
44660702 12591 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12592 "format" : "pve-vmid",
12593 "minimum" : 1,
44660702 12594 "type" : "integer"
7aacca6f 12595 }
56122987
DM
12596 }
12597 },
44660702
DM
12598 "permissions" : {
12599 "user" : "all"
12600 },
12601 "proxyto" : "node",
7aacca6f 12602 "returns" : {
7aacca6f
DM
12603 "items" : {
12604 "properties" : {
12605 "subdir" : {
12606 "type" : "string"
12607 }
12608 },
12609 "type" : "object"
12610 },
12611 "links" : [
12612 {
44660702
DM
12613 "href" : "{subdir}",
12614 "rel" : "child"
7aacca6f 12615 }
44660702
DM
12616 ],
12617 "type" : "array"
7aacca6f
DM
12618 }
12619 }
44660702
DM
12620 },
12621 "leaf" : 0,
12622 "path" : "/nodes/{node}/lxc/{vmid}/status",
12623 "text" : "status"
7aacca6f
DM
12624 },
12625 {
7aacca6f 12626 "children" : [
56122987 12627 {
7aacca6f
DM
12628 "children" : [
12629 {
12630 "info" : {
12631 "POST" : {
7aacca6f 12632 "description" : "Rollback LXC state to specified snapshot.",
7aacca6f 12633 "method" : "POST",
44660702 12634 "name" : "rollback",
7aacca6f 12635 "parameters" : {
44660702 12636 "additionalProperties" : 0,
7aacca6f 12637 "properties" : {
44660702
DM
12638 "node" : {
12639 "description" : "The cluster node name.",
12640 "format" : "pve-node",
12641 "type" : "string"
12642 },
7aacca6f 12643 "snapname" : {
44660702 12644 "description" : "The name of the snapshot.",
7aacca6f
DM
12645 "format" : "pve-configid",
12646 "maxLength" : 40,
7aacca6f
DM
12647 "type" : "string"
12648 },
7aacca6f 12649 "vmid" : {
44660702 12650 "description" : "The (unique) ID of the VM.",
7aacca6f 12651 "format" : "pve-vmid",
44660702
DM
12652 "minimum" : 1,
12653 "type" : "integer"
7aacca6f 12654 }
44660702
DM
12655 }
12656 },
12657 "permissions" : {
12658 "check" : [
12659 "perm",
12660 "/vms/{vmid}",
12661 [
12662 "VM.Snapshot"
12663 ]
12664 ]
7aacca6f 12665 },
44660702
DM
12666 "protected" : 1,
12667 "proxyto" : "node",
12668 "returns" : {
12669 "description" : "the task ID.",
12670 "type" : "string"
12671 }
7aacca6f
DM
12672 }
12673 },
7aacca6f 12674 "leaf" : 1,
44660702
DM
12675 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback",
12676 "text" : "rollback"
7aacca6f
DM
12677 },
12678 {
7aacca6f
DM
12679 "info" : {
12680 "GET" : {
7aacca6f 12681 "description" : "Get snapshot configuration",
44660702
DM
12682 "method" : "GET",
12683 "name" : "get_snapshot_config",
7aacca6f
DM
12684 "parameters" : {
12685 "additionalProperties" : 0,
12686 "properties" : {
7aacca6f 12687 "node" : {
7aacca6f 12688 "description" : "The cluster node name.",
44660702 12689 "format" : "pve-node",
7aacca6f
DM
12690 "type" : "string"
12691 },
12692 "snapname" : {
44660702 12693 "description" : "The name of the snapshot.",
7aacca6f
DM
12694 "format" : "pve-configid",
12695 "maxLength" : 40,
44660702
DM
12696 "type" : "string"
12697 },
12698 "vmid" : {
12699 "description" : "The (unique) ID of the VM.",
12700 "format" : "pve-vmid",
12701 "minimum" : 1,
12702 "type" : "integer"
7aacca6f
DM
12703 }
12704 }
12705 },
12706 "permissions" : {
12707 "check" : [
12708 "perm",
12709 "/vms/{vmid}",
12710 [
12711 "VM.Snapshot"
12712 ]
12713 ]
12714 },
44660702
DM
12715 "proxyto" : "node",
12716 "returns" : {
12717 "type" : "object"
12718 }
7aacca6f
DM
12719 },
12720 "PUT" : {
44660702
DM
12721 "description" : "Update snapshot metadata.",
12722 "method" : "PUT",
7aacca6f
DM
12723 "name" : "update_snapshot_config",
12724 "parameters" : {
12725 "additionalProperties" : 0,
12726 "properties" : {
44660702
DM
12727 "description" : {
12728 "description" : "A textual description or comment.",
12729 "optional" : 1,
12730 "type" : "string"
12731 },
7aacca6f 12732 "node" : {
7aacca6f 12733 "description" : "The cluster node name.",
44660702
DM
12734 "format" : "pve-node",
12735 "type" : "string"
7aacca6f
DM
12736 },
12737 "snapname" : {
12738 "description" : "The name of the snapshot.",
7aacca6f 12739 "format" : "pve-configid",
44660702
DM
12740 "maxLength" : 40,
12741 "type" : "string"
7aacca6f
DM
12742 },
12743 "vmid" : {
44660702 12744 "description" : "The (unique) ID of the VM.",
7aacca6f 12745 "format" : "pve-vmid",
44660702
DM
12746 "minimum" : 1,
12747 "type" : "integer"
7aacca6f
DM
12748 }
12749 }
12750 },
7aacca6f
DM
12751 "permissions" : {
12752 "check" : [
12753 "perm",
12754 "/vms/{vmid}",
12755 [
12756 "VM.Snapshot"
12757 ]
12758 ]
12759 },
44660702
DM
12760 "protected" : 1,
12761 "proxyto" : "node",
7aacca6f
DM
12762 "returns" : {
12763 "type" : "null"
12764 }
12765 }
12766 },
44660702 12767 "leaf" : 1,
7aacca6f 12768 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config",
44660702 12769 "text" : "config"
7aacca6f
DM
12770 }
12771 ],
56122987 12772 "info" : {
44660702
DM
12773 "DELETE" : {
12774 "description" : "Delete a LXC snapshot.",
12775 "method" : "DELETE",
12776 "name" : "delsnapshot",
56122987 12777 "parameters" : {
44660702 12778 "additionalProperties" : 0,
56122987 12779 "properties" : {
44660702
DM
12780 "force" : {
12781 "description" : "For removal from config file, even if removing disk snapshots fails.",
12782 "optional" : 1,
12783 "type" : "boolean"
12784 },
12785 "node" : {
12786 "description" : "The cluster node name.",
12787 "format" : "pve-node",
12788 "type" : "string"
7aacca6f
DM
12789 },
12790 "snapname" : {
7aacca6f
DM
12791 "description" : "The name of the snapshot.",
12792 "format" : "pve-configid",
44660702 12793 "maxLength" : 40,
7aacca6f 12794 "type" : "string"
44660702
DM
12795 },
12796 "vmid" : {
12797 "description" : "The (unique) ID of the VM.",
12798 "format" : "pve-vmid",
12799 "minimum" : 1,
12800 "type" : "integer"
56122987 12801 }
44660702 12802 }
7aacca6f 12803 },
56122987
DM
12804 "permissions" : {
12805 "check" : [
12806 "perm",
12807 "/vms/{vmid}",
12808 [
7aacca6f 12809 "VM.Snapshot"
56122987
DM
12810 ]
12811 ]
12812 },
44660702 12813 "protected" : 1,
7aacca6f 12814 "proxyto" : "node",
56122987 12815 "returns" : {
7aacca6f 12816 "description" : "the task ID.",
56122987 12817 "type" : "string"
44660702
DM
12818 }
12819 },
12820 "GET" : {
12821 "description" : "",
12822 "method" : "GET",
12823 "name" : "snapshot_cmd_idx",
7aacca6f
DM
12824 "parameters" : {
12825 "additionalProperties" : 0,
12826 "properties" : {
7aacca6f 12827 "node" : {
44660702 12828 "description" : "The cluster node name.",
7aacca6f 12829 "format" : "pve-node",
44660702 12830 "type" : "string"
7aacca6f
DM
12831 },
12832 "snapname" : {
44660702 12833 "description" : "The name of the snapshot.",
7aacca6f 12834 "format" : "pve-configid",
44660702
DM
12835 "maxLength" : 40,
12836 "type" : "string"
12837 },
12838 "vmid" : {
12839 "description" : "The (unique) ID of the VM.",
12840 "format" : "pve-vmid",
12841 "minimum" : 1,
12842 "type" : "integer"
7aacca6f
DM
12843 }
12844 }
12845 },
44660702
DM
12846 "permissions" : {
12847 "user" : "all"
12848 },
12849 "returns" : {
12850 "items" : {
12851 "properties" : {},
12852 "type" : "object"
12853 },
12854 "links" : [
12855 {
12856 "href" : "{cmd}",
12857 "rel" : "child"
12858 }
12859 ],
12860 "type" : "array"
12861 }
12862 }
12863 },
12864 "leaf" : 0,
12865 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}",
12866 "text" : "{snapname}"
12867 }
12868 ],
12869 "info" : {
12870 "GET" : {
12871 "description" : "List all snapshots.",
12872 "method" : "GET",
12873 "name" : "list",
12874 "parameters" : {
12875 "additionalProperties" : 0,
12876 "properties" : {
12877 "node" : {
12878 "description" : "The cluster node name.",
12879 "format" : "pve-node",
12880 "type" : "string"
12881 },
12882 "vmid" : {
12883 "description" : "The (unique) ID of the VM.",
12884 "format" : "pve-vmid",
12885 "minimum" : 1,
12886 "type" : "integer"
12887 }
56122987
DM
12888 }
12889 },
56122987 12890 "permissions" : {
7aacca6f
DM
12891 "check" : [
12892 "perm",
12893 "/vms/{vmid}",
12894 [
12895 "VM.Audit"
12896 ]
12897 ]
12898 },
44660702 12899 "protected" : 1,
56122987 12900 "proxyto" : "node",
7aacca6f 12901 "returns" : {
44660702
DM
12902 "items" : {
12903 "properties" : {},
12904 "type" : "object"
12905 },
7aacca6f
DM
12906 "links" : [
12907 {
12908 "href" : "{name}",
12909 "rel" : "child"
12910 }
12911 ],
7aacca6f 12912 "type" : "array"
44660702 12913 }
7aacca6f
DM
12914 },
12915 "POST" : {
44660702
DM
12916 "description" : "Snapshot a container.",
12917 "method" : "POST",
12918 "name" : "snapshot",
56122987
DM
12919 "parameters" : {
12920 "additionalProperties" : 0,
12921 "properties" : {
7aacca6f 12922 "description" : {
44660702 12923 "description" : "A textual description or comment.",
7aacca6f 12924 "optional" : 1,
44660702
DM
12925 "type" : "string"
12926 },
12927 "node" : {
12928 "description" : "The cluster node name.",
12929 "format" : "pve-node",
12930 "type" : "string"
56122987
DM
12931 },
12932 "snapname" : {
56122987 12933 "description" : "The name of the snapshot.",
44660702 12934 "format" : "pve-configid",
7aacca6f 12935 "maxLength" : 40,
44660702 12936 "type" : "string"
56122987 12937 },
44660702
DM
12938 "vmid" : {
12939 "description" : "The (unique) ID of the VM.",
12940 "format" : "pve-vmid",
12941 "minimum" : 1,
12942 "type" : "integer"
56122987 12943 }
7aacca6f 12944 }
56122987 12945 },
56122987
DM
12946 "permissions" : {
12947 "check" : [
12948 "perm",
12949 "/vms/{vmid}",
12950 [
7aacca6f 12951 "VM.Snapshot"
56122987
DM
12952 ]
12953 ]
7aacca6f 12954 },
44660702 12955 "protected" : 1,
7aacca6f
DM
12956 "proxyto" : "node",
12957 "returns" : {
12958 "description" : "the task ID.",
12959 "type" : "string"
56122987
DM
12960 }
12961 }
44660702
DM
12962 },
12963 "leaf" : 0,
12964 "path" : "/nodes/{node}/lxc/{vmid}/snapshot",
12965 "text" : "snapshot"
7aacca6f
DM
12966 },
12967 {
56122987
DM
12968 "children" : [
12969 {
56122987
DM
12970 "children" : [
12971 {
56122987 12972 "info" : {
44660702
DM
12973 "DELETE" : {
12974 "description" : "Delete rule.",
12975 "method" : "DELETE",
12976 "name" : "delete_rule",
56122987 12977 "parameters" : {
44660702 12978 "additionalProperties" : 0,
56122987 12979 "properties" : {
44660702
DM
12980 "digest" : {
12981 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
12982 "maxLength" : 40,
7aacca6f 12983 "optional" : 1,
44660702 12984 "type" : "string"
7aacca6f
DM
12985 },
12986 "node" : {
44660702 12987 "description" : "The cluster node name.",
7aacca6f 12988 "format" : "pve-node",
44660702
DM
12989 "type" : "string"
12990 },
12991 "pos" : {
12992 "description" : "Update rule at position <pos>.",
12993 "minimum" : 0,
12994 "optional" : 1,
12995 "type" : "integer"
12996 },
12997 "vmid" : {
12998 "description" : "The (unique) ID of the VM.",
12999 "format" : "pve-vmid",
13000 "minimum" : 1,
13001 "type" : "integer"
56122987 13002 }
44660702 13003 }
56122987 13004 },
56122987
DM
13005 "permissions" : {
13006 "check" : [
13007 "perm",
13008 "/vms/{vmid}",
13009 [
44660702 13010 "VM.Config.Network"
56122987
DM
13011 ]
13012 ]
13013 },
44660702 13014 "protected" : 1,
7aacca6f 13015 "proxyto" : null,
44660702
DM
13016 "returns" : {
13017 "type" : "null"
13018 }
7aacca6f 13019 },
44660702
DM
13020 "GET" : {
13021 "description" : "Get single rule data.",
13022 "method" : "GET",
13023 "name" : "get_rule",
56122987 13024 "parameters" : {
44660702 13025 "additionalProperties" : 0,
56122987 13026 "properties" : {
7aacca6f 13027 "node" : {
7aacca6f 13028 "description" : "The cluster node name.",
44660702 13029 "format" : "pve-node",
56122987
DM
13030 "type" : "string"
13031 },
7aacca6f 13032 "pos" : {
7aacca6f 13033 "description" : "Update rule at position <pos>.",
44660702 13034 "minimum" : 0,
7aacca6f 13035 "optional" : 1,
44660702 13036 "type" : "integer"
56122987 13037 },
7aacca6f 13038 "vmid" : {
44660702 13039 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13040 "format" : "pve-vmid",
13041 "minimum" : 1,
7aacca6f 13042 "type" : "integer"
56122987 13043 }
44660702 13044 }
56122987 13045 },
7aacca6f
DM
13046 "permissions" : {
13047 "check" : [
13048 "perm",
13049 "/vms/{vmid}",
13050 [
44660702 13051 "VM.Audit"
7aacca6f
DM
13052 ]
13053 ]
13054 },
7aacca6f
DM
13055 "proxyto" : null,
13056 "returns" : {
44660702
DM
13057 "properties" : {
13058 "pos" : {
13059 "type" : "integer"
13060 }
13061 },
13062 "type" : "object"
7aacca6f 13063 }
56122987 13064 },
44660702
DM
13065 "PUT" : {
13066 "description" : "Modify rule data.",
13067 "method" : "PUT",
13068 "name" : "update_rule",
56122987
DM
13069 "parameters" : {
13070 "additionalProperties" : 0,
13071 "properties" : {
44660702
DM
13072 "action" : {
13073 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
13074 "maxLength" : 20,
13075 "minLength" : 2,
13076 "optional" : 1,
13077 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13078 "type" : "string"
13079 },
13080 "comment" : {
13081 "optional" : 1,
13082 "type" : "string"
13083 },
13084 "delete" : {
13085 "description" : "A list of settings you want to delete.",
13086 "format" : "pve-configid-list",
13087 "optional" : 1,
13088 "type" : "string"
13089 },
13090 "dest" : {
13091 "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.",
13092 "format" : "pve-fw-addr-spec",
13093 "optional" : 1,
13094 "type" : "string"
13095 },
13096 "digest" : {
13097 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13098 "maxLength" : 40,
13099 "optional" : 1,
13100 "type" : "string"
13101 },
13102 "dport" : {
13103 "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.",
13104 "format" : "pve-fw-dport-spec",
13105 "optional" : 1,
13106 "type" : "string"
13107 },
13108 "enable" : {
13109 "minimum" : 0,
13110 "optional" : 1,
13111 "type" : "integer"
13112 },
13113 "iface" : {
13114 "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.",
13115 "format" : "pve-iface",
13116 "maxLength" : 20,
13117 "minLength" : 2,
13118 "optional" : 1,
13119 "type" : "string"
13120 },
13121 "macro" : {
13122 "maxLength" : 128,
13123 "optional" : 1,
13124 "type" : "string"
13125 },
13126 "moveto" : {
13127 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
13128 "minimum" : 0,
13129 "optional" : 1,
13130 "type" : "integer"
13131 },
7aacca6f
DM
13132 "node" : {
13133 "description" : "The cluster node name.",
44660702
DM
13134 "format" : "pve-node",
13135 "type" : "string"
56122987
DM
13136 },
13137 "pos" : {
44660702 13138 "description" : "Update rule at position <pos>.",
56122987 13139 "minimum" : 0,
7aacca6f 13140 "optional" : 1,
44660702 13141 "type" : "integer"
56122987 13142 },
44660702
DM
13143 "proto" : {
13144 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13145 "format" : "pve-fw-protocol-spec",
13146 "optional" : 1,
13147 "type" : "string"
7aacca6f 13148 },
44660702
DM
13149 "source" : {
13150 "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.",
13151 "format" : "pve-fw-addr-spec",
13152 "optional" : 1,
13153 "type" : "string"
13154 },
13155 "sport" : {
13156 "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.",
13157 "format" : "pve-fw-sport-spec",
13158 "optional" : 1,
13159 "type" : "string"
13160 },
13161 "type" : {
13162 "enum" : [
13163 "in",
13164 "out",
13165 "group"
13166 ],
7aacca6f 13167 "optional" : 1,
44660702
DM
13168 "type" : "string"
13169 },
13170 "vmid" : {
13171 "description" : "The (unique) ID of the VM.",
13172 "format" : "pve-vmid",
13173 "minimum" : 1,
13174 "type" : "integer"
56122987
DM
13175 }
13176 }
13177 },
56122987
DM
13178 "permissions" : {
13179 "check" : [
13180 "perm",
13181 "/vms/{vmid}",
13182 [
7aacca6f 13183 "VM.Config.Network"
56122987
DM
13184 ]
13185 ]
13186 },
44660702 13187 "protected" : 1,
56122987 13188 "proxyto" : null,
56122987 13189 "returns" : {
7aacca6f
DM
13190 "type" : "null"
13191 }
56122987 13192 }
44660702
DM
13193 },
13194 "leaf" : 1,
13195 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}",
13196 "text" : "{pos}"
56122987
DM
13197 }
13198 ],
13199 "info" : {
7aacca6f 13200 "GET" : {
44660702
DM
13201 "description" : "List rules.",
13202 "method" : "GET",
13203 "name" : "get_rules",
7aacca6f 13204 "parameters" : {
44660702 13205 "additionalProperties" : 0,
7aacca6f
DM
13206 "properties" : {
13207 "node" : {
7aacca6f 13208 "description" : "The cluster node name.",
44660702
DM
13209 "format" : "pve-node",
13210 "type" : "string"
7aacca6f
DM
13211 },
13212 "vmid" : {
13213 "description" : "The (unique) ID of the VM.",
44660702 13214 "format" : "pve-vmid",
7aacca6f 13215 "minimum" : 1,
44660702 13216 "type" : "integer"
7aacca6f 13217 }
44660702 13218 }
56122987 13219 },
56122987
DM
13220 "permissions" : {
13221 "check" : [
13222 "perm",
13223 "/vms/{vmid}",
13224 [
7aacca6f 13225 "VM.Audit"
56122987
DM
13226 ]
13227 ]
13228 },
13229 "proxyto" : null,
7aacca6f 13230 "returns" : {
7aacca6f
DM
13231 "items" : {
13232 "properties" : {
13233 "pos" : {
13234 "type" : "integer"
13235 }
13236 },
13237 "type" : "object"
13238 },
13239 "links" : [
13240 {
44660702
DM
13241 "href" : "{pos}",
13242 "rel" : "child"
7aacca6f 13243 }
44660702
DM
13244 ],
13245 "type" : "array"
13246 }
7aacca6f
DM
13247 },
13248 "POST" : {
44660702
DM
13249 "description" : "Create new rule.",
13250 "method" : "POST",
7aacca6f 13251 "name" : "create_rule",
56122987 13252 "parameters" : {
44660702 13253 "additionalProperties" : 0,
56122987 13254 "properties" : {
7aacca6f 13255 "action" : {
44660702 13256 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 13257 "maxLength" : 20,
44660702 13258 "minLength" : 2,
7aacca6f
DM
13259 "optional" : 0,
13260 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
13261 "type" : "string"
13262 },
44660702 13263 "comment" : {
7aacca6f 13264 "optional" : 1,
44660702 13265 "type" : "string"
56122987 13266 },
44660702
DM
13267 "dest" : {
13268 "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.",
13269 "format" : "pve-fw-addr-spec",
56122987 13270 "optional" : 1,
44660702 13271 "type" : "string"
56122987 13272 },
44660702
DM
13273 "digest" : {
13274 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13275 "maxLength" : 40,
56122987 13276 "optional" : 1,
44660702 13277 "type" : "string"
56122987 13278 },
44660702
DM
13279 "dport" : {
13280 "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.",
13281 "format" : "pve-fw-dport-spec",
56122987 13282 "optional" : 1,
44660702 13283 "type" : "string"
56122987 13284 },
44660702
DM
13285 "enable" : {
13286 "minimum" : 0,
56122987 13287 "optional" : 1,
44660702 13288 "type" : "integer"
56122987 13289 },
44660702
DM
13290 "iface" : {
13291 "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.",
13292 "format" : "pve-iface",
13293 "maxLength" : 20,
13294 "minLength" : 2,
7aacca6f 13295 "optional" : 1,
56122987 13296 "type" : "string"
56122987 13297 },
44660702
DM
13298 "macro" : {
13299 "maxLength" : 128,
56122987
DM
13300 "optional" : 1,
13301 "type" : "string"
13302 },
13303 "node" : {
7aacca6f 13304 "description" : "The cluster node name.",
44660702
DM
13305 "format" : "pve-node",
13306 "type" : "string"
7aacca6f 13307 },
44660702
DM
13308 "pos" : {
13309 "description" : "Update rule at position <pos>.",
13310 "minimum" : 0,
13311 "optional" : 1,
13312 "type" : "integer"
13313 },
13314 "proto" : {
13315 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13316 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
13317 "optional" : 1,
13318 "type" : "string"
7aacca6f 13319 },
44660702
DM
13320 "source" : {
13321 "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.",
13322 "format" : "pve-fw-addr-spec",
13323 "optional" : 1,
13324 "type" : "string"
56122987 13325 },
44660702
DM
13326 "sport" : {
13327 "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.",
13328 "format" : "pve-fw-sport-spec",
13329 "optional" : 1,
13330 "type" : "string"
7aacca6f 13331 },
44660702
DM
13332 "type" : {
13333 "enum" : [
13334 "in",
13335 "out",
13336 "group"
13337 ],
13338 "optional" : 0,
13339 "type" : "string"
13340 },
13341 "vmid" : {
13342 "description" : "The (unique) ID of the VM.",
13343 "format" : "pve-vmid",
13344 "minimum" : 1,
13345 "type" : "integer"
13346 }
13347 }
13348 },
13349 "permissions" : {
13350 "check" : [
13351 "perm",
13352 "/vms/{vmid}",
13353 [
13354 "VM.Config.Network"
13355 ]
13356 ]
13357 },
13358 "protected" : 1,
13359 "proxyto" : null,
13360 "returns" : {
13361 "type" : "null"
13362 }
13363 }
13364 },
13365 "leaf" : 0,
13366 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules",
13367 "text" : "rules"
13368 },
13369 {
13370 "children" : [
13371 {
13372 "info" : {
13373 "DELETE" : {
13374 "description" : "Remove IP or Network alias.",
13375 "method" : "DELETE",
13376 "name" : "remove_alias",
56122987 13377 "parameters" : {
44660702 13378 "additionalProperties" : 0,
56122987 13379 "properties" : {
44660702
DM
13380 "digest" : {
13381 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13382 "maxLength" : 40,
56122987
DM
13383 "optional" : 1,
13384 "type" : "string"
13385 },
7aacca6f 13386 "name" : {
44660702 13387 "description" : "Alias name.",
7aacca6f 13388 "maxLength" : 64,
7aacca6f
DM
13389 "minLength" : 2,
13390 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13391 "type" : "string"
7aacca6f
DM
13392 },
13393 "node" : {
44660702 13394 "description" : "The cluster node name.",
56122987 13395 "format" : "pve-node",
44660702 13396 "type" : "string"
7aacca6f 13397 },
56122987 13398 "vmid" : {
44660702 13399 "description" : "The (unique) ID of the VM.",
56122987 13400 "format" : "pve-vmid",
44660702
DM
13401 "minimum" : 1,
13402 "type" : "integer"
56122987 13403 }
44660702 13404 }
56122987 13405 },
56122987
DM
13406 "permissions" : {
13407 "check" : [
13408 "perm",
13409 "/vms/{vmid}",
13410 [
7aacca6f 13411 "VM.Config.Network"
56122987
DM
13412 ]
13413 ]
13414 },
44660702 13415 "protected" : 1,
56122987 13416 "returns" : {
7aacca6f 13417 "type" : "null"
44660702 13418 }
56122987 13419 },
44660702
DM
13420 "GET" : {
13421 "description" : "Read alias.",
13422 "method" : "GET",
13423 "name" : "read_alias",
13424 "parameters" : {
13425 "additionalProperties" : 0,
13426 "properties" : {
13427 "name" : {
13428 "description" : "Alias name.",
13429 "maxLength" : 64,
13430 "minLength" : 2,
13431 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13432 "type" : "string"
13433 },
13434 "node" : {
13435 "description" : "The cluster node name.",
13436 "format" : "pve-node",
13437 "type" : "string"
13438 },
13439 "vmid" : {
13440 "description" : "The (unique) ID of the VM.",
13441 "format" : "pve-vmid",
13442 "minimum" : 1,
13443 "type" : "integer"
13444 }
13445 }
56122987 13446 },
7aacca6f
DM
13447 "permissions" : {
13448 "check" : [
13449 "perm",
13450 "/vms/{vmid}",
13451 [
44660702 13452 "VM.Audit"
7aacca6f
DM
13453 ]
13454 ]
13455 },
44660702
DM
13456 "returns" : {
13457 "type" : "object"
13458 }
13459 },
13460 "PUT" : {
13461 "description" : "Update IP or Network alias.",
13462 "method" : "PUT",
13463 "name" : "update_alias",
56122987
DM
13464 "parameters" : {
13465 "additionalProperties" : 0,
13466 "properties" : {
44660702
DM
13467 "cidr" : {
13468 "description" : "Network/IP specification in CIDR format.",
13469 "format" : "IPorCIDR",
13470 "type" : "string"
13471 },
13472 "comment" : {
13473 "optional" : 1,
13474 "type" : "string"
13475 },
13476 "digest" : {
13477 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13478 "maxLength" : 40,
13479 "optional" : 1,
13480 "type" : "string"
13481 },
56122987 13482 "name" : {
7aacca6f 13483 "description" : "Alias name.",
44660702
DM
13484 "maxLength" : 64,
13485 "minLength" : 2,
7aacca6f 13486 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13487 "type" : "string"
56122987
DM
13488 },
13489 "node" : {
13490 "description" : "The cluster node name.",
44660702
DM
13491 "format" : "pve-node",
13492 "type" : "string"
13493 },
13494 "rename" : {
13495 "description" : "Rename an existing alias.",
13496 "maxLength" : 64,
13497 "minLength" : 2,
13498 "optional" : 1,
13499 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13500 "type" : "string"
56122987 13501 },
7aacca6f 13502 "vmid" : {
7aacca6f 13503 "description" : "The (unique) ID of the VM.",
44660702 13504 "format" : "pve-vmid",
7aacca6f 13505 "minimum" : 1,
44660702 13506 "type" : "integer"
56122987
DM
13507 }
13508 }
13509 },
44660702
DM
13510 "permissions" : {
13511 "check" : [
13512 "perm",
13513 "/vms/{vmid}",
13514 [
13515 "VM.Config.Network"
13516 ]
13517 ]
7aacca6f 13518 },
44660702
DM
13519 "protected" : 1,
13520 "returns" : {
13521 "type" : "null"
7aacca6f
DM
13522 }
13523 }
13524 },
44660702
DM
13525 "leaf" : 1,
13526 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}",
13527 "text" : "{name}"
13528 }
13529 ],
13530 "info" : {
13531 "GET" : {
13532 "description" : "List aliases",
13533 "method" : "GET",
13534 "name" : "get_aliases",
56122987
DM
13535 "parameters" : {
13536 "additionalProperties" : 0,
13537 "properties" : {
13538 "node" : {
44660702 13539 "description" : "The cluster node name.",
56122987 13540 "format" : "pve-node",
44660702 13541 "type" : "string"
56122987
DM
13542 },
13543 "vmid" : {
7aacca6f 13544 "description" : "The (unique) ID of the VM.",
44660702 13545 "format" : "pve-vmid",
7aacca6f 13546 "minimum" : 1,
44660702 13547 "type" : "integer"
56122987
DM
13548 }
13549 }
13550 },
44660702
DM
13551 "permissions" : {
13552 "check" : [
13553 "perm",
13554 "/vms/{vmid}",
13555 [
13556 "VM.Audit"
13557 ]
13558 ]
13559 },
56122987
DM
13560 "returns" : {
13561 "items" : {
56122987 13562 "properties" : {
44660702
DM
13563 "cidr" : {
13564 "type" : "string"
7aacca6f 13565 },
44660702
DM
13566 "comment" : {
13567 "optional" : 1,
56122987
DM
13568 "type" : "string"
13569 },
56122987 13570 "digest" : {
56122987 13571 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
13572 "maxLength" : 40,
13573 "optional" : 0,
13574 "type" : "string"
13575 },
13576 "name" : {
13577 "type" : "string"
56122987 13578 }
44660702
DM
13579 },
13580 "type" : "object"
13581 },
13582 "links" : [
13583 {
13584 "href" : "{name}",
13585 "rel" : "child"
56122987 13586 }
44660702
DM
13587 ],
13588 "type" : "array"
7aacca6f
DM
13589 }
13590 },
13591 "POST" : {
44660702 13592 "description" : "Create IP or Network Alias.",
7aacca6f 13593 "method" : "POST",
44660702 13594 "name" : "create_alias",
7aacca6f
DM
13595 "parameters" : {
13596 "additionalProperties" : 0,
13597 "properties" : {
44660702
DM
13598 "cidr" : {
13599 "description" : "Network/IP specification in CIDR format.",
13600 "format" : "IPorCIDR",
7aacca6f
DM
13601 "type" : "string"
13602 },
13603 "comment" : {
13604 "optional" : 1,
13605 "type" : "string"
13606 },
44660702
DM
13607 "name" : {
13608 "description" : "Alias name.",
13609 "maxLength" : 64,
7aacca6f
DM
13610 "minLength" : 2,
13611 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13612 "type" : "string"
7aacca6f
DM
13613 },
13614 "node" : {
44660702 13615 "description" : "The cluster node name.",
7aacca6f 13616 "format" : "pve-node",
44660702 13617 "type" : "string"
7aacca6f 13618 },
44660702
DM
13619 "vmid" : {
13620 "description" : "The (unique) ID of the VM.",
13621 "format" : "pve-vmid",
13622 "minimum" : 1,
13623 "type" : "integer"
7aacca6f
DM
13624 }
13625 }
13626 },
44660702
DM
13627 "permissions" : {
13628 "check" : [
13629 "perm",
13630 "/vms/{vmid}",
13631 [
13632 "VM.Config.Network"
13633 ]
13634 ]
13635 },
13636 "protected" : 1,
13637 "returns" : {
13638 "type" : "null"
13639 }
56122987
DM
13640 }
13641 },
44660702
DM
13642 "leaf" : 0,
13643 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases",
13644 "text" : "aliases"
13645 },
13646 {
56122987
DM
13647 "children" : [
13648 {
56122987
DM
13649 "children" : [
13650 {
13651 "info" : {
13652 "DELETE" : {
44660702 13653 "description" : "Remove IP or Network from IPSet.",
7aacca6f 13654 "method" : "DELETE",
44660702 13655 "name" : "remove_ip",
56122987
DM
13656 "parameters" : {
13657 "additionalProperties" : 0,
13658 "properties" : {
44660702
DM
13659 "cidr" : {
13660 "description" : "Network/IP specification in CIDR format.",
13661 "format" : "IPorCIDRorAlias",
13662 "type" : "string"
56122987
DM
13663 },
13664 "digest" : {
44660702 13665 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987 13666 "maxLength" : 40,
7aacca6f 13667 "optional" : 1,
44660702 13668 "type" : "string"
56122987 13669 },
56122987 13670 "name" : {
44660702 13671 "description" : "IP set name.",
56122987 13672 "maxLength" : 64,
7aacca6f 13673 "minLength" : 2,
56122987 13674 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 13675 "type" : "string"
7aacca6f
DM
13676 },
13677 "node" : {
7aacca6f 13678 "description" : "The cluster node name.",
44660702
DM
13679 "format" : "pve-node",
13680 "type" : "string"
13681 },
13682 "vmid" : {
13683 "description" : "The (unique) ID of the VM.",
13684 "format" : "pve-vmid",
13685 "minimum" : 1,
13686 "type" : "integer"
56122987
DM
13687 }
13688 }
13689 },
44660702
DM
13690 "permissions" : {
13691 "check" : [
13692 "perm",
13693 "/vms/{vmid}",
13694 [
13695 "VM.Config.Network"
13696 ]
13697 ]
13698 },
7aacca6f 13699 "protected" : 1,
56122987
DM
13700 "returns" : {
13701 "type" : "null"
44660702
DM
13702 }
13703 },
13704 "GET" : {
13705 "description" : "Read IP or Network settings from IPSet.",
13706 "method" : "GET",
13707 "name" : "read_ip",
56122987
DM
13708 "parameters" : {
13709 "additionalProperties" : 0,
13710 "properties" : {
7aacca6f 13711 "cidr" : {
7aacca6f 13712 "description" : "Network/IP specification in CIDR format.",
44660702 13713 "format" : "IPorCIDRorAlias",
56122987
DM
13714 "type" : "string"
13715 },
7aacca6f 13716 "name" : {
44660702 13717 "description" : "IP set name.",
7aacca6f
DM
13718 "maxLength" : 64,
13719 "minLength" : 2,
7aacca6f
DM
13720 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13721 "type" : "string"
56122987 13722 },
44660702
DM
13723 "node" : {
13724 "description" : "The cluster node name.",
13725 "format" : "pve-node",
13726 "type" : "string"
13727 },
13728 "vmid" : {
13729 "description" : "The (unique) ID of the VM.",
13730 "format" : "pve-vmid",
13731 "minimum" : 1,
13732 "type" : "integer"
56122987
DM
13733 }
13734 }
13735 },
56122987
DM
13736 "permissions" : {
13737 "check" : [
13738 "perm",
13739 "/vms/{vmid}",
13740 [
44660702 13741 "VM.Audit"
56122987
DM
13742 ]
13743 ]
7aacca6f 13744 },
44660702 13745 "protected" : 1,
7aacca6f
DM
13746 "returns" : {
13747 "type" : "object"
44660702
DM
13748 }
13749 },
13750 "PUT" : {
13751 "description" : "Update IP or Network settings",
13752 "method" : "PUT",
13753 "name" : "update_ip",
7aacca6f 13754 "parameters" : {
44660702 13755 "additionalProperties" : 0,
7aacca6f
DM
13756 "properties" : {
13757 "cidr" : {
44660702 13758 "description" : "Network/IP specification in CIDR format.",
7aacca6f 13759 "format" : "IPorCIDRorAlias",
44660702 13760 "type" : "string"
7aacca6f 13761 },
44660702
DM
13762 "comment" : {
13763 "optional" : 1,
13764 "type" : "string"
13765 },
13766 "digest" : {
13767 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13768 "maxLength" : 40,
13769 "optional" : 1,
13770 "type" : "string"
13771 },
13772 "name" : {
13773 "description" : "IP set name.",
13774 "maxLength" : 64,
13775 "minLength" : 2,
13776 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13777 "type" : "string"
7aacca6f
DM
13778 },
13779 "node" : {
7aacca6f 13780 "description" : "The cluster node name.",
44660702 13781 "format" : "pve-node",
7aacca6f
DM
13782 "type" : "string"
13783 },
44660702
DM
13784 "nomatch" : {
13785 "optional" : 1,
13786 "type" : "boolean"
13787 },
13788 "vmid" : {
13789 "description" : "The (unique) ID of the VM.",
13790 "format" : "pve-vmid",
13791 "minimum" : 1,
13792 "type" : "integer"
7aacca6f 13793 }
44660702
DM
13794 }
13795 },
13796 "permissions" : {
13797 "check" : [
13798 "perm",
13799 "/vms/{vmid}",
13800 [
13801 "VM.Config.Network"
13802 ]
13803 ]
7aacca6f
DM
13804 },
13805 "protected" : 1,
44660702
DM
13806 "returns" : {
13807 "type" : "null"
13808 }
56122987
DM
13809 }
13810 },
56122987 13811 "leaf" : 1,
44660702
DM
13812 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}",
13813 "text" : "{cidr}"
56122987
DM
13814 }
13815 ],
13816 "info" : {
44660702
DM
13817 "DELETE" : {
13818 "description" : "Delete IPSet",
13819 "method" : "DELETE",
13820 "name" : "delete_ipset",
13821 "parameters" : {
13822 "additionalProperties" : 0,
13823 "properties" : {
13824 "name" : {
13825 "description" : "IP set name.",
13826 "maxLength" : 64,
13827 "minLength" : 2,
13828 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13829 "type" : "string"
13830 },
13831 "node" : {
13832 "description" : "The cluster node name.",
13833 "format" : "pve-node",
13834 "type" : "string"
13835 },
13836 "vmid" : {
13837 "description" : "The (unique) ID of the VM.",
13838 "format" : "pve-vmid",
13839 "minimum" : 1,
13840 "type" : "integer"
13841 }
13842 }
13843 },
13844 "permissions" : {
13845 "check" : [
13846 "perm",
13847 "/vms/{vmid}",
13848 [
13849 "VM.Config.Network"
13850 ]
13851 ]
13852 },
13853 "protected" : 1,
13854 "returns" : {
13855 "type" : "null"
13856 }
13857 },
56122987 13858 "GET" : {
7aacca6f 13859 "description" : "List IPSet content",
44660702
DM
13860 "method" : "GET",
13861 "name" : "get_ipset",
7aacca6f
DM
13862 "parameters" : {
13863 "additionalProperties" : 0,
13864 "properties" : {
13865 "name" : {
13866 "description" : "IP set name.",
44660702 13867 "maxLength" : 64,
7aacca6f 13868 "minLength" : 2,
44660702
DM
13869 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13870 "type" : "string"
7aacca6f
DM
13871 },
13872 "node" : {
7aacca6f 13873 "description" : "The cluster node name.",
44660702 13874 "format" : "pve-node",
7aacca6f
DM
13875 "type" : "string"
13876 },
13877 "vmid" : {
13878 "description" : "The (unique) ID of the VM.",
44660702 13879 "format" : "pve-vmid",
7aacca6f 13880 "minimum" : 1,
44660702 13881 "type" : "integer"
56122987 13882 }
7aacca6f
DM
13883 }
13884 },
7aacca6f
DM
13885 "permissions" : {
13886 "check" : [
13887 "perm",
13888 "/vms/{vmid}",
13889 [
13890 "VM.Audit"
13891 ]
13892 ]
13893 },
13894 "returns" : {
56122987
DM
13895 "items" : {
13896 "properties" : {
13897 "cidr" : {
13898 "type" : "string"
13899 },
44660702
DM
13900 "comment" : {
13901 "optional" : 1,
13902 "type" : "string"
13903 },
56122987 13904 "digest" : {
56122987 13905 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 13906 "maxLength" : 40,
7aacca6f 13907 "optional" : 0,
56122987 13908 "type" : "string"
7aacca6f
DM
13909 },
13910 "nomatch" : {
44660702
DM
13911 "optional" : 1,
13912 "type" : "boolean"
56122987 13913 }
44660702
DM
13914 },
13915 "type" : "object"
56122987 13916 },
7aacca6f
DM
13917 "links" : [
13918 {
44660702
DM
13919 "href" : "{cidr}",
13920 "rel" : "child"
56122987 13921 }
44660702
DM
13922 ],
13923 "type" : "array"
13924 }
56122987 13925 },
7aacca6f
DM
13926 "POST" : {
13927 "description" : "Add IP or Network to IPSet.",
44660702 13928 "method" : "POST",
7aacca6f 13929 "name" : "create_ip",
56122987 13930 "parameters" : {
44660702 13931 "additionalProperties" : 0,
56122987 13932 "properties" : {
44660702
DM
13933 "cidr" : {
13934 "description" : "Network/IP specification in CIDR format.",
13935 "format" : "IPorCIDRorAlias",
13936 "type" : "string"
13937 },
13938 "comment" : {
13939 "optional" : 1,
13940 "type" : "string"
56122987
DM
13941 },
13942 "name" : {
56122987 13943 "description" : "IP set name.",
44660702 13944 "maxLength" : 64,
7aacca6f 13945 "minLength" : 2,
44660702 13946 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 13947 "type" : "string"
56122987 13948 },
7aacca6f 13949 "node" : {
7aacca6f 13950 "description" : "The cluster node name.",
44660702 13951 "format" : "pve-node",
56122987
DM
13952 "type" : "string"
13953 },
44660702
DM
13954 "nomatch" : {
13955 "optional" : 1,
13956 "type" : "boolean"
7aacca6f
DM
13957 },
13958 "vmid" : {
44660702 13959 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13960 "format" : "pve-vmid",
13961 "minimum" : 1,
7aacca6f 13962 "type" : "integer"
56122987 13963 }
44660702
DM
13964 }
13965 },
13966 "permissions" : {
13967 "check" : [
13968 "perm",
13969 "/vms/{vmid}",
13970 [
13971 "VM.Config.Network"
13972 ]
13973 ]
13974 },
13975 "protected" : 1,
13976 "returns" : {
13977 "type" : "null"
13978 }
13979 }
13980 },
13981 "leaf" : 0,
13982 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}",
13983 "text" : "{name}"
13984 }
13985 ],
13986 "info" : {
13987 "GET" : {
13988 "description" : "List IPSets",
13989 "method" : "GET",
13990 "name" : "ipset_index",
13991 "parameters" : {
13992 "additionalProperties" : 0,
13993 "properties" : {
13994 "node" : {
13995 "description" : "The cluster node name.",
13996 "format" : "pve-node",
13997 "type" : "string"
13998 },
13999 "vmid" : {
14000 "description" : "The (unique) ID of the VM.",
14001 "format" : "pve-vmid",
14002 "minimum" : 1,
14003 "type" : "integer"
14004 }
14005 }
14006 },
14007 "permissions" : {
14008 "check" : [
14009 "perm",
14010 "/vms/{vmid}",
14011 [
14012 "VM.Audit"
14013 ]
14014 ]
14015 },
14016 "returns" : {
14017 "items" : {
14018 "properties" : {
14019 "comment" : {
14020 "optional" : 1,
14021 "type" : "string"
14022 },
14023 "digest" : {
14024 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14025 "maxLength" : 40,
14026 "optional" : 0,
14027 "type" : "string"
7aacca6f 14028 },
44660702
DM
14029 "name" : {
14030 "description" : "IP set name.",
14031 "maxLength" : 64,
14032 "minLength" : 2,
14033 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14034 "type" : "string"
14035 }
14036 },
14037 "type" : "object"
14038 },
14039 "links" : [
14040 {
14041 "href" : "{name}",
14042 "rel" : "child"
14043 }
14044 ],
14045 "type" : "array"
14046 }
14047 },
14048 "POST" : {
14049 "description" : "Create new IPSet",
14050 "method" : "POST",
14051 "name" : "create_ipset",
14052 "parameters" : {
14053 "additionalProperties" : 0,
14054 "properties" : {
14055 "comment" : {
14056 "optional" : 1,
14057 "type" : "string"
14058 },
14059 "digest" : {
14060 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14061 "maxLength" : 40,
14062 "optional" : 1,
14063 "type" : "string"
56122987 14064 },
44660702
DM
14065 "name" : {
14066 "description" : "IP set name.",
14067 "maxLength" : 64,
14068 "minLength" : 2,
14069 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14070 "type" : "string"
14071 },
14072 "node" : {
14073 "description" : "The cluster node name.",
14074 "format" : "pve-node",
14075 "type" : "string"
7aacca6f 14076 },
44660702
DM
14077 "rename" : {
14078 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
14079 "maxLength" : 64,
14080 "minLength" : 2,
14081 "optional" : 1,
14082 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14083 "type" : "string"
14084 },
14085 "vmid" : {
14086 "description" : "The (unique) ID of the VM.",
14087 "format" : "pve-vmid",
14088 "minimum" : 1,
14089 "type" : "integer"
14090 }
56122987 14091 }
44660702
DM
14092 },
14093 "permissions" : {
14094 "check" : [
14095 "perm",
14096 "/vms/{vmid}",
14097 [
14098 "VM.Config.Network"
14099 ]
14100 ]
14101 },
14102 "protected" : 1,
14103 "returns" : {
14104 "type" : "null"
56122987
DM
14105 }
14106 }
44660702
DM
14107 },
14108 "leaf" : 0,
14109 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset",
14110 "text" : "ipset"
56122987
DM
14111 },
14112 {
56122987 14113 "info" : {
7aacca6f 14114 "GET" : {
44660702 14115 "description" : "Get VM firewall options.",
7aacca6f 14116 "method" : "GET",
44660702
DM
14117 "name" : "get_options",
14118 "parameters" : {
14119 "additionalProperties" : 0,
14120 "properties" : {
14121 "node" : {
14122 "description" : "The cluster node name.",
14123 "format" : "pve-node",
14124 "type" : "string"
14125 },
14126 "vmid" : {
14127 "description" : "The (unique) ID of the VM.",
14128 "format" : "pve-vmid",
14129 "minimum" : 1,
14130 "type" : "integer"
14131 }
14132 }
14133 },
14134 "permissions" : {
14135 "check" : [
14136 "perm",
14137 "/vms/{vmid}",
14138 [
14139 "VM.Audit"
14140 ]
14141 ]
14142 },
14143 "proxyto" : "node",
56122987 14144 "returns" : {
56122987 14145 "properties" : {
44660702
DM
14146 "dhcp" : {
14147 "description" : "Enable DHCP.",
14148 "optional" : 1,
14149 "type" : "boolean"
14150 },
14151 "enable" : {
14152 "description" : "Enable/disable firewall rules.",
14153 "optional" : 1,
14154 "type" : "boolean"
14155 },
14156 "ipfilter" : {
14157 "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 14158 "optional" : 1,
44660702
DM
14159 "type" : "boolean"
14160 },
14161 "log_level_in" : {
7aacca6f
DM
14162 "description" : "Log level for incoming traffic.",
14163 "enum" : [
14164 "emerg",
14165 "alert",
14166 "crit",
14167 "err",
14168 "warning",
14169 "notice",
14170 "info",
14171 "debug",
14172 "nolog"
44660702
DM
14173 ],
14174 "optional" : 1,
14175 "type" : "string"
56122987 14176 },
44660702
DM
14177 "log_level_out" : {
14178 "description" : "Log level for outgoing traffic.",
56122987 14179 "enum" : [
44660702
DM
14180 "emerg",
14181 "alert",
14182 "crit",
14183 "err",
14184 "warning",
14185 "notice",
14186 "info",
14187 "debug",
14188 "nolog"
7aacca6f 14189 ],
7aacca6f
DM
14190 "optional" : 1,
14191 "type" : "string"
56122987 14192 },
44660702
DM
14193 "macfilter" : {
14194 "description" : "Enable/disable MAC address filter.",
14195 "optional" : 1,
14196 "type" : "boolean"
7aacca6f 14197 },
44660702
DM
14198 "ndp" : {
14199 "description" : "Enable NDP.",
56122987 14200 "optional" : 1,
44660702 14201 "type" : "boolean"
56122987
DM
14202 },
14203 "policy_in" : {
7aacca6f 14204 "description" : "Input policy.",
56122987
DM
14205 "enum" : [
14206 "ACCEPT",
14207 "REJECT",
14208 "DROP"
14209 ],
7aacca6f 14210 "optional" : 1,
44660702 14211 "type" : "string"
56122987 14212 },
44660702
DM
14213 "policy_out" : {
14214 "description" : "Output policy.",
56122987 14215 "enum" : [
44660702
DM
14216 "ACCEPT",
14217 "REJECT",
14218 "DROP"
56122987 14219 ],
7aacca6f 14220 "optional" : 1,
56122987
DM
14221 "type" : "string"
14222 },
44660702
DM
14223 "radv" : {
14224 "description" : "Allow sending Router Advertisement.",
56122987 14225 "optional" : 1,
7aacca6f
DM
14226 "type" : "boolean"
14227 }
7aacca6f 14228 },
44660702
DM
14229 "type" : "object"
14230 }
7aacca6f
DM
14231 },
14232 "PUT" : {
44660702
DM
14233 "description" : "Set Firewall options.",
14234 "method" : "PUT",
7aacca6f
DM
14235 "name" : "set_options",
14236 "parameters" : {
44660702 14237 "additionalProperties" : 0,
7aacca6f 14238 "properties" : {
44660702
DM
14239 "delete" : {
14240 "description" : "A list of settings you want to delete.",
14241 "format" : "pve-configid-list",
14242 "optional" : 1,
14243 "type" : "string"
14244 },
14245 "dhcp" : {
14246 "description" : "Enable DHCP.",
14247 "optional" : 1,
14248 "type" : "boolean"
14249 },
14250 "digest" : {
14251 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14252 "maxLength" : 40,
14253 "optional" : 1,
14254 "type" : "string"
14255 },
7aacca6f
DM
14256 "enable" : {
14257 "description" : "Enable/disable firewall rules.",
56122987 14258 "optional" : 1,
7aacca6f 14259 "type" : "boolean"
56122987 14260 },
44660702
DM
14261 "ipfilter" : {
14262 "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.",
14263 "optional" : 1,
14264 "type" : "boolean"
14265 },
14266 "log_level_in" : {
14267 "description" : "Log level for incoming traffic.",
56122987
DM
14268 "enum" : [
14269 "emerg",
14270 "alert",
14271 "crit",
14272 "err",
14273 "warning",
14274 "notice",
14275 "info",
14276 "debug",
14277 "nolog"
14278 ],
56122987 14279 "optional" : 1,
44660702 14280 "type" : "string"
56122987 14281 },
44660702
DM
14282 "log_level_out" : {
14283 "description" : "Log level for outgoing traffic.",
56122987
DM
14284 "enum" : [
14285 "emerg",
14286 "alert",
14287 "crit",
14288 "err",
14289 "warning",
14290 "notice",
14291 "info",
14292 "debug",
14293 "nolog"
14294 ],
44660702
DM
14295 "optional" : 1,
14296 "type" : "string"
56122987 14297 },
44660702
DM
14298 "macfilter" : {
14299 "description" : "Enable/disable MAC address filter.",
14300 "optional" : 1,
14301 "type" : "boolean"
14302 },
14303 "ndp" : {
14304 "description" : "Enable NDP.",
56122987 14305 "optional" : 1,
56122987
DM
14306 "type" : "boolean"
14307 },
7aacca6f
DM
14308 "node" : {
14309 "description" : "The cluster node name.",
44660702
DM
14310 "format" : "pve-node",
14311 "type" : "string"
7aacca6f 14312 },
44660702
DM
14313 "policy_in" : {
14314 "description" : "Input policy.",
14315 "enum" : [
14316 "ACCEPT",
14317 "REJECT",
14318 "DROP"
14319 ],
7aacca6f 14320 "optional" : 1,
44660702 14321 "type" : "string"
7aacca6f 14322 },
44660702
DM
14323 "policy_out" : {
14324 "description" : "Output policy.",
56122987 14325 "enum" : [
7aacca6f
DM
14326 "ACCEPT",
14327 "REJECT",
14328 "DROP"
56122987
DM
14329 ],
14330 "optional" : 1,
56122987 14331 "type" : "string"
7aacca6f 14332 },
44660702
DM
14333 "radv" : {
14334 "description" : "Allow sending Router Advertisement.",
7aacca6f 14335 "optional" : 1,
44660702
DM
14336 "type" : "boolean"
14337 },
14338 "vmid" : {
14339 "description" : "The (unique) ID of the VM.",
14340 "format" : "pve-vmid",
14341 "minimum" : 1,
14342 "type" : "integer"
56122987 14343 }
44660702 14344 }
56122987 14345 },
7aacca6f
DM
14346 "permissions" : {
14347 "check" : [
14348 "perm",
14349 "/vms/{vmid}",
14350 [
14351 "VM.Config.Network"
14352 ]
14353 ]
14354 },
44660702
DM
14355 "protected" : 1,
14356 "proxyto" : "node",
7aacca6f
DM
14357 "returns" : {
14358 "type" : "null"
56122987
DM
14359 }
14360 }
14361 },
44660702 14362 "leaf" : 1,
7aacca6f 14363 "path" : "/nodes/{node}/lxc/{vmid}/firewall/options",
44660702 14364 "text" : "options"
56122987
DM
14365 },
14366 {
56122987
DM
14367 "info" : {
14368 "GET" : {
44660702 14369 "description" : "Read firewall log",
56122987 14370 "method" : "GET",
7aacca6f 14371 "name" : "log",
56122987
DM
14372 "parameters" : {
14373 "additionalProperties" : 0,
14374 "properties" : {
44660702
DM
14375 "limit" : {
14376 "minimum" : 0,
14377 "optional" : 1,
14378 "type" : "integer"
14379 },
56122987
DM
14380 "node" : {
14381 "description" : "The cluster node name.",
44660702
DM
14382 "format" : "pve-node",
14383 "type" : "string"
56122987 14384 },
44660702
DM
14385 "start" : {
14386 "minimum" : 0,
7aacca6f 14387 "optional" : 1,
44660702 14388 "type" : "integer"
56122987
DM
14389 },
14390 "vmid" : {
44660702 14391 "description" : "The (unique) ID of the VM.",
7aacca6f 14392 "format" : "pve-vmid",
56122987 14393 "minimum" : 1,
7aacca6f 14394 "type" : "integer"
56122987
DM
14395 }
14396 }
14397 },
44660702
DM
14398 "permissions" : {
14399 "check" : [
14400 "perm",
14401 "/vms/{vmid}",
14402 [
14403 "VM.Console"
14404 ]
14405 ]
14406 },
56122987 14407 "protected" : 1,
44660702 14408 "proxyto" : "node",
7aacca6f
DM
14409 "returns" : {
14410 "items" : {
14411 "properties" : {
7aacca6f
DM
14412 "n" : {
14413 "description" : "Line number",
14414 "type" : "integer"
44660702
DM
14415 },
14416 "t" : {
14417 "description" : "Line text",
14418 "type" : "string"
7aacca6f
DM
14419 }
14420 },
14421 "type" : "object"
14422 },
14423 "type" : "array"
44660702 14424 }
56122987
DM
14425 }
14426 },
7aacca6f 14427 "leaf" : 1,
44660702
DM
14428 "path" : "/nodes/{node}/lxc/{vmid}/firewall/log",
14429 "text" : "log"
56122987
DM
14430 },
14431 {
56122987
DM
14432 "info" : {
14433 "GET" : {
7aacca6f 14434 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
14435 "method" : "GET",
14436 "name" : "refs",
56122987 14437 "parameters" : {
7aacca6f 14438 "additionalProperties" : 0,
56122987 14439 "properties" : {
44660702
DM
14440 "node" : {
14441 "description" : "The cluster node name.",
14442 "format" : "pve-node",
14443 "type" : "string"
7aacca6f 14444 },
56122987 14445 "type" : {
44660702 14446 "description" : "Only list references of specified type.",
56122987
DM
14447 "enum" : [
14448 "alias",
14449 "ipset"
14450 ],
44660702
DM
14451 "optional" : 1,
14452 "type" : "string"
56122987 14453 },
44660702
DM
14454 "vmid" : {
14455 "description" : "The (unique) ID of the VM.",
14456 "format" : "pve-vmid",
14457 "minimum" : 1,
14458 "type" : "integer"
56122987 14459 }
7aacca6f 14460 }
56122987 14461 },
44660702
DM
14462 "permissions" : {
14463 "check" : [
14464 "perm",
14465 "/vms/{vmid}",
14466 [
14467 "VM.Audit"
14468 ]
14469 ]
14470 },
56122987 14471 "returns" : {
56122987 14472 "items" : {
56122987 14473 "properties" : {
44660702
DM
14474 "comment" : {
14475 "optional" : 1,
14476 "type" : "string"
14477 },
14478 "name" : {
14479 "type" : "string"
14480 },
56122987 14481 "type" : {
56122987
DM
14482 "enum" : [
14483 "alias",
14484 "ipset"
44660702 14485 ],
7aacca6f 14486 "type" : "string"
56122987 14487 }
44660702
DM
14488 },
14489 "type" : "object"
14490 },
14491 "type" : "array"
56122987
DM
14492 }
14493 }
14494 },
44660702 14495 "leaf" : 1,
7aacca6f 14496 "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs",
44660702 14497 "text" : "refs"
56122987
DM
14498 }
14499 ],
56122987
DM
14500 "info" : {
14501 "GET" : {
7aacca6f 14502 "description" : "Directory index.",
44660702
DM
14503 "method" : "GET",
14504 "name" : "index",
56122987 14505 "parameters" : {
44660702 14506 "additionalProperties" : 0,
56122987 14507 "properties" : {
56122987 14508 "node" : {
44660702 14509 "description" : "The cluster node name.",
56122987 14510 "format" : "pve-node",
44660702
DM
14511 "type" : "string"
14512 },
14513 "vmid" : {
14514 "description" : "The (unique) ID of the VM.",
14515 "format" : "pve-vmid",
14516 "minimum" : 1,
14517 "type" : "integer"
56122987 14518 }
44660702
DM
14519 }
14520 },
14521 "permissions" : {
14522 "user" : "all"
56122987
DM
14523 },
14524 "returns" : {
7aacca6f 14525 "items" : {
44660702
DM
14526 "properties" : {},
14527 "type" : "object"
7aacca6f 14528 },
56122987
DM
14529 "links" : [
14530 {
44660702
DM
14531 "href" : "{name}",
14532 "rel" : "child"
56122987 14533 }
44660702
DM
14534 ],
14535 "type" : "array"
56122987
DM
14536 }
14537 }
14538 },
44660702 14539 "leaf" : 0,
7aacca6f 14540 "path" : "/nodes/{node}/lxc/{vmid}/firewall",
44660702 14541 "text" : "firewall"
56122987
DM
14542 },
14543 {
56122987
DM
14544 "info" : {
14545 "GET" : {
56122987 14546 "description" : "Read VM RRD statistics (returns PNG)",
44660702 14547 "method" : "GET",
7aacca6f 14548 "name" : "rrd",
56122987 14549 "parameters" : {
7aacca6f 14550 "additionalProperties" : 0,
56122987 14551 "properties" : {
44660702
DM
14552 "cf" : {
14553 "description" : "The RRD consolidation function",
14554 "enum" : [
14555 "AVERAGE",
14556 "MAX"
14557 ],
14558 "optional" : 1,
14559 "type" : "string"
14560 },
14561 "ds" : {
14562 "description" : "The list of datasources you want to display.",
14563 "format" : "pve-configid-list",
14564 "type" : "string"
14565 },
7aacca6f
DM
14566 "node" : {
14567 "description" : "The cluster node name.",
44660702
DM
14568 "format" : "pve-node",
14569 "type" : "string"
56122987
DM
14570 },
14571 "timeframe" : {
14572 "description" : "Specify the time frame you are interested in.",
14573 "enum" : [
14574 "hour",
14575 "day",
14576 "week",
14577 "month",
14578 "year"
7aacca6f 14579 ],
44660702 14580 "type" : "string"
7aacca6f
DM
14581 },
14582 "vmid" : {
44660702 14583 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14584 "format" : "pve-vmid",
14585 "minimum" : 1,
7aacca6f 14586 "type" : "integer"
56122987 14587 }
7aacca6f
DM
14588 }
14589 },
14590 "permissions" : {
14591 "check" : [
14592 "perm",
14593 "/vms/{vmid}",
14594 [
14595 "VM.Audit"
14596 ]
14597 ]
56122987 14598 },
44660702 14599 "protected" : 1,
7aacca6f
DM
14600 "returns" : {
14601 "properties" : {
14602 "filename" : {
14603 "type" : "string"
14604 }
14605 },
14606 "type" : "object"
14607 }
56122987 14608 }
7aacca6f 14609 },
44660702 14610 "leaf" : 1,
7aacca6f 14611 "path" : "/nodes/{node}/lxc/{vmid}/rrd",
44660702 14612 "text" : "rrd"
56122987
DM
14613 },
14614 {
56122987
DM
14615 "info" : {
14616 "GET" : {
44660702
DM
14617 "description" : "Read VM RRD statistics",
14618 "method" : "GET",
14619 "name" : "rrddata",
56122987 14620 "parameters" : {
7aacca6f 14621 "additionalProperties" : 0,
56122987 14622 "properties" : {
44660702
DM
14623 "cf" : {
14624 "description" : "The RRD consolidation function",
14625 "enum" : [
14626 "AVERAGE",
14627 "MAX"
14628 ],
14629 "optional" : 1,
14630 "type" : "string"
14631 },
7aacca6f 14632 "node" : {
44660702 14633 "description" : "The cluster node name.",
7aacca6f 14634 "format" : "pve-node",
44660702 14635 "type" : "string"
7aacca6f 14636 },
56122987
DM
14637 "timeframe" : {
14638 "description" : "Specify the time frame you are interested in.",
14639 "enum" : [
14640 "hour",
14641 "day",
14642 "week",
14643 "month",
14644 "year"
44660702
DM
14645 ],
14646 "type" : "string"
7aacca6f
DM
14647 },
14648 "vmid" : {
14649 "description" : "The (unique) ID of the VM.",
44660702 14650 "format" : "pve-vmid",
7aacca6f 14651 "minimum" : 1,
44660702 14652 "type" : "integer"
56122987 14653 }
56122987
DM
14654 }
14655 },
56122987
DM
14656 "permissions" : {
14657 "check" : [
14658 "perm",
14659 "/vms/{vmid}",
14660 [
14661 "VM.Audit"
14662 ]
14663 ]
14664 },
7aacca6f
DM
14665 "protected" : 1,
14666 "returns" : {
7aacca6f
DM
14667 "items" : {
14668 "properties" : {},
14669 "type" : "object"
44660702
DM
14670 },
14671 "type" : "array"
14672 }
56122987
DM
14673 }
14674 },
44660702 14675 "leaf" : 1,
7aacca6f 14676 "path" : "/nodes/{node}/lxc/{vmid}/rrddata",
44660702 14677 "text" : "rrddata"
56122987
DM
14678 },
14679 {
14680 "info" : {
14681 "POST" : {
14682 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
14683 "method" : "POST",
14684 "name" : "vncproxy",
7aacca6f 14685 "parameters" : {
44660702 14686 "additionalProperties" : 0,
7aacca6f 14687 "properties" : {
44660702
DM
14688 "node" : {
14689 "description" : "The cluster node name.",
14690 "format" : "pve-node",
14691 "type" : "string"
14692 },
7aacca6f 14693 "vmid" : {
44660702 14694 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14695 "format" : "pve-vmid",
14696 "minimum" : 1,
7aacca6f
DM
14697 "type" : "integer"
14698 },
14699 "websocket" : {
44660702 14700 "description" : "use websocket instead of standard VNC.",
7aacca6f 14701 "optional" : 1,
44660702 14702 "type" : "boolean"
7aacca6f 14703 }
44660702 14704 }
7aacca6f 14705 },
56122987
DM
14706 "permissions" : {
14707 "check" : [
14708 "perm",
14709 "/vms/{vmid}",
14710 [
14711 "VM.Console"
14712 ]
14713 ]
14714 },
44660702 14715 "protected" : 1,
56122987 14716 "returns" : {
7aacca6f 14717 "additionalProperties" : 0,
56122987 14718 "properties" : {
7aacca6f 14719 "cert" : {
56122987
DM
14720 "type" : "string"
14721 },
44660702
DM
14722 "port" : {
14723 "type" : "integer"
56122987 14724 },
44660702 14725 "ticket" : {
56122987
DM
14726 "type" : "string"
14727 },
44660702 14728 "upid" : {
56122987
DM
14729 "type" : "string"
14730 },
44660702
DM
14731 "user" : {
14732 "type" : "string"
56122987 14733 }
7aacca6f 14734 }
56122987
DM
14735 }
14736 }
14737 },
44660702 14738 "leaf" : 1,
56122987 14739 "path" : "/nodes/{node}/lxc/{vmid}/vncproxy",
44660702 14740 "text" : "vncproxy"
56122987
DM
14741 },
14742 {
56122987
DM
14743 "info" : {
14744 "GET" : {
44660702
DM
14745 "description" : "Opens a weksocket for VNC traffic.",
14746 "method" : "GET",
14747 "name" : "vncwebsocket",
56122987 14748 "parameters" : {
44660702 14749 "additionalProperties" : 0,
56122987 14750 "properties" : {
56122987
DM
14751 "node" : {
14752 "description" : "The cluster node name.",
44660702 14753 "format" : "pve-node",
56122987 14754 "type" : "string"
7aacca6f 14755 },
44660702
DM
14756 "port" : {
14757 "description" : "Port number returned by previous vncproxy call.",
14758 "maximum" : 5999,
14759 "minimum" : 5900,
14760 "type" : "integer"
14761 },
7aacca6f
DM
14762 "vmid" : {
14763 "description" : "The (unique) ID of the VM.",
7aacca6f 14764 "format" : "pve-vmid",
44660702
DM
14765 "minimum" : 1,
14766 "type" : "integer"
14767 },
14768 "vncticket" : {
14769 "description" : "Ticket from previous call to vncproxy.",
14770 "maxLength" : 512,
14771 "type" : "string"
56122987 14772 }
44660702 14773 }
7aacca6f 14774 },
7aacca6f
DM
14775 "permissions" : {
14776 "check" : [
14777 "perm",
14778 "/vms/{vmid}",
14779 [
14780 "VM.Console"
14781 ]
14782 ],
14783 "description" : "You also need to pass a valid ticket (vncticket)."
56122987
DM
14784 },
14785 "returns" : {
56122987
DM
14786 "properties" : {
14787 "port" : {
14788 "type" : "string"
14789 }
44660702
DM
14790 },
14791 "type" : "object"
14792 }
56122987
DM
14793 }
14794 },
44660702 14795 "leaf" : 1,
7aacca6f 14796 "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket",
44660702 14797 "text" : "vncwebsocket"
56122987
DM
14798 },
14799 {
56122987
DM
14800 "info" : {
14801 "POST" : {
44660702
DM
14802 "description" : "Returns a SPICE configuration to connect to the CT.",
14803 "method" : "POST",
14804 "name" : "spiceproxy",
56122987
DM
14805 "parameters" : {
14806 "additionalProperties" : 0,
14807 "properties" : {
44660702
DM
14808 "node" : {
14809 "description" : "The cluster node name.",
14810 "format" : "pve-node",
14811 "type" : "string"
56122987
DM
14812 },
14813 "proxy" : {
7aacca6f 14814 "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
14815 "format" : "address",
14816 "optional" : 1,
7aacca6f 14817 "type" : "string"
44660702
DM
14818 },
14819 "vmid" : {
14820 "description" : "The (unique) ID of the VM.",
14821 "format" : "pve-vmid",
14822 "minimum" : 1,
14823 "type" : "integer"
56122987
DM
14824 }
14825 }
14826 },
56122987
DM
14827 "permissions" : {
14828 "check" : [
14829 "perm",
14830 "/vms/{vmid}",
14831 [
14832 "VM.Console"
14833 ]
14834 ]
14835 },
44660702
DM
14836 "protected" : 1,
14837 "proxyto" : "node",
56122987 14838 "returns" : {
7aacca6f 14839 "additionalProperties" : 1,
44660702 14840 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 14841 "properties" : {
44660702 14842 "host" : {
56122987
DM
14843 "type" : "string"
14844 },
44660702 14845 "password" : {
56122987
DM
14846 "type" : "string"
14847 },
14848 "proxy" : {
14849 "type" : "string"
14850 },
56122987
DM
14851 "tls-port" : {
14852 "type" : "integer"
7aacca6f 14853 },
44660702 14854 "type" : {
7aacca6f 14855 "type" : "string"
56122987 14856 }
7aacca6f
DM
14857 }
14858 }
56122987 14859 }
44660702
DM
14860 },
14861 "leaf" : 1,
14862 "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy",
14863 "text" : "spiceproxy"
56122987
DM
14864 },
14865 {
56122987
DM
14866 "info" : {
14867 "POST" : {
44660702 14868 "description" : "Migrate the container to another node. Creates a new migration task.",
7aacca6f 14869 "method" : "POST",
44660702 14870 "name" : "migrate_vm",
56122987 14871 "parameters" : {
44660702 14872 "additionalProperties" : 0,
56122987 14873 "properties" : {
44660702
DM
14874 "force" : {
14875 "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node.",
14876 "optional" : 1,
14877 "type" : "boolean"
14878 },
14879 "node" : {
14880 "description" : "The cluster node name.",
7aacca6f 14881 "format" : "pve-node",
7aacca6f
DM
14882 "type" : "string"
14883 },
56122987 14884 "online" : {
56122987 14885 "description" : "Use online/live migration.",
44660702
DM
14886 "optional" : 1,
14887 "type" : "boolean"
56122987 14888 },
44660702
DM
14889 "target" : {
14890 "description" : "Target node.",
56122987 14891 "format" : "pve-node",
44660702 14892 "type" : "string"
56122987 14893 },
44660702
DM
14894 "vmid" : {
14895 "description" : "The (unique) ID of the VM.",
14896 "format" : "pve-vmid",
14897 "minimum" : 1,
14898 "type" : "integer"
56122987 14899 }
44660702 14900 }
7aacca6f 14901 },
56122987
DM
14902 "permissions" : {
14903 "check" : [
14904 "perm",
14905 "/vms/{vmid}",
14906 [
14907 "VM.Migrate"
14908 ]
14909 ]
14910 },
44660702 14911 "protected" : 1,
7aacca6f 14912 "proxyto" : "node",
44660702
DM
14913 "returns" : {
14914 "description" : "the task ID.",
14915 "type" : "string"
14916 }
56122987
DM
14917 }
14918 },
44660702
DM
14919 "leaf" : 1,
14920 "path" : "/nodes/{node}/lxc/{vmid}/migrate",
7aacca6f 14921 "text" : "migrate"
56122987
DM
14922 },
14923 {
56122987
DM
14924 "info" : {
14925 "GET" : {
44660702
DM
14926 "description" : "Check if feature for virtual machine is available.",
14927 "method" : "GET",
56122987 14928 "name" : "vm_feature",
56122987 14929 "parameters" : {
7aacca6f 14930 "additionalProperties" : 0,
56122987 14931 "properties" : {
44660702
DM
14932 "feature" : {
14933 "description" : "Feature to check.",
14934 "enum" : [
14935 "snapshot"
14936 ],
14937 "type" : "string"
14938 },
7aacca6f 14939 "node" : {
44660702 14940 "description" : "The cluster node name.",
7aacca6f 14941 "format" : "pve-node",
44660702 14942 "type" : "string"
7aacca6f 14943 },
56122987 14944 "snapname" : {
7aacca6f
DM
14945 "description" : "The name of the snapshot.",
14946 "format" : "pve-configid",
44660702
DM
14947 "maxLength" : 40,
14948 "optional" : 1,
56122987
DM
14949 "type" : "string"
14950 },
14951 "vmid" : {
7aacca6f 14952 "description" : "The (unique) ID of the VM.",
44660702 14953 "format" : "pve-vmid",
7aacca6f 14954 "minimum" : 1,
44660702 14955 "type" : "integer"
56122987 14956 }
7aacca6f 14957 }
56122987
DM
14958 },
14959 "permissions" : {
14960 "check" : [
14961 "perm",
14962 "/vms/{vmid}",
14963 [
14964 "VM.Audit"
14965 ]
14966 ]
14967 },
44660702 14968 "protected" : 1,
7aacca6f 14969 "proxyto" : "node",
7aacca6f
DM
14970 "returns" : {
14971 "properties" : {
14972 "hasFeature" : {
14973 "type" : "boolean"
14974 }
14975 },
14976 "type" : "object"
14977 }
56122987
DM
14978 }
14979 },
7aacca6f 14980 "leaf" : 1,
44660702
DM
14981 "path" : "/nodes/{node}/lxc/{vmid}/feature",
14982 "text" : "feature"
56122987
DM
14983 },
14984 {
56122987
DM
14985 "info" : {
14986 "POST" : {
44660702
DM
14987 "description" : "Create a Template.",
14988 "method" : "POST",
56122987 14989 "name" : "template",
56122987
DM
14990 "parameters" : {
14991 "additionalProperties" : 0,
14992 "properties" : {
44660702
DM
14993 "experimental" : {
14994 "default" : 0,
14995 "description" : "The template feature is experimental, set this flag if you know what you are doing.",
14996 "type" : "boolean"
7aacca6f
DM
14997 },
14998 "node" : {
7aacca6f 14999 "description" : "The cluster node name.",
44660702 15000 "format" : "pve-node",
7aacca6f 15001 "type" : "string"
56122987 15002 },
44660702
DM
15003 "vmid" : {
15004 "description" : "The (unique) ID of the VM.",
15005 "format" : "pve-vmid",
15006 "minimum" : 1,
15007 "type" : "integer"
56122987
DM
15008 }
15009 }
15010 },
56122987 15011 "permissions" : {
56122987
DM
15012 "check" : [
15013 "perm",
15014 "/vms/{vmid}",
15015 [
15016 "VM.Allocate"
15017 ]
44660702
DM
15018 ],
15019 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
7aacca6f 15020 },
44660702 15021 "protected" : 1,
7aacca6f
DM
15022 "proxyto" : "node",
15023 "returns" : {
15024 "type" : "null"
56122987
DM
15025 }
15026 }
15027 },
44660702 15028 "leaf" : 1,
7aacca6f 15029 "path" : "/nodes/{node}/lxc/{vmid}/template",
44660702 15030 "text" : "template"
56122987
DM
15031 },
15032 {
56122987
DM
15033 "info" : {
15034 "POST" : {
44660702
DM
15035 "description" : "Create a container clone/copy",
15036 "method" : "POST",
56122987 15037 "name" : "clone_vm",
7aacca6f
DM
15038 "parameters" : {
15039 "additionalProperties" : 0,
15040 "properties" : {
44660702
DM
15041 "description" : {
15042 "description" : "Description for the new CT.",
7aacca6f 15043 "optional" : 1,
44660702 15044 "type" : "string"
7aacca6f
DM
15045 },
15046 "experimental" : {
7aacca6f 15047 "default" : 0,
44660702
DM
15048 "description" : "The clone feature is experimental, set this flag if you know what you are doing.",
15049 "type" : "boolean"
7aacca6f 15050 },
44660702
DM
15051 "full" : {
15052 "default" : 0,
15053 "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 15054 "optional" : 1,
44660702 15055 "type" : "boolean"
7aacca6f
DM
15056 },
15057 "hostname" : {
44660702 15058 "description" : "Set a hostname for the new CT.",
7aacca6f 15059 "format" : "dns-name",
7aacca6f 15060 "optional" : 1,
44660702 15061 "type" : "string"
7aacca6f 15062 },
44660702
DM
15063 "newid" : {
15064 "description" : "VMID for the clone.",
7aacca6f 15065 "format" : "pve-vmid",
44660702 15066 "minimum" : 1,
7aacca6f
DM
15067 "type" : "integer"
15068 },
15069 "node" : {
15070 "description" : "The cluster node name.",
44660702
DM
15071 "format" : "pve-node",
15072 "type" : "string"
15073 },
15074 "pool" : {
15075 "description" : "Add the new CT to the specified pool.",
15076 "format" : "pve-poolid",
15077 "optional" : 1,
15078 "type" : "string"
7aacca6f
DM
15079 },
15080 "snapname" : {
44660702 15081 "description" : "The name of the snapshot.",
7aacca6f
DM
15082 "format" : "pve-configid",
15083 "maxLength" : 40,
7aacca6f 15084 "optional" : 1,
44660702 15085 "type" : "string"
7aacca6f
DM
15086 },
15087 "storage" : {
44660702 15088 "description" : "Target storage for full clone.",
7aacca6f
DM
15089 "format" : "pve-storage-id",
15090 "optional" : 1,
7aacca6f 15091 "requires" : "full",
44660702
DM
15092 "type" : "string"
15093 },
15094 "vmid" : {
15095 "description" : "The (unique) ID of the VM.",
15096 "format" : "pve-vmid",
15097 "minimum" : 1,
15098 "type" : "integer"
7aacca6f
DM
15099 }
15100 }
56122987
DM
15101 },
15102 "permissions" : {
56122987
DM
15103 "check" : [
15104 "and",
15105 [
15106 "perm",
15107 "/vms/{vmid}",
15108 [
15109 "VM.Clone"
15110 ]
15111 ],
15112 [
15113 "or",
15114 [
15115 "perm",
15116 "/vms/{newid}",
15117 [
15118 "VM.Allocate"
15119 ]
15120 ],
15121 [
15122 "perm",
15123 "/pool/{pool}",
15124 [
15125 "VM.Allocate"
15126 ],
15127 "require_param",
15128 "pool"
15129 ]
15130 ]
7aacca6f
DM
15131 ],
15132 "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 15133 },
44660702 15134 "protected" : 1,
56122987 15135 "proxyto" : "node",
7aacca6f
DM
15136 "returns" : {
15137 "type" : "string"
56122987
DM
15138 }
15139 }
44660702
DM
15140 },
15141 "leaf" : 1,
15142 "path" : "/nodes/{node}/lxc/{vmid}/clone",
15143 "text" : "clone"
56122987
DM
15144 },
15145 {
56122987
DM
15146 "info" : {
15147 "PUT" : {
44660702
DM
15148 "description" : "Resize a container mountpoint.",
15149 "method" : "PUT",
15150 "name" : "resize_vm",
56122987 15151 "parameters" : {
44660702 15152 "additionalProperties" : 0,
56122987 15153 "properties" : {
44660702
DM
15154 "digest" : {
15155 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
15156 "maxLength" : 40,
15157 "optional" : 1,
15158 "type" : "string"
56122987
DM
15159 },
15160 "disk" : {
7aacca6f 15161 "description" : "The disk you want to resize.",
56122987
DM
15162 "enum" : [
15163 "rootfs",
15164 "mp0",
15165 "mp1",
15166 "mp2",
15167 "mp3",
15168 "mp4",
15169 "mp5",
15170 "mp6",
15171 "mp7",
15172 "mp8",
15173 "mp9"
15174 ],
7aacca6f
DM
15175 "type" : "string"
15176 },
44660702
DM
15177 "node" : {
15178 "description" : "The cluster node name.",
15179 "format" : "pve-node",
15180 "type" : "string"
15181 },
15182 "size" : {
15183 "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.",
15184 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
15185 "type" : "string"
15186 },
15187 "vmid" : {
15188 "description" : "The (unique) ID of the VM.",
15189 "format" : "pve-vmid",
15190 "minimum" : 1,
15191 "type" : "integer"
56122987 15192 }
44660702 15193 }
56122987 15194 },
7aacca6f
DM
15195 "permissions" : {
15196 "check" : [
15197 "perm",
15198 "/vms/{vmid}",
15199 [
15200 "VM.Config.Disk"
15201 ],
15202 "any",
15203 1
15204 ]
15205 },
44660702 15206 "protected" : 1,
7aacca6f
DM
15207 "proxyto" : "node",
15208 "returns" : {
15209 "description" : "the task ID.",
15210 "type" : "string"
15211 }
56122987
DM
15212 }
15213 },
44660702 15214 "leaf" : 1,
7aacca6f 15215 "path" : "/nodes/{node}/lxc/{vmid}/resize",
44660702 15216 "text" : "resize"
56122987
DM
15217 }
15218 ],
15219 "info" : {
15220 "DELETE" : {
7aacca6f 15221 "description" : "Destroy the container (also delete all uses files).",
44660702
DM
15222 "method" : "DELETE",
15223 "name" : "destroy_vm",
15224 "parameters" : {
15225 "additionalProperties" : 0,
15226 "properties" : {
15227 "node" : {
15228 "description" : "The cluster node name.",
15229 "format" : "pve-node",
15230 "type" : "string"
15231 },
15232 "vmid" : {
15233 "description" : "The (unique) ID of the VM.",
15234 "format" : "pve-vmid",
15235 "minimum" : 1,
15236 "type" : "integer"
15237 }
15238 }
15239 },
7aacca6f
DM
15240 "permissions" : {
15241 "check" : [
15242 "perm",
15243 "/vms/{vmid}",
15244 [
15245 "VM.Allocate"
15246 ]
15247 ]
15248 },
44660702
DM
15249 "protected" : 1,
15250 "proxyto" : "node",
56122987
DM
15251 "returns" : {
15252 "type" : "string"
44660702 15253 }
56122987
DM
15254 },
15255 "GET" : {
7aacca6f 15256 "description" : "Directory index",
44660702 15257 "method" : "GET",
7aacca6f 15258 "name" : "vmdiridx",
56122987 15259 "parameters" : {
7aacca6f 15260 "additionalProperties" : 0,
56122987
DM
15261 "properties" : {
15262 "node" : {
7aacca6f 15263 "description" : "The cluster node name.",
44660702
DM
15264 "format" : "pve-node",
15265 "type" : "string"
56122987
DM
15266 },
15267 "vmid" : {
15268 "description" : "The (unique) ID of the VM.",
56122987 15269 "format" : "pve-vmid",
44660702
DM
15270 "minimum" : 1,
15271 "type" : "integer"
56122987 15272 }
7aacca6f 15273 }
56122987 15274 },
56122987
DM
15275 "permissions" : {
15276 "user" : "all"
44660702
DM
15277 },
15278 "proxyto" : "node",
15279 "returns" : {
15280 "items" : {
15281 "properties" : {
15282 "subdir" : {
15283 "type" : "string"
15284 }
15285 },
15286 "type" : "object"
15287 },
15288 "links" : [
15289 {
15290 "href" : "{subdir}",
15291 "rel" : "child"
15292 }
15293 ],
15294 "type" : "array"
56122987
DM
15295 }
15296 }
44660702
DM
15297 },
15298 "leaf" : 0,
15299 "path" : "/nodes/{node}/lxc/{vmid}",
15300 "text" : "{vmid}"
56122987
DM
15301 }
15302 ],
56122987 15303 "info" : {
44660702
DM
15304 "GET" : {
15305 "description" : "LXC container index (per node).",
15306 "method" : "GET",
15307 "name" : "vmlist",
15308 "parameters" : {
15309 "additionalProperties" : 0,
15310 "properties" : {
15311 "node" : {
15312 "description" : "The cluster node name.",
15313 "format" : "pve-node",
15314 "type" : "string"
15315 }
15316 }
15317 },
15318 "permissions" : {
15319 "description" : "Only list CTs where you have VM.Audit permissons on /vms/<vmid>.",
15320 "user" : "all"
15321 },
15322 "protected" : 1,
15323 "proxyto" : "node",
15324 "returns" : {
15325 "items" : {
15326 "properties" : {},
15327 "type" : "object"
15328 },
15329 "links" : [
15330 {
15331 "href" : "{vmid}",
15332 "rel" : "child"
15333 }
15334 ],
15335 "type" : "array"
15336 }
15337 },
56122987 15338 "POST" : {
44660702 15339 "description" : "Create or restore a container.",
7aacca6f
DM
15340 "method" : "POST",
15341 "name" : "create_vm",
56122987 15342 "parameters" : {
7aacca6f 15343 "additionalProperties" : 0,
56122987 15344 "properties" : {
44660702
DM
15345 "arch" : {
15346 "default" : "amd64",
15347 "description" : "OS architecture type.",
15348 "enum" : [
15349 "amd64",
15350 "i386"
15351 ],
7aacca6f 15352 "optional" : 1,
44660702 15353 "type" : "string"
7aacca6f 15354 },
44660702
DM
15355 "cmode" : {
15356 "default" : "tty",
15357 "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).",
15358 "enum" : [
15359 "shell",
15360 "console",
15361 "tty"
15362 ],
7aacca6f 15363 "optional" : 1,
44660702 15364 "type" : "string"
7aacca6f
DM
15365 },
15366 "console" : {
7aacca6f 15367 "default" : 1,
44660702 15368 "description" : "Attach a console device (/dev/console) to the container.",
56122987 15369 "optional" : 1,
7aacca6f 15370 "type" : "boolean"
56122987 15371 },
44660702
DM
15372 "cpulimit" : {
15373 "default" : 0,
15374 "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.",
15375 "maximum" : 128,
15376 "minimum" : 0,
56122987 15377 "optional" : 1,
44660702 15378 "type" : "number"
56122987 15379 },
44660702
DM
15380 "cpuunits" : {
15381 "default" : 1024,
15382 "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.",
15383 "maximum" : 500000,
15384 "minimum" : 0,
56122987 15385 "optional" : 1,
44660702 15386 "type" : "integer"
7aacca6f
DM
15387 },
15388 "description" : {
44660702 15389 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 15390 "optional" : 1,
44660702 15391 "type" : "string"
7aacca6f 15392 },
44660702
DM
15393 "force" : {
15394 "description" : "Allow to overwrite existing container.",
7aacca6f 15395 "optional" : 1,
44660702
DM
15396 "type" : "boolean"
15397 },
15398 "hostname" : {
15399 "description" : "Set a host name for the container.",
15400 "format" : "dns-name",
15401 "maxLength" : 255,
15402 "optional" : 1,
15403 "type" : "string"
15404 },
15405 "ignore-unpack-errors" : {
15406 "description" : "Ignore errors when extracting the template.",
15407 "optional" : 1,
15408 "type" : "boolean"
15409 },
15410 "lock" : {
15411 "description" : "Lock/unlock the VM.",
7aacca6f
DM
15412 "enum" : [
15413 "migrate",
15414 "backup",
15415 "snapshot",
15416 "rollback"
15417 ],
44660702
DM
15418 "optional" : 1,
15419 "type" : "string"
7aacca6f 15420 },
44660702
DM
15421 "memory" : {
15422 "default" : 512,
15423 "description" : "Amount of RAM for the VM in MB.",
15424 "minimum" : 16,
7aacca6f 15425 "optional" : 1,
44660702
DM
15426 "type" : "integer"
15427 },
15428 "mp[n]" : {
c2993fe5 15429 "description" : "Use volume as container mount point.",
56122987 15430 "format" : {
7aacca6f
DM
15431 "acl" : {
15432 "description" : "Explicitly enable or disable ACL support.",
15433 "optional" : 1,
44660702 15434 "type" : "boolean"
56122987
DM
15435 },
15436 "backup" : {
56122987 15437 "description" : "Whether to include the mountpoint in backups.",
44660702
DM
15438 "optional" : 1,
15439 "type" : "boolean"
15440 },
15441 "mp" : {
15442 "description" : "Path to the mountpoint as seen from inside the container.",
15443 "format" : "pve-lxc-mp-string",
15444 "format_description" : "Path",
15445 "type" : "string"
15446 },
15447 "quota" : {
15448 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15449 "optional" : 1,
44660702
DM
15450 "type" : "boolean"
15451 },
15452 "ro" : {
15453 "description" : "Read-only mountpoint (not supported with bind mounts)",
44660702
DM
15454 "optional" : 1,
15455 "type" : "boolean"
7aacca6f
DM
15456 },
15457 "size" : {
44660702 15458 "description" : "Volume size (read only value).",
7aacca6f
DM
15459 "format" : "disk-size",
15460 "format_description" : "DiskSize",
7aacca6f
DM
15461 "optional" : 1,
15462 "type" : "string"
56122987
DM
15463 },
15464 "volume" : {
7aacca6f 15465 "default_key" : 1,
44660702 15466 "description" : "Volume, device or directory to mount into the container.",
56122987 15467 "format" : "pve-lxc-mp-string",
56122987 15468 "format_description" : "volume",
44660702 15469 "type" : "string"
56122987 15470 }
44660702 15471 },
56122987 15472 "optional" : 1,
7aacca6f 15473 "type" : "string"
56122987 15474 },
44660702
DM
15475 "nameserver" : {
15476 "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.",
15477 "format" : "address-list",
56122987 15478 "optional" : 1,
44660702 15479 "type" : "string"
56122987 15480 },
44660702
DM
15481 "net[n]" : {
15482 "description" : "Specifies network interfaces for the container.",
7aacca6f 15483 "format" : {
44660702
DM
15484 "bridge" : {
15485 "description" : "Bridge to attach the network device to.",
f004f5b9 15486 "format_description" : "bridge",
7aacca6f 15487 "optional" : 1,
44660702
DM
15488 "pattern" : "[-_.\\w\\d]+",
15489 "type" : "string"
7aacca6f 15490 },
44660702
DM
15491 "firewall" : {
15492 "description" : "Controls whether this interface's firewall rules should be used.",
7aacca6f 15493 "optional" : 1,
44660702 15494 "type" : "boolean"
7aacca6f 15495 },
44660702
DM
15496 "gw" : {
15497 "description" : "Default gateway for IPv4 traffic.",
15498 "format" : "ipv4",
15499 "format_description" : "GatewayIPv4",
7aacca6f 15500 "optional" : 1,
44660702 15501 "type" : "string"
7aacca6f 15502 },
44660702
DM
15503 "gw6" : {
15504 "description" : "Default gateway for IPv6 traffic.",
15505 "format" : "ipv6",
15506 "format_description" : "GatewayIPv6",
15507 "optional" : 1,
15508 "type" : "string"
7aacca6f 15509 },
44660702 15510 "hwaddr" : {
f004f5b9
DM
15511 "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)",
15512 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
15513 "optional" : 1,
15514 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
7aacca6f
DM
15515 "type" : "string"
15516 },
44660702
DM
15517 "ip" : {
15518 "description" : "IPv4 address in CIDR format.",
15519 "format" : "pve-ipv4-config",
15520 "format_description" : "IPv4Format/CIDR",
7aacca6f 15521 "optional" : 1,
44660702 15522 "type" : "string"
7aacca6f 15523 },
44660702
DM
15524 "ip6" : {
15525 "description" : "IPv6 address in CIDR format.",
15526 "format" : "pve-ipv6-config",
15527 "format_description" : "IPv6Format/CIDR",
15528 "optional" : 1,
15529 "type" : "string"
15530 },
15531 "mtu" : {
15532 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702
DM
15533 "minimum" : 64,
15534 "optional" : 1,
15535 "type" : "integer"
15536 },
15537 "name" : {
15538 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 15539 "format_description" : "string",
44660702
DM
15540 "pattern" : "[-_.\\w\\d]+",
15541 "type" : "string"
15542 },
15543 "rate" : {
15544 "description" : "Apply rate limiting to the interface",
15545 "format_description" : "mbps",
15546 "optional" : 1,
15547 "type" : "number"
15548 },
15549 "tag" : {
15550 "description" : "VLAN tag for this interface.",
44660702 15551 "maximum" : "4094",
c2993fe5 15552 "minimum" : "1",
44660702
DM
15553 "optional" : 1,
15554 "type" : "integer"
15555 },
15556 "trunks" : {
15557 "description" : "VLAN ids to pass through the interface",
15558 "format_description" : "vlanid[;vlanid...]",
15559 "optional" : 1,
15560 "pattern" : "(?^:\\d+(?:;\\d+)*)",
15561 "type" : "string"
15562 },
15563 "type" : {
15564 "description" : "Network interface type.",
15565 "enum" : [
15566 "veth"
15567 ],
15568 "optional" : 1,
15569 "type" : "string"
7aacca6f
DM
15570 }
15571 },
56122987 15572 "optional" : 1,
44660702 15573 "type" : "string"
56122987 15574 },
44660702
DM
15575 "node" : {
15576 "description" : "The cluster node name.",
15577 "format" : "pve-node",
15578 "type" : "string"
56122987 15579 },
44660702
DM
15580 "onboot" : {
15581 "default" : 0,
15582 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 15583 "optional" : 1,
44660702
DM
15584 "type" : "boolean"
15585 },
15586 "ostemplate" : {
15587 "description" : "The OS template or backup file.",
15588 "maxLength" : 255,
15589 "type" : "string"
56122987
DM
15590 },
15591 "ostype" : {
7aacca6f 15592 "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
15593 "enum" : [
15594 "debian",
15595 "ubuntu",
15596 "centos",
15597 "fedora",
15598 "opensuse",
15599 "archlinux",
15600 "alpine",
15601 "unmanaged"
44660702 15602 ],
56122987 15603 "optional" : 1,
7aacca6f 15604 "type" : "string"
56122987 15605 },
44660702
DM
15606 "password" : {
15607 "description" : "Sets root password inside container.",
15608 "minLength" : 5,
7aacca6f
DM
15609 "optional" : 1,
15610 "type" : "string"
15611 },
44660702
DM
15612 "pool" : {
15613 "description" : "Add the VM to the specified pool.",
15614 "format" : "pve-poolid",
7aacca6f 15615 "optional" : 1,
44660702 15616 "type" : "string"
7aacca6f 15617 },
44660702
DM
15618 "protection" : {
15619 "default" : 0,
15620 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
7aacca6f 15621 "optional" : 1,
44660702 15622 "type" : "boolean"
7aacca6f 15623 },
44660702
DM
15624 "restore" : {
15625 "description" : "Mark this as restore task.",
15626 "optional" : 1,
15627 "type" : "boolean"
7aacca6f 15628 },
44660702
DM
15629 "rootfs" : {
15630 "description" : "Use volume as container root.",
56122987 15631 "format" : {
44660702
DM
15632 "acl" : {
15633 "description" : "Explicitly enable or disable ACL support.",
56122987 15634 "optional" : 1,
44660702 15635 "type" : "boolean"
56122987 15636 },
44660702
DM
15637 "quota" : {
15638 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15639 "optional" : 1,
44660702 15640 "type" : "boolean"
7aacca6f 15641 },
44660702
DM
15642 "ro" : {
15643 "description" : "Read-only mountpoint (not supported with bind mounts)",
7aacca6f 15644 "optional" : 1,
44660702 15645 "type" : "boolean"
7aacca6f 15646 },
44660702
DM
15647 "size" : {
15648 "description" : "Volume size (read only value).",
15649 "format" : "disk-size",
15650 "format_description" : "DiskSize",
7aacca6f
DM
15651 "optional" : 1,
15652 "type" : "string"
15653 },
44660702
DM
15654 "volume" : {
15655 "default_key" : 1,
15656 "description" : "Volume, device or directory to mount into the container.",
15657 "format" : "pve-lxc-mp-string",
15658 "format_description" : "volume",
15659 "type" : "string"
56122987 15660 }
7aacca6f 15661 },
7aacca6f
DM
15662 "optional" : 1,
15663 "type" : "string"
44660702
DM
15664 },
15665 "searchdomain" : {
15666 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
15667 "format" : "dns-name-list",
15668 "optional" : 1,
15669 "type" : "string"
15670 },
15671 "ssh-public-keys" : {
15672 "description" : "Setup public SSH keys (one key per line, OpenSSH format).",
15673 "optional" : 1,
15674 "type" : "string"
15675 },
15676 "startup" : {
15677 "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.",
15678 "format" : "pve-startup-order",
15679 "optional" : 1,
7aacca6f 15680 "type" : "string",
44660702 15681 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 15682 },
44660702
DM
15683 "storage" : {
15684 "default" : "local",
15685 "description" : "Default Storage.",
15686 "format" : "pve-storage-id",
15687 "optional" : 1,
7aacca6f 15688 "type" : "string"
7aacca6f 15689 },
44660702
DM
15690 "swap" : {
15691 "default" : 512,
15692 "description" : "Amount of SWAP for the VM in MB.",
15693 "minimum" : 0,
15694 "optional" : 1,
15695 "type" : "integer"
15696 },
15697 "template" : {
15698 "default" : 0,
15699 "description" : "Enable/disable Template.",
15700 "optional" : 1,
15701 "type" : "boolean"
7aacca6f 15702 },
44660702
DM
15703 "tty" : {
15704 "default" : 2,
15705 "description" : "Specify the number of tty available to the container",
15706 "maximum" : 6,
15707 "minimum" : 0,
15708 "optional" : 1,
15709 "type" : "integer"
7aacca6f 15710 },
44660702
DM
15711 "unprivileged" : {
15712 "default" : 0,
15713 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
15714 "optional" : 1,
15715 "type" : "boolean"
15716 },
15717 "unused[n]" : {
c2993fe5 15718 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702
DM
15719 "format" : "pve-volume-id",
15720 "optional" : 1,
15721 "type" : "string"
15722 },
15723 "vmid" : {
15724 "description" : "The (unique) ID of the VM.",
15725 "format" : "pve-vmid",
15726 "minimum" : 1,
15727 "type" : "integer"
15728 }
7aacca6f
DM
15729 }
15730 },
44660702
DM
15731 "permissions" : {
15732 "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.",
15733 "user" : "all"
15734 },
15735 "protected" : 1,
15736 "proxyto" : "node",
15737 "returns" : {
15738 "type" : "string"
15739 }
15740 }
15741 },
15742 "leaf" : 0,
15743 "path" : "/nodes/{node}/lxc",
15744 "text" : "lxc"
15745 },
15746 {
15747 "children" : [
15748 {
56122987
DM
15749 "children" : [
15750 {
7aacca6f
DM
15751 "children" : [
15752 {
7aacca6f
DM
15753 "info" : {
15754 "POST" : {
44660702
DM
15755 "description" : "ceph osd in",
15756 "method" : "POST",
15757 "name" : "in",
15758 "parameters" : {
15759 "additionalProperties" : 0,
15760 "properties" : {
15761 "node" : {
15762 "description" : "The cluster node name.",
15763 "format" : "pve-node",
15764 "type" : "string"
15765 },
15766 "osdid" : {
15767 "description" : "OSD ID",
15768 "type" : "integer"
15769 }
15770 }
15771 },
56122987
DM
15772 "permissions" : {
15773 "check" : [
15774 "perm",
15775 "/",
15776 [
15777 "Sys.Modify"
15778 ]
15779 ]
7aacca6f 15780 },
44660702 15781 "protected" : 1,
7aacca6f
DM
15782 "proxyto" : "node",
15783 "returns" : {
15784 "type" : "null"
44660702 15785 }
56122987
DM
15786 }
15787 },
44660702 15788 "leaf" : 1,
7aacca6f 15789 "path" : "/nodes/{node}/ceph/osd/{osdid}/in",
44660702 15790 "text" : "in"
56122987
DM
15791 },
15792 {
56122987
DM
15793 "info" : {
15794 "POST" : {
44660702
DM
15795 "description" : "ceph osd out",
15796 "method" : "POST",
15797 "name" : "out",
15798 "parameters" : {
15799 "additionalProperties" : 0,
15800 "properties" : {
15801 "node" : {
15802 "description" : "The cluster node name.",
15803 "format" : "pve-node",
15804 "type" : "string"
15805 },
15806 "osdid" : {
15807 "description" : "OSD ID",
15808 "type" : "integer"
15809 }
15810 }
15811 },
56122987
DM
15812 "permissions" : {
15813 "check" : [
15814 "perm",
15815 "/",
15816 [
15817 "Sys.Modify"
15818 ]
15819 ]
15820 },
44660702 15821 "protected" : 1,
56122987 15822 "proxyto" : "node",
7aacca6f
DM
15823 "returns" : {
15824 "type" : "null"
44660702
DM
15825 }
15826 }
15827 },
15828 "leaf" : 1,
15829 "path" : "/nodes/{node}/ceph/osd/{osdid}/out",
15830 "text" : "out"
15831 }
15832 ],
15833 "info" : {
15834 "DELETE" : {
15835 "description" : "Destroy OSD",
15836 "method" : "DELETE",
15837 "name" : "destroyosd",
15838 "parameters" : {
15839 "additionalProperties" : 0,
15840 "properties" : {
15841 "cleanup" : {
15842 "default" : 0,
15843 "description" : "If set, we remove partition table entries.",
15844 "optional" : 1,
15845 "type" : "boolean"
7aacca6f 15846 },
44660702
DM
15847 "node" : {
15848 "description" : "The cluster node name.",
15849 "format" : "pve-node",
15850 "type" : "string"
56122987 15851 },
44660702
DM
15852 "osdid" : {
15853 "description" : "OSD ID",
15854 "type" : "integer"
15855 }
56122987
DM
15856 }
15857 },
44660702
DM
15858 "protected" : 1,
15859 "proxyto" : "node",
15860 "returns" : {
15861 "type" : "string"
15862 }
15863 }
15864 },
15865 "leaf" : 0,
15866 "path" : "/nodes/{node}/ceph/osd/{osdid}",
15867 "text" : "{osdid}"
15868 }
15869 ],
15870 "info" : {
15871 "GET" : {
15872 "description" : "Get Ceph osd list/tree.",
15873 "method" : "GET",
15874 "name" : "index",
15875 "parameters" : {
15876 "additionalProperties" : 0,
15877 "properties" : {
15878 "node" : {
15879 "description" : "The cluster node name.",
15880 "format" : "pve-node",
15881 "type" : "string"
15882 }
15883 }
15884 },
15885 "permissions" : {
15886 "check" : [
15887 "perm",
15888 "/",
15889 [
15890 "Sys.Audit",
15891 "Datastore.Audit"
15892 ],
15893 "any",
15894 1
15895 ]
15896 },
15897 "protected" : 1,
15898 "proxyto" : "node",
15899 "returns" : {
15900 "type" : "object"
15901 }
15902 },
15903 "POST" : {
15904 "description" : "Create OSD",
15905 "method" : "POST",
15906 "name" : "createosd",
15907 "parameters" : {
15908 "additionalProperties" : 0,
15909 "properties" : {
15910 "dev" : {
15911 "description" : "Block device name.",
15912 "type" : "string"
15913 },
15914 "fstype" : {
15915 "default" : "xfs",
15916 "description" : "File system type.",
15917 "enum" : [
15918 "xfs",
15919 "ext4",
15920 "btrfs"
15921 ],
15922 "optional" : 1,
15923 "type" : "string"
15924 },
15925 "journal_dev" : {
15926 "description" : "Block device name for journal.",
15927 "optional" : 1,
15928 "type" : "string"
15929 },
15930 "node" : {
15931 "description" : "The cluster node name.",
15932 "format" : "pve-node",
15933 "type" : "string"
15934 }
56122987 15935 }
44660702
DM
15936 },
15937 "protected" : 1,
15938 "proxyto" : "node",
15939 "returns" : {
15940 "type" : "string"
15941 }
56122987 15942 }
44660702 15943 },
7aacca6f 15944 "leaf" : 0,
44660702
DM
15945 "path" : "/nodes/{node}/ceph/osd",
15946 "text" : "osd"
7aacca6f
DM
15947 },
15948 {
56122987
DM
15949 "info" : {
15950 "GET" : {
7aacca6f 15951 "description" : "List local disks.",
44660702
DM
15952 "method" : "GET",
15953 "name" : "disks",
15954 "parameters" : {
15955 "additionalProperties" : 0,
15956 "properties" : {
15957 "node" : {
15958 "description" : "The cluster node name.",
15959 "format" : "pve-node",
15960 "type" : "string"
15961 },
15962 "type" : {
15963 "description" : "Only list specific types of disks.",
15964 "enum" : [
15965 "unused",
15966 "journal_disks"
15967 ],
15968 "optional" : 1,
15969 "type" : "string"
15970 }
15971 }
15972 },
56122987
DM
15973 "permissions" : {
15974 "check" : [
15975 "perm",
15976 "/",
15977 [
15978 "Sys.Audit",
15979 "Datastore.Audit"
15980 ],
15981 "any",
15982 1
15983 ]
7aacca6f 15984 },
44660702
DM
15985 "protected" : 1,
15986 "proxyto" : "node",
56122987 15987 "returns" : {
7aacca6f
DM
15988 "items" : {
15989 "properties" : {
44660702
DM
15990 "dev" : {
15991 "type" : "string"
15992 },
15993 "gpt" : {
15994 "type" : "boolean"
15995 },
15996 "model" : {
15997 "optional" : 1,
15998 "type" : "string"
7aacca6f
DM
15999 },
16000 "osdid" : {
16001 "type" : "integer"
16002 },
16003 "serial" : {
7aacca6f
DM
16004 "optional" : 1,
16005 "type" : "string"
16006 },
16007 "size" : {
16008 "type" : "integer"
16009 },
44660702
DM
16010 "used" : {
16011 "optional" : 1,
7aacca6f
DM
16012 "type" : "string"
16013 },
44660702
DM
16014 "vendor" : {
16015 "optional" : 1,
16016 "type" : "string"
7aacca6f
DM
16017 }
16018 },
16019 "type" : "object"
44660702
DM
16020 },
16021 "type" : "array"
16022 }
56122987 16023 }
44660702
DM
16024 },
16025 "leaf" : 1,
16026 "path" : "/nodes/{node}/ceph/disks",
16027 "text" : "disks"
56122987
DM
16028 },
16029 {
56122987
DM
16030 "info" : {
16031 "GET" : {
7aacca6f 16032 "description" : "Get Ceph configuration.",
44660702
DM
16033 "method" : "GET",
16034 "name" : "config",
56122987 16035 "parameters" : {
7aacca6f 16036 "additionalProperties" : 0,
56122987 16037 "properties" : {
56122987 16038 "node" : {
7aacca6f 16039 "description" : "The cluster node name.",
44660702 16040 "format" : "pve-node",
56122987
DM
16041 "type" : "string"
16042 }
7aacca6f 16043 }
56122987 16044 },
56122987
DM
16045 "permissions" : {
16046 "check" : [
16047 "perm",
16048 "/",
16049 [
16050 "Sys.Audit",
16051 "Datastore.Audit"
16052 ],
16053 "any",
16054 1
16055 ]
44660702
DM
16056 },
16057 "returns" : {
16058 "type" : "string"
7aacca6f
DM
16059 }
16060 }
44660702
DM
16061 },
16062 "leaf" : 1,
16063 "path" : "/nodes/{node}/ceph/config",
16064 "text" : "config"
7aacca6f
DM
16065 },
16066 {
7aacca6f
DM
16067 "children" : [
16068 {
7aacca6f
DM
16069 "info" : {
16070 "DELETE" : {
7aacca6f 16071 "description" : "Destroy Ceph monitor.",
44660702
DM
16072 "method" : "DELETE",
16073 "name" : "destroymon",
16074 "parameters" : {
16075 "additionalProperties" : 0,
16076 "properties" : {
16077 "monid" : {
16078 "description" : "Monitor ID",
16079 "type" : "integer"
16080 },
16081 "node" : {
16082 "description" : "The cluster node name.",
16083 "format" : "pve-node",
16084 "type" : "string"
16085 }
16086 }
16087 },
7aacca6f
DM
16088 "permissions" : {
16089 "check" : [
16090 "perm",
16091 "/",
16092 [
16093 "Sys.Modify"
16094 ]
16095 ]
16096 },
44660702
DM
16097 "protected" : 1,
16098 "proxyto" : "node",
7aacca6f
DM
16099 "returns" : {
16100 "type" : "string"
44660702 16101 }
7aacca6f 16102 }
44660702
DM
16103 },
16104 "leaf" : 1,
16105 "path" : "/nodes/{node}/ceph/mon/{monid}",
16106 "text" : "{monid}"
7aacca6f
DM
16107 }
16108 ],
16109 "info" : {
16110 "GET" : {
44660702 16111 "description" : "Get Ceph monitor list.",
7aacca6f 16112 "method" : "GET",
44660702 16113 "name" : "listmon",
7aacca6f
DM
16114 "parameters" : {
16115 "additionalProperties" : 0,
16116 "properties" : {
16117 "node" : {
7aacca6f 16118 "description" : "The cluster node name.",
44660702
DM
16119 "format" : "pve-node",
16120 "type" : "string"
7aacca6f
DM
16121 }
16122 }
16123 },
44660702
DM
16124 "permissions" : {
16125 "check" : [
16126 "perm",
16127 "/",
16128 [
16129 "Sys.Audit",
16130 "Datastore.Audit"
16131 ],
16132 "any",
16133 1
16134 ]
16135 },
7aacca6f 16136 "protected" : 1,
44660702 16137 "proxyto" : "node",
7aacca6f
DM
16138 "returns" : {
16139 "items" : {
16140 "properties" : {
44660702 16141 "addr" : {
7aacca6f 16142 "type" : "string"
56122987 16143 },
44660702 16144 "name" : {
56122987
DM
16145 "type" : "string"
16146 }
7aacca6f
DM
16147 },
16148 "type" : "object"
56122987 16149 },
7aacca6f
DM
16150 "links" : [
16151 {
16152 "href" : "{name}",
16153 "rel" : "child"
16154 }
16155 ],
56122987 16156 "type" : "array"
44660702 16157 }
7aacca6f
DM
16158 },
16159 "POST" : {
44660702
DM
16160 "description" : "Create Ceph Monitor",
16161 "method" : "POST",
16162 "name" : "createmon",
16163 "parameters" : {
16164 "additionalProperties" : 0,
16165 "properties" : {
16166 "node" : {
16167 "description" : "The cluster node name.",
16168 "format" : "pve-node",
16169 "type" : "string"
16170 }
16171 }
16172 },
7aacca6f
DM
16173 "permissions" : {
16174 "check" : [
16175 "perm",
16176 "/",
16177 [
16178 "Sys.Modify"
16179 ]
16180 ]
16181 },
44660702 16182 "protected" : 1,
7aacca6f 16183 "proxyto" : "node",
56122987
DM
16184 "returns" : {
16185 "type" : "string"
44660702 16186 }
56122987 16187 }
44660702
DM
16188 },
16189 "leaf" : 0,
16190 "path" : "/nodes/{node}/ceph/mon",
16191 "text" : "mon"
56122987
DM
16192 },
16193 {
16194 "info" : {
16195 "POST" : {
44660702
DM
16196 "description" : "Create initial ceph default configuration and setup symlinks.",
16197 "method" : "POST",
16198 "name" : "init",
16199 "parameters" : {
16200 "additionalProperties" : 0,
16201 "properties" : {
16202 "network" : {
16203 "description" : "Use specific network for all ceph related traffic",
16204 "format" : "CIDR",
16205 "maxLength" : 128,
16206 "optional" : 1,
16207 "type" : "string"
16208 },
16209 "node" : {
16210 "description" : "The cluster node name.",
16211 "format" : "pve-node",
16212 "type" : "string"
16213 },
16214 "pg_bits" : {
16215 "default" : 6,
16216 "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.",
16217 "maximum" : 14,
16218 "minimum" : 6,
16219 "optional" : 1,
16220 "type" : "integer"
16221 },
16222 "size" : {
16223 "default" : 2,
16224 "description" : "Number of replicas per object",
16225 "maximum" : 3,
16226 "minimum" : 1,
16227 "optional" : 1,
16228 "type" : "integer"
16229 }
16230 }
7aacca6f 16231 },
56122987
DM
16232 "permissions" : {
16233 "check" : [
16234 "perm",
16235 "/",
16236 [
16237 "Sys.Modify"
16238 ]
16239 ]
16240 },
7aacca6f 16241 "protected" : 1,
44660702
DM
16242 "proxyto" : "node",
16243 "returns" : {
16244 "type" : "null"
7aacca6f
DM
16245 }
16246 }
16247 },
7aacca6f 16248 "leaf" : 1,
44660702
DM
16249 "path" : "/nodes/{node}/ceph/init",
16250 "text" : "init"
7aacca6f
DM
16251 },
16252 {
7aacca6f
DM
16253 "info" : {
16254 "POST" : {
44660702 16255 "description" : "Stop ceph services.",
7aacca6f
DM
16256 "method" : "POST",
16257 "name" : "stop",
16258 "parameters" : {
44660702 16259 "additionalProperties" : 0,
7aacca6f
DM
16260 "properties" : {
16261 "node" : {
7aacca6f 16262 "description" : "The cluster node name.",
44660702 16263 "format" : "pve-node",
56122987 16264 "type" : "string"
7aacca6f
DM
16265 },
16266 "service" : {
7aacca6f 16267 "description" : "Ceph service name.",
44660702
DM
16268 "optional" : 1,
16269 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
16270 "type" : "string"
56122987 16271 }
44660702 16272 }
7aacca6f
DM
16273 },
16274 "permissions" : {
16275 "check" : [
16276 "perm",
16277 "/",
16278 [
16279 "Sys.Modify"
16280 ]
16281 ]
16282 },
44660702
DM
16283 "protected" : 1,
16284 "proxyto" : "node",
16285 "returns" : {
16286 "type" : "string"
16287 }
7aacca6f 16288 }
44660702
DM
16289 },
16290 "leaf" : 1,
16291 "path" : "/nodes/{node}/ceph/stop",
16292 "text" : "stop"
7aacca6f
DM
16293 },
16294 {
7aacca6f
DM
16295 "info" : {
16296 "POST" : {
7aacca6f 16297 "description" : "Start ceph services.",
44660702 16298 "method" : "POST",
7aacca6f 16299 "name" : "start",
56122987
DM
16300 "parameters" : {
16301 "additionalProperties" : 0,
16302 "properties" : {
16303 "node" : {
7aacca6f 16304 "description" : "The cluster node name.",
44660702 16305 "format" : "pve-node",
7aacca6f
DM
16306 "type" : "string"
16307 },
16308 "service" : {
16309 "description" : "Ceph service name.",
44660702 16310 "optional" : 1,
7aacca6f 16311 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
44660702 16312 "type" : "string"
7aacca6f
DM
16313 }
16314 }
16315 },
44660702
DM
16316 "permissions" : {
16317 "check" : [
16318 "perm",
16319 "/",
16320 [
16321 "Sys.Modify"
16322 ]
16323 ]
16324 },
7aacca6f 16325 "protected" : 1,
44660702
DM
16326 "proxyto" : "node",
16327 "returns" : {
16328 "type" : "string"
16329 }
7aacca6f 16330 }
44660702
DM
16331 },
16332 "leaf" : 1,
16333 "path" : "/nodes/{node}/ceph/start",
16334 "text" : "start"
7aacca6f
DM
16335 },
16336 {
7aacca6f
DM
16337 "info" : {
16338 "GET" : {
44660702
DM
16339 "description" : "Get ceph status.",
16340 "method" : "GET",
16341 "name" : "status",
7aacca6f
DM
16342 "parameters" : {
16343 "additionalProperties" : 0,
16344 "properties" : {
16345 "node" : {
7aacca6f 16346 "description" : "The cluster node name.",
44660702 16347 "format" : "pve-node",
7aacca6f 16348 "type" : "string"
56122987
DM
16349 }
16350 }
16351 },
16352 "permissions" : {
16353 "check" : [
16354 "perm",
16355 "/",
16356 [
16357 "Sys.Audit",
16358 "Datastore.Audit"
16359 ],
16360 "any",
16361 1
16362 ]
16363 },
44660702
DM
16364 "protected" : 1,
16365 "proxyto" : "node",
56122987 16366 "returns" : {
7aacca6f
DM
16367 "type" : "object"
16368 }
16369 }
16370 },
44660702 16371 "leaf" : 1,
7aacca6f 16372 "path" : "/nodes/{node}/ceph/status",
44660702 16373 "text" : "status"
7aacca6f
DM
16374 },
16375 {
44660702
DM
16376 "children" : [
16377 {
16378 "info" : {
16379 "DELETE" : {
16380 "description" : "Destroy pool",
16381 "method" : "DELETE",
16382 "name" : "destroypool",
16383 "parameters" : {
16384 "additionalProperties" : 0,
16385 "properties" : {
16386 "name" : {
16387 "description" : "The name of the pool. It must be unique.",
16388 "type" : "string"
16389 },
16390 "node" : {
16391 "description" : "The cluster node name.",
16392 "format" : "pve-node",
16393 "type" : "string"
16394 }
16395 }
16396 },
16397 "permissions" : {
16398 "check" : [
16399 "perm",
16400 "/",
16401 [
16402 "Sys.Modify"
16403 ]
16404 ]
16405 },
16406 "protected" : 1,
16407 "proxyto" : "node",
16408 "returns" : {
16409 "type" : "null"
16410 }
16411 }
16412 },
16413 "leaf" : 1,
16414 "path" : "/nodes/{node}/ceph/pools/{name}",
16415 "text" : "{name}"
16416 }
16417 ],
7aacca6f
DM
16418 "info" : {
16419 "GET" : {
44660702
DM
16420 "description" : "List all pools.",
16421 "method" : "GET",
16422 "name" : "lspools",
7aacca6f
DM
16423 "parameters" : {
16424 "additionalProperties" : 0,
16425 "properties" : {
16426 "node" : {
7aacca6f 16427 "description" : "The cluster node name.",
44660702
DM
16428 "format" : "pve-node",
16429 "type" : "string"
7aacca6f
DM
16430 }
16431 }
16432 },
7aacca6f
DM
16433 "permissions" : {
16434 "check" : [
16435 "perm",
16436 "/",
16437 [
16438 "Sys.Audit",
16439 "Datastore.Audit"
16440 ],
16441 "any",
16442 1
16443 ]
16444 },
44660702
DM
16445 "protected" : 1,
16446 "proxyto" : "node",
7aacca6f 16447 "returns" : {
56122987 16448 "items" : {
56122987 16449 "properties" : {
7aacca6f
DM
16450 "pool" : {
16451 "type" : "integer"
16452 },
44660702
DM
16453 "pool_name" : {
16454 "type" : "string"
16455 },
7aacca6f
DM
16456 "size" : {
16457 "type" : "integer"
56122987 16458 }
44660702
DM
16459 },
16460 "type" : "object"
7aacca6f 16461 },
44660702
DM
16462 "links" : [
16463 {
16464 "href" : "{pool_name}",
16465 "rel" : "child"
16466 }
16467 ],
7aacca6f
DM
16468 "type" : "array"
16469 }
16470 },
16471 "POST" : {
7aacca6f 16472 "description" : "Create POOL",
7aacca6f 16473 "method" : "POST",
7aacca6f
DM
16474 "name" : "createpool",
16475 "parameters" : {
16476 "additionalProperties" : 0,
16477 "properties" : {
7aacca6f 16478 "crush_ruleset" : {
7aacca6f 16479 "default" : 0,
44660702 16480 "description" : "The ruleset to use for mapping object placement in the cluster.",
7aacca6f 16481 "maximum" : 32768,
44660702 16482 "minimum" : 0,
7aacca6f 16483 "optional" : 1,
44660702 16484 "type" : "integer"
56122987 16485 },
44660702
DM
16486 "min_size" : {
16487 "default" : 1,
16488 "description" : "Minimum number of replicas per object",
16489 "maximum" : 3,
16490 "minimum" : 1,
16491 "optional" : 1,
16492 "type" : "integer"
7aacca6f 16493 },
44660702
DM
16494 "name" : {
16495 "description" : "The name of the pool. It must be unique.",
16496 "type" : "string"
16497 },
16498 "node" : {
16499 "description" : "The cluster node name.",
16500 "format" : "pve-node",
16501 "type" : "string"
16502 },
16503 "pg_num" : {
16504 "default" : 64,
16505 "description" : "Number of placement groups.",
16506 "maximum" : 32768,
16507 "minimum" : 8,
16508 "optional" : 1,
16509 "type" : "integer"
16510 },
16511 "size" : {
16512 "default" : 2,
16513 "description" : "Number of replicas per object",
16514 "maximum" : 3,
16515 "minimum" : 1,
16516 "optional" : 1,
16517 "type" : "integer"
56122987
DM
16518 }
16519 }
44660702
DM
16520 },
16521 "permissions" : {
16522 "check" : [
16523 "perm",
16524 "/",
16525 [
16526 "Sys.Modify"
16527 ]
16528 ]
16529 },
16530 "protected" : 1,
16531 "proxyto" : "node",
16532 "returns" : {
16533 "type" : "null"
7aacca6f 16534 }
56122987 16535 }
44660702 16536 },
56122987 16537 "leaf" : 0,
44660702
DM
16538 "path" : "/nodes/{node}/ceph/pools",
16539 "text" : "pools"
56122987
DM
16540 },
16541 {
56122987 16542 "info" : {
7aacca6f 16543 "GET" : {
44660702
DM
16544 "description" : "Get OSD crush map",
16545 "method" : "GET",
16546 "name" : "crush",
16547 "parameters" : {
16548 "additionalProperties" : 0,
16549 "properties" : {
16550 "node" : {
16551 "description" : "The cluster node name.",
16552 "format" : "pve-node",
16553 "type" : "string"
16554 }
16555 }
16556 },
7aacca6f
DM
16557 "permissions" : {
16558 "check" : [
16559 "perm",
16560 "/",
16561 [
16562 "Sys.Audit",
16563 "Datastore.Audit"
16564 ],
16565 "any",
16566 1
16567 ]
16568 },
44660702 16569 "protected" : 1,
7aacca6f 16570 "proxyto" : "node",
56122987 16571 "returns" : {
7aacca6f 16572 "type" : "string"
44660702 16573 }
56122987
DM
16574 }
16575 },
44660702
DM
16576 "leaf" : 1,
16577 "path" : "/nodes/{node}/ceph/crush",
7aacca6f 16578 "text" : "crush"
56122987
DM
16579 },
16580 {
56122987 16581 "info" : {
7aacca6f 16582 "GET" : {
44660702
DM
16583 "description" : "Read ceph log",
16584 "method" : "GET",
16585 "name" : "log",
16586 "parameters" : {
16587 "additionalProperties" : 0,
16588 "properties" : {
16589 "limit" : {
16590 "minimum" : 0,
16591 "optional" : 1,
16592 "type" : "integer"
7aacca6f 16593 },
44660702
DM
16594 "node" : {
16595 "description" : "The cluster node name.",
16596 "format" : "pve-node",
16597 "type" : "string"
16598 },
16599 "start" : {
16600 "minimum" : 0,
16601 "optional" : 1,
16602 "type" : "integer"
16603 }
7aacca6f 16604 }
56122987 16605 },
56122987
DM
16606 "permissions" : {
16607 "check" : [
16608 "perm",
7aacca6f 16609 "/nodes/{node}",
56122987 16610 [
7aacca6f 16611 "Sys.Syslog"
56122987
DM
16612 ]
16613 ]
16614 },
7aacca6f 16615 "protected" : 1,
44660702
DM
16616 "proxyto" : "node",
16617 "returns" : {
16618 "items" : {
16619 "properties" : {
16620 "n" : {
16621 "description" : "Line number",
16622 "type" : "integer"
16623 },
16624 "t" : {
16625 "description" : "Line text",
16626 "type" : "string"
16627 }
56122987 16628 },
44660702 16629 "type" : "object"
56122987 16630 },
44660702 16631 "type" : "array"
7aacca6f 16632 }
56122987
DM
16633 }
16634 },
16635 "leaf" : 1,
44660702
DM
16636 "path" : "/nodes/{node}/ceph/log",
16637 "text" : "log"
7aacca6f
DM
16638 }
16639 ],
44660702
DM
16640 "info" : {
16641 "GET" : {
16642 "description" : "Directory index.",
16643 "method" : "GET",
16644 "name" : "index",
16645 "parameters" : {
16646 "additionalProperties" : 0,
16647 "properties" : {
16648 "node" : {
16649 "description" : "The cluster node name.",
16650 "format" : "pve-node",
16651 "type" : "string"
16652 }
16653 }
16654 },
16655 "permissions" : {
16656 "check" : [
16657 "perm",
16658 "/",
16659 [
16660 "Sys.Audit",
16661 "Datastore.Audit"
16662 ],
16663 "any",
16664 1
16665 ]
16666 },
16667 "returns" : {
16668 "items" : {
16669 "properties" : {},
16670 "type" : "object"
16671 },
16672 "links" : [
16673 {
16674 "href" : "{name}",
16675 "rel" : "child"
16676 }
16677 ],
16678 "type" : "array"
16679 }
16680 }
16681 },
7aacca6f 16682 "leaf" : 0,
44660702
DM
16683 "path" : "/nodes/{node}/ceph",
16684 "text" : "ceph"
7aacca6f
DM
16685 },
16686 {
7aacca6f
DM
16687 "info" : {
16688 "POST" : {
7aacca6f 16689 "description" : "Create backup.",
44660702 16690 "method" : "POST",
7aacca6f
DM
16691 "name" : "vzdump",
16692 "parameters" : {
44660702 16693 "additionalProperties" : 0,
7aacca6f 16694 "properties" : {
44660702
DM
16695 "all" : {
16696 "default" : 0,
16697 "description" : "Backup all known guest systems on this host.",
7aacca6f 16698 "optional" : 1,
44660702 16699 "type" : "boolean"
56122987 16700 },
44660702 16701 "bwlimit" : {
7aacca6f 16702 "default" : 0,
44660702
DM
16703 "description" : "Limit I/O bandwidth (KBytes per second).",
16704 "minimum" : 0,
7aacca6f 16705 "optional" : 1,
44660702 16706 "type" : "integer"
56122987 16707 },
44660702
DM
16708 "compress" : {
16709 "default" : "0",
16710 "description" : "Compress dump file.",
16711 "enum" : [
16712 "0",
16713 "1",
16714 "gzip",
16715 "lzo"
16716 ],
7aacca6f 16717 "optional" : 1,
44660702 16718 "type" : "string"
56122987 16719 },
44660702
DM
16720 "dumpdir" : {
16721 "description" : "Store resulting files to specified directory.",
7aacca6f 16722 "optional" : 1,
44660702 16723 "type" : "string"
7aacca6f 16724 },
44660702
DM
16725 "exclude" : {
16726 "description" : "Exclude specified guest systems (assumes --all)",
16727 "format" : "pve-vmid-list",
7aacca6f 16728 "optional" : 1,
44660702 16729 "type" : "string"
7aacca6f 16730 },
44660702
DM
16731 "exclude-path" : {
16732 "description" : "Exclude certain files/directories (shell globs).",
16733 "format" : "string-alist",
7aacca6f 16734 "optional" : 1,
44660702 16735 "type" : "string"
7aacca6f 16736 },
44660702
DM
16737 "ionice" : {
16738 "default" : 7,
16739 "description" : "Set CFQ ionice priority.",
16740 "maximum" : 8,
16741 "minimum" : 0,
16742 "optional" : 1,
16743 "type" : "integer"
7aacca6f 16744 },
44660702
DM
16745 "lockwait" : {
16746 "default" : 180,
16747 "description" : "Maximal time to wait for the global lock (minutes).",
16748 "minimum" : 0,
7aacca6f 16749 "optional" : 1,
44660702 16750 "type" : "integer"
7aacca6f
DM
16751 },
16752 "mailnotification" : {
44660702 16753 "default" : "always",
7aacca6f
DM
16754 "description" : "Specify when to send an email",
16755 "enum" : [
16756 "always",
16757 "failure"
16758 ],
7aacca6f 16759 "optional" : 1,
44660702 16760 "type" : "string"
7aacca6f
DM
16761 },
16762 "mailto" : {
7aacca6f 16763 "description" : "Comma-separated list of email addresses that should receive email notifications.",
44660702 16764 "format" : "string-list",
7aacca6f 16765 "optional" : 1,
44660702 16766 "type" : "string"
56122987 16767 },
44660702
DM
16768 "maxfiles" : {
16769 "default" : 1,
16770 "description" : "Maximal number of backup files per guest system.",
16771 "minimum" : 1,
7aacca6f 16772 "optional" : 1,
44660702 16773 "type" : "integer"
56122987 16774 },
7aacca6f 16775 "mode" : {
44660702 16776 "default" : "snapshot",
7aacca6f
DM
16777 "description" : "Backup mode.",
16778 "enum" : [
16779 "snapshot",
16780 "suspend",
16781 "stop"
16782 ],
44660702
DM
16783 "optional" : 1,
16784 "type" : "string"
7aacca6f 16785 },
44660702
DM
16786 "node" : {
16787 "description" : "Only run if executed on this node.",
16788 "format" : "pve-node",
16789 "optional" : 1,
16790 "type" : "string"
16791 },
16792 "pigz" : {
16793 "default" : 0,
16794 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
16795 "optional" : 1,
16796 "type" : "integer"
16797 },
16798 "quiet" : {
16799 "default" : 0,
16800 "description" : "Be quiet.",
16801 "optional" : 1,
16802 "type" : "boolean"
16803 },
16804 "remove" : {
7aacca6f 16805 "default" : 1,
44660702 16806 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
7aacca6f 16807 "optional" : 1,
44660702 16808 "type" : "boolean"
7aacca6f 16809 },
44660702
DM
16810 "script" : {
16811 "description" : "Use specified hook script.",
16812 "optional" : 1,
16813 "type" : "string"
16814 },
16815 "size" : {
16816 "default" : 1024,
16817 "description" : "Unused, will be removed in a future release.",
16818 "minimum" : 500,
16819 "optional" : 1,
16820 "type" : "integer"
16821 },
16822 "stdexcludes" : {
16823 "default" : 1,
16824 "description" : "Exclude temporary files and logs.",
16825 "optional" : 1,
16826 "type" : "boolean"
16827 },
16828 "stdout" : {
16829 "description" : "Write tar to stdout, not to a file.",
7aacca6f 16830 "optional" : 1,
44660702
DM
16831 "type" : "boolean"
16832 },
16833 "stop" : {
7aacca6f 16834 "default" : 0,
44660702
DM
16835 "description" : "Stop runnig backup jobs on this host.",
16836 "optional" : 1,
16837 "type" : "boolean"
7aacca6f 16838 },
44660702
DM
16839 "stopwait" : {
16840 "default" : 10,
16841 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
7aacca6f
DM
16842 "minimum" : 0,
16843 "optional" : 1,
44660702 16844 "type" : "integer"
7aacca6f 16845 },
44660702
DM
16846 "storage" : {
16847 "description" : "Store resulting file to this storage.",
16848 "format" : "pve-storage-id",
7aacca6f 16849 "optional" : 1,
44660702
DM
16850 "type" : "string"
16851 },
16852 "tmpdir" : {
16853 "description" : "Store temporary files to specified directory.",
16854 "optional" : 1,
16855 "type" : "string"
7aacca6f
DM
16856 },
16857 "vmid" : {
7aacca6f 16858 "description" : "The ID of the guest system you want to backup.",
44660702 16859 "format" : "pve-vmid-list",
7aacca6f
DM
16860 "optional" : 1,
16861 "type" : "string"
16862 }
7aacca6f
DM
16863 }
16864 },
7aacca6f 16865 "permissions" : {
44660702
DM
16866 "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.",
16867 "user" : "all"
7aacca6f 16868 },
44660702 16869 "protected" : 1,
7aacca6f 16870 "proxyto" : "node",
7aacca6f 16871 "returns" : {
44660702 16872 "type" : "string"
7aacca6f
DM
16873 }
16874 }
16875 },
44660702
DM
16876 "leaf" : 1,
16877 "path" : "/nodes/{node}/vzdump",
16878 "text" : "vzdump"
16879 },
16880 {
7aacca6f
DM
16881 "children" : [
16882 {
7aacca6f
DM
16883 "children" : [
16884 {
7aacca6f
DM
16885 "info" : {
16886 "GET" : {
7aacca6f
DM
16887 "description" : "Read service properties",
16888 "method" : "GET",
16889 "name" : "service_state",
16890 "parameters" : {
44660702 16891 "additionalProperties" : 0,
7aacca6f
DM
16892 "properties" : {
16893 "node" : {
7aacca6f 16894 "description" : "The cluster node name.",
44660702
DM
16895 "format" : "pve-node",
16896 "type" : "string"
7aacca6f
DM
16897 },
16898 "service" : {
44660702 16899 "description" : "Service ID",
7aacca6f
DM
16900 "enum" : [
16901 "pveproxy",
16902 "pvedaemon",
16903 "spiceproxy",
16904 "pvestatd",
16905 "pve-cluster",
16906 "corosync",
16907 "pve-firewall",
16908 "pvefw-logger",
16909 "pve-ha-crm",
16910 "pve-ha-lrm",
16911 "sshd",
16912 "syslog",
16913 "cron",
16914 "postfix",
16915 "ksmtuned",
16916 "systemd-timesyncd"
16917 ],
7aacca6f
DM
16918 "type" : "string"
16919 }
44660702 16920 }
56122987 16921 },
7aacca6f
DM
16922 "permissions" : {
16923 "check" : [
16924 "perm",
16925 "/nodes/{node}",
16926 [
44660702 16927 "Sys.Audit"
7aacca6f
DM
16928 ]
16929 ]
56122987 16930 },
44660702 16931 "protected" : 1,
7aacca6f 16932 "proxyto" : "node",
44660702
DM
16933 "returns" : {
16934 "properties" : {},
16935 "type" : "object"
16936 }
16937 }
16938 },
16939 "leaf" : 1,
16940 "path" : "/nodes/{node}/services/{service}/state",
16941 "text" : "state"
16942 },
16943 {
16944 "info" : {
16945 "POST" : {
16946 "description" : "Start service.",
7aacca6f
DM
16947 "method" : "POST",
16948 "name" : "service_start",
16949 "parameters" : {
44660702 16950 "additionalProperties" : 0,
7aacca6f 16951 "properties" : {
44660702
DM
16952 "node" : {
16953 "description" : "The cluster node name.",
16954 "format" : "pve-node",
16955 "type" : "string"
16956 },
7aacca6f 16957 "service" : {
44660702 16958 "description" : "Service ID",
7aacca6f
DM
16959 "enum" : [
16960 "pveproxy",
16961 "pvedaemon",
16962 "spiceproxy",
16963 "pvestatd",
16964 "pve-cluster",
16965 "corosync",
16966 "pve-firewall",
16967 "pvefw-logger",
16968 "pve-ha-crm",
16969 "pve-ha-lrm",
16970 "sshd",
16971 "syslog",
16972 "cron",
16973 "postfix",
16974 "ksmtuned",
16975 "systemd-timesyncd"
16976 ],
7aacca6f
DM
16977 "type" : "string"
16978 }
44660702 16979 }
56122987 16980 },
56122987
DM
16981 "permissions" : {
16982 "check" : [
16983 "perm",
16984 "/nodes/{node}",
16985 [
7aacca6f 16986 "Sys.Modify"
56122987
DM
16987 ]
16988 ]
7aacca6f 16989 },
7aacca6f 16990 "protected" : 1,
44660702
DM
16991 "proxyto" : "node",
16992 "returns" : {
16993 "type" : "string"
16994 }
16995 }
16996 },
16997 "leaf" : 1,
16998 "path" : "/nodes/{node}/services/{service}/start",
16999 "text" : "start"
17000 },
17001 {
17002 "info" : {
17003 "POST" : {
17004 "description" : "Stop service.",
17005 "method" : "POST",
7aacca6f 17006 "name" : "service_stop",
56122987 17007 "parameters" : {
7aacca6f 17008 "additionalProperties" : 0,
56122987
DM
17009 "properties" : {
17010 "node" : {
44660702 17011 "description" : "The cluster node name.",
56122987 17012 "format" : "pve-node",
44660702 17013 "type" : "string"
56122987
DM
17014 },
17015 "service" : {
44660702 17016 "description" : "Service ID",
56122987
DM
17017 "enum" : [
17018 "pveproxy",
17019 "pvedaemon",
17020 "spiceproxy",
17021 "pvestatd",
17022 "pve-cluster",
17023 "corosync",
17024 "pve-firewall",
17025 "pvefw-logger",
17026 "pve-ha-crm",
17027 "pve-ha-lrm",
17028 "sshd",
17029 "syslog",
17030 "cron",
17031 "postfix",
17032 "ksmtuned",
17033 "systemd-timesyncd"
17034 ],
56122987
DM
17035 "type" : "string"
17036 }
7aacca6f 17037 }
44660702 17038 },
56122987
DM
17039 "permissions" : {
17040 "check" : [
17041 "perm",
17042 "/nodes/{node}",
17043 [
17044 "Sys.Modify"
17045 ]
17046 ]
17047 },
44660702
DM
17048 "protected" : 1,
17049 "proxyto" : "node",
7aacca6f
DM
17050 "returns" : {
17051 "type" : "string"
44660702
DM
17052 }
17053 }
17054 },
17055 "leaf" : 1,
17056 "path" : "/nodes/{node}/services/{service}/stop",
17057 "text" : "stop"
17058 },
17059 {
17060 "info" : {
17061 "POST" : {
17062 "description" : "Restart service.",
17063 "method" : "POST",
17064 "name" : "service_restart",
56122987
DM
17065 "parameters" : {
17066 "additionalProperties" : 0,
17067 "properties" : {
7aacca6f
DM
17068 "node" : {
17069 "description" : "The cluster node name.",
44660702
DM
17070 "format" : "pve-node",
17071 "type" : "string"
7aacca6f
DM
17072 },
17073 "service" : {
44660702 17074 "description" : "Service ID",
56122987
DM
17075 "enum" : [
17076 "pveproxy",
17077 "pvedaemon",
17078 "spiceproxy",
17079 "pvestatd",
17080 "pve-cluster",
17081 "corosync",
17082 "pve-firewall",
17083 "pvefw-logger",
17084 "pve-ha-crm",
17085 "pve-ha-lrm",
17086 "sshd",
17087 "syslog",
17088 "cron",
17089 "postfix",
17090 "ksmtuned",
17091 "systemd-timesyncd"
7aacca6f 17092 ],
7aacca6f 17093 "type" : "string"
56122987
DM
17094 }
17095 }
17096 },
44660702
DM
17097 "permissions" : {
17098 "check" : [
17099 "perm",
17100 "/nodes/{node}",
17101 [
17102 "Sys.Modify"
17103 ]
17104 ]
17105 },
17106 "protected" : 1,
17107 "proxyto" : "node",
17108 "returns" : {
17109 "type" : "string"
17110 }
56122987 17111 }
44660702
DM
17112 },
17113 "leaf" : 1,
17114 "path" : "/nodes/{node}/services/{service}/restart",
17115 "text" : "restart"
56122987
DM
17116 },
17117 {
56122987
DM
17118 "info" : {
17119 "POST" : {
44660702
DM
17120 "description" : "Reload service.",
17121 "method" : "POST",
7aacca6f 17122 "name" : "service_reload",
56122987
DM
17123 "parameters" : {
17124 "additionalProperties" : 0,
17125 "properties" : {
44660702
DM
17126 "node" : {
17127 "description" : "The cluster node name.",
17128 "format" : "pve-node",
17129 "type" : "string"
17130 },
56122987 17131 "service" : {
56122987
DM
17132 "description" : "Service ID",
17133 "enum" : [
17134 "pveproxy",
17135 "pvedaemon",
17136 "spiceproxy",
17137 "pvestatd",
17138 "pve-cluster",
17139 "corosync",
17140 "pve-firewall",
17141 "pvefw-logger",
17142 "pve-ha-crm",
17143 "pve-ha-lrm",
17144 "sshd",
17145 "syslog",
17146 "cron",
17147 "postfix",
17148 "ksmtuned",
17149 "systemd-timesyncd"
44660702
DM
17150 ],
17151 "type" : "string"
56122987
DM
17152 }
17153 }
17154 },
56122987
DM
17155 "permissions" : {
17156 "check" : [
17157 "perm",
17158 "/nodes/{node}",
17159 [
17160 "Sys.Modify"
17161 ]
17162 ]
17163 },
44660702 17164 "protected" : 1,
56122987 17165 "proxyto" : "node",
7aacca6f
DM
17166 "returns" : {
17167 "type" : "string"
56122987
DM
17168 }
17169 }
44660702
DM
17170 },
17171 "leaf" : 1,
17172 "path" : "/nodes/{node}/services/{service}/reload",
17173 "text" : "reload"
17174 }
17175 ],
17176 "info" : {
17177 "GET" : {
17178 "description" : "Directory index",
17179 "method" : "GET",
17180 "name" : "srvcmdidx",
17181 "parameters" : {
17182 "additionalProperties" : 0,
17183 "properties" : {
17184 "node" : {
17185 "description" : "The cluster node name.",
17186 "format" : "pve-node",
17187 "type" : "string"
17188 },
17189 "service" : {
17190 "description" : "Service ID",
17191 "enum" : [
17192 "pveproxy",
17193 "pvedaemon",
17194 "spiceproxy",
17195 "pvestatd",
17196 "pve-cluster",
17197 "corosync",
17198 "pve-firewall",
17199 "pvefw-logger",
17200 "pve-ha-crm",
17201 "pve-ha-lrm",
17202 "sshd",
17203 "syslog",
17204 "cron",
17205 "postfix",
17206 "ksmtuned",
17207 "systemd-timesyncd"
17208 ],
17209 "type" : "string"
17210 }
17211 }
17212 },
17213 "permissions" : {
17214 "check" : [
17215 "perm",
17216 "/nodes/{node}",
17217 [
17218 "Sys.Audit"
17219 ]
17220 ]
17221 },
17222 "returns" : {
17223 "items" : {
17224 "properties" : {
17225 "subdir" : {
17226 "type" : "string"
17227 }
17228 },
17229 "type" : "object"
17230 },
17231 "links" : [
17232 {
17233 "href" : "{subdir}",
17234 "rel" : "child"
17235 }
17236 ],
17237 "type" : "array"
17238 }
17239 }
17240 },
17241 "leaf" : 0,
17242 "path" : "/nodes/{node}/services/{service}",
17243 "text" : "{service}"
17244 }
17245 ],
17246 "info" : {
17247 "GET" : {
17248 "description" : "Service list.",
17249 "method" : "GET",
17250 "name" : "index",
17251 "parameters" : {
17252 "additionalProperties" : 0,
17253 "properties" : {
17254 "node" : {
17255 "description" : "The cluster node name.",
17256 "format" : "pve-node",
17257 "type" : "string"
17258 }
17259 }
17260 },
17261 "permissions" : {
17262 "check" : [
17263 "perm",
17264 "/nodes/{node}",
17265 [
17266 "Sys.Audit"
17267 ]
17268 ]
17269 },
17270 "protected" : 1,
17271 "proxyto" : "node",
17272 "returns" : {
17273 "items" : {
17274 "properties" : {},
17275 "type" : "object"
17276 },
17277 "links" : [
17278 {
17279 "href" : "{service}",
17280 "rel" : "child"
56122987 17281 }
44660702
DM
17282 ],
17283 "type" : "array"
17284 }
7aacca6f 17285 }
44660702 17286 },
7aacca6f 17287 "leaf" : 0,
44660702
DM
17288 "path" : "/nodes/{node}/services",
17289 "text" : "services"
7aacca6f
DM
17290 },
17291 {
7aacca6f
DM
17292 "info" : {
17293 "GET" : {
44660702
DM
17294 "description" : "Read subscription info.",
17295 "method" : "GET",
17296 "name" : "get",
7aacca6f 17297 "parameters" : {
44660702 17298 "additionalProperties" : 0,
7aacca6f
DM
17299 "properties" : {
17300 "node" : {
17301 "description" : "The cluster node name.",
44660702
DM
17302 "format" : "pve-node",
17303 "type" : "string"
7aacca6f 17304 }
44660702
DM
17305 }
17306 },
17307 "permissions" : {
17308 "user" : "all"
7aacca6f 17309 },
7aacca6f
DM
17310 "proxyto" : "node",
17311 "returns" : {
17312 "type" : "object"
44660702 17313 }
7aacca6f 17314 },
44660702
DM
17315 "POST" : {
17316 "description" : "Update subscription info.",
17317 "method" : "POST",
17318 "name" : "update",
7aacca6f
DM
17319 "parameters" : {
17320 "additionalProperties" : 0,
17321 "properties" : {
44660702
DM
17322 "force" : {
17323 "default" : 0,
17324 "description" : "Always connect to server, even if we have up to date info inside local cache.",
17325 "optional" : 1,
17326 "type" : "boolean"
17327 },
7aacca6f 17328 "node" : {
7aacca6f 17329 "description" : "The cluster node name.",
44660702 17330 "format" : "pve-node",
7aacca6f
DM
17331 "type" : "string"
17332 }
17333 }
17334 },
7aacca6f 17335 "protected" : 1,
7aacca6f 17336 "proxyto" : "node",
44660702
DM
17337 "returns" : {
17338 "type" : "null"
17339 }
17340 },
17341 "PUT" : {
17342 "description" : "Set subscription key.",
17343 "method" : "PUT",
17344 "name" : "set",
7aacca6f
DM
17345 "parameters" : {
17346 "additionalProperties" : 0,
17347 "properties" : {
44660702
DM
17348 "key" : {
17349 "description" : "Proxmox VE subscription key",
17350 "type" : "string"
7aacca6f
DM
17351 },
17352 "node" : {
7aacca6f 17353 "description" : "The cluster node name.",
44660702
DM
17354 "format" : "pve-node",
17355 "type" : "string"
7aacca6f
DM
17356 }
17357 }
17358 },
44660702
DM
17359 "protected" : 1,
17360 "proxyto" : "node",
7aacca6f
DM
17361 "returns" : {
17362 "type" : "null"
44660702 17363 }
7aacca6f
DM
17364 }
17365 },
44660702 17366 "leaf" : 1,
7aacca6f 17367 "path" : "/nodes/{node}/subscription",
44660702 17368 "text" : "subscription"
7aacca6f
DM
17369 },
17370 {
7aacca6f
DM
17371 "children" : [
17372 {
56122987 17373 "info" : {
7aacca6f 17374 "DELETE" : {
44660702
DM
17375 "description" : "Delete network device configuration",
17376 "method" : "DELETE",
17377 "name" : "delete_network",
17378 "parameters" : {
17379 "additionalProperties" : 0,
17380 "properties" : {
17381 "iface" : {
17382 "description" : "Network interface name.",
17383 "format" : "pve-iface",
17384 "maxLength" : 20,
17385 "minLength" : 2,
17386 "type" : "string"
17387 },
17388 "node" : {
17389 "description" : "The cluster node name.",
17390 "format" : "pve-node",
17391 "type" : "string"
17392 }
17393 }
7aacca6f
DM
17394 },
17395 "permissions" : {
17396 "check" : [
17397 "perm",
17398 "/nodes/{node}",
17399 [
17400 "Sys.Modify"
17401 ]
17402 ]
17403 },
44660702 17404 "protected" : 1,
7aacca6f 17405 "proxyto" : "node",
44660702
DM
17406 "returns" : {
17407 "type" : "null"
17408 }
17409 },
17410 "GET" : {
17411 "description" : "Read network device configuration",
17412 "method" : "GET",
17413 "name" : "network_config",
56122987 17414 "parameters" : {
44660702 17415 "additionalProperties" : 0,
56122987 17416 "properties" : {
7aacca6f 17417 "iface" : {
7aacca6f 17418 "description" : "Network interface name.",
44660702
DM
17419 "format" : "pve-iface",
17420 "maxLength" : 20,
7aacca6f
DM
17421 "minLength" : 2,
17422 "type" : "string"
44660702
DM
17423 },
17424 "node" : {
17425 "description" : "The cluster node name.",
17426 "format" : "pve-node",
17427 "type" : "string"
56122987 17428 }
44660702 17429 }
7aacca6f
DM
17430 },
17431 "permissions" : {
17432 "check" : [
17433 "perm",
17434 "/nodes/{node}",
17435 [
44660702 17436 "Sys.Audit"
7aacca6f
DM
17437 ]
17438 ]
17439 },
17440 "proxyto" : "node",
44660702
DM
17441 "returns" : {
17442 "properties" : {
17443 "method" : {
17444 "type" : "string"
17445 },
17446 "type" : {
17447 "type" : "string"
17448 }
17449 },
17450 "type" : "object"
17451 }
17452 },
17453 "PUT" : {
7aacca6f
DM
17454 "description" : "Update network device configuration",
17455 "method" : "PUT",
17456 "name" : "update_network",
17457 "parameters" : {
17458 "additionalProperties" : 0,
17459 "properties" : {
7aacca6f 17460 "address" : {
44660702 17461 "description" : "IP address.",
7aacca6f 17462 "format" : "ipv4",
44660702 17463 "optional" : 1,
7aacca6f 17464 "requires" : "netmask",
44660702 17465 "type" : "string"
7aacca6f 17466 },
44660702
DM
17467 "address6" : {
17468 "description" : "IP address.",
17469 "format" : "ipv6",
17470 "optional" : 1,
17471 "requires" : "netmask6",
17472 "type" : "string"
7aacca6f
DM
17473 },
17474 "autostart" : {
44660702 17475 "description" : "Automatically start interface on boot.",
7aacca6f 17476 "optional" : 1,
44660702 17477 "type" : "boolean"
7aacca6f 17478 },
44660702
DM
17479 "bond_mode" : {
17480 "description" : "Bonding mode.",
7aacca6f 17481 "enum" : [
44660702
DM
17482 "balance-rr",
17483 "active-backup",
17484 "balance-xor",
17485 "broadcast",
17486 "802.3ad",
17487 "balance-tlb",
17488 "balance-alb",
17489 "balance-slb",
17490 "lacp-balance-slb",
17491 "lacp-balance-tcp"
17492 ],
7aacca6f 17493 "optional" : 1,
44660702 17494 "type" : "string"
7aacca6f 17495 },
44660702
DM
17496 "bond_xmit_hash_policy" : {
17497 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17498 "enum" : [
17499 "layer2",
17500 "layer2+3",
17501 "layer3+4"
17502 ],
7aacca6f 17503 "optional" : 1,
44660702 17504 "type" : "string"
7aacca6f 17505 },
44660702
DM
17506 "bridge_ports" : {
17507 "description" : "Specify the iterfaces you want to add to your bridge.",
17508 "format" : "pve-iface-list",
7aacca6f 17509 "optional" : 1,
44660702 17510 "type" : "string"
7aacca6f 17511 },
44660702
DM
17512 "bridge_vlan_aware" : {
17513 "description" : "Enable bridge vlan support.",
7aacca6f 17514 "optional" : 1,
44660702 17515 "type" : "boolean"
7aacca6f
DM
17516 },
17517 "comments" : {
44660702 17518 "description" : "Comments",
7aacca6f 17519 "optional" : 1,
44660702 17520 "type" : "string"
7aacca6f 17521 },
44660702
DM
17522 "comments6" : {
17523 "description" : "Comments",
7aacca6f 17524 "optional" : 1,
44660702 17525 "type" : "string"
7aacca6f 17526 },
44660702
DM
17527 "delete" : {
17528 "description" : "A list of settings you want to delete.",
17529 "format" : "pve-configid-list",
7aacca6f
DM
17530 "optional" : 1,
17531 "type" : "string"
17532 },
44660702
DM
17533 "gateway" : {
17534 "description" : "Default gateway address.",
17535 "format" : "ipv4",
7aacca6f
DM
17536 "optional" : 1,
17537 "type" : "string"
17538 },
44660702
DM
17539 "gateway6" : {
17540 "description" : "Default ipv6 gateway address.",
17541 "format" : "ipv6",
7aacca6f 17542 "optional" : 1,
44660702 17543 "type" : "string"
7aacca6f
DM
17544 },
17545 "iface" : {
44660702 17546 "description" : "Network interface name.",
7aacca6f
DM
17547 "format" : "pve-iface",
17548 "maxLength" : 20,
17549 "minLength" : 2,
7aacca6f
DM
17550 "type" : "string"
17551 },
44660702
DM
17552 "netmask" : {
17553 "description" : "Network mask.",
17554 "format" : "ipv4mask",
7aacca6f 17555 "optional" : 1,
44660702
DM
17556 "requires" : "address",
17557 "type" : "string"
7aacca6f
DM
17558 },
17559 "netmask6" : {
44660702 17560 "description" : "Network mask.",
7aacca6f 17561 "maximum" : 128,
44660702 17562 "minimum" : 0,
7aacca6f
DM
17563 "optional" : 1,
17564 "requires" : "address6",
44660702
DM
17565 "type" : "integer"
17566 },
7aacca6f 17567 "node" : {
44660702 17568 "description" : "The cluster node name.",
7aacca6f 17569 "format" : "pve-node",
44660702 17570 "type" : "string"
7aacca6f 17571 },
44660702
DM
17572 "ovs_bonds" : {
17573 "description" : "Specify the interfaces used by the bonding device.",
17574 "format" : "pve-iface-list",
17575 "optional" : 1,
17576 "type" : "string"
17577 },
17578 "ovs_bridge" : {
17579 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17580 "format" : "pve-iface",
17581 "optional" : 1,
17582 "type" : "string"
17583 },
17584 "ovs_options" : {
17585 "description" : "OVS interface options.",
17586 "maxLength" : 1024,
17587 "optional" : 1,
17588 "type" : "string"
17589 },
17590 "ovs_ports" : {
17591 "description" : "Specify the iterfaces you want to add to your bridge.",
17592 "format" : "pve-iface-list",
17593 "optional" : 1,
17594 "type" : "string"
17595 },
17596 "ovs_tag" : {
17597 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17598 "maximum" : 4094,
17599 "minimum" : 1,
17600 "optional" : 1,
17601 "type" : "integer"
17602 },
17603 "slaves" : {
17604 "description" : "Specify the interfaces used by the bonding device.",
17605 "format" : "pve-iface-list",
17606 "optional" : 1,
17607 "type" : "string"
17608 },
17609 "type" : {
17610 "description" : "Network interface type",
17611 "enum" : [
17612 "bridge",
17613 "bond",
17614 "eth",
17615 "alias",
17616 "vlan",
17617 "OVSBridge",
17618 "OVSBond",
17619 "OVSPort",
17620 "OVSIntPort",
17621 "unknown"
17622 ],
17623 "type" : "string"
7aacca6f
DM
17624 }
17625 }
17626 },
7aacca6f
DM
17627 "permissions" : {
17628 "check" : [
17629 "perm",
17630 "/nodes/{node}",
17631 [
44660702 17632 "Sys.Modify"
7aacca6f
DM
17633 ]
17634 ]
17635 },
44660702
DM
17636 "protected" : 1,
17637 "proxyto" : "node",
7aacca6f 17638 "returns" : {
44660702
DM
17639 "type" : "null"
17640 }
7aacca6f
DM
17641 }
17642 },
7aacca6f 17643 "leaf" : 1,
44660702
DM
17644 "path" : "/nodes/{node}/network/{iface}",
17645 "text" : "{iface}"
7aacca6f
DM
17646 }
17647 ],
7aacca6f 17648 "info" : {
44660702
DM
17649 "DELETE" : {
17650 "description" : "Revert network configuration changes.",
17651 "method" : "DELETE",
17652 "name" : "revert_network_changes",
7aacca6f
DM
17653 "parameters" : {
17654 "additionalProperties" : 0,
17655 "properties" : {
7aacca6f 17656 "node" : {
7aacca6f 17657 "description" : "The cluster node name.",
44660702 17658 "format" : "pve-node",
7aacca6f
DM
17659 "type" : "string"
17660 }
17661 }
44660702 17662 },
7aacca6f
DM
17663 "permissions" : {
17664 "check" : [
17665 "perm",
17666 "/nodes/{node}",
17667 [
17668 "Sys.Modify"
17669 ]
17670 ]
17671 },
44660702
DM
17672 "protected" : 1,
17673 "proxyto" : "node",
7aacca6f
DM
17674 "returns" : {
17675 "type" : "null"
44660702 17676 }
7aacca6f 17677 },
44660702
DM
17678 "GET" : {
17679 "description" : "List available networks",
17680 "method" : "GET",
17681 "name" : "index",
7aacca6f 17682 "parameters" : {
44660702 17683 "additionalProperties" : 0,
7aacca6f 17684 "properties" : {
7aacca6f 17685 "node" : {
44660702
DM
17686 "description" : "The cluster node name.",
17687 "format" : "pve-node",
17688 "type" : "string"
7aacca6f
DM
17689 },
17690 "type" : {
44660702 17691 "description" : "Only list specific interface types.",
7aacca6f
DM
17692 "enum" : [
17693 "bridge",
17694 "bond",
17695 "eth",
17696 "alias",
17697 "vlan",
17698 "OVSBridge",
17699 "OVSBond",
17700 "OVSPort",
17701 "OVSIntPort",
44660702 17702 "any_bridge"
7aacca6f 17703 ],
7aacca6f 17704 "optional" : 1,
44660702
DM
17705 "type" : "string"
17706 }
17707 }
17708 },
17709 "permissions" : {
17710 "user" : "all"
17711 },
17712 "proxyto" : "node",
17713 "returns" : {
17714 "items" : {
17715 "properties" : {},
17716 "type" : "object"
17717 },
17718 "links" : [
17719 {
17720 "href" : "{iface}",
17721 "rel" : "child"
17722 }
17723 ],
17724 "type" : "array"
17725 }
17726 },
17727 "POST" : {
17728 "description" : "Create network device configuration",
17729 "method" : "POST",
17730 "name" : "create_network",
17731 "parameters" : {
17732 "additionalProperties" : 0,
17733 "properties" : {
7aacca6f 17734 "address" : {
44660702
DM
17735 "description" : "IP address.",
17736 "format" : "ipv4",
17737 "optional" : 1,
7aacca6f 17738 "requires" : "netmask",
44660702
DM
17739 "type" : "string"
17740 },
17741 "address6" : {
7aacca6f 17742 "description" : "IP address.",
44660702
DM
17743 "format" : "ipv6",
17744 "optional" : 1,
17745 "requires" : "netmask6",
17746 "type" : "string"
17747 },
17748 "autostart" : {
17749 "description" : "Automatically start interface on boot.",
7aacca6f 17750 "optional" : 1,
44660702 17751 "type" : "boolean"
7aacca6f
DM
17752 },
17753 "bond_mode" : {
17754 "description" : "Bonding mode.",
17755 "enum" : [
17756 "balance-rr",
17757 "active-backup",
17758 "balance-xor",
17759 "broadcast",
17760 "802.3ad",
17761 "balance-tlb",
17762 "balance-alb",
17763 "balance-slb",
17764 "lacp-balance-slb",
17765 "lacp-balance-tcp"
17766 ],
17767 "optional" : 1,
17768 "type" : "string"
17769 },
44660702
DM
17770 "bond_xmit_hash_policy" : {
17771 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17772 "enum" : [
17773 "layer2",
17774 "layer2+3",
17775 "layer3+4"
17776 ],
17777 "optional" : 1,
17778 "type" : "string"
17779 },
17780 "bridge_ports" : {
17781 "description" : "Specify the iterfaces you want to add to your bridge.",
7aacca6f 17782 "format" : "pve-iface-list",
7aacca6f 17783 "optional" : 1,
44660702 17784 "type" : "string"
7aacca6f 17785 },
44660702
DM
17786 "bridge_vlan_aware" : {
17787 "description" : "Enable bridge vlan support.",
7aacca6f 17788 "optional" : 1,
44660702 17789 "type" : "boolean"
7aacca6f 17790 },
44660702
DM
17791 "comments" : {
17792 "description" : "Comments",
7aacca6f 17793 "optional" : 1,
44660702
DM
17794 "type" : "string"
17795 },
17796 "comments6" : {
17797 "description" : "Comments",
17798 "optional" : 1,
17799 "type" : "string"
17800 },
17801 "gateway" : {
17802 "description" : "Default gateway address.",
17803 "format" : "ipv4",
17804 "optional" : 1,
17805 "type" : "string"
17806 },
17807 "gateway6" : {
17808 "description" : "Default ipv6 gateway address.",
17809 "format" : "ipv6",
17810 "optional" : 1,
17811 "type" : "string"
56122987 17812 },
7aacca6f 17813 "iface" : {
44660702 17814 "description" : "Network interface name.",
7aacca6f
DM
17815 "format" : "pve-iface",
17816 "maxLength" : 20,
44660702
DM
17817 "minLength" : 2,
17818 "type" : "string"
56122987 17819 },
44660702
DM
17820 "netmask" : {
17821 "description" : "Network mask.",
17822 "format" : "ipv4mask",
7aacca6f 17823 "optional" : 1,
44660702
DM
17824 "requires" : "address",
17825 "type" : "string"
7aacca6f 17826 },
44660702
DM
17827 "netmask6" : {
17828 "description" : "Network mask.",
17829 "maximum" : 128,
17830 "minimum" : 0,
7aacca6f 17831 "optional" : 1,
44660702
DM
17832 "requires" : "address6",
17833 "type" : "integer"
7aacca6f 17834 },
44660702
DM
17835 "node" : {
17836 "description" : "The cluster node name.",
17837 "format" : "pve-node",
17838 "type" : "string"
17839 },
17840 "ovs_bonds" : {
17841 "description" : "Specify the interfaces used by the bonding device.",
17842 "format" : "pve-iface-list",
7aacca6f
DM
17843 "optional" : 1,
17844 "type" : "string"
17845 },
44660702
DM
17846 "ovs_bridge" : {
17847 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17848 "format" : "pve-iface",
17849 "optional" : 1,
17850 "type" : "string"
17851 },
17852 "ovs_options" : {
17853 "description" : "OVS interface options.",
17854 "maxLength" : 1024,
17855 "optional" : 1,
17856 "type" : "string"
17857 },
17858 "ovs_ports" : {
17859 "description" : "Specify the iterfaces you want to add to your bridge.",
17860 "format" : "pve-iface-list",
17861 "optional" : 1,
17862 "type" : "string"
17863 },
17864 "ovs_tag" : {
17865 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17866 "maximum" : 4094,
17867 "minimum" : 1,
17868 "optional" : 1,
17869 "type" : "integer"
17870 },
17871 "slaves" : {
17872 "description" : "Specify the interfaces used by the bonding device.",
17873 "format" : "pve-iface-list",
7aacca6f 17874 "optional" : 1,
44660702
DM
17875 "type" : "string"
17876 },
17877 "type" : {
17878 "description" : "Network interface type",
7aacca6f 17879 "enum" : [
44660702
DM
17880 "bridge",
17881 "bond",
17882 "eth",
17883 "alias",
17884 "vlan",
17885 "OVSBridge",
17886 "OVSBond",
17887 "OVSPort",
17888 "OVSIntPort",
17889 "unknown"
7aacca6f 17890 ],
44660702 17891 "type" : "string"
56122987 17892 }
44660702 17893 }
56122987 17894 },
56122987
DM
17895 "permissions" : {
17896 "check" : [
17897 "perm",
17898 "/nodes/{node}",
17899 [
7aacca6f 17900 "Sys.Modify"
44660702
DM
17901 ]
17902 ]
7aacca6f 17903 },
44660702
DM
17904 "protected" : 1,
17905 "proxyto" : "node",
17906 "returns" : {
17907 "type" : "null"
17908 }
17909 }
17910 },
17911 "leaf" : 0,
17912 "path" : "/nodes/{node}/network",
17913 "text" : "network"
17914 },
17915 {
17916 "children" : [
17917 {
7aacca6f
DM
17918 "children" : [
17919 {
17920 "info" : {
17921 "GET" : {
44660702 17922 "description" : "Read task log.",
7aacca6f
DM
17923 "method" : "GET",
17924 "name" : "read_task_log",
17925 "parameters" : {
44660702 17926 "additionalProperties" : 0,
7aacca6f 17927 "properties" : {
44660702
DM
17928 "limit" : {
17929 "minimum" : 0,
7aacca6f 17930 "optional" : 1,
44660702 17931 "type" : "integer"
7aacca6f
DM
17932 },
17933 "node" : {
17934 "description" : "The cluster node name.",
44660702
DM
17935 "format" : "pve-node",
17936 "type" : "string"
7aacca6f 17937 },
44660702
DM
17938 "start" : {
17939 "minimum" : 0,
7aacca6f 17940 "optional" : 1,
44660702
DM
17941 "type" : "integer"
17942 },
17943 "upid" : {
17944 "type" : "string"
7aacca6f 17945 }
44660702
DM
17946 }
17947 },
17948 "permissions" : {
17949 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
17950 "user" : "all"
7aacca6f
DM
17951 },
17952 "protected" : 1,
44660702 17953 "proxyto" : "node",
7aacca6f 17954 "returns" : {
7aacca6f 17955 "items" : {
7aacca6f
DM
17956 "properties" : {
17957 "n" : {
44660702
DM
17958 "description" : "Line number",
17959 "type" : "integer"
7aacca6f
DM
17960 },
17961 "t" : {
44660702
DM
17962 "description" : "Line text",
17963 "type" : "string"
7aacca6f 17964 }
44660702
DM
17965 },
17966 "type" : "object"
17967 },
17968 "type" : "array"
17969 }
7aacca6f 17970 }
56122987 17971 },
7aacca6f 17972 "leaf" : 1,
44660702
DM
17973 "path" : "/nodes/{node}/tasks/{upid}/log",
17974 "text" : "log"
7aacca6f
DM
17975 },
17976 {
7aacca6f
DM
17977 "info" : {
17978 "GET" : {
44660702
DM
17979 "description" : "Read task status.",
17980 "method" : "GET",
7aacca6f
DM
17981 "name" : "read_task_status",
17982 "parameters" : {
17983 "additionalProperties" : 0,
17984 "properties" : {
17985 "node" : {
7aacca6f 17986 "description" : "The cluster node name.",
44660702 17987 "format" : "pve-node",
7aacca6f
DM
17988 "type" : "string"
17989 },
17990 "upid" : {
17991 "type" : "string"
17992 }
17993 }
17994 },
7aacca6f
DM
17995 "permissions" : {
17996 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
17997 "user" : "all"
56122987 17998 },
44660702 17999 "protected" : 1,
7aacca6f 18000 "proxyto" : "node",
7aacca6f
DM
18001 "returns" : {
18002 "properties" : {
18003 "pid" : {
18004 "type" : "integer"
18005 },
18006 "status" : {
7aacca6f
DM
18007 "enum" : [
18008 "running",
18009 "stopped"
44660702
DM
18010 ],
18011 "type" : "string"
7aacca6f
DM
18012 }
18013 },
18014 "type" : "object"
56122987 18015 }
7aacca6f 18016 }
44660702
DM
18017 },
18018 "leaf" : 1,
18019 "path" : "/nodes/{node}/tasks/{upid}/status",
18020 "text" : "status"
56122987 18021 }
7aacca6f 18022 ],
44660702
DM
18023 "info" : {
18024 "DELETE" : {
18025 "description" : "Stop a task.",
18026 "method" : "DELETE",
18027 "name" : "stop_task",
18028 "parameters" : {
18029 "additionalProperties" : 0,
18030 "properties" : {
18031 "node" : {
18032 "description" : "The cluster node name.",
18033 "format" : "pve-node",
18034 "type" : "string"
18035 },
18036 "upid" : {
18037 "type" : "string"
18038 }
7aacca6f 18039 }
44660702
DM
18040 },
18041 "permissions" : {
18042 "description" : "The user needs 'Sys.Modify' permissions on '/nodes/<node>' if the task does not belong to him.",
18043 "user" : "all"
18044 },
18045 "protected" : 1,
18046 "proxyto" : "node",
18047 "returns" : {
18048 "type" : "null"
7aacca6f 18049 }
56122987 18050 },
44660702
DM
18051 "GET" : {
18052 "description" : "",
18053 "method" : "GET",
18054 "name" : "upid_index",
18055 "parameters" : {
18056 "additionalProperties" : 0,
18057 "properties" : {
18058 "node" : {
18059 "description" : "The cluster node name.",
18060 "format" : "pve-node",
18061 "type" : "string"
18062 },
18063 "upid" : {
18064 "type" : "string"
18065 }
18066 }
18067 },
18068 "permissions" : {
18069 "user" : "all"
18070 },
18071 "returns" : {
18072 "items" : {
18073 "properties" : {},
18074 "type" : "object"
18075 },
18076 "links" : [
18077 {
18078 "href" : "{name}",
18079 "rel" : "child"
18080 }
18081 ],
18082 "type" : "array"
56122987 18083 }
44660702 18084 }
56122987 18085 },
44660702
DM
18086 "leaf" : 0,
18087 "path" : "/nodes/{node}/tasks/{upid}",
18088 "text" : "{upid}"
18089 }
18090 ],
18091 "info" : {
18092 "GET" : {
7aacca6f 18093 "description" : "Read task list for one node (finished tasks).",
44660702
DM
18094 "method" : "GET",
18095 "name" : "node_tasks",
56122987 18096 "parameters" : {
7aacca6f 18097 "additionalProperties" : 0,
56122987 18098 "properties" : {
44660702 18099 "errors" : {
56122987 18100 "optional" : 1,
44660702 18101 "type" : "boolean"
56122987 18102 },
44660702 18103 "limit" : {
56122987 18104 "minimum" : 0,
56122987 18105 "optional" : 1,
7aacca6f 18106 "type" : "integer"
56122987 18107 },
56122987
DM
18108 "node" : {
18109 "description" : "The cluster node name.",
44660702
DM
18110 "format" : "pve-node",
18111 "type" : "string"
56122987 18112 },
44660702 18113 "start" : {
7aacca6f 18114 "minimum" : 0,
44660702
DM
18115 "optional" : 1,
18116 "type" : "integer"
56122987 18117 },
7aacca6f 18118 "userfilter" : {
44660702
DM
18119 "optional" : 1,
18120 "type" : "string"
18121 },
18122 "vmid" : {
18123 "description" : "Only list tasks for this VM.",
18124 "format" : "pve-vmid",
18125 "minimum" : 1,
18126 "optional" : 1,
18127 "type" : "integer"
56122987
DM
18128 }
18129 }
18130 },
7aacca6f 18131 "permissions" : {
44660702 18132 "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
18133 "user" : "all"
18134 },
44660702 18135 "proxyto" : "node",
56122987
DM
18136 "returns" : {
18137 "items" : {
18138 "properties" : {
44660702 18139 "upid" : {
56122987
DM
18140 "type" : "string"
18141 }
18142 },
18143 "type" : "object"
18144 },
56122987
DM
18145 "links" : [
18146 {
44660702
DM
18147 "href" : "{upid}",
18148 "rel" : "child"
56122987 18149 }
44660702
DM
18150 ],
18151 "type" : "array"
56122987
DM
18152 }
18153 }
18154 },
44660702
DM
18155 "leaf" : 0,
18156 "path" : "/nodes/{node}/tasks",
18157 "text" : "tasks"
18158 },
18159 {
56122987
DM
18160 "children" : [
18161 {
56122987
DM
18162 "info" : {
18163 "GET" : {
7aacca6f 18164 "description" : "Scan zfs pool list on local node.",
44660702
DM
18165 "method" : "GET",
18166 "name" : "zfsscan",
56122987 18167 "parameters" : {
44660702 18168 "additionalProperties" : 0,
56122987 18169 "properties" : {
56122987
DM
18170 "node" : {
18171 "description" : "The cluster node name.",
44660702
DM
18172 "format" : "pve-node",
18173 "type" : "string"
56122987 18174 }
44660702
DM
18175 }
18176 },
7aacca6f
DM
18177 "permissions" : {
18178 "check" : [
18179 "perm",
18180 "/storage",
18181 [
18182 "Datastore.Allocate"
18183 ]
18184 ]
18185 },
44660702
DM
18186 "protected" : 1,
18187 "proxyto" : "node",
56122987 18188 "returns" : {
56122987
DM
18189 "items" : {
18190 "properties" : {
44660702 18191 "pool" : {
56122987
DM
18192 "type" : "string"
18193 }
44660702
DM
18194 },
18195 "type" : "object"
18196 },
18197 "type" : "array"
18198 }
18199 }
18200 },
18201 "leaf" : 1,
18202 "path" : "/nodes/{node}/scan/zfs",
18203 "text" : "zfs"
18204 },
18205 {
18206 "info" : {
18207 "GET" : {
18208 "description" : "Scan remote NFS server.",
18209 "method" : "GET",
7aacca6f 18210 "name" : "nfsscan",
56122987 18211 "parameters" : {
44660702 18212 "additionalProperties" : 0,
56122987
DM
18213 "properties" : {
18214 "node" : {
7aacca6f 18215 "description" : "The cluster node name.",
44660702 18216 "format" : "pve-node",
7aacca6f
DM
18217 "type" : "string"
18218 },
18219 "server" : {
18220 "format" : "pve-storage-server",
18221 "type" : "string"
56122987 18222 }
44660702 18223 }
56122987 18224 },
56122987
DM
18225 "permissions" : {
18226 "check" : [
18227 "perm",
18228 "/storage",
18229 [
18230 "Datastore.Allocate"
18231 ]
18232 ]
18233 },
44660702 18234 "protected" : 1,
56122987 18235 "proxyto" : "node",
44660702
DM
18236 "returns" : {
18237 "items" : {
18238 "properties" : {
18239 "options" : {
18240 "type" : "string"
18241 },
18242 "path" : {
18243 "type" : "string"
18244 }
18245 },
18246 "type" : "object"
18247 },
18248 "type" : "array"
18249 }
18250 }
18251 },
18252 "leaf" : 1,
18253 "path" : "/nodes/{node}/scan/nfs",
18254 "text" : "nfs"
18255 },
18256 {
18257 "info" : {
18258 "GET" : {
18259 "description" : "Scan remote GlusterFS server.",
7aacca6f
DM
18260 "method" : "GET",
18261 "name" : "glusterfsscan",
56122987 18262 "parameters" : {
44660702 18263 "additionalProperties" : 0,
56122987 18264 "properties" : {
56122987 18265 "node" : {
44660702 18266 "description" : "The cluster node name.",
56122987 18267 "format" : "pve-node",
44660702 18268 "type" : "string"
7aacca6f
DM
18269 },
18270 "server" : {
18271 "format" : "pve-storage-server",
18272 "type" : "string"
56122987 18273 }
44660702
DM
18274 }
18275 },
18276 "permissions" : {
18277 "check" : [
18278 "perm",
18279 "/storage",
18280 [
18281 "Datastore.Allocate"
18282 ]
18283 ]
7aacca6f 18284 },
44660702
DM
18285 "protected" : 1,
18286 "proxyto" : "node",
18287 "returns" : {
18288 "items" : {
18289 "properties" : {
18290 "volname" : {
18291 "type" : "string"
18292 }
18293 },
18294 "type" : "object"
18295 },
18296 "type" : "array"
18297 }
56122987
DM
18298 }
18299 },
44660702
DM
18300 "leaf" : 1,
18301 "path" : "/nodes/{node}/scan/glusterfs",
7aacca6f 18302 "text" : "glusterfs"
56122987
DM
18303 },
18304 {
56122987
DM
18305 "info" : {
18306 "GET" : {
7aacca6f 18307 "description" : "Scan remote iSCSI server.",
44660702
DM
18308 "method" : "GET",
18309 "name" : "iscsiscan",
18310 "parameters" : {
18311 "additionalProperties" : 0,
18312 "properties" : {
18313 "node" : {
18314 "description" : "The cluster node name.",
18315 "format" : "pve-node",
18316 "type" : "string"
18317 },
18318 "portal" : {
18319 "format" : "pve-storage-portal-dns",
18320 "type" : "string"
18321 }
18322 }
18323 },
56122987
DM
18324 "permissions" : {
18325 "check" : [
18326 "perm",
18327 "/storage",
18328 [
18329 "Datastore.Allocate"
18330 ]
18331 ]
18332 },
44660702
DM
18333 "protected" : 1,
18334 "proxyto" : "node",
56122987 18335 "returns" : {
56122987
DM
18336 "items" : {
18337 "properties" : {
44660702 18338 "portal" : {
56122987
DM
18339 "type" : "string"
18340 },
44660702 18341 "target" : {
56122987
DM
18342 "type" : "string"
18343 }
18344 },
18345 "type" : "object"
56122987 18346 },
44660702
DM
18347 "type" : "array"
18348 }
56122987
DM
18349 }
18350 },
44660702 18351 "leaf" : 1,
7aacca6f 18352 "path" : "/nodes/{node}/scan/iscsi",
44660702 18353 "text" : "iscsi"
56122987
DM
18354 },
18355 {
56122987
DM
18356 "info" : {
18357 "GET" : {
44660702
DM
18358 "description" : "List local LVM volume groups.",
18359 "method" : "GET",
18360 "name" : "lvmscan",
18361 "parameters" : {
18362 "additionalProperties" : 0,
18363 "properties" : {
18364 "node" : {
18365 "description" : "The cluster node name.",
18366 "format" : "pve-node",
18367 "type" : "string"
56122987 18368 }
7aacca6f 18369 }
56122987 18370 },
56122987
DM
18371 "permissions" : {
18372 "check" : [
18373 "perm",
18374 "/storage",
18375 [
18376 "Datastore.Allocate"
18377 ]
18378 ]
18379 },
7aacca6f 18380 "protected" : 1,
44660702
DM
18381 "proxyto" : "node",
18382 "returns" : {
18383 "items" : {
18384 "properties" : {
18385 "vg" : {
18386 "type" : "string"
18387 }
18388 },
18389 "type" : "object"
18390 },
18391 "type" : "array"
7aacca6f 18392 }
56122987
DM
18393 }
18394 },
18395 "leaf" : 1,
44660702
DM
18396 "path" : "/nodes/{node}/scan/lvm",
18397 "text" : "lvm"
56122987
DM
18398 },
18399 {
56122987
DM
18400 "info" : {
18401 "GET" : {
44660702
DM
18402 "description" : "List local LVM Thin Pools.",
18403 "method" : "GET",
18404 "name" : "lvmthinscan",
56122987 18405 "parameters" : {
44660702 18406 "additionalProperties" : 0,
56122987
DM
18407 "properties" : {
18408 "node" : {
44660702 18409 "description" : "The cluster node name.",
56122987 18410 "format" : "pve-node",
44660702 18411 "type" : "string"
56122987
DM
18412 },
18413 "vg" : {
44660702 18414 "maxLength" : 100,
56122987 18415 "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+",
44660702 18416 "type" : "string"
56122987 18417 }
44660702 18418 }
56122987 18419 },
7aacca6f
DM
18420 "permissions" : {
18421 "check" : [
18422 "perm",
18423 "/storage",
18424 [
18425 "Datastore.Allocate"
18426 ]
18427 ]
18428 },
44660702 18429 "protected" : 1,
7aacca6f 18430 "proxyto" : "node",
56122987 18431 "returns" : {
56122987
DM
18432 "items" : {
18433 "properties" : {
18434 "lv" : {
18435 "type" : "string"
18436 }
18437 },
18438 "type" : "object"
44660702
DM
18439 },
18440 "type" : "array"
7aacca6f 18441 }
56122987
DM
18442 }
18443 },
7aacca6f 18444 "leaf" : 1,
44660702
DM
18445 "path" : "/nodes/{node}/scan/lvmthin",
18446 "text" : "lvmthin"
56122987
DM
18447 },
18448 {
56122987
DM
18449 "info" : {
18450 "GET" : {
44660702
DM
18451 "description" : "List local USB devices.",
18452 "method" : "GET",
18453 "name" : "usbscan",
18454 "parameters" : {
18455 "additionalProperties" : 0,
18456 "properties" : {
18457 "node" : {
18458 "description" : "The cluster node name.",
18459 "format" : "pve-node",
18460 "type" : "string"
18461 }
18462 }
18463 },
7aacca6f
DM
18464 "permissions" : {
18465 "check" : [
18466 "perm",
18467 "/",
18468 [
18469 "Sys.Modify"
18470 ]
18471 ]
18472 },
44660702 18473 "protected" : 1,
7aacca6f 18474 "proxyto" : "node",
56122987
DM
18475 "returns" : {
18476 "items" : {
18477 "properties" : {
44660702
DM
18478 "busnum" : {
18479 "type" : "integer"
56122987 18480 },
44660702
DM
18481 "class" : {
18482 "type" : "integer"
56122987 18483 },
7aacca6f 18484 "devnum" : {
56122987
DM
18485 "type" : "integer"
18486 },
44660702
DM
18487 "level" : {
18488 "type" : "integer"
18489 },
18490 "manufacturer" : {
18491 "optional" : 1,
7aacca6f
DM
18492 "type" : "string"
18493 },
44660702 18494 "port" : {
56122987
DM
18495 "type" : "integer"
18496 },
44660702
DM
18497 "prodid" : {
18498 "type" : "string"
56122987 18499 },
44660702
DM
18500 "product" : {
18501 "optional" : 1,
18502 "type" : "string"
18503 },
18504 "serial" : {
7aacca6f 18505 "optional" : 1,
56122987
DM
18506 "type" : "string"
18507 },
44660702 18508 "speed" : {
7aacca6f 18509 "type" : "string"
56122987 18510 },
44660702 18511 "usbpath" : {
56122987
DM
18512 "optional" : 1,
18513 "type" : "string"
18514 },
44660702
DM
18515 "vendid" : {
18516 "type" : "string"
56122987
DM
18517 }
18518 },
18519 "type" : "object"
7aacca6f
DM
18520 },
18521 "type" : "array"
44660702
DM
18522 }
18523 }
18524 },
18525 "leaf" : 1,
18526 "path" : "/nodes/{node}/scan/usb",
18527 "text" : "usb"
18528 }
18529 ],
18530 "info" : {
18531 "GET" : {
18532 "description" : "Index of available scan methods",
18533 "method" : "GET",
18534 "name" : "index",
18535 "parameters" : {
18536 "additionalProperties" : 0,
18537 "properties" : {
18538 "node" : {
18539 "description" : "The cluster node name.",
18540 "format" : "pve-node",
18541 "type" : "string"
18542 }
18543 }
18544 },
18545 "permissions" : {
18546 "user" : "all"
18547 },
18548 "returns" : {
18549 "items" : {
18550 "properties" : {
18551 "method" : {
18552 "type" : "string"
56122987
DM
18553 }
18554 },
44660702
DM
18555 "type" : "object"
18556 },
18557 "links" : [
18558 {
18559 "href" : "{method}",
18560 "rel" : "child"
18561 }
18562 ],
18563 "type" : "array"
56122987
DM
18564 }
18565 }
44660702
DM
18566 },
18567 "leaf" : 0,
18568 "path" : "/nodes/{node}/scan",
7aacca6f 18569 "text" : "scan"
56122987
DM
18570 },
18571 {
56122987
DM
18572 "children" : [
18573 {
56122987
DM
18574 "children" : [
18575 {
7aacca6f
DM
18576 "children" : [
18577 {
18578 "info" : {
44660702
DM
18579 "DELETE" : {
18580 "description" : "Delete volume",
18581 "method" : "DELETE",
18582 "name" : "delete",
7aacca6f
DM
18583 "parameters" : {
18584 "additionalProperties" : 0,
18585 "properties" : {
7aacca6f
DM
18586 "node" : {
18587 "description" : "The cluster node name.",
44660702
DM
18588 "format" : "pve-node",
18589 "type" : "string"
18590 },
18591 "storage" : {
18592 "description" : "The storage identifier.",
18593 "format" : "pve-storage-id",
18594 "optional" : 1,
18595 "type" : "string"
7aacca6f
DM
18596 },
18597 "volume" : {
18598 "description" : "Volume identifier",
18599 "type" : "string"
18600 }
18601 }
18602 },
44660702
DM
18603 "permissions" : {
18604 "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).",
18605 "user" : "all"
18606 },
18607 "protected" : 1,
18608 "proxyto" : "node",
18609 "returns" : {
18610 "type" : "null"
18611 }
7aacca6f 18612 },
44660702
DM
18613 "GET" : {
18614 "description" : "Get volume attributes",
18615 "method" : "GET",
18616 "name" : "info",
7aacca6f
DM
18617 "parameters" : {
18618 "additionalProperties" : 0,
18619 "properties" : {
7aacca6f
DM
18620 "node" : {
18621 "description" : "The cluster node name.",
44660702
DM
18622 "format" : "pve-node",
18623 "type" : "string"
7aacca6f
DM
18624 },
18625 "storage" : {
7aacca6f 18626 "description" : "The storage identifier.",
44660702 18627 "format" : "pve-storage-id",
7aacca6f
DM
18628 "optional" : 1,
18629 "type" : "string"
44660702
DM
18630 },
18631 "volume" : {
18632 "description" : "Volume identifier",
18633 "type" : "string"
7aacca6f
DM
18634 }
18635 }
18636 },
7aacca6f 18637 "permissions" : {
44660702 18638 "description" : "You need read access for the volume.",
7aacca6f
DM
18639 "user" : "all"
18640 },
44660702 18641 "protected" : 1,
7aacca6f 18642 "proxyto" : "node",
7aacca6f 18643 "returns" : {
44660702 18644 "type" : "object"
7aacca6f
DM
18645 }
18646 },
18647 "POST" : {
44660702
DM
18648 "description" : "Copy a volume. This is experimental code - do not use.",
18649 "method" : "POST",
18650 "name" : "copy",
7aacca6f
DM
18651 "parameters" : {
18652 "additionalProperties" : 0,
18653 "properties" : {
44660702
DM
18654 "node" : {
18655 "description" : "The cluster node name.",
18656 "format" : "pve-node",
18657 "type" : "string"
18658 },
18659 "storage" : {
18660 "description" : "The storage identifier.",
18661 "format" : "pve-storage-id",
18662 "optional" : 1,
18663 "type" : "string"
18664 },
7aacca6f 18665 "target" : {
44660702
DM
18666 "description" : "Target volume identifier",
18667 "type" : "string"
7aacca6f
DM
18668 },
18669 "target_node" : {
7aacca6f 18670 "description" : "Target node. Default is local node.",
44660702
DM
18671 "format" : "pve-node",
18672 "optional" : 1,
18673 "type" : "string"
7aacca6f
DM
18674 },
18675 "volume" : {
44660702
DM
18676 "description" : "Source volume identifier",
18677 "type" : "string"
7aacca6f
DM
18678 }
18679 }
18680 },
7aacca6f
DM
18681 "protected" : 1,
18682 "proxyto" : "node",
18683 "returns" : {
18684 "type" : "string"
44660702 18685 }
7aacca6f
DM
18686 }
18687 },
7aacca6f 18688 "leaf" : 1,
44660702
DM
18689 "path" : "/nodes/{node}/storage/{storage}/content/{volume}",
18690 "text" : "{volume}"
7aacca6f
DM
18691 }
18692 ],
56122987
DM
18693 "info" : {
18694 "GET" : {
44660702
DM
18695 "description" : "List storage content.",
18696 "method" : "GET",
18697 "name" : "index",
18698 "parameters" : {
18699 "additionalProperties" : 0,
18700 "properties" : {
18701 "content" : {
18702 "description" : "Only list content of this type.",
18703 "format" : "pve-storage-content",
18704 "optional" : 1,
18705 "type" : "string"
18706 },
18707 "node" : {
18708 "description" : "The cluster node name.",
18709 "format" : "pve-node",
18710 "type" : "string"
18711 },
18712 "storage" : {
18713 "description" : "The storage identifier.",
18714 "format" : "pve-storage-id",
18715 "type" : "string"
18716 },
18717 "vmid" : {
18718 "description" : "Only list images for this VM",
18719 "format" : "pve-vmid",
18720 "minimum" : 1,
18721 "optional" : 1,
18722 "type" : "integer"
18723 }
18724 }
18725 },
7aacca6f
DM
18726 "permissions" : {
18727 "check" : [
18728 "perm",
18729 "/storage/{storage}",
18730 [
18731 "Datastore.Audit",
18732 "Datastore.AllocateSpace"
18733 ],
18734 "any",
18735 1
18736 ]
18737 },
44660702 18738 "protected" : 1,
7aacca6f 18739 "proxyto" : "node",
56122987 18740 "returns" : {
44660702
DM
18741 "items" : {
18742 "properties" : {
18743 "volid" : {
18744 "type" : "string"
18745 }
18746 },
18747 "type" : "object"
18748 },
18749 "links" : [
18750 {
18751 "href" : "{volid}",
18752 "rel" : "child"
18753 }
18754 ],
18755 "type" : "array"
18756 }
18757 },
18758 "POST" : {
18759 "description" : "Allocate disk images.",
18760 "method" : "POST",
18761 "name" : "create",
56122987 18762 "parameters" : {
44660702 18763 "additionalProperties" : 0,
56122987 18764 "properties" : {
44660702
DM
18765 "filename" : {
18766 "description" : "The name of the file to create.",
18767 "type" : "string"
18768 },
18769 "format" : {
18770 "enum" : [
18771 "raw",
18772 "qcow2",
18773 "subvol"
18774 ],
18775 "optional" : 1,
18776 "requires" : "size",
18777 "type" : "string"
18778 },
18779 "node" : {
18780 "description" : "The cluster node name.",
18781 "format" : "pve-node",
18782 "type" : "string"
18783 },
18784 "size" : {
18785 "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)",
18786 "pattern" : "\\d+[MG]?",
18787 "type" : "string"
18788 },
56122987
DM
18789 "storage" : {
18790 "description" : "The storage identifier.",
44660702
DM
18791 "format" : "pve-storage-id",
18792 "type" : "string"
56122987 18793 },
44660702
DM
18794 "vmid" : {
18795 "description" : "Specify owner VM",
18796 "format" : "pve-vmid",
18797 "minimum" : 1,
18798 "type" : "integer"
18799 }
18800 }
18801 },
18802 "permissions" : {
18803 "check" : [
18804 "perm",
18805 "/storage/{storage}",
18806 [
18807 "Datastore.AllocateSpace"
18808 ]
18809 ]
18810 },
18811 "protected" : 1,
18812 "proxyto" : "node",
18813 "returns" : {
18814 "description" : "Volume identifier",
18815 "type" : "string"
18816 }
18817 }
18818 },
18819 "leaf" : 0,
18820 "path" : "/nodes/{node}/storage/{storage}/content",
18821 "text" : "content"
18822 },
18823 {
18824 "info" : {
18825 "GET" : {
18826 "description" : "Read storage status.",
18827 "method" : "GET",
18828 "name" : "read_status",
18829 "parameters" : {
18830 "additionalProperties" : 0,
18831 "properties" : {
56122987
DM
18832 "node" : {
18833 "description" : "The cluster node name.",
44660702
DM
18834 "format" : "pve-node",
18835 "type" : "string"
18836 },
18837 "storage" : {
18838 "description" : "The storage identifier.",
18839 "format" : "pve-storage-id",
18840 "type" : "string"
56122987 18841 }
44660702
DM
18842 }
18843 },
18844 "permissions" : {
18845 "check" : [
18846 "perm",
18847 "/storage/{storage}",
18848 [
18849 "Datastore.Audit",
18850 "Datastore.AllocateSpace"
18851 ],
18852 "any",
18853 1
18854 ]
56122987
DM
18855 },
18856 "protected" : 1,
44660702
DM
18857 "proxyto" : "node",
18858 "returns" : {
18859 "properties" : {},
18860 "type" : "object"
18861 }
56122987
DM
18862 }
18863 },
44660702
DM
18864 "leaf" : 1,
18865 "path" : "/nodes/{node}/storage/{storage}/status",
7aacca6f 18866 "text" : "status"
56122987
DM
18867 },
18868 {
56122987
DM
18869 "info" : {
18870 "GET" : {
44660702
DM
18871 "description" : "Read storage RRD statistics (returns PNG).",
18872 "method" : "GET",
18873 "name" : "rrd",
56122987 18874 "parameters" : {
44660702 18875 "additionalProperties" : 0,
56122987 18876 "properties" : {
44660702
DM
18877 "cf" : {
18878 "description" : "The RRD consolidation function",
18879 "enum" : [
18880 "AVERAGE",
18881 "MAX"
18882 ],
18883 "optional" : 1,
18884 "type" : "string"
18885 },
7aacca6f 18886 "ds" : {
7aacca6f 18887 "description" : "The list of datasources you want to display.",
44660702
DM
18888 "format" : "pve-configid-list",
18889 "type" : "string"
56122987 18890 },
7aacca6f
DM
18891 "node" : {
18892 "description" : "The cluster node name.",
44660702
DM
18893 "format" : "pve-node",
18894 "type" : "string"
56122987 18895 },
7aacca6f 18896 "storage" : {
7aacca6f 18897 "description" : "The storage identifier.",
44660702
DM
18898 "format" : "pve-storage-id",
18899 "type" : "string"
18900 },
18901 "timeframe" : {
18902 "description" : "Specify the time frame you are interested in.",
7aacca6f 18903 "enum" : [
44660702
DM
18904 "hour",
18905 "day",
18906 "week",
18907 "month",
18908 "year"
7aacca6f 18909 ],
44660702 18910 "type" : "string"
56122987 18911 }
44660702 18912 }
56122987
DM
18913 },
18914 "permissions" : {
18915 "check" : [
18916 "perm",
18917 "/storage/{storage}",
18918 [
18919 "Datastore.Audit",
18920 "Datastore.AllocateSpace"
18921 ],
18922 "any",
18923 1
18924 ]
18925 },
44660702
DM
18926 "protected" : 1,
18927 "proxyto" : "node",
7aacca6f
DM
18928 "returns" : {
18929 "properties" : {
18930 "filename" : {
18931 "type" : "string"
18932 }
18933 },
18934 "type" : "object"
18935 }
56122987
DM
18936 }
18937 },
18938 "leaf" : 1,
44660702
DM
18939 "path" : "/nodes/{node}/storage/{storage}/rrd",
18940 "text" : "rrd"
56122987
DM
18941 },
18942 {
56122987
DM
18943 "info" : {
18944 "GET" : {
44660702
DM
18945 "description" : "Read storage RRD statistics.",
18946 "method" : "GET",
18947 "name" : "rrddata",
56122987 18948 "parameters" : {
44660702 18949 "additionalProperties" : 0,
56122987 18950 "properties" : {
44660702
DM
18951 "cf" : {
18952 "description" : "The RRD consolidation function",
18953 "enum" : [
18954 "AVERAGE",
18955 "MAX"
18956 ],
18957 "optional" : 1,
18958 "type" : "string"
18959 },
7aacca6f 18960 "node" : {
7aacca6f 18961 "description" : "The cluster node name.",
44660702
DM
18962 "format" : "pve-node",
18963 "type" : "string"
18964 },
18965 "storage" : {
18966 "description" : "The storage identifier.",
18967 "format" : "pve-storage-id",
7aacca6f
DM
18968 "type" : "string"
18969 },
56122987 18970 "timeframe" : {
7aacca6f 18971 "description" : "Specify the time frame you are interested in.",
56122987
DM
18972 "enum" : [
18973 "hour",
18974 "day",
18975 "week",
18976 "month",
18977 "year"
56122987 18978 ],
44660702 18979 "type" : "string"
56122987 18980 }
44660702 18981 }
7aacca6f 18982 },
7aacca6f
DM
18983 "permissions" : {
18984 "check" : [
18985 "perm",
18986 "/storage/{storage}",
18987 [
18988 "Datastore.Audit",
18989 "Datastore.AllocateSpace"
18990 ],
18991 "any",
18992 1
18993 ]
18994 },
44660702
DM
18995 "protected" : 1,
18996 "proxyto" : "node",
7aacca6f
DM
18997 "returns" : {
18998 "items" : {
44660702
DM
18999 "properties" : {},
19000 "type" : "object"
7aacca6f
DM
19001 },
19002 "type" : "array"
56122987
DM
19003 }
19004 }
7aacca6f 19005 },
7aacca6f 19006 "leaf" : 1,
44660702
DM
19007 "path" : "/nodes/{node}/storage/{storage}/rrddata",
19008 "text" : "rrddata"
56122987
DM
19009 },
19010 {
56122987
DM
19011 "info" : {
19012 "POST" : {
7aacca6f 19013 "description" : "Upload templates and ISO images.",
44660702
DM
19014 "method" : "POST",
19015 "name" : "upload",
56122987 19016 "parameters" : {
7aacca6f 19017 "additionalProperties" : 0,
56122987 19018 "properties" : {
56122987 19019 "content" : {
7aacca6f 19020 "description" : "Content type.",
44660702
DM
19021 "format" : "pve-storage-content",
19022 "type" : "string"
56122987
DM
19023 },
19024 "filename" : {
44660702
DM
19025 "description" : "The name of the file to create.",
19026 "type" : "string"
56122987
DM
19027 },
19028 "node" : {
19029 "description" : "The cluster node name.",
44660702
DM
19030 "format" : "pve-node",
19031 "type" : "string"
19032 },
19033 "storage" : {
19034 "description" : "The storage identifier.",
19035 "format" : "pve-storage-id",
19036 "type" : "string"
19037 },
19038 "tmpfilename" : {
19039 "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.",
19040 "optional" : 1,
19041 "type" : "string"
56122987 19042 }
7aacca6f 19043 }
56122987 19044 },
56122987
DM
19045 "permissions" : {
19046 "check" : [
19047 "perm",
19048 "/storage/{storage}",
19049 [
19050 "Datastore.AllocateTemplate"
19051 ]
19052 ]
44660702
DM
19053 },
19054 "protected" : 1,
19055 "returns" : {
19056 "type" : "string"
19057 }
19058 }
19059 },
19060 "leaf" : 1,
19061 "path" : "/nodes/{node}/storage/{storage}/upload",
19062 "text" : "upload"
19063 }
19064 ],
19065 "info" : {
19066 "GET" : {
19067 "description" : "",
19068 "method" : "GET",
19069 "name" : "diridx",
19070 "parameters" : {
19071 "additionalProperties" : 0,
19072 "properties" : {
19073 "node" : {
19074 "description" : "The cluster node name.",
19075 "format" : "pve-node",
19076 "type" : "string"
19077 },
19078 "storage" : {
19079 "description" : "The storage identifier.",
19080 "format" : "pve-storage-id",
19081 "type" : "string"
56122987
DM
19082 }
19083 }
44660702
DM
19084 },
19085 "permissions" : {
19086 "check" : [
19087 "perm",
19088 "/storage/{storage}",
19089 [
19090 "Datastore.Audit",
19091 "Datastore.AllocateSpace"
19092 ],
19093 "any",
19094 1
19095 ]
19096 },
19097 "returns" : {
19098 "items" : {
19099 "properties" : {
19100 "subdir" : {
19101 "type" : "string"
19102 }
19103 },
19104 "type" : "object"
19105 },
19106 "links" : [
19107 {
19108 "href" : "{subdir}",
19109 "rel" : "child"
19110 }
19111 ],
19112 "type" : "array"
56122987
DM
19113 }
19114 }
44660702
DM
19115 },
19116 "leaf" : 0,
19117 "path" : "/nodes/{node}/storage/{storage}",
19118 "text" : "{storage}"
56122987
DM
19119 }
19120 ],
56122987
DM
19121 "info" : {
19122 "GET" : {
44660702
DM
19123 "description" : "Get status for all datastores.",
19124 "method" : "GET",
19125 "name" : "index",
19126 "parameters" : {
19127 "additionalProperties" : 0,
19128 "properties" : {
19129 "content" : {
19130 "description" : "Only list stores which support this content type.",
19131 "format" : "pve-storage-content-list",
19132 "optional" : 1,
19133 "type" : "string"
19134 },
19135 "enabled" : {
19136 "default" : 0,
19137 "description" : "Only list stores which are enabled (not disabled in config).",
19138 "optional" : 1,
19139 "type" : "boolean"
19140 },
19141 "node" : {
19142 "description" : "The cluster node name.",
19143 "format" : "pve-node",
19144 "type" : "string"
19145 },
19146 "storage" : {
19147 "description" : "Only list status for specified storage",
19148 "format" : "pve-storage-id",
19149 "optional" : 1,
19150 "type" : "string"
19151 },
19152 "target" : {
19153 "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.",
19154 "format" : "pve-node",
19155 "optional" : 1,
19156 "type" : "string"
19157 }
19158 }
19159 },
7aacca6f
DM
19160 "permissions" : {
19161 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
19162 "user" : "all"
19163 },
44660702 19164 "protected" : 1,
7aacca6f 19165 "proxyto" : "node",
56122987
DM
19166 "returns" : {
19167 "items" : {
56122987
DM
19168 "properties" : {
19169 "storage" : {
19170 "type" : "string"
19171 }
44660702
DM
19172 },
19173 "type" : "object"
56122987 19174 },
56122987
DM
19175 "links" : [
19176 {
7aacca6f
DM
19177 "href" : "{storage}",
19178 "rel" : "child"
56122987 19179 }
44660702
DM
19180 ],
19181 "type" : "array"
19182 }
56122987 19183 }
44660702
DM
19184 },
19185 "leaf" : 0,
19186 "path" : "/nodes/{node}/storage",
19187 "text" : "storage"
56122987
DM
19188 },
19189 {
56122987
DM
19190 "children" : [
19191 {
19192 "info" : {
44660702
DM
19193 "GET" : {
19194 "description" : "List available updates.",
19195 "method" : "GET",
19196 "name" : "list_updates",
19197 "parameters" : {
19198 "additionalProperties" : 0,
19199 "properties" : {
19200 "node" : {
19201 "description" : "The cluster node name.",
19202 "format" : "pve-node",
19203 "type" : "string"
19204 }
19205 }
7aacca6f
DM
19206 },
19207 "permissions" : {
19208 "check" : [
19209 "perm",
19210 "/nodes/{node}",
19211 [
19212 "Sys.Modify"
19213 ]
19214 ]
19215 },
44660702 19216 "protected" : 1,
56122987 19217 "proxyto" : "node",
44660702
DM
19218 "returns" : {
19219 "items" : {
19220 "properties" : {},
19221 "type" : "object"
19222 },
19223 "type" : "array"
19224 }
19225 },
19226 "POST" : {
19227 "description" : "This is used to resynchronize the package index files from their sources (apt-get update).",
7aacca6f
DM
19228 "method" : "POST",
19229 "name" : "update_database",
56122987
DM
19230 "parameters" : {
19231 "additionalProperties" : 0,
19232 "properties" : {
44660702
DM
19233 "node" : {
19234 "description" : "The cluster node name.",
19235 "format" : "pve-node",
19236 "type" : "string"
19237 },
56122987 19238 "notify" : {
56122987 19239 "default" : 0,
44660702
DM
19240 "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').",
19241 "optional" : 1,
19242 "type" : "boolean"
56122987
DM
19243 },
19244 "quiet" : {
56122987 19245 "default" : 0,
44660702 19246 "description" : "Only produces output suitable for logging, omitting progress indicators.",
56122987 19247 "optional" : 1,
44660702 19248 "type" : "boolean"
56122987 19249 }
7aacca6f
DM
19250 }
19251 },
19252 "permissions" : {
19253 "check" : [
19254 "perm",
19255 "/nodes/{node}",
19256 [
19257 "Sys.Modify"
19258 ]
19259 ]
19260 },
44660702
DM
19261 "protected" : 1,
19262 "proxyto" : "node",
19263 "returns" : {
19264 "type" : "string"
19265 }
56122987
DM
19266 }
19267 },
7aacca6f 19268 "leaf" : 1,
44660702
DM
19269 "path" : "/nodes/{node}/apt/update",
19270 "text" : "update"
56122987
DM
19271 },
19272 {
56122987
DM
19273 "info" : {
19274 "GET" : {
44660702 19275 "description" : "Get package changelogs.",
56122987 19276 "method" : "GET",
7aacca6f 19277 "name" : "changelog",
56122987 19278 "parameters" : {
44660702 19279 "additionalProperties" : 0,
56122987
DM
19280 "properties" : {
19281 "name" : {
19282 "description" : "Package name.",
19283 "type" : "string"
19284 },
44660702
DM
19285 "node" : {
19286 "description" : "The cluster node name.",
19287 "format" : "pve-node",
19288 "type" : "string"
19289 },
56122987 19290 "version" : {
7aacca6f 19291 "description" : "Package version.",
44660702
DM
19292 "optional" : 1,
19293 "type" : "string"
56122987 19294 }
44660702 19295 }
56122987 19296 },
44660702
DM
19297 "permissions" : {
19298 "check" : [
19299 "perm",
19300 "/nodes/{node}",
19301 [
19302 "Sys.Modify"
19303 ]
19304 ]
19305 },
19306 "proxyto" : "node",
19307 "returns" : {
19308 "type" : "string"
19309 }
56122987
DM
19310 }
19311 },
44660702
DM
19312 "leaf" : 1,
19313 "path" : "/nodes/{node}/apt/changelog",
7aacca6f 19314 "text" : "changelog"
56122987
DM
19315 },
19316 {
56122987
DM
19317 "info" : {
19318 "GET" : {
44660702
DM
19319 "description" : "Get package information for important Proxmox packages.",
19320 "method" : "GET",
7aacca6f
DM
19321 "name" : "versions",
19322 "parameters" : {
44660702 19323 "additionalProperties" : 0,
7aacca6f
DM
19324 "properties" : {
19325 "node" : {
44660702 19326 "description" : "The cluster node name.",
7aacca6f 19327 "format" : "pve-node",
44660702 19328 "type" : "string"
7aacca6f 19329 }
44660702 19330 }
7aacca6f 19331 },
56122987
DM
19332 "permissions" : {
19333 "check" : [
19334 "perm",
19335 "/nodes/{node}",
19336 [
19337 "Sys.Audit"
19338 ]
19339 ]
19340 },
7aacca6f 19341 "proxyto" : "node",
56122987
DM
19342 "returns" : {
19343 "items" : {
7aacca6f
DM
19344 "properties" : {},
19345 "type" : "object"
44660702
DM
19346 },
19347 "type" : "array"
56122987
DM
19348 }
19349 }
19350 },
44660702 19351 "leaf" : 1,
7aacca6f 19352 "path" : "/nodes/{node}/apt/versions",
44660702 19353 "text" : "versions"
56122987
DM
19354 }
19355 ],
56122987
DM
19356 "info" : {
19357 "GET" : {
44660702 19358 "description" : "Directory index for apt (Advanced Package Tool).",
7aacca6f 19359 "method" : "GET",
44660702 19360 "name" : "index",
7aacca6f
DM
19361 "parameters" : {
19362 "additionalProperties" : 0,
19363 "properties" : {
19364 "node" : {
44660702 19365 "description" : "The cluster node name.",
7aacca6f 19366 "format" : "pve-node",
44660702 19367 "type" : "string"
7aacca6f
DM
19368 }
19369 }
19370 },
7aacca6f
DM
19371 "permissions" : {
19372 "user" : "all"
19373 },
44660702
DM
19374 "returns" : {
19375 "items" : {
19376 "properties" : {
19377 "id" : {
19378 "type" : "string"
19379 }
19380 },
19381 "type" : "object"
19382 },
19383 "links" : [
19384 {
19385 "href" : "{id}",
19386 "rel" : "child"
19387 }
19388 ],
19389 "type" : "array"
19390 }
56122987 19391 }
7aacca6f 19392 },
44660702 19393 "leaf" : 0,
7aacca6f 19394 "path" : "/nodes/{node}/apt",
44660702 19395 "text" : "apt"
56122987
DM
19396 },
19397 {
56122987
DM
19398 "children" : [
19399 {
19400 "children" : [
19401 {
56122987
DM
19402 "info" : {
19403 "DELETE" : {
44660702 19404 "description" : "Delete rule.",
7aacca6f 19405 "method" : "DELETE",
44660702 19406 "name" : "delete_rule",
56122987
DM
19407 "parameters" : {
19408 "additionalProperties" : 0,
19409 "properties" : {
56122987
DM
19410 "digest" : {
19411 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 19412 "maxLength" : 40,
56122987 19413 "optional" : 1,
56122987
DM
19414 "type" : "string"
19415 },
44660702
DM
19416 "node" : {
19417 "description" : "The cluster node name.",
19418 "format" : "pve-node",
19419 "type" : "string"
19420 },
7aacca6f 19421 "pos" : {
7aacca6f 19422 "description" : "Update rule at position <pos>.",
44660702
DM
19423 "minimum" : 0,
19424 "optional" : 1,
19425 "type" : "integer"
56122987
DM
19426 }
19427 }
19428 },
44660702
DM
19429 "permissions" : {
19430 "check" : [
19431 "perm",
19432 "/nodes/{node}",
19433 [
19434 "Sys.Modify"
19435 ]
19436 ]
19437 },
19438 "protected" : 1,
19439 "proxyto" : "node",
56122987
DM
19440 "returns" : {
19441 "type" : "null"
44660702
DM
19442 }
19443 },
19444 "GET" : {
19445 "description" : "Get single rule data.",
19446 "method" : "GET",
19447 "name" : "get_rule",
19448 "parameters" : {
19449 "additionalProperties" : 0,
19450 "properties" : {
19451 "node" : {
19452 "description" : "The cluster node name.",
19453 "format" : "pve-node",
19454 "type" : "string"
19455 },
19456 "pos" : {
19457 "description" : "Update rule at position <pos>.",
19458 "minimum" : 0,
19459 "optional" : 1,
19460 "type" : "integer"
19461 }
19462 }
56122987 19463 },
56122987
DM
19464 "permissions" : {
19465 "check" : [
19466 "perm",
19467 "/nodes/{node}",
19468 [
44660702 19469 "Sys.Audit"
56122987
DM
19470 ]
19471 ]
44660702
DM
19472 },
19473 "proxyto" : "node",
19474 "returns" : {
19475 "properties" : {
19476 "pos" : {
19477 "type" : "integer"
19478 }
19479 },
19480 "type" : "object"
7aacca6f 19481 }
56122987
DM
19482 },
19483 "PUT" : {
44660702
DM
19484 "description" : "Modify rule data.",
19485 "method" : "PUT",
56122987 19486 "name" : "update_rule",
56122987 19487 "parameters" : {
44660702 19488 "additionalProperties" : 0,
56122987 19489 "properties" : {
44660702
DM
19490 "action" : {
19491 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
19492 "maxLength" : 20,
19493 "minLength" : 2,
56122987 19494 "optional" : 1,
44660702
DM
19495 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19496 "type" : "string"
56122987 19497 },
7aacca6f 19498 "comment" : {
56122987 19499 "optional" : 1,
56122987
DM
19500 "type" : "string"
19501 },
44660702
DM
19502 "delete" : {
19503 "description" : "A list of settings you want to delete.",
19504 "format" : "pve-configid-list",
56122987 19505 "optional" : 1,
44660702 19506 "type" : "string"
56122987 19507 },
44660702
DM
19508 "dest" : {
19509 "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.",
19510 "format" : "pve-fw-addr-spec",
56122987 19511 "optional" : 1,
44660702 19512 "type" : "string"
56122987 19513 },
44660702
DM
19514 "digest" : {
19515 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19516 "maxLength" : 40,
56122987 19517 "optional" : 1,
44660702 19518 "type" : "string"
56122987 19519 },
7aacca6f 19520 "dport" : {
7aacca6f 19521 "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
19522 "format" : "pve-fw-dport-spec",
19523 "optional" : 1,
19524 "type" : "string"
7aacca6f 19525 },
44660702
DM
19526 "enable" : {
19527 "minimum" : 0,
56122987 19528 "optional" : 1,
44660702 19529 "type" : "integer"
56122987 19530 },
7aacca6f 19531 "iface" : {
44660702 19532 "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 19533 "format" : "pve-iface",
44660702 19534 "maxLength" : 20,
56122987 19535 "minLength" : 2,
44660702
DM
19536 "optional" : 1,
19537 "type" : "string"
56122987 19538 },
44660702
DM
19539 "macro" : {
19540 "maxLength" : 128,
19541 "optional" : 1,
19542 "type" : "string"
19543 },
19544 "moveto" : {
19545 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
19546 "minimum" : 0,
7aacca6f 19547 "optional" : 1,
44660702
DM
19548 "type" : "integer"
19549 },
19550 "node" : {
19551 "description" : "The cluster node name.",
19552 "format" : "pve-node",
19553 "type" : "string"
56122987
DM
19554 },
19555 "pos" : {
44660702 19556 "description" : "Update rule at position <pos>.",
7aacca6f 19557 "minimum" : 0,
7aacca6f 19558 "optional" : 1,
44660702 19559 "type" : "integer"
7aacca6f 19560 },
44660702
DM
19561 "proto" : {
19562 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19563 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
19564 "optional" : 1,
19565 "type" : "string"
19566 },
44660702
DM
19567 "source" : {
19568 "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.",
19569 "format" : "pve-fw-addr-spec",
56122987 19570 "optional" : 1,
44660702 19571 "type" : "string"
7aacca6f 19572 },
44660702
DM
19573 "sport" : {
19574 "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.",
19575 "format" : "pve-fw-sport-spec",
19576 "optional" : 1,
19577 "type" : "string"
19578 },
19579 "type" : {
19580 "enum" : [
19581 "in",
19582 "out",
19583 "group"
19584 ],
19585 "optional" : 1,
19586 "type" : "string"
56122987 19587 }
44660702 19588 }
56122987 19589 },
56122987
DM
19590 "permissions" : {
19591 "check" : [
19592 "perm",
19593 "/nodes/{node}",
19594 [
19595 "Sys.Modify"
19596 ]
19597 ]
7aacca6f 19598 },
44660702 19599 "protected" : 1,
7aacca6f 19600 "proxyto" : "node",
7aacca6f
DM
19601 "returns" : {
19602 "type" : "null"
56122987
DM
19603 }
19604 }
7aacca6f 19605 },
44660702 19606 "leaf" : 1,
7aacca6f 19607 "path" : "/nodes/{node}/firewall/rules/{pos}",
44660702 19608 "text" : "{pos}"
56122987
DM
19609 }
19610 ],
56122987
DM
19611 "info" : {
19612 "GET" : {
44660702
DM
19613 "description" : "List rules.",
19614 "method" : "GET",
19615 "name" : "get_rules",
19616 "parameters" : {
19617 "additionalProperties" : 0,
19618 "properties" : {
19619 "node" : {
19620 "description" : "The cluster node name.",
19621 "format" : "pve-node",
19622 "type" : "string"
19623 }
19624 }
19625 },
19626 "permissions" : {
19627 "check" : [
19628 "perm",
19629 "/nodes/{node}",
19630 [
19631 "Sys.Audit"
19632 ]
19633 ]
19634 },
19635 "proxyto" : "node",
56122987 19636 "returns" : {
56122987
DM
19637 "items" : {
19638 "properties" : {
19639 "pos" : {
19640 "type" : "integer"
19641 }
44660702
DM
19642 },
19643 "type" : "object"
56122987 19644 },
7aacca6f
DM
19645 "links" : [
19646 {
19647 "href" : "{pos}",
19648 "rel" : "child"
19649 }
19650 ],
19651 "type" : "array"
44660702 19652 }
56122987
DM
19653 },
19654 "POST" : {
44660702 19655 "description" : "Create new rule.",
7aacca6f
DM
19656 "method" : "POST",
19657 "name" : "create_rule",
56122987 19658 "parameters" : {
44660702 19659 "additionalProperties" : 0,
56122987 19660 "properties" : {
7aacca6f 19661 "action" : {
7aacca6f 19662 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
44660702 19663 "maxLength" : 20,
7aacca6f
DM
19664 "minLength" : 2,
19665 "optional" : 0,
44660702
DM
19666 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19667 "type" : "string"
56122987 19668 },
44660702 19669 "comment" : {
56122987 19670 "optional" : 1,
44660702 19671 "type" : "string"
56122987 19672 },
44660702
DM
19673 "dest" : {
19674 "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.",
19675 "format" : "pve-fw-addr-spec",
7aacca6f 19676 "optional" : 1,
44660702 19677 "type" : "string"
56122987 19678 },
44660702
DM
19679 "digest" : {
19680 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19681 "maxLength" : 40,
19682 "optional" : 1,
19683 "type" : "string"
56122987 19684 },
44660702
DM
19685 "dport" : {
19686 "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.",
19687 "format" : "pve-fw-dport-spec",
7aacca6f
DM
19688 "optional" : 1,
19689 "type" : "string"
56122987 19690 },
44660702
DM
19691 "enable" : {
19692 "minimum" : 0,
19693 "optional" : 1,
19694 "type" : "integer"
19695 },
7aacca6f 19696 "iface" : {
44660702 19697 "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 19698 "format" : "pve-iface",
56122987 19699 "maxLength" : 20,
7aacca6f 19700 "minLength" : 2,
7aacca6f 19701 "optional" : 1,
56122987
DM
19702 "type" : "string"
19703 },
44660702
DM
19704 "macro" : {
19705 "maxLength" : 128,
7aacca6f
DM
19706 "optional" : 1,
19707 "type" : "string"
56122987 19708 },
44660702
DM
19709 "node" : {
19710 "description" : "The cluster node name.",
19711 "format" : "pve-node",
19712 "type" : "string"
19713 },
19714 "pos" : {
19715 "description" : "Update rule at position <pos>.",
19716 "minimum" : 0,
19717 "optional" : 1,
19718 "type" : "integer"
19719 },
19720 "proto" : {
19721 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19722 "format" : "pve-fw-protocol-spec",
56122987 19723 "optional" : 1,
44660702 19724 "type" : "string"
56122987 19725 },
7aacca6f 19726 "source" : {
7aacca6f 19727 "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
19728 "format" : "pve-fw-addr-spec",
19729 "optional" : 1,
19730 "type" : "string"
7aacca6f 19731 },
44660702
DM
19732 "sport" : {
19733 "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.",
19734 "format" : "pve-fw-sport-spec",
7aacca6f 19735 "optional" : 1,
44660702
DM
19736 "type" : "string"
19737 },
19738 "type" : {
19739 "enum" : [
19740 "in",
19741 "out",
19742 "group"
19743 ],
19744 "optional" : 0,
19745 "type" : "string"
56122987 19746 }
44660702 19747 }
7aacca6f 19748 },
56122987
DM
19749 "permissions" : {
19750 "check" : [
19751 "perm",
19752 "/nodes/{node}",
19753 [
19754 "Sys.Modify"
19755 ]
19756 ]
19757 },
44660702
DM
19758 "protected" : 1,
19759 "proxyto" : "node",
19760 "returns" : {
19761 "type" : "null"
19762 }
56122987
DM
19763 }
19764 },
44660702 19765 "leaf" : 0,
7aacca6f 19766 "path" : "/nodes/{node}/firewall/rules",
44660702 19767 "text" : "rules"
56122987
DM
19768 },
19769 {
56122987 19770 "info" : {
44660702
DM
19771 "GET" : {
19772 "description" : "Get host firewall options.",
19773 "method" : "GET",
19774 "name" : "get_options",
56122987 19775 "parameters" : {
7aacca6f 19776 "additionalProperties" : 0,
56122987 19777 "properties" : {
44660702
DM
19778 "node" : {
19779 "description" : "The cluster node name.",
19780 "format" : "pve-node",
19781 "type" : "string"
19782 }
19783 }
19784 },
19785 "permissions" : {
19786 "check" : [
19787 "perm",
19788 "/nodes/{node}",
19789 [
19790 "Sys.Audit"
19791 ]
19792 ]
19793 },
19794 "proxyto" : "node",
19795 "returns" : {
19796 "properties" : {
19797 "enable" : {
19798 "description" : "Enable host firewall rules.",
7aacca6f 19799 "optional" : 1,
44660702 19800 "type" : "boolean"
7aacca6f 19801 },
44660702
DM
19802 "log_level_in" : {
19803 "description" : "Log level for incoming traffic.",
56122987
DM
19804 "enum" : [
19805 "emerg",
19806 "alert",
19807 "crit",
19808 "err",
19809 "warning",
19810 "notice",
19811 "info",
19812 "debug",
19813 "nolog"
19814 ],
56122987 19815 "optional" : 1,
44660702
DM
19816 "type" : "string"
19817 },
19818 "log_level_out" : {
19819 "description" : "Log level for outgoing traffic.",
56122987
DM
19820 "enum" : [
19821 "emerg",
19822 "alert",
19823 "crit",
19824 "err",
19825 "warning",
19826 "notice",
19827 "info",
19828 "debug",
19829 "nolog"
19830 ],
44660702
DM
19831 "optional" : 1,
19832 "type" : "string"
19833 },
19834 "ndp" : {
19835 "description" : "Enable NDP.",
19836 "optional" : 1,
19837 "type" : "boolean"
19838 },
19839 "nf_conntrack_max" : {
19840 "description" : "Maximum number of tracked connections.",
19841 "minimum" : 32768,
19842 "optional" : 1,
19843 "type" : "integer"
19844 },
19845 "nf_conntrack_tcp_timeout_established" : {
19846 "description" : "Conntrack established timeout.",
19847 "minimum" : 7875,
19848 "optional" : 1,
19849 "type" : "integer"
19850 },
19851 "nosmurfs" : {
19852 "description" : "Enable SMURFS filter.",
19853 "optional" : 1,
19854 "type" : "boolean"
56122987 19855 },
7aacca6f 19856 "smurf_log_level" : {
44660702 19857 "description" : "Log level for SMURFS filter.",
56122987
DM
19858 "enum" : [
19859 "emerg",
19860 "alert",
19861 "crit",
19862 "err",
19863 "warning",
19864 "notice",
19865 "info",
19866 "debug",
19867 "nolog"
7aacca6f 19868 ],
7aacca6f
DM
19869 "optional" : 1,
19870 "type" : "string"
56122987 19871 },
44660702
DM
19872 "tcp_flags_log_level" : {
19873 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
19874 "enum" : [
19875 "emerg",
19876 "alert",
19877 "crit",
19878 "err",
19879 "warning",
19880 "notice",
19881 "info",
19882 "debug",
19883 "nolog"
19884 ],
44660702
DM
19885 "optional" : 1,
19886 "type" : "string"
7aacca6f 19887 },
44660702
DM
19888 "tcpflags" : {
19889 "description" : "Filter illegal combinations of TCP flags.",
56122987 19890 "optional" : 1,
44660702 19891 "type" : "boolean"
56122987 19892 }
44660702
DM
19893 },
19894 "type" : "object"
7aacca6f 19895 }
56122987 19896 },
44660702
DM
19897 "PUT" : {
19898 "description" : "Set Firewall options.",
19899 "method" : "PUT",
19900 "name" : "set_options",
7aacca6f 19901 "parameters" : {
44660702 19902 "additionalProperties" : 0,
7aacca6f 19903 "properties" : {
44660702
DM
19904 "delete" : {
19905 "description" : "A list of settings you want to delete.",
19906 "format" : "pve-configid-list",
7aacca6f 19907 "optional" : 1,
44660702 19908 "type" : "string"
56122987 19909 },
44660702
DM
19910 "digest" : {
19911 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19912 "maxLength" : 40,
19913 "optional" : 1,
19914 "type" : "string"
56122987 19915 },
44660702
DM
19916 "enable" : {
19917 "description" : "Enable host firewall rules.",
7aacca6f 19918 "optional" : 1,
44660702
DM
19919 "type" : "boolean"
19920 },
19921 "log_level_in" : {
19922 "description" : "Log level for incoming traffic.",
56122987
DM
19923 "enum" : [
19924 "emerg",
19925 "alert",
19926 "crit",
19927 "err",
19928 "warning",
19929 "notice",
19930 "info",
19931 "debug",
19932 "nolog"
44660702 19933 ],
7aacca6f 19934 "optional" : 1,
44660702 19935 "type" : "string"
7aacca6f 19936 },
44660702
DM
19937 "log_level_out" : {
19938 "description" : "Log level for outgoing traffic.",
56122987
DM
19939 "enum" : [
19940 "emerg",
19941 "alert",
19942 "crit",
19943 "err",
19944 "warning",
19945 "notice",
19946 "info",
19947 "debug",
19948 "nolog"
19949 ],
19950 "optional" : 1,
7aacca6f 19951 "type" : "string"
56122987 19952 },
44660702
DM
19953 "ndp" : {
19954 "description" : "Enable NDP.",
7aacca6f 19955 "optional" : 1,
44660702
DM
19956 "type" : "boolean"
19957 },
19958 "nf_conntrack_max" : {
19959 "description" : "Maximum number of tracked connections.",
19960 "minimum" : 32768,
19961 "optional" : 1,
19962 "type" : "integer"
19963 },
19964 "nf_conntrack_tcp_timeout_established" : {
19965 "description" : "Conntrack established timeout.",
19966 "minimum" : 7875,
19967 "optional" : 1,
19968 "type" : "integer"
19969 },
19970 "node" : {
19971 "description" : "The cluster node name.",
19972 "format" : "pve-node",
19973 "type" : "string"
19974 },
19975 "nosmurfs" : {
19976 "description" : "Enable SMURFS filter.",
19977 "optional" : 1,
19978 "type" : "boolean"
19979 },
19980 "smurf_log_level" : {
19981 "description" : "Log level for SMURFS filter.",
56122987
DM
19982 "enum" : [
19983 "emerg",
19984 "alert",
19985 "crit",
19986 "err",
19987 "warning",
19988 "notice",
19989 "info",
19990 "debug",
19991 "nolog"
44660702
DM
19992 ],
19993 "optional" : 1,
19994 "type" : "string"
56122987 19995 },
44660702
DM
19996 "tcp_flags_log_level" : {
19997 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
19998 "enum" : [
19999 "emerg",
20000 "alert",
20001 "crit",
20002 "err",
20003 "warning",
20004 "notice",
20005 "info",
20006 "debug",
20007 "nolog"
20008 ],
44660702
DM
20009 "optional" : 1,
20010 "type" : "string"
7aacca6f 20011 },
44660702
DM
20012 "tcpflags" : {
20013 "description" : "Filter illegal combinations of TCP flags.",
56122987 20014 "optional" : 1,
7aacca6f 20015 "type" : "boolean"
56122987 20016 }
7aacca6f 20017 }
56122987 20018 },
44660702
DM
20019 "permissions" : {
20020 "check" : [
20021 "perm",
20022 "/nodes/{node}",
20023 [
20024 "Sys.Modify"
20025 ]
20026 ]
20027 },
20028 "protected" : 1,
20029 "proxyto" : "node",
20030 "returns" : {
20031 "type" : "null"
20032 }
7aacca6f
DM
20033 }
20034 },
44660702
DM
20035 "leaf" : 1,
20036 "path" : "/nodes/{node}/firewall/options",
7aacca6f
DM
20037 "text" : "options"
20038 },
20039 {
7aacca6f
DM
20040 "info" : {
20041 "GET" : {
44660702
DM
20042 "description" : "Read firewall log",
20043 "method" : "GET",
7aacca6f 20044 "name" : "log",
56122987 20045 "parameters" : {
44660702 20046 "additionalProperties" : 0,
56122987 20047 "properties" : {
7aacca6f 20048 "limit" : {
44660702 20049 "minimum" : 0,
7aacca6f 20050 "optional" : 1,
44660702 20051 "type" : "integer"
7aacca6f 20052 },
56122987 20053 "node" : {
7aacca6f 20054 "description" : "The cluster node name.",
44660702 20055 "format" : "pve-node",
7aacca6f 20056 "type" : "string"
44660702
DM
20057 },
20058 "start" : {
20059 "minimum" : 0,
20060 "optional" : 1,
20061 "type" : "integer"
56122987 20062 }
44660702 20063 }
7aacca6f 20064 },
56122987
DM
20065 "permissions" : {
20066 "check" : [
20067 "perm",
20068 "/nodes/{node}",
20069 [
20070 "Sys.Syslog"
20071 ]
20072 ]
20073 },
44660702
DM
20074 "protected" : 1,
20075 "proxyto" : "node",
56122987
DM
20076 "returns" : {
20077 "items" : {
56122987 20078 "properties" : {
56122987 20079 "n" : {
44660702
DM
20080 "description" : "Line number",
20081 "type" : "integer"
7aacca6f
DM
20082 },
20083 "t" : {
44660702
DM
20084 "description" : "Line text",
20085 "type" : "string"
56122987 20086 }
44660702
DM
20087 },
20088 "type" : "object"
56122987
DM
20089 },
20090 "type" : "array"
7aacca6f 20091 }
56122987
DM
20092 }
20093 },
44660702
DM
20094 "leaf" : 1,
20095 "path" : "/nodes/{node}/firewall/log",
7aacca6f 20096 "text" : "log"
56122987
DM
20097 }
20098 ],
20099 "info" : {
20100 "GET" : {
44660702
DM
20101 "description" : "Directory index.",
20102 "method" : "GET",
20103 "name" : "index",
56122987 20104 "parameters" : {
44660702 20105 "additionalProperties" : 0,
56122987
DM
20106 "properties" : {
20107 "node" : {
20108 "description" : "The cluster node name.",
44660702
DM
20109 "format" : "pve-node",
20110 "type" : "string"
56122987 20111 }
44660702 20112 }
56122987 20113 },
7aacca6f
DM
20114 "permissions" : {
20115 "user" : "all"
20116 },
56122987
DM
20117 "returns" : {
20118 "items" : {
20119 "properties" : {},
20120 "type" : "object"
20121 },
56122987
DM
20122 "links" : [
20123 {
44660702
DM
20124 "href" : "{name}",
20125 "rel" : "child"
56122987 20126 }
44660702
DM
20127 ],
20128 "type" : "array"
20129 }
56122987 20130 }
7aacca6f 20131 },
44660702 20132 "leaf" : 0,
7aacca6f 20133 "path" : "/nodes/{node}/firewall",
44660702 20134 "text" : "firewall"
56122987
DM
20135 },
20136 {
56122987
DM
20137 "info" : {
20138 "GET" : {
44660702
DM
20139 "description" : "API version details",
20140 "method" : "GET",
20141 "name" : "version",
56122987 20142 "parameters" : {
44660702 20143 "additionalProperties" : 0,
56122987
DM
20144 "properties" : {
20145 "node" : {
56122987 20146 "description" : "The cluster node name.",
44660702 20147 "format" : "pve-node",
7aacca6f 20148 "type" : "string"
56122987 20149 }
44660702 20150 }
56122987 20151 },
56122987 20152 "permissions" : {
7aacca6f 20153 "user" : "all"
56122987 20154 },
56122987 20155 "proxyto" : "node",
56122987 20156 "returns" : {
56122987 20157 "properties" : {
44660702 20158 "release" : {
56122987
DM
20159 "type" : "string"
20160 },
44660702 20161 "repoid" : {
7aacca6f
DM
20162 "type" : "string"
20163 },
20164 "version" : {
20165 "type" : "string"
20166 }
44660702
DM
20167 },
20168 "type" : "object"
7aacca6f 20169 }
56122987
DM
20170 }
20171 },
56122987 20172 "leaf" : 1,
44660702
DM
20173 "path" : "/nodes/{node}/version",
20174 "text" : "version"
56122987
DM
20175 },
20176 {
56122987
DM
20177 "info" : {
20178 "GET" : {
7aacca6f 20179 "description" : "Read node status",
44660702 20180 "method" : "GET",
7aacca6f 20181 "name" : "status",
56122987 20182 "parameters" : {
44660702 20183 "additionalProperties" : 0,
56122987
DM
20184 "properties" : {
20185 "node" : {
7aacca6f 20186 "description" : "The cluster node name.",
44660702
DM
20187 "format" : "pve-node",
20188 "type" : "string"
56122987 20189 }
44660702 20190 }
56122987 20191 },
56122987
DM
20192 "permissions" : {
20193 "check" : [
20194 "perm",
20195 "/nodes/{node}",
20196 [
20197 "Sys.Audit"
20198 ]
20199 ]
44660702
DM
20200 },
20201 "proxyto" : "node",
20202 "returns" : {
20203 "properties" : {},
20204 "type" : "object"
7aacca6f
DM
20205 }
20206 },
20207 "POST" : {
44660702
DM
20208 "description" : "Reboot or shutdown a node.",
20209 "method" : "POST",
7aacca6f 20210 "name" : "node_cmd",
56122987 20211 "parameters" : {
44660702 20212 "additionalProperties" : 0,
56122987 20213 "properties" : {
7aacca6f
DM
20214 "command" : {
20215 "description" : "Specify the command.",
56122987 20216 "enum" : [
7aacca6f
DM
20217 "reboot",
20218 "shutdown"
56122987
DM
20219 ],
20220 "type" : "string"
44660702
DM
20221 },
20222 "node" : {
20223 "description" : "The cluster node name.",
20224 "format" : "pve-node",
20225 "type" : "string"
56122987 20226 }
44660702 20227 }
7aacca6f 20228 },
7aacca6f
DM
20229 "permissions" : {
20230 "check" : [
20231 "perm",
20232 "/nodes/{node}",
20233 [
20234 "Sys.PowerMgmt"
20235 ]
20236 ]
20237 },
44660702 20238 "protected" : 1,
7aacca6f 20239 "proxyto" : "node",
7aacca6f
DM
20240 "returns" : {
20241 "type" : "null"
56122987
DM
20242 }
20243 }
20244 },
7aacca6f 20245 "leaf" : 1,
44660702
DM
20246 "path" : "/nodes/{node}/status",
20247 "text" : "status"
56122987
DM
20248 },
20249 {
56122987
DM
20250 "info" : {
20251 "GET" : {
44660702
DM
20252 "description" : "Read tap/vm network device interface counters",
20253 "method" : "GET",
20254 "name" : "netstat",
20255 "parameters" : {
20256 "additionalProperties" : 0,
20257 "properties" : {
20258 "node" : {
20259 "description" : "The cluster node name.",
20260 "format" : "pve-node",
20261 "type" : "string"
20262 }
56122987
DM
20263 }
20264 },
20265 "permissions" : {
20266 "check" : [
20267 "perm",
20268 "/nodes/{node}",
20269 [
7aacca6f 20270 "Sys.Audit"
56122987
DM
20271 ]
20272 ]
20273 },
7aacca6f 20274 "proxyto" : "node",
44660702
DM
20275 "returns" : {
20276 "items" : {
20277 "properties" : {},
20278 "type" : "object"
20279 },
20280 "type" : "array"
20281 }
7aacca6f
DM
20282 }
20283 },
44660702
DM
20284 "leaf" : 1,
20285 "path" : "/nodes/{node}/netstat",
7aacca6f
DM
20286 "text" : "netstat"
20287 },
20288 {
20289 "info" : {
20290 "POST" : {
7aacca6f 20291 "description" : "Execute multiple commands in order.",
7aacca6f 20292 "method" : "POST",
7aacca6f 20293 "name" : "execute",
56122987
DM
20294 "parameters" : {
20295 "additionalProperties" : 0,
20296 "properties" : {
7aacca6f
DM
20297 "commands" : {
20298 "description" : "JSON encoded array of commands.",
56122987
DM
20299 "type" : "string"
20300 },
20301 "node" : {
44660702 20302 "description" : "The cluster node name.",
56122987 20303 "format" : "pve-node",
44660702 20304 "type" : "string"
56122987
DM
20305 }
20306 }
44660702
DM
20307 },
20308 "permissions" : {
20309 "check" : [
20310 "perm",
20311 "/nodes/{node}",
20312 [
20313 "Sys.Audit"
20314 ]
20315 ]
20316 },
20317 "protected" : 1,
20318 "proxyto" : "node",
20319 "returns" : {
20320 "properties" : {},
20321 "type" : "array"
56122987
DM
20322 }
20323 }
20324 },
56122987 20325 "leaf" : 1,
44660702
DM
20326 "path" : "/nodes/{node}/execute",
20327 "text" : "execute"
56122987
DM
20328 },
20329 {
20330 "info" : {
7aacca6f 20331 "GET" : {
44660702
DM
20332 "description" : "Read node RRD statistics (returns PNG)",
20333 "method" : "GET",
7aacca6f 20334 "name" : "rrd",
56122987 20335 "parameters" : {
7aacca6f 20336 "additionalProperties" : 0,
56122987 20337 "properties" : {
44660702
DM
20338 "cf" : {
20339 "description" : "The RRD consolidation function",
20340 "enum" : [
20341 "AVERAGE",
20342 "MAX"
20343 ],
20344 "optional" : 1,
20345 "type" : "string"
20346 },
7aacca6f 20347 "ds" : {
7aacca6f 20348 "description" : "The list of datasources you want to display.",
44660702
DM
20349 "format" : "pve-configid-list",
20350 "type" : "string"
20351 },
20352 "node" : {
20353 "description" : "The cluster node name.",
20354 "format" : "pve-node",
20355 "type" : "string"
7aacca6f
DM
20356 },
20357 "timeframe" : {
20358 "description" : "Specify the time frame you are interested in.",
20359 "enum" : [
20360 "hour",
20361 "day",
20362 "week",
20363 "month",
20364 "year"
20365 ],
20366 "type" : "string"
56122987 20367 }
7aacca6f 20368 }
56122987 20369 },
56122987 20370 "permissions" : {
56122987
DM
20371 "check" : [
20372 "perm",
20373 "/nodes/{node}",
20374 [
7aacca6f 20375 "Sys.Audit"
56122987
DM
20376 ]
20377 ]
20378 },
7aacca6f 20379 "protected" : 1,
56122987 20380 "returns" : {
56122987 20381 "properties" : {
7aacca6f 20382 "filename" : {
56122987
DM
20383 "type" : "string"
20384 }
44660702
DM
20385 },
20386 "type" : "object"
20387 }
56122987
DM
20388 }
20389 },
44660702 20390 "leaf" : 1,
7aacca6f 20391 "path" : "/nodes/{node}/rrd",
44660702 20392 "text" : "rrd"
56122987
DM
20393 },
20394 {
20395 "info" : {
7aacca6f 20396 "GET" : {
44660702
DM
20397 "description" : "Read node RRD statistics",
20398 "method" : "GET",
7aacca6f 20399 "name" : "rrddata",
56122987 20400 "parameters" : {
44660702 20401 "additionalProperties" : 0,
56122987 20402 "properties" : {
7aacca6f 20403 "cf" : {
7aacca6f
DM
20404 "description" : "The RRD consolidation function",
20405 "enum" : [
20406 "AVERAGE",
20407 "MAX"
44660702
DM
20408 ],
20409 "optional" : 1,
20410 "type" : "string"
56122987
DM
20411 },
20412 "node" : {
44660702 20413 "description" : "The cluster node name.",
56122987 20414 "format" : "pve-node",
44660702 20415 "type" : "string"
56122987 20416 },
7aacca6f 20417 "timeframe" : {
7aacca6f
DM
20418 "description" : "Specify the time frame you are interested in.",
20419 "enum" : [
20420 "hour",
20421 "day",
20422 "week",
20423 "month",
20424 "year"
44660702
DM
20425 ],
20426 "type" : "string"
56122987 20427 }
56122987
DM
20428 }
20429 },
56122987
DM
20430 "permissions" : {
20431 "check" : [
20432 "perm",
20433 "/nodes/{node}",
20434 [
44660702 20435 "Sys.Audit"
56122987
DM
20436 ]
20437 ]
7aacca6f 20438 },
44660702 20439 "protected" : 1,
56122987 20440 "returns" : {
7aacca6f 20441 "items" : {
44660702 20442 "properties" : {},
7aacca6f
DM
20443 "type" : "object"
20444 },
20445 "type" : "array"
44660702
DM
20446 }
20447 }
20448 },
20449 "leaf" : 1,
20450 "path" : "/nodes/{node}/rrddata",
20451 "text" : "rrddata"
20452 },
20453 {
20454 "info" : {
20455 "GET" : {
20456 "description" : "Read system log",
20457 "method" : "GET",
20458 "name" : "syslog",
56122987 20459 "parameters" : {
44660702 20460 "additionalProperties" : 0,
56122987 20461 "properties" : {
44660702
DM
20462 "limit" : {
20463 "minimum" : 0,
7aacca6f 20464 "optional" : 1,
44660702 20465 "type" : "integer"
7aacca6f 20466 },
56122987 20467 "node" : {
7aacca6f 20468 "description" : "The cluster node name.",
44660702
DM
20469 "format" : "pve-node",
20470 "type" : "string"
56122987 20471 },
44660702
DM
20472 "since" : {
20473 "description" : "Display all log since this date-time string.",
20474 "optional" : 1,
20475 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
20476 "type" : "string"
20477 },
20478 "start" : {
7aacca6f
DM
20479 "minimum" : 0,
20480 "optional" : 1,
20481 "type" : "integer"
20482 },
20483 "until" : {
20484 "description" : "Display all log until this date-time string.",
7aacca6f 20485 "optional" : 1,
44660702 20486 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
56122987
DM
20487 "type" : "string"
20488 }
44660702 20489 }
56122987 20490 },
44660702
DM
20491 "permissions" : {
20492 "check" : [
20493 "perm",
20494 "/nodes/{node}",
20495 [
20496 "Sys.Syslog"
20497 ]
20498 ]
20499 },
20500 "protected" : 1,
20501 "proxyto" : "node",
20502 "returns" : {
20503 "items" : {
20504 "properties" : {
20505 "n" : {
20506 "description" : "Line number",
20507 "type" : "integer"
20508 },
20509 "t" : {
20510 "description" : "Line text",
20511 "type" : "string"
20512 }
20513 },
20514 "type" : "object"
20515 },
20516 "type" : "array"
20517 }
56122987
DM
20518 }
20519 },
44660702
DM
20520 "leaf" : 1,
20521 "path" : "/nodes/{node}/syslog",
7aacca6f 20522 "text" : "syslog"
56122987
DM
20523 },
20524 {
56122987
DM
20525 "info" : {
20526 "POST" : {
44660702
DM
20527 "description" : "Creates a VNC Shell proxy.",
20528 "method" : "POST",
20529 "name" : "vncshell",
20530 "parameters" : {
20531 "additionalProperties" : 0,
56122987 20532 "properties" : {
44660702
DM
20533 "node" : {
20534 "description" : "The cluster node name.",
20535 "format" : "pve-node",
7aacca6f
DM
20536 "type" : "string"
20537 },
44660702
DM
20538 "upgrade" : {
20539 "default" : 0,
20540 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20541 "optional" : 1,
20542 "type" : "boolean"
7aacca6f 20543 },
44660702
DM
20544 "websocket" : {
20545 "description" : "use websocket instead of standard vnc.",
20546 "optional" : 1,
20547 "type" : "boolean"
56122987 20548 }
44660702 20549 }
56122987 20550 },
56122987
DM
20551 "permissions" : {
20552 "check" : [
20553 "perm",
7aacca6f 20554 "/nodes/{node}",
56122987 20555 [
7aacca6f 20556 "Sys.Console"
56122987 20557 ]
44660702
DM
20558 ],
20559 "description" : "Restricted to users on realm 'pam'"
56122987 20560 },
44660702
DM
20561 "protected" : 1,
20562 "returns" : {
20563 "additionalProperties" : 0,
56122987 20564 "properties" : {
44660702
DM
20565 "cert" : {
20566 "type" : "string"
7aacca6f 20567 },
44660702
DM
20568 "port" : {
20569 "type" : "integer"
7aacca6f 20570 },
44660702
DM
20571 "ticket" : {
20572 "type" : "string"
20573 },
20574 "upid" : {
20575 "type" : "string"
20576 },
20577 "user" : {
20578 "type" : "string"
56122987 20579 }
44660702
DM
20580 }
20581 }
56122987
DM
20582 }
20583 },
7aacca6f 20584 "leaf" : 1,
44660702
DM
20585 "path" : "/nodes/{node}/vncshell",
20586 "text" : "vncshell"
56122987
DM
20587 },
20588 {
20589 "info" : {
20590 "GET" : {
7aacca6f 20591 "description" : "Opens a weksocket for VNC traffic.",
44660702
DM
20592 "method" : "GET",
20593 "name" : "vncwebsocket",
56122987 20594 "parameters" : {
44660702 20595 "additionalProperties" : 0,
56122987
DM
20596 "properties" : {
20597 "node" : {
20598 "description" : "The cluster node name.",
44660702 20599 "format" : "pve-node",
7aacca6f
DM
20600 "type" : "string"
20601 },
20602 "port" : {
7aacca6f
DM
20603 "description" : "Port number returned by previous vncproxy call.",
20604 "maximum" : 5999,
44660702 20605 "minimum" : 5900,
7aacca6f 20606 "type" : "integer"
44660702
DM
20607 },
20608 "vncticket" : {
20609 "description" : "Ticket from previous call to vncproxy.",
20610 "maxLength" : 512,
20611 "type" : "string"
56122987 20612 }
44660702 20613 }
56122987 20614 },
56122987
DM
20615 "permissions" : {
20616 "check" : [
20617 "perm",
20618 "/nodes/{node}",
20619 [
7aacca6f 20620 "Sys.Console"
56122987 20621 ]
44660702
DM
20622 ],
20623 "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket)."
20624 },
20625 "returns" : {
20626 "properties" : {
20627 "port" : {
20628 "type" : "string"
20629 }
20630 },
20631 "type" : "object"
7aacca6f 20632 }
56122987
DM
20633 }
20634 },
44660702 20635 "leaf" : 1,
7aacca6f 20636 "path" : "/nodes/{node}/vncwebsocket",
44660702 20637 "text" : "vncwebsocket"
56122987
DM
20638 },
20639 {
20640 "info" : {
20641 "POST" : {
44660702 20642 "description" : "Creates a SPICE shell.",
7aacca6f 20643 "method" : "POST",
44660702 20644 "name" : "spiceshell",
56122987 20645 "parameters" : {
7aacca6f 20646 "additionalProperties" : 0,
56122987 20647 "properties" : {
7aacca6f 20648 "node" : {
44660702 20649 "description" : "The cluster node name.",
56122987 20650 "format" : "pve-node",
7aacca6f
DM
20651 "type" : "string"
20652 },
44660702
DM
20653 "proxy" : {
20654 "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).",
20655 "format" : "address",
20656 "optional" : 1,
7aacca6f
DM
20657 "type" : "string"
20658 },
44660702
DM
20659 "upgrade" : {
20660 "default" : 0,
20661 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20662 "optional" : 1,
20663 "type" : "boolean"
56122987 20664 }
7aacca6f 20665 }
56122987 20666 },
56122987
DM
20667 "permissions" : {
20668 "check" : [
20669 "perm",
7aacca6f 20670 "/nodes/{node}",
56122987 20671 [
7aacca6f 20672 "Sys.Console"
56122987 20673 ]
7aacca6f
DM
20674 ],
20675 "description" : "Restricted to users on realm 'pam'"
44660702
DM
20676 },
20677 "protected" : 1,
20678 "proxyto" : "node",
20679 "returns" : {
20680 "additionalProperties" : 1,
20681 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
20682 "properties" : {
20683 "host" : {
20684 "type" : "string"
20685 },
20686 "password" : {
20687 "type" : "string"
20688 },
20689 "proxy" : {
20690 "type" : "string"
20691 },
20692 "tls-port" : {
20693 "type" : "integer"
20694 },
20695 "type" : {
20696 "type" : "string"
20697 }
20698 }
7aacca6f 20699 }
56122987
DM
20700 }
20701 },
56122987 20702 "leaf" : 1,
44660702
DM
20703 "path" : "/nodes/{node}/spiceshell",
20704 "text" : "spiceshell"
56122987
DM
20705 },
20706 {
56122987 20707 "info" : {
7aacca6f 20708 "GET" : {
44660702 20709 "description" : "Read DNS settings.",
7aacca6f 20710 "method" : "GET",
44660702
DM
20711 "name" : "dns",
20712 "parameters" : {
7aacca6f
DM
20713 "additionalProperties" : 0,
20714 "properties" : {
44660702
DM
20715 "node" : {
20716 "description" : "The cluster node name.",
20717 "format" : "pve-node",
20718 "type" : "string"
7aacca6f
DM
20719 }
20720 }
20721 },
7aacca6f
DM
20722 "permissions" : {
20723 "check" : [
20724 "perm",
20725 "/nodes/{node}",
20726 [
20727 "Sys.Audit"
20728 ]
20729 ]
20730 },
44660702
DM
20731 "proxyto" : "node",
20732 "returns" : {
56122987
DM
20733 "additionalProperties" : 0,
20734 "properties" : {
44660702
DM
20735 "dns1" : {
20736 "description" : "First name server IP address.",
20737 "optional" : 1,
20738 "type" : "string"
20739 },
20740 "dns2" : {
20741 "description" : "Second name server IP address.",
20742 "optional" : 1,
20743 "type" : "string"
20744 },
20745 "dns3" : {
20746 "description" : "Third name server IP address.",
20747 "optional" : 1,
20748 "type" : "string"
20749 },
20750 "search" : {
20751 "description" : "Search domain for host-name lookup.",
20752 "optional" : 1,
20753 "type" : "string"
7aacca6f 20754 }
44660702
DM
20755 },
20756 "type" : "object"
20757 }
7aacca6f
DM
20758 },
20759 "PUT" : {
44660702
DM
20760 "description" : "Write DNS settings.",
20761 "method" : "PUT",
7aacca6f
DM
20762 "name" : "update_dns",
20763 "parameters" : {
20764 "additionalProperties" : 0,
20765 "properties" : {
44660702
DM
20766 "dns1" : {
20767 "description" : "First name server IP address.",
20768 "format" : "ip",
20769 "optional" : 1,
7aacca6f
DM
20770 "type" : "string"
20771 },
44660702
DM
20772 "dns2" : {
20773 "description" : "Second name server IP address.",
20774 "format" : "ip",
7aacca6f 20775 "optional" : 1,
44660702 20776 "type" : "string"
7aacca6f 20777 },
44660702
DM
20778 "dns3" : {
20779 "description" : "Third name server IP address.",
20780 "format" : "ip",
7aacca6f 20781 "optional" : 1,
44660702 20782 "type" : "string"
7aacca6f
DM
20783 },
20784 "node" : {
44660702 20785 "description" : "The cluster node name.",
56122987 20786 "format" : "pve-node",
44660702 20787 "type" : "string"
7aacca6f 20788 },
44660702
DM
20789 "search" : {
20790 "description" : "Search domain for host-name lookup.",
20791 "type" : "string"
56122987
DM
20792 }
20793 }
20794 },
20795 "permissions" : {
20796 "check" : [
20797 "perm",
7aacca6f 20798 "/nodes/{node}",
56122987 20799 [
7aacca6f 20800 "Sys.Modify"
56122987
DM
20801 ]
20802 ]
20803 },
44660702 20804 "protected" : 1,
7aacca6f 20805 "proxyto" : "node",
56122987 20806 "returns" : {
7aacca6f
DM
20807 "type" : "null"
20808 }
56122987 20809 }
44660702
DM
20810 },
20811 "leaf" : 1,
20812 "path" : "/nodes/{node}/dns",
20813 "text" : "dns"
56122987
DM
20814 },
20815 {
20816 "info" : {
7aacca6f 20817 "GET" : {
7aacca6f 20818 "description" : "Read server time and time zone settings.",
44660702
DM
20819 "method" : "GET",
20820 "name" : "time",
56122987 20821 "parameters" : {
44660702 20822 "additionalProperties" : 0,
56122987
DM
20823 "properties" : {
20824 "node" : {
44660702 20825 "description" : "The cluster node name.",
56122987 20826 "format" : "pve-node",
44660702 20827 "type" : "string"
56122987 20828 }
44660702 20829 }
56122987
DM
20830 },
20831 "permissions" : {
20832 "check" : [
20833 "perm",
7aacca6f 20834 "/nodes/{node}",
56122987 20835 [
7aacca6f 20836 "Sys.Audit"
56122987
DM
20837 ]
20838 ]
44660702
DM
20839 },
20840 "proxyto" : "node",
20841 "returns" : {
20842 "additionalProperties" : 0,
20843 "properties" : {
20844 "localtime" : {
20845 "description" : "Seconds since 1970-01-01 00:00:00 (local time)",
20846 "minimum" : 1297163644,
20847 "type" : "integer"
20848 },
20849 "time" : {
20850 "description" : "Seconds since 1970-01-01 00:00:00 UTC.",
20851 "minimum" : 1297163644,
20852 "type" : "integer"
20853 },
20854 "timezone" : {
20855 "description" : "Time zone",
20856 "type" : "string"
20857 }
20858 },
20859 "type" : "object"
7aacca6f
DM
20860 }
20861 },
20862 "PUT" : {
7aacca6f 20863 "description" : "Set time zone.",
44660702
DM
20864 "method" : "PUT",
20865 "name" : "set_timezone",
20866 "parameters" : {
20867 "additionalProperties" : 0,
20868 "properties" : {
20869 "node" : {
20870 "description" : "The cluster node name.",
20871 "format" : "pve-node",
20872 "type" : "string"
20873 },
20874 "timezone" : {
20875 "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.",
20876 "type" : "string"
20877 }
20878 }
20879 },
7aacca6f
DM
20880 "permissions" : {
20881 "check" : [
20882 "perm",
20883 "/nodes/{node}",
20884 [
20885 "Sys.Modify"
20886 ]
20887 ]
56122987 20888 },
7aacca6f 20889 "protected" : 1,
44660702
DM
20890 "proxyto" : "node",
20891 "returns" : {
20892 "type" : "null"
20893 }
7aacca6f
DM
20894 }
20895 },
7aacca6f 20896 "leaf" : 1,
44660702
DM
20897 "path" : "/nodes/{node}/time",
20898 "text" : "time"
7aacca6f
DM
20899 },
20900 {
20901 "info" : {
44660702
DM
20902 "GET" : {
20903 "description" : "Get list of appliances.",
20904 "method" : "GET",
20905 "name" : "aplinfo",
7aacca6f
DM
20906 "parameters" : {
20907 "additionalProperties" : 0,
20908 "properties" : {
7aacca6f 20909 "node" : {
44660702 20910 "description" : "The cluster node name.",
7aacca6f 20911 "format" : "pve-node",
44660702 20912 "type" : "string"
7aacca6f
DM
20913 }
20914 }
56122987 20915 },
7aacca6f 20916 "permissions" : {
44660702 20917 "user" : "all"
56122987 20918 },
44660702 20919 "proxyto" : "node",
7aacca6f
DM
20920 "returns" : {
20921 "items" : {
44660702
DM
20922 "properties" : {},
20923 "type" : "object"
7aacca6f
DM
20924 },
20925 "type" : "array"
44660702
DM
20926 }
20927 },
20928 "POST" : {
20929 "description" : "Download appliance templates.",
20930 "method" : "POST",
20931 "name" : "apl_download",
7aacca6f
DM
20932 "parameters" : {
20933 "additionalProperties" : 0,
20934 "properties" : {
20935 "node" : {
7aacca6f 20936 "description" : "The cluster node name.",
44660702
DM
20937 "format" : "pve-node",
20938 "type" : "string"
20939 },
20940 "storage" : {
20941 "description" : "Only list status for specified storage",
20942 "format" : "pve-storage-id",
20943 "type" : "string"
20944 },
20945 "template" : {
20946 "description" : "The template wich will downloaded",
20947 "maxLength" : 255,
7aacca6f
DM
20948 "type" : "string"
20949 }
20950 }
56122987 20951 },
7aacca6f 20952 "permissions" : {
44660702
DM
20953 "check" : [
20954 "perm",
20955 "/storage/{storage}",
20956 [
20957 "Datastore.AllocateTemplate"
20958 ]
20959 ]
20960 },
20961 "protected" : 1,
20962 "proxyto" : "node",
20963 "returns" : {
20964 "type" : "string"
7aacca6f
DM
20965 }
20966 }
20967 },
7aacca6f 20968 "leaf" : 1,
44660702
DM
20969 "path" : "/nodes/{node}/aplinfo",
20970 "text" : "aplinfo"
7aacca6f
DM
20971 },
20972 {
20973 "info" : {
20974 "GET" : {
44660702
DM
20975 "description" : "Gather various systems information about a node",
20976 "method" : "GET",
20977 "name" : "report",
7aacca6f 20978 "parameters" : {
44660702 20979 "additionalProperties" : 0,
7aacca6f
DM
20980 "properties" : {
20981 "node" : {
7aacca6f 20982 "description" : "The cluster node name.",
44660702 20983 "format" : "pve-node",
7aacca6f
DM
20984 "type" : "string"
20985 }
44660702 20986 }
56122987 20987 },
7aacca6f
DM
20988 "permissions" : {
20989 "check" : [
20990 "perm",
20991 "/nodes/{node}",
20992 [
20993 "Sys.Audit"
20994 ]
20995 ]
56122987 20996 },
44660702 20997 "protected" : 1,
7aacca6f
DM
20998 "proxyto" : "node",
20999 "returns" : {
56122987 21000 "type" : "string"
7aacca6f
DM
21001 }
21002 }
21003 },
7aacca6f 21004 "leaf" : 1,
44660702
DM
21005 "path" : "/nodes/{node}/report",
21006 "text" : "report"
7aacca6f
DM
21007 },
21008 {
7aacca6f
DM
21009 "info" : {
21010 "POST" : {
44660702 21011 "description" : "Start all VMs and containers (when onboot=1).",
7aacca6f 21012 "method" : "POST",
44660702 21013 "name" : "startall",
7aacca6f 21014 "parameters" : {
44660702 21015 "additionalProperties" : 0,
7aacca6f
DM
21016 "properties" : {
21017 "force" : {
44660702 21018 "description" : "force if onboot=0.",
7aacca6f 21019 "optional" : 1,
44660702 21020 "type" : "boolean"
7aacca6f
DM
21021 },
21022 "node" : {
7aacca6f 21023 "description" : "The cluster node name.",
44660702
DM
21024 "format" : "pve-node",
21025 "type" : "string"
7aacca6f 21026 }
44660702 21027 }
56122987 21028 },
7aacca6f
DM
21029 "permissions" : {
21030 "check" : [
21031 "perm",
21032 "/",
21033 [
21034 "VM.PowerMgmt"
21035 ]
21036 ]
44660702
DM
21037 },
21038 "protected" : 1,
21039 "proxyto" : "node",
21040 "returns" : {
21041 "type" : "string"
7aacca6f
DM
21042 }
21043 }
21044 },
44660702 21045 "leaf" : 1,
7aacca6f 21046 "path" : "/nodes/{node}/startall",
44660702 21047 "text" : "startall"
7aacca6f
DM
21048 },
21049 {
7aacca6f
DM
21050 "info" : {
21051 "POST" : {
21052 "description" : "Stop all VMs and Containers.",
44660702
DM
21053 "method" : "POST",
21054 "name" : "stopall",
7aacca6f 21055 "parameters" : {
44660702 21056 "additionalProperties" : 0,
7aacca6f
DM
21057 "properties" : {
21058 "node" : {
44660702 21059 "description" : "The cluster node name.",
7aacca6f 21060 "format" : "pve-node",
44660702 21061 "type" : "string"
7aacca6f 21062 }
44660702 21063 }
56122987 21064 },
7aacca6f
DM
21065 "permissions" : {
21066 "check" : [
21067 "perm",
21068 "/",
21069 [
44660702 21070 "VM.PowerMgmt"
7aacca6f
DM
21071 ]
21072 ]
56122987 21073 },
44660702 21074 "protected" : 1,
7aacca6f 21075 "proxyto" : "node",
44660702
DM
21076 "returns" : {
21077 "type" : "string"
21078 }
21079 }
56122987 21080 },
44660702
DM
21081 "leaf" : 1,
21082 "path" : "/nodes/{node}/stopall",
21083 "text" : "stopall"
21084 },
21085 {
21086 "info" : {
21087 "POST" : {
21088 "description" : "Migrate all VMs and Containers.",
21089 "method" : "POST",
21090 "name" : "migrateall",
21091 "parameters" : {
21092 "additionalProperties" : 0,
21093 "properties" : {
21094 "maxworkers" : {
21095 "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!",
21096 "minimum" : 1,
21097 "optional" : 1,
21098 "type" : "integer"
21099 },
21100 "node" : {
21101 "description" : "The cluster node name.",
21102 "format" : "pve-node",
21103 "type" : "string"
21104 },
21105 "target" : {
21106 "description" : "Target node.",
21107 "format" : "pve-node",
21108 "type" : "string"
21109 }
21110 }
21111 },
21112 "permissions" : {
21113 "check" : [
21114 "perm",
21115 "/",
21116 [
21117 "VM.Migrate"
21118 ]
21119 ]
21120 },
21121 "protected" : 1,
21122 "proxyto" : "node",
21123 "returns" : {
21124 "type" : "string"
21125 }
21126 }
56122987 21127 },
44660702
DM
21128 "leaf" : 1,
21129 "path" : "/nodes/{node}/migrateall",
21130 "text" : "migrateall"
21131 }
21132 ],
21133 "info" : {
21134 "GET" : {
21135 "description" : "Node index.",
21136 "method" : "GET",
21137 "name" : "index",
21138 "parameters" : {
21139 "additionalProperties" : 0,
21140 "properties" : {
21141 "node" : {
21142 "description" : "The cluster node name.",
21143 "format" : "pve-node",
21144 "type" : "string"
21145 }
21146 }
56122987 21147 },
44660702
DM
21148 "permissions" : {
21149 "user" : "all"
56122987 21150 },
44660702
DM
21151 "returns" : {
21152 "items" : {
21153 "properties" : {},
21154 "type" : "object"
21155 },
21156 "links" : [
21157 {
21158 "href" : "{name}",
21159 "rel" : "child"
21160 }
56122987 21161 ],
44660702 21162 "type" : "array"
7aacca6f
DM
21163 }
21164 }
21165 },
44660702
DM
21166 "leaf" : 0,
21167 "path" : "/nodes/{node}",
21168 "text" : "{node}"
21169 }
21170 ],
21171 "info" : {
7aacca6f 21172 "GET" : {
44660702 21173 "description" : "Cluster node index.",
7aacca6f 21174 "method" : "GET",
44660702 21175 "name" : "index",
7aacca6f 21176 "parameters" : {
7aacca6f
DM
21177 "additionalProperties" : 0
21178 },
21179 "permissions" : {
7aacca6f
DM
21180 "user" : "all"
21181 },
44660702
DM
21182 "returns" : {
21183 "items" : {
21184 "properties" : {},
21185 "type" : "object"
21186 },
21187 "links" : [
21188 {
21189 "href" : "{node}",
21190 "rel" : "child"
21191 }
21192 ],
21193 "type" : "array"
21194 }
7aacca6f
DM
21195 }
21196 },
44660702
DM
21197 "leaf" : 0,
21198 "path" : "/nodes",
21199 "text" : "nodes"
21200 },
21201 {
7aacca6f
DM
21202 "children" : [
21203 {
7aacca6f 21204 "info" : {
44660702
DM
21205 "DELETE" : {
21206 "description" : "Delete storage configuration.",
21207 "method" : "DELETE",
21208 "name" : "delete",
7aacca6f
DM
21209 "parameters" : {
21210 "additionalProperties" : 0,
21211 "properties" : {
21212 "storage" : {
7aacca6f 21213 "description" : "The storage identifier.",
44660702 21214 "format" : "pve-storage-id",
7aacca6f
DM
21215 "type" : "string"
21216 }
21217 }
56122987 21218 },
7aacca6f
DM
21219 "permissions" : {
21220 "check" : [
21221 "perm",
21222 "/storage",
21223 [
21224 "Datastore.Allocate"
21225 ]
21226 ]
56122987 21227 },
44660702
DM
21228 "protected" : 1,
21229 "returns" : {
21230 "type" : "null"
21231 }
21232 },
21233 "GET" : {
21234 "description" : "Read storage configuration.",
21235 "method" : "GET",
21236 "name" : "read",
7aacca6f
DM
21237 "parameters" : {
21238 "additionalProperties" : 0,
21239 "properties" : {
21240 "storage" : {
44660702 21241 "description" : "The storage identifier.",
7aacca6f 21242 "format" : "pve-storage-id",
44660702 21243 "type" : "string"
7aacca6f
DM
21244 }
21245 }
21246 },
44660702
DM
21247 "permissions" : {
21248 "check" : [
21249 "perm",
21250 "/storage/{storage}",
21251 [
21252 "Datastore.Allocate"
21253 ]
21254 ]
21255 },
21256 "returns" : {}
7aacca6f
DM
21257 },
21258 "PUT" : {
44660702
DM
21259 "description" : "Update storage configuration.",
21260 "method" : "PUT",
21261 "name" : "update",
21262 "parameters" : {
21263 "additionalProperties" : 0,
21264 "properties" : {
21265 "blocksize" : {
21266 "description" : "block size",
7aacca6f 21267 "optional" : 1,
44660702 21268 "type" : "string"
7aacca6f 21269 },
44660702
DM
21270 "comstar_hg" : {
21271 "description" : "host group for comstar views",
21272 "optional" : 1,
21273 "type" : "string"
7aacca6f 21274 },
44660702
DM
21275 "comstar_tg" : {
21276 "description" : "target group for comstar views",
7aacca6f 21277 "optional" : 1,
44660702 21278 "type" : "string"
7aacca6f 21279 },
44660702
DM
21280 "content" : {
21281 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21282 "format" : "pve-storage-content-list",
7aacca6f 21283 "optional" : 1,
44660702 21284 "type" : "string"
7aacca6f 21285 },
44660702
DM
21286 "delete" : {
21287 "description" : "A list of settings you want to delete.",
21288 "format" : "pve-configid-list",
21289 "maxLength" : 4096,
7aacca6f 21290 "optional" : 1,
44660702 21291 "type" : "string"
7aacca6f
DM
21292 },
21293 "digest" : {
44660702 21294 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 21295 "maxLength" : 40,
7aacca6f 21296 "optional" : 1,
7aacca6f
DM
21297 "type" : "string"
21298 },
44660702
DM
21299 "disable" : {
21300 "description" : "Flag to disable the storage.",
21301 "optional" : 1,
21302 "type" : "boolean"
7aacca6f
DM
21303 },
21304 "format" : {
21305 "description" : "Default image format.",
44660702 21306 "format" : "pve-storage-format",
7aacca6f 21307 "optional" : 1,
44660702 21308 "type" : "string"
7aacca6f 21309 },
44660702
DM
21310 "krbd" : {
21311 "description" : "Access rbd through krbd kernel module.",
7aacca6f 21312 "optional" : 1,
44660702 21313 "type" : "boolean"
7aacca6f 21314 },
44660702
DM
21315 "maxfiles" : {
21316 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21317 "minimum" : 0,
21318 "optional" : 1,
21319 "type" : "integer"
7aacca6f
DM
21320 },
21321 "nodes" : {
44660702 21322 "description" : "List of cluster node names.",
7aacca6f
DM
21323 "format" : "pve-node-list",
21324 "optional" : 1,
44660702 21325 "type" : "string"
7aacca6f 21326 },
44660702
DM
21327 "nowritecache" : {
21328 "description" : "disable write caching on the target",
7aacca6f 21329 "optional" : 1,
44660702 21330 "type" : "boolean"
7aacca6f
DM
21331 },
21332 "options" : {
7aacca6f 21333 "description" : "NFS mount options (see 'man nfs')",
44660702
DM
21334 "format" : "pve-storage-options",
21335 "optional" : 1,
21336 "type" : "string"
21337 },
21338 "pool" : {
21339 "description" : "Pool.",
21340 "optional" : 1,
21341 "type" : "string"
21342 },
21343 "redundancy" : {
21344 "default" : 2,
21345 "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.",
21346 "maximum" : 16,
21347 "minimum" : 1,
21348 "optional" : 1,
21349 "type" : "integer"
21350 },
21351 "saferemove" : {
21352 "description" : "Zero-out data when removing LVs.",
21353 "optional" : 1,
21354 "type" : "boolean"
7aacca6f
DM
21355 },
21356 "saferemove_throughput" : {
44660702 21357 "description" : "Wipe throughput (cstream -t parameter value).",
7aacca6f 21358 "optional" : 1,
44660702 21359 "type" : "string"
7aacca6f 21360 },
44660702
DM
21361 "server" : {
21362 "description" : "Server IP or DNS name.",
21363 "format" : "pve-storage-server",
7aacca6f 21364 "optional" : 1,
44660702 21365 "type" : "string"
7aacca6f 21366 },
44660702
DM
21367 "server2" : {
21368 "description" : "Backup volfile server IP or DNS name.",
21369 "format" : "pve-storage-server",
7aacca6f 21370 "optional" : 1,
44660702
DM
21371 "requires" : "server",
21372 "type" : "string"
21373 },
21374 "shared" : {
21375 "description" : "Mark storage as shared.",
21376 "optional" : 1,
21377 "type" : "boolean"
21378 },
21379 "sparse" : {
21380 "description" : "use sparse volumes",
21381 "optional" : 1,
21382 "type" : "boolean"
21383 },
21384 "storage" : {
21385 "description" : "The storage identifier.",
21386 "format" : "pve-storage-id",
21387 "type" : "string"
21388 },
21389 "transport" : {
21390 "description" : "Gluster transport: tcp or rdma",
21391 "enum" : [
21392 "tcp",
21393 "rdma",
21394 "unix"
21395 ],
21396 "optional" : 1,
21397 "type" : "string"
7aacca6f
DM
21398 },
21399 "username" : {
21400 "description" : "RBD Id.",
44660702
DM
21401 "optional" : 1,
21402 "type" : "string"
7aacca6f 21403 }
44660702
DM
21404 },
21405 "type" : "object"
21406 },
21407 "permissions" : {
21408 "check" : [
21409 "perm",
21410 "/storage",
21411 [
21412 "Datastore.Allocate"
21413 ]
21414 ]
21415 },
21416 "protected" : 1,
21417 "returns" : {
21418 "type" : "null"
21419 }
21420 }
21421 },
21422 "leaf" : 1,
21423 "path" : "/storage/{storage}",
21424 "text" : "{storage}"
21425 }
21426 ],
21427 "info" : {
21428 "GET" : {
21429 "description" : "Storage index.",
21430 "method" : "GET",
21431 "name" : "index",
21432 "parameters" : {
21433 "additionalProperties" : 0,
21434 "properties" : {
21435 "type" : {
21436 "description" : "Only list storage of specific type",
21437 "enum" : [
21438 "dir",
21439 "drbd",
21440 "glusterfs",
21441 "iscsi",
21442 "iscsidirect",
21443 "lvm",
21444 "lvmthin",
21445 "nfs",
21446 "rbd",
21447 "sheepdog",
21448 "zfs",
21449 "zfspool"
21450 ],
21451 "optional" : 1,
21452 "type" : "string"
21453 }
21454 }
21455 },
21456 "permissions" : {
21457 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
21458 "user" : "all"
21459 },
21460 "returns" : {
21461 "items" : {
21462 "properties" : {
21463 "storage" : {
21464 "type" : "string"
7aacca6f 21465 }
56122987 21466 },
44660702
DM
21467 "type" : "object"
21468 },
21469 "links" : [
21470 {
21471 "href" : "{storage}",
21472 "rel" : "child"
21473 }
21474 ],
21475 "type" : "array"
21476 }
21477 },
21478 "POST" : {
21479 "description" : "Create a new storage.",
21480 "method" : "POST",
21481 "name" : "create",
21482 "parameters" : {
21483 "additionalProperties" : 0,
21484 "properties" : {
21485 "authsupported" : {
21486 "description" : "Authsupported.",
21487 "optional" : 1,
21488 "type" : "string"
21489 },
21490 "base" : {
21491 "description" : "Base volume. This volume is automatically activated.",
21492 "format" : "pve-volume-id",
21493 "optional" : 1,
21494 "type" : "string"
21495 },
21496 "blocksize" : {
21497 "description" : "block size",
21498 "optional" : 1,
21499 "type" : "string"
21500 },
21501 "comstar_hg" : {
21502 "description" : "host group for comstar views",
21503 "optional" : 1,
21504 "type" : "string"
21505 },
21506 "comstar_tg" : {
21507 "description" : "target group for comstar views",
21508 "optional" : 1,
21509 "type" : "string"
21510 },
21511 "content" : {
21512 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21513 "format" : "pve-storage-content-list",
21514 "optional" : 1,
21515 "type" : "string"
21516 },
21517 "disable" : {
21518 "description" : "Flag to disable the storage.",
21519 "optional" : 1,
21520 "type" : "boolean"
21521 },
21522 "export" : {
21523 "description" : "NFS export path.",
21524 "format" : "pve-storage-path",
21525 "optional" : 1,
21526 "type" : "string"
21527 },
21528 "format" : {
21529 "description" : "Default image format.",
21530 "format" : "pve-storage-format",
21531 "optional" : 1,
21532 "type" : "string"
21533 },
21534 "iscsiprovider" : {
21535 "description" : "iscsi provider",
21536 "optional" : 1,
21537 "type" : "string"
21538 },
21539 "krbd" : {
21540 "description" : "Access rbd through krbd kernel module.",
21541 "optional" : 1,
21542 "type" : "boolean"
56122987 21543 },
44660702
DM
21544 "maxfiles" : {
21545 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21546 "minimum" : 0,
21547 "optional" : 1,
21548 "type" : "integer"
7aacca6f 21549 },
44660702
DM
21550 "monhost" : {
21551 "description" : "Monitors daemon ips.",
21552 "optional" : 1,
21553 "type" : "string"
7aacca6f 21554 },
44660702
DM
21555 "nodes" : {
21556 "description" : "List of cluster node names.",
21557 "format" : "pve-node-list",
21558 "optional" : 1,
21559 "type" : "string"
7aacca6f 21560 },
44660702
DM
21561 "nowritecache" : {
21562 "description" : "disable write caching on the target",
21563 "optional" : 1,
21564 "type" : "boolean"
21565 },
21566 "options" : {
21567 "description" : "NFS mount options (see 'man nfs')",
21568 "format" : "pve-storage-options",
21569 "optional" : 1,
21570 "type" : "string"
21571 },
21572 "path" : {
21573 "description" : "File system path.",
21574 "format" : "pve-storage-path",
21575 "optional" : 1,
21576 "type" : "string"
21577 },
21578 "pool" : {
21579 "description" : "Pool.",
21580 "optional" : 1,
21581 "type" : "string"
21582 },
21583 "portal" : {
21584 "description" : "iSCSI portal (IP or DNS name with optional port).",
21585 "format" : "pve-storage-portal-dns",
21586 "optional" : 1,
21587 "type" : "string"
21588 },
21589 "redundancy" : {
21590 "default" : 2,
21591 "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.",
21592 "maximum" : 16,
21593 "minimum" : 1,
21594 "optional" : 1,
21595 "type" : "integer"
21596 },
21597 "saferemove" : {
21598 "description" : "Zero-out data when removing LVs.",
21599 "optional" : 1,
21600 "type" : "boolean"
21601 },
21602 "saferemove_throughput" : {
21603 "description" : "Wipe throughput (cstream -t parameter value).",
21604 "optional" : 1,
21605 "type" : "string"
21606 },
21607 "server" : {
21608 "description" : "Server IP or DNS name.",
21609 "format" : "pve-storage-server",
21610 "optional" : 1,
21611 "type" : "string"
21612 },
21613 "server2" : {
21614 "description" : "Backup volfile server IP or DNS name.",
21615 "format" : "pve-storage-server",
21616 "optional" : 1,
21617 "requires" : "server",
21618 "type" : "string"
21619 },
21620 "shared" : {
21621 "description" : "Mark storage as shared.",
21622 "optional" : 1,
21623 "type" : "boolean"
21624 },
21625 "sparse" : {
21626 "description" : "use sparse volumes",
21627 "optional" : 1,
21628 "type" : "boolean"
21629 },
21630 "storage" : {
21631 "description" : "The storage identifier.",
21632 "format" : "pve-storage-id",
21633 "type" : "string"
21634 },
21635 "target" : {
21636 "description" : "iSCSI target.",
21637 "optional" : 1,
21638 "type" : "string"
21639 },
21640 "thinpool" : {
21641 "description" : "LVM thin pool LV name.",
21642 "format" : "pve-storage-vgname",
21643 "optional" : 1,
21644 "type" : "string"
21645 },
21646 "transport" : {
21647 "description" : "Gluster transport: tcp or rdma",
21648 "enum" : [
21649 "tcp",
21650 "rdma",
21651 "unix"
7aacca6f 21652 ],
44660702
DM
21653 "optional" : 1,
21654 "type" : "string"
56122987 21655 },
44660702
DM
21656 "type" : {
21657 "description" : "Storage type.",
21658 "enum" : [
21659 "dir",
21660 "drbd",
21661 "glusterfs",
21662 "iscsi",
21663 "iscsidirect",
21664 "lvm",
21665 "lvmthin",
21666 "nfs",
21667 "rbd",
21668 "sheepdog",
21669 "zfs",
21670 "zfspool"
21671 ],
21672 "type" : "string"
56122987 21673 },
44660702
DM
21674 "username" : {
21675 "description" : "RBD Id.",
21676 "optional" : 1,
21677 "type" : "string"
7aacca6f 21678 },
44660702
DM
21679 "vgname" : {
21680 "description" : "Volume group name.",
21681 "format" : "pve-storage-vgname",
21682 "optional" : 1,
21683 "type" : "string"
21684 },
21685 "volume" : {
21686 "description" : "Glusterfs Volume.",
21687 "optional" : 1,
21688 "type" : "string"
21689 }
21690 },
21691 "type" : "object"
21692 },
21693 "permissions" : {
21694 "check" : [
21695 "perm",
21696 "/storage",
21697 [
21698 "Datastore.Allocate"
21699 ]
21700 ]
56122987 21701 },
44660702
DM
21702 "protected" : 1,
21703 "returns" : {
21704 "type" : "null"
21705 }
21706 }
21707 },
21708 "leaf" : 0,
21709 "path" : "/storage",
21710 "text" : "storage"
21711 },
21712 {
21713 "children" : [
21714 {
56122987
DM
21715 "children" : [
21716 {
56122987 21717 "info" : {
44660702
DM
21718 "DELETE" : {
21719 "description" : "Delete user.",
21720 "method" : "DELETE",
21721 "name" : "delete_user",
56122987 21722 "parameters" : {
7aacca6f 21723 "additionalProperties" : 0,
56122987 21724 "properties" : {
56122987 21725 "userid" : {
56122987
DM
21726 "description" : "User ID",
21727 "format" : "pve-userid",
44660702 21728 "maxLength" : 64,
56122987
DM
21729 "type" : "string"
21730 }
7aacca6f 21731 }
56122987 21732 },
56122987
DM
21733 "permissions" : {
21734 "check" : [
44660702 21735 "and",
56122987 21736 [
44660702
DM
21737 "userid-param",
21738 "Realm.AllocateUser"
56122987 21739 ],
44660702
DM
21740 [
21741 "userid-group",
21742 [
21743 "User.Modify"
21744 ]
21745 ]
56122987 21746 ]
7aacca6f 21747 },
44660702 21748 "protected" : 1,
56122987
DM
21749 "returns" : {
21750 "type" : "null"
44660702 21751 }
7aacca6f 21752 },
44660702
DM
21753 "GET" : {
21754 "description" : "Get user configuration.",
21755 "method" : "GET",
21756 "name" : "read_user",
56122987
DM
21757 "parameters" : {
21758 "additionalProperties" : 0,
21759 "properties" : {
21760 "userid" : {
44660702 21761 "description" : "User ID",
56122987 21762 "format" : "pve-userid",
44660702
DM
21763 "maxLength" : 64,
21764 "type" : "string"
56122987
DM
21765 }
21766 }
21767 },
56122987
DM
21768 "permissions" : {
21769 "check" : [
44660702 21770 "userid-group",
56122987 21771 [
44660702
DM
21772 "User.Modify",
21773 "Sys.Audit"
56122987
DM
21774 ]
21775 ]
21776 },
56122987 21777 "returns" : {
7aacca6f 21778 "additionalProperties" : 0,
56122987 21779 "properties" : {
44660702
DM
21780 "comment" : {
21781 "optional" : 1,
21782 "type" : "string"
56122987 21783 },
44660702
DM
21784 "email" : {
21785 "optional" : 1,
21786 "type" : "string"
7aacca6f
DM
21787 },
21788 "enable" : {
21789 "type" : "boolean"
21790 },
44660702
DM
21791 "expire" : {
21792 "optional" : 1,
21793 "type" : "integer"
21794 },
21795 "firstname" : {
56122987
DM
21796 "optional" : 1,
21797 "type" : "string"
21798 },
44660702
DM
21799 "groups" : {
21800 "type" : "array"
56122987 21801 },
44660702
DM
21802 "keys" : {
21803 "optional" : 1,
21804 "type" : "string"
7aacca6f 21805 },
44660702
DM
21806 "lastname" : {
21807 "optional" : 1,
21808 "type" : "string"
56122987 21809 }
7aacca6f 21810 }
44660702
DM
21811 }
21812 },
21813 "PUT" : {
21814 "description" : "Update user configuration.",
21815 "method" : "PUT",
21816 "name" : "update_user",
56122987 21817 "parameters" : {
44660702 21818 "additionalProperties" : 0,
56122987 21819 "properties" : {
44660702
DM
21820 "append" : {
21821 "optional" : 1,
21822 "requires" : "groups",
21823 "type" : "boolean"
21824 },
21825 "comment" : {
21826 "optional" : 1,
21827 "type" : "string"
21828 },
21829 "email" : {
21830 "format" : "email-opt",
21831 "optional" : 1,
21832 "type" : "string"
21833 },
21834 "enable" : {
21835 "description" : "Enable/disable the account.",
21836 "optional" : 1,
21837 "type" : "boolean"
21838 },
21839 "expire" : {
21840 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
21841 "minimum" : 0,
21842 "optional" : 1,
21843 "type" : "integer"
21844 },
21845 "firstname" : {
21846 "optional" : 1,
21847 "type" : "string"
21848 },
21849 "groups" : {
21850 "format" : "pve-groupid-list",
21851 "optional" : 1,
21852 "type" : "string"
21853 },
21854 "keys" : {
21855 "description" : "Keys for two factor auth (yubico).",
21856 "optional" : 1,
21857 "type" : "string"
21858 },
21859 "lastname" : {
21860 "optional" : 1,
21861 "type" : "string"
21862 },
56122987 21863 "userid" : {
56122987
DM
21864 "description" : "User ID",
21865 "format" : "pve-userid",
44660702
DM
21866 "maxLength" : 64,
21867 "type" : "string"
56122987 21868 }
44660702 21869 }
56122987 21870 },
56122987
DM
21871 "permissions" : {
21872 "check" : [
21873 "userid-group",
21874 [
44660702
DM
21875 "User.Modify"
21876 ],
21877 "groups_param",
21878 1
56122987
DM
21879 ]
21880 },
44660702
DM
21881 "protected" : 1,
21882 "returns" : {
21883 "type" : "null"
21884 }
56122987
DM
21885 }
21886 },
44660702
DM
21887 "leaf" : 1,
21888 "path" : "/access/users/{userid}",
7aacca6f 21889 "text" : "{userid}"
56122987 21890 }
7aacca6f 21891 ],
56122987 21892 "info" : {
7aacca6f 21893 "GET" : {
44660702
DM
21894 "description" : "User index.",
21895 "method" : "GET",
7aacca6f 21896 "name" : "index",
56122987 21897 "parameters" : {
44660702
DM
21898 "additionalProperties" : 0,
21899 "properties" : {
21900 "enabled" : {
21901 "description" : "Optional filter for enable property.",
21902 "optional" : 1,
21903 "type" : "boolean"
21904 }
21905 }
21906 },
21907 "permissions" : {
21908 "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.",
21909 "user" : "all"
56122987 21910 },
7aacca6f 21911 "returns" : {
7aacca6f
DM
21912 "items" : {
21913 "properties" : {
44660702 21914 "userid" : {
7aacca6f
DM
21915 "type" : "string"
21916 }
21917 },
21918 "type" : "object"
21919 },
44660702
DM
21920 "links" : [
21921 {
21922 "href" : "{userid}",
21923 "rel" : "child"
21924 }
21925 ],
7aacca6f
DM
21926 "type" : "array"
21927 }
21928 },
21929 "POST" : {
44660702 21930 "description" : "Create new user.",
7aacca6f 21931 "method" : "POST",
44660702 21932 "name" : "create_user",
56122987 21933 "parameters" : {
7aacca6f
DM
21934 "additionalProperties" : 0,
21935 "properties" : {
44660702
DM
21936 "comment" : {
21937 "optional" : 1,
7aacca6f
DM
21938 "type" : "string"
21939 },
44660702
DM
21940 "email" : {
21941 "format" : "email-opt",
21942 "optional" : 1,
21943 "type" : "string"
21944 },
21945 "enable" : {
21946 "default" : 1,
21947 "description" : "Enable the account (default). You can set this to '0' to disable the accout",
21948 "optional" : 1,
21949 "type" : "boolean"
21950 },
21951 "expire" : {
21952 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
21953 "minimum" : 0,
21954 "optional" : 1,
21955 "type" : "integer"
21956 },
21957 "firstname" : {
21958 "optional" : 1,
21959 "type" : "string"
21960 },
21961 "groups" : {
21962 "format" : "pve-groupid-list",
21963 "optional" : 1,
21964 "type" : "string"
21965 },
21966 "keys" : {
21967 "description" : "Keys for two factor auth (yubico).",
21968 "optional" : 1,
21969 "type" : "string"
21970 },
21971 "lastname" : {
7aacca6f
DM
21972 "optional" : 1,
21973 "type" : "string"
44660702
DM
21974 },
21975 "password" : {
21976 "description" : "Initial password.",
21977 "maxLength" : 64,
21978 "minLength" : 5,
21979 "optional" : 1,
21980 "type" : "string"
21981 },
21982 "userid" : {
21983 "description" : "User ID",
21984 "format" : "pve-userid",
21985 "maxLength" : 64,
21986 "type" : "string"
56122987 21987 }
7aacca6f 21988 }
56122987 21989 },
44660702
DM
21990 "permissions" : {
21991 "check" : [
21992 "and",
21993 [
21994 "userid-param",
21995 "Realm.AllocateUser"
21996 ],
21997 [
21998 "userid-group",
21999 [
22000 "User.Modify"
22001 ],
22002 "groups_param",
22003 1
22004 ]
22005 ],
22006 "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."
22007 },
22008 "protected" : 1,
22009 "returns" : {
22010 "type" : "null"
22011 }
56122987
DM
22012 }
22013 },
44660702
DM
22014 "leaf" : 0,
22015 "path" : "/access/users",
22016 "text" : "users"
22017 },
22018 {
56122987
DM
22019 "children" : [
22020 {
56122987
DM
22021 "info" : {
22022 "DELETE" : {
44660702
DM
22023 "description" : "Delete group.",
22024 "method" : "DELETE",
22025 "name" : "delete_group",
22026 "parameters" : {
22027 "additionalProperties" : 0,
22028 "properties" : {
22029 "groupid" : {
22030 "format" : "pve-groupid",
22031 "type" : "string"
22032 }
22033 }
22034 },
7aacca6f
DM
22035 "permissions" : {
22036 "check" : [
22037 "perm",
22038 "/access/groups",
22039 [
22040 "Group.Allocate"
22041 ]
22042 ]
22043 },
7aacca6f 22044 "protected" : 1,
7aacca6f
DM
22045 "returns" : {
22046 "type" : "null"
44660702 22047 }
7aacca6f 22048 },
44660702
DM
22049 "GET" : {
22050 "description" : "Get group configuration.",
22051 "method" : "GET",
22052 "name" : "read_group",
22053 "parameters" : {
22054 "additionalProperties" : 0,
22055 "properties" : {
22056 "groupid" : {
22057 "format" : "pve-groupid",
22058 "type" : "string"
22059 }
22060 }
56122987 22061 },
7aacca6f
DM
22062 "permissions" : {
22063 "check" : [
22064 "perm",
22065 "/access/groups",
22066 [
44660702 22067 "Sys.Audit",
7aacca6f 22068 "Group.Allocate"
44660702
DM
22069 ],
22070 "any",
22071 1
7aacca6f
DM
22072 ]
22073 },
7aacca6f 22074 "returns" : {
44660702 22075 "additionalProperties" : 0,
7aacca6f
DM
22076 "properties" : {
22077 "comment" : {
44660702
DM
22078 "optional" : 1,
22079 "type" : "string"
7aacca6f
DM
22080 },
22081 "members" : {
22082 "items" : {
22083 "type" : "string"
22084 },
22085 "type" : "array"
22086 }
22087 },
44660702
DM
22088 "type" : "object"
22089 }
22090 },
22091 "PUT" : {
22092 "description" : "Update group data.",
22093 "method" : "PUT",
22094 "name" : "update_group",
56122987 22095 "parameters" : {
44660702 22096 "additionalProperties" : 0,
56122987 22097 "properties" : {
44660702
DM
22098 "comment" : {
22099 "optional" : 1,
22100 "type" : "string"
22101 },
56122987
DM
22102 "groupid" : {
22103 "format" : "pve-groupid",
22104 "type" : "string"
22105 }
44660702 22106 }
56122987 22107 },
56122987
DM
22108 "permissions" : {
22109 "check" : [
22110 "perm",
22111 "/access/groups",
22112 [
22113 "Group.Allocate"
44660702 22114 ]
56122987
DM
22115 ]
22116 },
44660702
DM
22117 "protected" : 1,
22118 "returns" : {
22119 "type" : "null"
22120 }
7aacca6f
DM
22121 }
22122 },
7aacca6f 22123 "leaf" : 1,
44660702
DM
22124 "path" : "/access/groups/{groupid}",
22125 "text" : "{groupid}"
22126 }
22127 ],
22128 "info" : {
22129 "GET" : {
22130 "description" : "Group index.",
22131 "method" : "GET",
22132 "name" : "index",
22133 "parameters" : {
22134 "additionalProperties" : 0
22135 },
22136 "permissions" : {
22137 "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/<group>.",
22138 "user" : "all"
22139 },
22140 "returns" : {
22141 "items" : {
22142 "properties" : {
22143 "groupid" : {
22144 "type" : "string"
22145 }
22146 },
22147 "type" : "object"
22148 },
22149 "links" : [
22150 {
22151 "href" : "{groupid}",
22152 "rel" : "child"
22153 }
22154 ],
22155 "type" : "array"
22156 }
22157 },
22158 "POST" : {
22159 "description" : "Create new group.",
22160 "method" : "POST",
22161 "name" : "create_group",
22162 "parameters" : {
22163 "additionalProperties" : 0,
22164 "properties" : {
22165 "comment" : {
22166 "optional" : 1,
22167 "type" : "string"
22168 },
22169 "groupid" : {
22170 "format" : "pve-groupid",
22171 "type" : "string"
22172 }
22173 }
22174 },
22175 "permissions" : {
22176 "check" : [
22177 "perm",
22178 "/access/groups",
22179 [
22180 "Group.Allocate"
22181 ]
22182 ]
22183 },
22184 "protected" : 1,
22185 "returns" : {
22186 "type" : "null"
22187 }
7aacca6f 22188 }
44660702 22189 },
7aacca6f 22190 "leaf" : 0,
44660702
DM
22191 "path" : "/access/groups",
22192 "text" : "groups"
7aacca6f
DM
22193 },
22194 {
22195 "children" : [
22196 {
7aacca6f 22197 "info" : {
7aacca6f 22198 "DELETE" : {
7aacca6f 22199 "description" : "Delete role.",
44660702 22200 "method" : "DELETE",
7aacca6f 22201 "name" : "delete_role",
56122987
DM
22202 "parameters" : {
22203 "additionalProperties" : 0,
22204 "properties" : {
7aacca6f
DM
22205 "roleid" : {
22206 "format" : "pve-roleid",
22207 "type" : "string"
56122987
DM
22208 }
22209 }
22210 },
56122987
DM
22211 "permissions" : {
22212 "check" : [
22213 "perm",
7aacca6f 22214 "/access",
56122987 22215 [
7aacca6f
DM
22216 "Sys.Modify"
22217 ]
56122987 22218 ]
44660702
DM
22219 },
22220 "protected" : 1,
22221 "returns" : {
22222 "type" : "null"
56122987
DM
22223 }
22224 },
44660702
DM
22225 "GET" : {
22226 "description" : "Get role configuration.",
22227 "method" : "GET",
22228 "name" : "read_role",
22229 "parameters" : {
22230 "additionalProperties" : 0,
22231 "properties" : {
22232 "roleid" : {
22233 "format" : "pve-roleid",
22234 "type" : "string"
22235 }
22236 }
22237 },
7aacca6f 22238 "permissions" : {
44660702 22239 "user" : "all"
56122987 22240 },
44660702
DM
22241 "returns" : {}
22242 },
22243 "PUT" : {
22244 "description" : "Create new role.",
22245 "method" : "PUT",
22246 "name" : "update_role",
56122987
DM
22247 "parameters" : {
22248 "additionalProperties" : 0,
22249 "properties" : {
7aacca6f 22250 "append" : {
44660702 22251 "optional" : 1,
7aacca6f 22252 "requires" : "privs",
44660702 22253 "type" : "boolean"
7aacca6f
DM
22254 },
22255 "privs" : {
22256 "format" : "pve-priv-list",
56122987 22257 "type" : "string"
44660702
DM
22258 },
22259 "roleid" : {
22260 "format" : "pve-roleid",
22261 "type" : "string"
56122987
DM
22262 }
22263 }
22264 },
44660702
DM
22265 "permissions" : {
22266 "check" : [
22267 "perm",
22268 "/access",
22269 [
22270 "Sys.Modify"
22271 ]
22272 ]
22273 },
56122987 22274 "protected" : 1,
7aacca6f
DM
22275 "returns" : {
22276 "type" : "null"
56122987
DM
22277 }
22278 }
22279 },
44660702 22280 "leaf" : 1,
7aacca6f 22281 "path" : "/access/roles/{roleid}",
44660702 22282 "text" : "{roleid}"
56122987
DM
22283 }
22284 ],
56122987 22285 "info" : {
7aacca6f
DM
22286 "GET" : {
22287 "description" : "Role index.",
44660702 22288 "method" : "GET",
7aacca6f 22289 "name" : "index",
56122987 22290 "parameters" : {
56122987
DM
22291 "additionalProperties" : 0
22292 },
7aacca6f
DM
22293 "permissions" : {
22294 "user" : "all"
22295 },
56122987 22296 "returns" : {
7aacca6f 22297 "items" : {
7aacca6f
DM
22298 "properties" : {
22299 "roleid" : {
22300 "type" : "string"
22301 }
44660702
DM
22302 },
22303 "type" : "object"
22304 },
22305 "links" : [
22306 {
22307 "href" : "{roleid}",
22308 "rel" : "child"
7aacca6f 22309 }
44660702
DM
22310 ],
22311 "type" : "array"
22312 }
7aacca6f
DM
22313 },
22314 "POST" : {
22315 "description" : "Create new role.",
44660702
DM
22316 "method" : "POST",
22317 "name" : "create_role",
7aacca6f
DM
22318 "parameters" : {
22319 "additionalProperties" : 0,
22320 "properties" : {
7aacca6f
DM
22321 "privs" : {
22322 "format" : "pve-priv-list",
22323 "optional" : 1,
22324 "type" : "string"
44660702
DM
22325 },
22326 "roleid" : {
22327 "format" : "pve-roleid",
22328 "type" : "string"
7aacca6f
DM
22329 }
22330 }
22331 },
44660702
DM
22332 "permissions" : {
22333 "check" : [
22334 "perm",
22335 "/access",
22336 [
22337 "Sys.Modify"
22338 ]
22339 ]
22340 },
22341 "protected" : 1,
7aacca6f
DM
22342 "returns" : {
22343 "type" : "null"
22344 }
22345 }
22346 },
44660702 22347 "leaf" : 0,
7aacca6f 22348 "path" : "/access/roles",
44660702 22349 "text" : "roles"
7aacca6f
DM
22350 },
22351 {
22352 "info" : {
56122987 22353 "GET" : {
44660702
DM
22354 "description" : "Get Access Control List (ACLs).",
22355 "method" : "GET",
22356 "name" : "read_acl",
7aacca6f
DM
22357 "parameters" : {
22358 "additionalProperties" : 0
22359 },
44660702
DM
22360 "permissions" : {
22361 "description" : "The returned list is restricted to objects where you have rights to modify permissions.",
22362 "user" : "all"
22363 },
56122987 22364 "returns" : {
56122987 22365 "items" : {
44660702 22366 "additionalProperties" : 0,
56122987 22367 "properties" : {
7aacca6f
DM
22368 "path" : {
22369 "type" : "string"
22370 },
44660702
DM
22371 "propagate" : {
22372 "type" : "boolean"
22373 },
22374 "roleid" : {
22375 "type" : "string"
22376 },
7aacca6f
DM
22377 "type" : {
22378 "enum" : [
22379 "user",
22380 "group"
22381 ],
22382 "type" : "string"
22383 },
7aacca6f
DM
22384 "ugid" : {
22385 "type" : "string"
56122987 22386 }
7aacca6f 22387 },
44660702 22388 "type" : "object"
7aacca6f
DM
22389 },
22390 "type" : "array"
44660702 22391 }
7aacca6f
DM
22392 },
22393 "PUT" : {
44660702
DM
22394 "description" : "Update Access Control List (add or remove permissions).",
22395 "method" : "PUT",
7aacca6f
DM
22396 "name" : "update_acl",
22397 "parameters" : {
22398 "additionalProperties" : 0,
22399 "properties" : {
22400 "delete" : {
44660702 22401 "description" : "Remove permissions (instead of adding it).",
7aacca6f 22402 "optional" : 1,
44660702 22403 "type" : "boolean"
7aacca6f 22404 },
44660702
DM
22405 "groups" : {
22406 "description" : "List of groups.",
22407 "format" : "pve-groupid-list",
7aacca6f 22408 "optional" : 1,
44660702 22409 "type" : "string"
7aacca6f
DM
22410 },
22411 "path" : {
22412 "description" : "Access control path",
22413 "type" : "string"
22414 },
7aacca6f 22415 "propagate" : {
44660702 22416 "default" : 1,
7aacca6f 22417 "description" : "Allow to propagate (inherit) permissions.",
7aacca6f 22418 "optional" : 1,
44660702 22419 "type" : "boolean"
7aacca6f 22420 },
44660702
DM
22421 "roles" : {
22422 "description" : "List of roles.",
22423 "format" : "pve-roleid-list",
22424 "type" : "string"
22425 },
22426 "users" : {
22427 "description" : "List of users.",
22428 "format" : "pve-userid-list",
7aacca6f 22429 "optional" : 1,
44660702 22430 "type" : "string"
56122987
DM
22431 }
22432 }
22433 },
56122987 22434 "permissions" : {
7aacca6f
DM
22435 "check" : [
22436 "perm-modify",
22437 "{path}"
22438 ]
22439 },
7aacca6f
DM
22440 "protected" : 1,
22441 "returns" : {
22442 "type" : "null"
44660702 22443 }
56122987
DM
22444 }
22445 },
7aacca6f 22446 "leaf" : 1,
44660702
DM
22447 "path" : "/access/acl",
22448 "text" : "acl"
7aacca6f
DM
22449 },
22450 {
56122987
DM
22451 "children" : [
22452 {
56122987 22453 "info" : {
44660702
DM
22454 "DELETE" : {
22455 "description" : "Delete an authentication server.",
22456 "method" : "DELETE",
22457 "name" : "delete",
22458 "parameters" : {
22459 "additionalProperties" : 0,
22460 "properties" : {
22461 "realm" : {
22462 "description" : "Authentication domain ID",
22463 "format" : "pve-realm",
22464 "maxLength" : 32,
22465 "type" : "string"
56122987 22466 }
44660702 22467 }
56122987 22468 },
56122987
DM
22469 "permissions" : {
22470 "check" : [
22471 "perm",
7aacca6f 22472 "/access/realm",
56122987 22473 [
7aacca6f 22474 "Realm.Allocate"
56122987
DM
22475 ]
22476 ]
22477 },
7aacca6f 22478 "protected" : 1,
7aacca6f
DM
22479 "returns" : {
22480 "type" : "null"
44660702 22481 }
7aacca6f 22482 },
44660702
DM
22483 "GET" : {
22484 "description" : "Get auth server configuration.",
22485 "method" : "GET",
22486 "name" : "read",
56122987 22487 "parameters" : {
44660702 22488 "additionalProperties" : 0,
56122987 22489 "properties" : {
7aacca6f 22490 "realm" : {
44660702 22491 "description" : "Authentication domain ID",
7aacca6f
DM
22492 "format" : "pve-realm",
22493 "maxLength" : 32,
44660702 22494 "type" : "string"
56122987 22495 }
44660702 22496 }
7aacca6f 22497 },
7aacca6f
DM
22498 "permissions" : {
22499 "check" : [
22500 "perm",
22501 "/access/realm",
22502 [
44660702
DM
22503 "Realm.Allocate",
22504 "Sys.Audit"
22505 ],
22506 "any",
22507 1
7aacca6f 22508 ]
44660702
DM
22509 },
22510 "returns" : {}
7aacca6f 22511 },
44660702
DM
22512 "PUT" : {
22513 "description" : "Update authentication server settings.",
22514 "method" : "PUT",
22515 "name" : "update",
7aacca6f 22516 "parameters" : {
44660702 22517 "additionalProperties" : 0,
7aacca6f 22518 "properties" : {
44660702
DM
22519 "base_dn" : {
22520 "description" : "LDAP base domain name",
22521 "maxLength" : 256,
22522 "optional" : 1,
22523 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
22524 "type" : "string"
22525 },
22526 "comment" : {
22527 "description" : "Description.",
22528 "maxLength" : 4096,
22529 "optional" : 1,
22530 "type" : "string"
22531 },
22532 "default" : {
22533 "description" : "Use this as default realm",
22534 "optional" : 1,
22535 "type" : "boolean"
22536 },
22537 "delete" : {
22538 "description" : "A list of settings you want to delete.",
22539 "format" : "pve-configid-list",
22540 "maxLength" : 4096,
22541 "optional" : 1,
22542 "type" : "string"
22543 },
22544 "digest" : {
22545 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
22546 "maxLength" : 40,
22547 "optional" : 1,
22548 "type" : "string"
22549 },
22550 "domain" : {
22551 "description" : "AD domain name",
22552 "maxLength" : 256,
22553 "optional" : 1,
22554 "pattern" : "\\S+",
22555 "type" : "string"
22556 },
22557 "port" : {
22558 "description" : "Server port.",
22559 "maximum" : 65535,
22560 "minimum" : 1,
22561 "optional" : 1,
22562 "type" : "integer"
22563 },
7aacca6f 22564 "realm" : {
7aacca6f
DM
22565 "description" : "Authentication domain ID",
22566 "format" : "pve-realm",
44660702
DM
22567 "maxLength" : 32,
22568 "type" : "string"
22569 },
22570 "secure" : {
22571 "description" : "Use secure LDAPS protocol.",
22572 "optional" : 1,
22573 "type" : "boolean"
22574 },
22575 "server1" : {
22576 "description" : "Server IP address (or DNS name)",
22577 "format" : "address",
22578 "maxLength" : 256,
22579 "optional" : 1,
22580 "type" : "string"
22581 },
22582 "server2" : {
22583 "description" : "Fallback Server IP address (or DNS name)",
22584 "format" : "address",
22585 "maxLength" : 256,
22586 "optional" : 1,
22587 "type" : "string"
22588 },
22589 "tfa" : {
22590 "description" : "Use Two-factor authentication.",
22591 "format" : "pve-tfa-config",
22592 "maxLength" : 128,
22593 "optional" : 1,
22594 "type" : "string"
22595 },
22596 "user_attr" : {
22597 "description" : "LDAP user attribute name",
22598 "maxLength" : 256,
22599 "optional" : 1,
22600 "pattern" : "\\S{2,}",
22601 "type" : "string"
7aacca6f 22602 }
56122987 22603 },
44660702 22604 "type" : "object"
56122987 22605 },
7aacca6f
DM
22606 "permissions" : {
22607 "check" : [
22608 "perm",
22609 "/access/realm",
22610 [
44660702
DM
22611 "Realm.Allocate"
22612 ]
7aacca6f
DM
22613 ]
22614 },
44660702
DM
22615 "protected" : 1,
22616 "returns" : {
22617 "type" : "null"
22618 }
56122987 22619 }
44660702
DM
22620 },
22621 "leaf" : 1,
22622 "path" : "/access/domains/{realm}",
22623 "text" : "{realm}"
56122987 22624 }
7aacca6f 22625 ],
56122987
DM
22626 "info" : {
22627 "GET" : {
44660702
DM
22628 "description" : "Authentication domain index.",
22629 "method" : "GET",
22630 "name" : "index",
22631 "parameters" : {
22632 "additionalProperties" : 0
22633 },
22634 "permissions" : {
22635 "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated).",
22636 "user" : "world"
22637 },
56122987 22638 "returns" : {
56122987
DM
22639 "items" : {
22640 "properties" : {
7aacca6f
DM
22641 "comment" : {
22642 "optional" : 1,
22643 "type" : "string"
22644 },
56122987
DM
22645 "realm" : {
22646 "type" : "string"
22647 },
22648 "tfa" : {
7aacca6f 22649 "description" : "Two-factor authentication provider.",
56122987
DM
22650 "enum" : [
22651 "yubico",
22652 "oath"
22653 ],
44660702
DM
22654 "optional" : 1,
22655 "type" : "string"
56122987
DM
22656 }
22657 },
22658 "type" : "object"
44660702
DM
22659 },
22660 "links" : [
22661 {
22662 "href" : "{realm}",
22663 "rel" : "child"
22664 }
22665 ],
22666 "type" : "array"
22667 }
56122987
DM
22668 },
22669 "POST" : {
7aacca6f 22670 "description" : "Add an authentication server.",
44660702 22671 "method" : "POST",
7aacca6f 22672 "name" : "create",
56122987 22673 "parameters" : {
44660702 22674 "additionalProperties" : 0,
56122987 22675 "properties" : {
44660702
DM
22676 "base_dn" : {
22677 "description" : "LDAP base domain name",
56122987 22678 "maxLength" : 256,
44660702
DM
22679 "optional" : 1,
22680 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
7aacca6f 22681 "type" : "string"
56122987 22682 },
44660702
DM
22683 "comment" : {
22684 "description" : "Description.",
22685 "maxLength" : 4096,
56122987 22686 "optional" : 1,
44660702 22687 "type" : "string"
56122987 22688 },
44660702
DM
22689 "default" : {
22690 "description" : "Use this as default realm",
7aacca6f 22691 "optional" : 1,
44660702 22692 "type" : "boolean"
56122987 22693 },
44660702
DM
22694 "domain" : {
22695 "description" : "AD domain name",
22696 "maxLength" : 256,
7aacca6f 22697 "optional" : 1,
44660702
DM
22698 "pattern" : "\\S+",
22699 "type" : "string"
56122987 22700 },
7aacca6f 22701 "port" : {
44660702 22702 "description" : "Server port.",
7aacca6f 22703 "maximum" : 65535,
44660702 22704 "minimum" : 1,
7aacca6f 22705 "optional" : 1,
44660702 22706 "type" : "integer"
56122987 22707 },
44660702
DM
22708 "realm" : {
22709 "description" : "Authentication domain ID",
22710 "format" : "pve-realm",
22711 "maxLength" : 32,
22712 "type" : "string"
22713 },
22714 "secure" : {
22715 "description" : "Use secure LDAPS protocol.",
7aacca6f 22716 "optional" : 1,
44660702 22717 "type" : "boolean"
56122987 22718 },
44660702
DM
22719 "server1" : {
22720 "description" : "Server IP address (or DNS name)",
22721 "format" : "address",
22722 "maxLength" : 256,
22723 "optional" : 1,
22724 "type" : "string"
56122987 22725 },
44660702
DM
22726 "server2" : {
22727 "description" : "Fallback Server IP address (or DNS name)",
22728 "format" : "address",
7aacca6f 22729 "maxLength" : 256,
7aacca6f 22730 "optional" : 1,
44660702 22731 "type" : "string"
7aacca6f 22732 },
44660702
DM
22733 "tfa" : {
22734 "description" : "Use Two-factor authentication.",
22735 "format" : "pve-tfa-config",
22736 "maxLength" : 128,
22737 "optional" : 1,
22738 "type" : "string"
22739 },
22740 "type" : {
22741 "description" : "Realm type.",
22742 "enum" : [
22743 "ad",
22744 "ldap",
22745 "pam",
22746 "pve"
22747 ],
22748 "type" : "string"
22749 },
22750 "user_attr" : {
22751 "description" : "LDAP user attribute name",
7aacca6f 22752 "maxLength" : 256,
7aacca6f 22753 "optional" : 1,
44660702
DM
22754 "pattern" : "\\S{2,}",
22755 "type" : "string"
7aacca6f
DM
22756 }
22757 },
7aacca6f 22758 "type" : "object"
56122987 22759 },
7aacca6f
DM
22760 "permissions" : {
22761 "check" : [
22762 "perm",
22763 "/access/realm",
22764 [
22765 "Realm.Allocate"
22766 ]
22767 ]
44660702
DM
22768 },
22769 "protected" : 1,
22770 "returns" : {
22771 "type" : "null"
7aacca6f 22772 }
56122987 22773 }
7aacca6f 22774 },
44660702 22775 "leaf" : 0,
56122987 22776 "path" : "/access/domains",
44660702 22777 "text" : "domains"
56122987
DM
22778 },
22779 {
56122987 22780 "info" : {
44660702
DM
22781 "GET" : {
22782 "description" : "Dummy. Useful for formaters which want to priovde a login page.",
22783 "method" : "GET",
22784 "name" : "get_ticket",
22785 "parameters" : {
22786 "additionalProperties" : 0
22787 },
22788 "permissions" : {
22789 "user" : "world"
22790 },
22791 "returns" : {
22792 "type" : "null"
22793 }
22794 },
56122987 22795 "POST" : {
44660702 22796 "description" : "Create or verify authentication ticket.",
56122987 22797 "method" : "POST",
44660702
DM
22798 "name" : "create_ticket",
22799 "parameters" : {
22800 "additionalProperties" : 0,
56122987 22801 "properties" : {
44660702
DM
22802 "otp" : {
22803 "description" : "One-time password for Two-factor authentication.",
7aacca6f
DM
22804 "optional" : 1,
22805 "type" : "string"
56122987 22806 },
7aacca6f
DM
22807 "password" : {
22808 "description" : "The secret password. This can also be a valid ticket.",
22809 "type" : "string"
22810 },
44660702
DM
22811 "path" : {
22812 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
7aacca6f 22813 "maxLength" : 64,
56122987 22814 "optional" : 1,
56122987 22815 "requires" : "privs",
44660702
DM
22816 "type" : "string"
22817 },
22818 "privs" : {
7aacca6f 22819 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
44660702
DM
22820 "format" : "pve-priv-list",
22821 "maxLength" : 64,
56122987 22822 "optional" : 1,
44660702
DM
22823 "requires" : "path",
22824 "type" : "string"
56122987
DM
22825 },
22826 "realm" : {
56122987 22827 "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<relam>.",
44660702 22828 "format" : "pve-realm",
7aacca6f 22829 "maxLength" : 32,
44660702
DM
22830 "optional" : 1,
22831 "type" : "string"
56122987
DM
22832 },
22833 "username" : {
22834 "description" : "User name",
44660702
DM
22835 "maxLength" : 64,
22836 "type" : "string"
56122987 22837 }
44660702 22838 }
7aacca6f 22839 },
56122987 22840 "permissions" : {
44660702 22841 "description" : "You need to pass valid credientials.",
56122987
DM
22842 "user" : "world"
22843 },
44660702 22844 "protected" : 1,
7aacca6f 22845 "returns" : {
56122987 22846 "properties" : {
44660702
DM
22847 "CSRFPreventionToken" : {
22848 "optional" : 1,
22849 "type" : "string"
56122987 22850 },
44660702
DM
22851 "ticket" : {
22852 "optional" : 1,
22853 "type" : "string"
22854 },
22855 "username" : {
56122987
DM
22856 "type" : "string"
22857 }
22858 },
44660702 22859 "type" : "object"
7aacca6f 22860 }
7aacca6f
DM
22861 }
22862 },
44660702
DM
22863 "leaf" : 1,
22864 "path" : "/access/ticket",
22865 "text" : "ticket"
7aacca6f 22866 },
56122987 22867 {
56122987 22868 "info" : {
7aacca6f 22869 "PUT" : {
44660702 22870 "description" : "Change user password.",
7aacca6f 22871 "method" : "PUT",
44660702 22872 "name" : "change_passsword",
56122987
DM
22873 "parameters" : {
22874 "additionalProperties" : 0,
22875 "properties" : {
44660702
DM
22876 "password" : {
22877 "description" : "The new password.",
22878 "maxLength" : 64,
22879 "minLength" : 5,
22880 "type" : "string"
7aacca6f 22881 },
44660702
DM
22882 "userid" : {
22883 "description" : "User ID",
22884 "format" : "pve-userid",
22885 "maxLength" : 64,
7aacca6f 22886 "type" : "string"
56122987 22887 }
7aacca6f 22888 }
56122987
DM
22889 },
22890 "permissions" : {
22891 "check" : [
44660702 22892 "or",
56122987 22893 [
44660702
DM
22894 "userid-param",
22895 "self"
22896 ],
22897 [
22898 "and",
22899 [
22900 "userid-param",
22901 "Realm.AllocateUser"
22902 ],
22903 [
22904 "userid-group",
22905 [
22906 "User.Modify"
22907 ]
22908 ]
56122987 22909 ]
7aacca6f 22910 ],
44660702 22911 "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 22912 },
44660702 22913 "protected" : 1,
7aacca6f
DM
22914 "returns" : {
22915 "type" : "null"
44660702
DM
22916 }
22917 }
22918 },
22919 "leaf" : 1,
22920 "path" : "/access/password",
22921 "text" : "password"
22922 }
22923 ],
22924 "info" : {
22925 "GET" : {
22926 "description" : "Directory index.",
22927 "method" : "GET",
22928 "name" : "index",
22929 "parameters" : {
22930 "additionalProperties" : 0
22931 },
22932 "permissions" : {
22933 "user" : "all"
22934 },
22935 "returns" : {
22936 "items" : {
22937 "properties" : {
22938 "subdir" : {
22939 "type" : "string"
22940 }
7aacca6f 22941 },
44660702
DM
22942 "type" : "object"
22943 },
22944 "links" : [
22945 {
22946 "href" : "{subdir}",
22947 "rel" : "child"
22948 }
22949 ],
22950 "type" : "array"
22951 }
22952 }
22953 },
22954 "leaf" : 0,
22955 "path" : "/access",
22956 "text" : "access"
22957 },
22958 {
22959 "children" : [
22960 {
22961 "info" : {
22962 "DELETE" : {
7aacca6f 22963 "description" : "Delete pool.",
44660702
DM
22964 "method" : "DELETE",
22965 "name" : "delete_pool",
7aacca6f
DM
22966 "parameters" : {
22967 "additionalProperties" : 0,
22968 "properties" : {
22969 "poolid" : {
22970 "format" : "pve-poolid",
22971 "type" : "string"
22972 }
22973 }
22974 },
56122987
DM
22975 "permissions" : {
22976 "check" : [
22977 "perm",
22978 "/pool/{poolid}",
22979 [
22980 "Pool.Allocate"
22981 ]
44660702
DM
22982 ],
22983 "description" : "You can only delete empty pools (no members)."
22984 },
22985 "protected" : 1,
22986 "returns" : {
22987 "type" : "null"
7aacca6f
DM
22988 }
22989 },
22990 "GET" : {
22991 "description" : "Get pool configuration.",
44660702 22992 "method" : "GET",
7aacca6f 22993 "name" : "read_pool",
56122987 22994 "parameters" : {
44660702 22995 "additionalProperties" : 0,
56122987
DM
22996 "properties" : {
22997 "poolid" : {
44660702
DM
22998 "format" : "pve-poolid",
22999 "type" : "string"
56122987 23000 }
44660702 23001 }
56122987 23002 },
56122987 23003 "permissions" : {
56122987
DM
23004 "check" : [
23005 "perm",
23006 "/pool/{poolid}",
23007 [
23008 "Pool.Allocate"
23009 ]
23010 ]
23011 },
7aacca6f 23012 "returns" : {
44660702 23013 "additionalProperties" : 0,
56122987 23014 "properties" : {
44660702
DM
23015 "comment" : {
23016 "optional" : 1,
23017 "type" : "string"
23018 },
7aacca6f 23019 "members" : {
7aacca6f
DM
23020 "items" : {
23021 "additionalProperties" : 1,
7aacca6f 23022 "properties" : {
7aacca6f
DM
23023 "id" : {
23024 "type" : "string"
23025 },
23026 "node" : {
23027 "type" : "string"
23028 },
44660702
DM
23029 "storage" : {
23030 "optional" : 1,
23031 "type" : "string"
23032 },
7aacca6f 23033 "type" : {
7aacca6f
DM
23034 "enum" : [
23035 "qemu",
23036 "lxc",
23037 "openvz",
23038 "storage"
44660702
DM
23039 ],
23040 "type" : "string"
23041 },
23042 "vmid" : {
23043 "optional" : 1,
23044 "type" : "integer"
7aacca6f 23045 }
44660702
DM
23046 },
23047 "type" : "object"
23048 },
23049 "type" : "array"
23050 }
23051 },
23052 "type" : "object"
23053 }
23054 },
23055 "PUT" : {
23056 "description" : "Update pool data.",
23057 "method" : "PUT",
23058 "name" : "update_pool",
23059 "parameters" : {
23060 "additionalProperties" : 0,
23061 "properties" : {
56122987
DM
23062 "comment" : {
23063 "optional" : 1,
23064 "type" : "string"
44660702
DM
23065 },
23066 "delete" : {
23067 "description" : "Remove vms/storage (instead of adding it).",
23068 "optional" : 1,
23069 "type" : "boolean"
23070 },
23071 "poolid" : {
23072 "format" : "pve-poolid",
23073 "type" : "string"
23074 },
23075 "storage" : {
23076 "description" : "List of storage IDs.",
23077 "format" : "pve-storage-id-list",
23078 "optional" : 1,
23079 "type" : "string"
23080 },
23081 "vms" : {
23082 "description" : "List of virtual machines.",
23083 "format" : "pve-vmid-list",
23084 "optional" : 1,
23085 "type" : "string"
56122987 23086 }
44660702
DM
23087 }
23088 },
23089 "permissions" : {
23090 "check" : [
23091 "perm",
23092 "/pool/{poolid}",
23093 [
23094 "Pool.Allocate"
23095 ]
23096 ],
23097 "description" : "You also need the right to modify permissions on any object you add/delete."
23098 },
23099 "protected" : 1,
23100 "returns" : {
23101 "type" : "null"
56122987
DM
23102 }
23103 }
23104 },
44660702
DM
23105 "leaf" : 1,
23106 "path" : "/pools/{poolid}",
7aacca6f 23107 "text" : "{poolid}"
56122987 23108 }
7aacca6f 23109 ],
56122987
DM
23110 "info" : {
23111 "GET" : {
44660702
DM
23112 "description" : "Pool index.",
23113 "method" : "GET",
23114 "name" : "index",
23115 "parameters" : {
23116 "additionalProperties" : 0
23117 },
23118 "permissions" : {
23119 "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/<pool>.",
23120 "user" : "all"
23121 },
56122987 23122 "returns" : {
44660702
DM
23123 "items" : {
23124 "properties" : {
23125 "poolid" : {
23126 "type" : "string"
23127 }
56122987 23128 },
44660702
DM
23129 "type" : "object"
23130 },
23131 "links" : [
23132 {
23133 "href" : "{poolid}",
23134 "rel" : "child"
23135 }
23136 ],
23137 "type" : "array"
23138 }
23139 },
23140 "POST" : {
23141 "description" : "Create new pool.",
23142 "method" : "POST",
23143 "name" : "create_pool",
23144 "parameters" : {
23145 "additionalProperties" : 0,
23146 "properties" : {
23147 "comment" : {
23148 "optional" : 1,
56122987 23149 "type" : "string"
7aacca6f 23150 },
44660702
DM
23151 "poolid" : {
23152 "format" : "pve-poolid",
7aacca6f 23153 "type" : "string"
56122987
DM
23154 }
23155 }
23156 },
56122987 23157 "permissions" : {
44660702
DM
23158 "check" : [
23159 "perm",
23160 "/pool/{poolid}",
23161 [
23162 "Pool.Allocate"
23163 ]
23164 ]
56122987 23165 },
44660702
DM
23166 "protected" : 1,
23167 "returns" : {
23168 "type" : "null"
23169 }
23170 }
23171 },
23172 "leaf" : 0,
23173 "path" : "/pools",
23174 "text" : "pools"
23175 },
23176 {
23177 "info" : {
23178 "GET" : {
23179 "description" : "API version details. The result also includes the global datacenter confguration.",
23180 "method" : "GET",
23181 "name" : "version",
7aacca6f
DM
23182 "parameters" : {
23183 "additionalProperties" : 0
23184 },
44660702
DM
23185 "permissions" : {
23186 "user" : "all"
23187 },
23188 "returns" : {
23189 "properties" : {
23190 "release" : {
23191 "type" : "string"
23192 },
23193 "repoid" : {
23194 "type" : "string"
23195 },
23196 "version" : {
23197 "type" : "string"
23198 }
23199 },
23200 "type" : "object"
23201 }
56122987
DM
23202 }
23203 },
44660702
DM
23204 "leaf" : 1,
23205 "path" : "/version",
56122987
DM
23206 "text" : "version"
23207 }
23208]
23209;
23210