]> git.proxmox.com Git - pve-docs.git/blame - api-viewer/apidata.js
simplify/cleanup previous commit
[pve-docs.git] / api-viewer / apidata.js
CommitLineData
56122987
DM
1var pveapi = [
2 {
56122987
DM
3 "children" : [
4 {
56122987
DM
5 "children" : [
6 {
56122987
DM
7 "children" : [
8 {
44660702
DM
9 "children" : [
10 {
11 "info" : {
12 "DELETE" : {
13 "description" : "Delete rule.",
14 "method" : "DELETE",
15 "name" : "delete_rule",
16 "parameters" : {
17 "additionalProperties" : 0,
18 "properties" : {
19 "digest" : {
20 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
21 "maxLength" : 40,
22 "optional" : 1,
23 "type" : "string"
24 },
25 "group" : {
26 "description" : "Security Group name.",
27 "maxLength" : 20,
28 "minLength" : 2,
29 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
30 "type" : "string"
31 },
32 "pos" : {
33 "description" : "Update rule at position <pos>.",
34 "minimum" : 0,
35 "optional" : 1,
36 "type" : "integer"
37 }
38 }
39 },
40 "permissions" : {
41 "check" : [
42 "perm",
43 "/",
44 [
45 "Sys.Modify"
46 ]
47 ]
48 },
49 "protected" : 1,
50 "proxyto" : null,
51 "returns" : {
52 "type" : "null"
7aacca6f
DM
53 }
54 },
44660702
DM
55 "GET" : {
56 "description" : "Get single rule data.",
57 "method" : "GET",
58 "name" : "get_rule",
59 "parameters" : {
60 "additionalProperties" : 0,
61 "properties" : {
62 "group" : {
63 "description" : "Security Group name.",
64 "maxLength" : 20,
65 "minLength" : 2,
66 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
67 "type" : "string"
68 },
69 "pos" : {
70 "description" : "Update rule at position <pos>.",
71 "minimum" : 0,
72 "optional" : 1,
73 "type" : "integer"
74 }
7aacca6f 75 }
56122987 76 },
44660702
DM
77 "permissions" : {
78 "check" : [
79 "perm",
80 "/",
81 [
82 "Sys.Audit"
83 ]
84 ]
85 },
86 "proxyto" : null,
87 "returns" : {
88 "properties" : {
89 "pos" : {
90 "type" : "integer"
91 }
92 },
93 "type" : "object"
56122987 94 }
44660702 95 },
7aacca6f 96 "PUT" : {
44660702
DM
97 "description" : "Modify rule data.",
98 "method" : "PUT",
99 "name" : "update_rule",
7aacca6f
DM
100 "parameters" : {
101 "additionalProperties" : 0,
102 "properties" : {
44660702
DM
103 "action" : {
104 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 105 "maxLength" : 20,
44660702 106 "minLength" : 2,
7aacca6f 107 "optional" : 1,
44660702 108 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
109 "type" : "string"
110 },
44660702 111 "comment" : {
7aacca6f 112 "optional" : 1,
44660702 113 "type" : "string"
7aacca6f 114 },
44660702
DM
115 "delete" : {
116 "description" : "A list of settings you want to delete.",
117 "format" : "pve-configid-list",
7aacca6f 118 "optional" : 1,
44660702 119 "type" : "string"
7aacca6f 120 },
44660702
DM
121 "dest" : {
122 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
123 "format" : "pve-fw-addr-spec",
7aacca6f 124 "optional" : 1,
44660702 125 "type" : "string"
7aacca6f
DM
126 },
127 "digest" : {
128 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 129 "maxLength" : 40,
7aacca6f 130 "optional" : 1,
44660702 131 "type" : "string"
7aacca6f 132 },
44660702
DM
133 "dport" : {
134 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
135 "format" : "pve-fw-dport-spec",
7aacca6f 136 "optional" : 1,
44660702 137 "type" : "string"
7aacca6f 138 },
44660702
DM
139 "enable" : {
140 "minimum" : 0,
7aacca6f 141 "optional" : 1,
44660702 142 "type" : "integer"
7aacca6f 143 },
44660702
DM
144 "group" : {
145 "description" : "Security Group name.",
146 "maxLength" : 20,
147 "minLength" : 2,
148 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
149 "type" : "string"
150 },
151 "iface" : {
152 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
153 "format" : "pve-iface",
154 "maxLength" : 20,
155 "minLength" : 2,
7aacca6f 156 "optional" : 1,
44660702 157 "type" : "string"
7aacca6f 158 },
44660702
DM
159 "macro" : {
160 "maxLength" : 128,
161 "optional" : 1,
162 "type" : "string"
7aacca6f
DM
163 },
164 "moveto" : {
165 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
44660702 166 "minimum" : 0,
7aacca6f 167 "optional" : 1,
44660702 168 "type" : "integer"
7aacca6f 169 },
44660702
DM
170 "pos" : {
171 "description" : "Update rule at position <pos>.",
172 "minimum" : 0,
173 "optional" : 1,
174 "type" : "integer"
7aacca6f 175 },
44660702
DM
176 "proto" : {
177 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
178 "format" : "pve-fw-protocol-spec",
7aacca6f 179 "optional" : 1,
44660702
DM
180 "type" : "string"
181 },
182 "source" : {
183 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
184 "format" : "pve-fw-addr-spec",
185 "optional" : 1,
186 "type" : "string"
187 },
188 "sport" : {
189 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
190 "format" : "pve-fw-sport-spec",
191 "optional" : 1,
192 "type" : "string"
7aacca6f
DM
193 },
194 "type" : {
195 "enum" : [
196 "in",
197 "out",
198 "group"
199 ],
200 "optional" : 1,
201 "type" : "string"
202 }
203 }
204 },
7aacca6f
DM
205 "permissions" : {
206 "check" : [
207 "perm",
208 "/",
209 [
210 "Sys.Modify"
211 ]
212 ]
213 },
44660702 214 "protected" : 1,
7aacca6f
DM
215 "proxyto" : null,
216 "returns" : {
217 "type" : "null"
218 }
7aacca6f
DM
219 }
220 },
44660702 221 "leaf" : 1,
7aacca6f 222 "path" : "/cluster/firewall/groups/{group}/{pos}",
44660702 223 "text" : "{pos}"
7aacca6f
DM
224 }
225 ],
44660702
DM
226 "info" : {
227 "DELETE" : {
228 "description" : "Delete security group.",
229 "method" : "DELETE",
230 "name" : "delete_security_group",
231 "parameters" : {
232 "additionalProperties" : 0,
233 "properties" : {
234 "group" : {
235 "description" : "Security Group name.",
236 "maxLength" : 20,
237 "minLength" : 2,
238 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
239 "type" : "string"
240 }
56122987 241 }
7aacca6f 242 },
44660702
DM
243 "permissions" : {
244 "check" : [
245 "perm",
246 "/",
247 [
248 "Sys.Modify"
249 ]
7aacca6f 250 ]
56122987 251 },
44660702
DM
252 "protected" : 1,
253 "returns" : {
254 "type" : "null"
56122987 255 }
7aacca6f 256 },
7aacca6f 257 "GET" : {
44660702 258 "description" : "List rules.",
7aacca6f 259 "method" : "GET",
44660702
DM
260 "name" : "get_rules",
261 "parameters" : {
262 "additionalProperties" : 0,
7aacca6f 263 "properties" : {
44660702
DM
264 "group" : {
265 "description" : "Security Group name.",
266 "maxLength" : 20,
267 "minLength" : 2,
268 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
269 "type" : "string"
7aacca6f 270 }
44660702 271 }
7aacca6f
DM
272 },
273 "permissions" : {
274 "check" : [
275 "perm",
276 "/",
277 [
278 "Sys.Audit"
279 ]
280 ]
281 },
44660702
DM
282 "proxyto" : null,
283 "returns" : {
284 "items" : {
285 "properties" : {
286 "pos" : {
287 "type" : "integer"
288 }
289 },
290 "type" : "object"
291 },
292 "links" : [
293 {
294 "href" : "{pos}",
295 "rel" : "child"
296 }
297 ],
298 "type" : "array"
299 }
300 },
301 "POST" : {
302 "description" : "Create new rule.",
303 "method" : "POST",
304 "name" : "create_rule",
7aacca6f
DM
305 "parameters" : {
306 "additionalProperties" : 0,
307 "properties" : {
44660702
DM
308 "action" : {
309 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
310 "maxLength" : 20,
56122987 311 "minLength" : 2,
44660702
DM
312 "optional" : 0,
313 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 314 "type" : "string"
56122987 315 },
44660702 316 "comment" : {
56122987 317 "optional" : 1,
7aacca6f 318 "type" : "string"
56122987 319 },
44660702
DM
320 "dest" : {
321 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
56122987
DM
322 "format" : "pve-fw-addr-spec",
323 "optional" : 1,
44660702 324 "type" : "string"
56122987 325 },
44660702
DM
326 "digest" : {
327 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
328 "maxLength" : 40,
7aacca6f 329 "optional" : 1,
44660702 330 "type" : "string"
56122987 331 },
44660702
DM
332 "dport" : {
333 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
334 "format" : "pve-fw-dport-spec",
56122987 335 "optional" : 1,
44660702 336 "type" : "string"
56122987 337 },
7aacca6f 338 "enable" : {
44660702 339 "minimum" : 0,
7aacca6f 340 "optional" : 1,
44660702 341 "type" : "integer"
56122987 342 },
44660702
DM
343 "group" : {
344 "description" : "Security Group name.",
345 "maxLength" : 20,
346 "minLength" : 2,
7aacca6f 347 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702
DM
348 "type" : "string"
349 },
350 "iface" : {
351 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
352 "format" : "pve-iface",
353 "maxLength" : 20,
7aacca6f 354 "minLength" : 2,
44660702
DM
355 "optional" : 1,
356 "type" : "string"
56122987 357 },
7aacca6f 358 "macro" : {
44660702 359 "maxLength" : 128,
7aacca6f 360 "optional" : 1,
44660702 361 "type" : "string"
7aacca6f
DM
362 },
363 "pos" : {
364 "description" : "Update rule at position <pos>.",
44660702 365 "minimum" : 0,
56122987 366 "optional" : 1,
44660702 367 "type" : "integer"
7aacca6f
DM
368 },
369 "proto" : {
370 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
44660702 371 "format" : "pve-fw-protocol-spec",
7aacca6f 372 "optional" : 1,
44660702
DM
373 "type" : "string"
374 },
375 "source" : {
376 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
377 "format" : "pve-fw-addr-spec",
378 "optional" : 1,
379 "type" : "string"
380 },
381 "sport" : {
382 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
383 "format" : "pve-fw-sport-spec",
384 "optional" : 1,
385 "type" : "string"
386 },
387 "type" : {
388 "enum" : [
389 "in",
390 "out",
391 "group"
392 ],
393 "optional" : 0,
394 "type" : "string"
56122987 395 }
44660702 396 }
56122987 397 },
56122987
DM
398 "permissions" : {
399 "check" : [
400 "perm",
401 "/",
402 [
403 "Sys.Modify"
404 ]
405 ]
406 },
44660702
DM
407 "protected" : 1,
408 "proxyto" : null,
56122987
DM
409 "returns" : {
410 "type" : "null"
7aacca6f 411 }
44660702
DM
412 }
413 },
414 "leaf" : 0,
415 "path" : "/cluster/firewall/groups/{group}",
416 "text" : "{group}"
417 }
418 ],
419 "info" : {
420 "GET" : {
421 "description" : "List security groups.",
422 "method" : "GET",
423 "name" : "list_security_groups",
424 "parameters" : {
425 "additionalProperties" : 0
426 },
427 "permissions" : {
428 "user" : "all"
429 },
430 "returns" : {
431 "items" : {
432 "properties" : {
433 "comment" : {
434 "optional" : 1,
435 "type" : "string"
436 },
437 "digest" : {
438 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
439 "maxLength" : 40,
440 "optional" : 0,
441 "type" : "string"
442 },
443 "group" : {
444 "description" : "Security Group name.",
445 "maxLength" : 20,
446 "minLength" : 2,
447 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
448 "type" : "string"
449 }
450 },
451 "type" : "object"
56122987 452 },
44660702
DM
453 "links" : [
454 {
455 "href" : "{group}",
456 "rel" : "child"
457 }
458 ],
459 "type" : "array"
460 }
461 },
462 "POST" : {
463 "description" : "Create new security group.",
464 "method" : "POST",
465 "name" : "create_security_group",
466 "parameters" : {
467 "additionalProperties" : 0,
468 "properties" : {
469 "comment" : {
470 "optional" : 1,
471 "type" : "string"
472 },
473 "digest" : {
474 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
475 "maxLength" : 40,
476 "optional" : 1,
477 "type" : "string"
478 },
479 "group" : {
480 "description" : "Security Group name.",
481 "maxLength" : 20,
482 "minLength" : 2,
483 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
484 "type" : "string"
485 },
486 "rename" : {
487 "description" : "Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.",
488 "maxLength" : 20,
489 "minLength" : 2,
490 "optional" : 1,
491 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
492 "type" : "string"
493 }
494 }
495 },
496 "permissions" : {
497 "check" : [
498 "perm",
499 "/",
500 [
501 "Sys.Modify"
502 ]
503 ]
504 },
505 "protected" : 1,
506 "returns" : {
507 "type" : "null"
508 }
509 }
510 },
511 "leaf" : 0,
512 "path" : "/cluster/firewall/groups",
513 "text" : "groups"
514 },
515 {
516 "children" : [
517 {
518 "info" : {
7aacca6f 519 "DELETE" : {
44660702
DM
520 "description" : "Delete rule.",
521 "method" : "DELETE",
522 "name" : "delete_rule",
523 "parameters" : {
524 "additionalProperties" : 0,
525 "properties" : {
526 "digest" : {
527 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
528 "maxLength" : 40,
529 "optional" : 1,
530 "type" : "string"
531 },
532 "pos" : {
533 "description" : "Update rule at position <pos>.",
534 "minimum" : 0,
535 "optional" : 1,
536 "type" : "integer"
537 }
538 }
539 },
56122987
DM
540 "permissions" : {
541 "check" : [
542 "perm",
543 "/",
544 [
7aacca6f 545 "Sys.Modify"
56122987
DM
546 ]
547 ]
548 },
44660702 549 "protected" : 1,
56122987
DM
550 "proxyto" : null,
551 "returns" : {
7aacca6f 552 "type" : "null"
44660702
DM
553 }
554 },
555 "GET" : {
556 "description" : "Get single rule data.",
557 "method" : "GET",
558 "name" : "get_rule",
56122987
DM
559 "parameters" : {
560 "additionalProperties" : 0,
561 "properties" : {
562 "pos" : {
7aacca6f 563 "description" : "Update rule at position <pos>.",
44660702 564 "minimum" : 0,
56122987 565 "optional" : 1,
44660702 566 "type" : "integer"
7aacca6f
DM
567 }
568 }
569 },
7aacca6f
DM
570 "permissions" : {
571 "check" : [
572 "perm",
573 "/",
574 [
575 "Sys.Audit"
576 ]
577 ]
56122987 578 },
44660702
DM
579 "proxyto" : null,
580 "returns" : {
7aacca6f 581 "properties" : {
44660702
DM
582 "pos" : {
583 "type" : "integer"
7aacca6f 584 }
44660702
DM
585 },
586 "type" : "object"
587 }
56122987 588 },
44660702
DM
589 "PUT" : {
590 "description" : "Modify rule data.",
591 "method" : "PUT",
592 "name" : "update_rule",
7aacca6f
DM
593 "parameters" : {
594 "additionalProperties" : 0,
595 "properties" : {
44660702
DM
596 "action" : {
597 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
598 "maxLength" : 20,
599 "minLength" : 2,
600 "optional" : 1,
601 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
602 "type" : "string"
7aacca6f 603 },
44660702
DM
604 "comment" : {
605 "optional" : 1,
606 "type" : "string"
7aacca6f 607 },
44660702
DM
608 "delete" : {
609 "description" : "A list of settings you want to delete.",
610 "format" : "pve-configid-list",
611 "optional" : 1,
612 "type" : "string"
613 },
614 "dest" : {
615 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
616 "format" : "pve-fw-addr-spec",
617 "optional" : 1,
618 "type" : "string"
619 },
620 "digest" : {
621 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
622 "maxLength" : 40,
623 "optional" : 1,
624 "type" : "string"
625 },
626 "dport" : {
627 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
628 "format" : "pve-fw-dport-spec",
629 "optional" : 1,
630 "type" : "string"
631 },
632 "enable" : {
633 "minimum" : 0,
634 "optional" : 1,
635 "type" : "integer"
636 },
637 "iface" : {
638 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
639 "format" : "pve-iface",
640 "maxLength" : 20,
7aacca6f 641 "minLength" : 2,
44660702
DM
642 "optional" : 1,
643 "type" : "string"
7aacca6f 644 },
44660702
DM
645 "macro" : {
646 "maxLength" : 128,
647 "optional" : 1,
648 "type" : "string"
649 },
650 "moveto" : {
651 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
652 "minimum" : 0,
653 "optional" : 1,
654 "type" : "integer"
655 },
656 "pos" : {
657 "description" : "Update rule at position <pos>.",
658 "minimum" : 0,
659 "optional" : 1,
660 "type" : "integer"
661 },
662 "proto" : {
663 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
664 "format" : "pve-fw-protocol-spec",
665 "optional" : 1,
666 "type" : "string"
667 },
668 "source" : {
669 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
670 "format" : "pve-fw-addr-spec",
671 "optional" : 1,
672 "type" : "string"
673 },
674 "sport" : {
675 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
676 "format" : "pve-fw-sport-spec",
677 "optional" : 1,
678 "type" : "string"
679 },
680 "type" : {
681 "enum" : [
682 "in",
683 "out",
684 "group"
685 ],
686 "optional" : 1,
687 "type" : "string"
7aacca6f 688 }
56122987
DM
689 }
690 },
7aacca6f
DM
691 "permissions" : {
692 "check" : [
693 "perm",
694 "/",
695 [
696 "Sys.Modify"
697 ]
698 ]
699 },
44660702
DM
700 "protected" : 1,
701 "proxyto" : null,
702 "returns" : {
703 "type" : "null"
704 }
7aacca6f 705 }
56122987 706 },
44660702
DM
707 "leaf" : 1,
708 "path" : "/cluster/firewall/rules/{pos}",
709 "text" : "{pos}"
7aacca6f
DM
710 }
711 ],
7aacca6f 712 "info" : {
44660702
DM
713 "GET" : {
714 "description" : "List rules.",
715 "method" : "GET",
716 "name" : "get_rules",
7aacca6f 717 "parameters" : {
44660702 718 "additionalProperties" : 0
7aacca6f
DM
719 },
720 "permissions" : {
721 "check" : [
722 "perm",
723 "/",
724 [
44660702 725 "Sys.Audit"
7aacca6f
DM
726 ]
727 ]
728 },
44660702 729 "proxyto" : null,
7aacca6f 730 "returns" : {
7aacca6f
DM
731 "items" : {
732 "properties" : {
44660702
DM
733 "pos" : {
734 "type" : "integer"
7aacca6f
DM
735 }
736 },
737 "type" : "object"
56122987 738 },
7aacca6f
DM
739 "links" : [
740 {
44660702 741 "href" : "{pos}",
7aacca6f
DM
742 "rel" : "child"
743 }
44660702
DM
744 ],
745 "type" : "array"
7aacca6f 746 }
44660702 747 },
7aacca6f 748 "POST" : {
44660702 749 "description" : "Create new rule.",
7aacca6f 750 "method" : "POST",
44660702 751 "name" : "create_rule",
7aacca6f
DM
752 "parameters" : {
753 "additionalProperties" : 0,
754 "properties" : {
44660702
DM
755 "action" : {
756 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
757 "maxLength" : 20,
7aacca6f 758 "minLength" : 2,
44660702
DM
759 "optional" : 0,
760 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
761 "type" : "string"
7aacca6f
DM
762 },
763 "comment" : {
764 "optional" : 1,
765 "type" : "string"
44660702
DM
766 },
767 "dest" : {
768 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
769 "format" : "pve-fw-addr-spec",
770 "optional" : 1,
771 "type" : "string"
772 },
773 "digest" : {
774 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
775 "maxLength" : 40,
776 "optional" : 1,
777 "type" : "string"
778 },
779 "dport" : {
780 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
781 "format" : "pve-fw-dport-spec",
782 "optional" : 1,
783 "type" : "string"
784 },
785 "enable" : {
786 "minimum" : 0,
787 "optional" : 1,
788 "type" : "integer"
789 },
790 "iface" : {
791 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
792 "format" : "pve-iface",
793 "maxLength" : 20,
794 "minLength" : 2,
795 "optional" : 1,
796 "type" : "string"
797 },
798 "macro" : {
799 "maxLength" : 128,
800 "optional" : 1,
801 "type" : "string"
802 },
803 "pos" : {
804 "description" : "Update rule at position <pos>.",
805 "minimum" : 0,
806 "optional" : 1,
807 "type" : "integer"
808 },
809 "proto" : {
810 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
811 "format" : "pve-fw-protocol-spec",
812 "optional" : 1,
813 "type" : "string"
814 },
815 "source" : {
816 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
817 "format" : "pve-fw-addr-spec",
818 "optional" : 1,
819 "type" : "string"
820 },
821 "sport" : {
822 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
823 "format" : "pve-fw-sport-spec",
824 "optional" : 1,
825 "type" : "string"
826 },
827 "type" : {
828 "enum" : [
829 "in",
830 "out",
831 "group"
832 ],
833 "optional" : 0,
834 "type" : "string"
7aacca6f
DM
835 }
836 }
837 },
838 "permissions" : {
839 "check" : [
840 "perm",
841 "/",
842 [
843 "Sys.Modify"
844 ]
845 ]
846 },
44660702
DM
847 "protected" : 1,
848 "proxyto" : null,
7aacca6f 849 "returns" : {
44660702
DM
850 "type" : "null"
851 }
852 }
853 },
854 "leaf" : 0,
855 "path" : "/cluster/firewall/rules",
856 "text" : "rules"
857 },
858 {
859 "children" : [
860 {
861 "children" : [
862 {
863 "info" : {
864 "DELETE" : {
865 "description" : "Remove IP or Network from IPSet.",
866 "method" : "DELETE",
867 "name" : "remove_ip",
868 "parameters" : {
869 "additionalProperties" : 0,
870 "properties" : {
871 "cidr" : {
872 "description" : "Network/IP specification in CIDR format.",
873 "format" : "IPorCIDRorAlias",
874 "type" : "string"
875 },
876 "digest" : {
877 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
878 "maxLength" : 40,
879 "optional" : 1,
880 "type" : "string"
881 },
882 "name" : {
883 "description" : "IP set name.",
884 "maxLength" : 64,
885 "minLength" : 2,
886 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
887 "type" : "string"
888 }
889 }
890 },
891 "permissions" : {
892 "check" : [
893 "perm",
894 "/",
895 [
896 "Sys.Modify"
897 ]
898 ]
899 },
900 "protected" : 1,
901 "returns" : {
902 "type" : "null"
903 }
7aacca6f 904 },
44660702
DM
905 "GET" : {
906 "description" : "Read IP or Network settings from IPSet.",
907 "method" : "GET",
908 "name" : "read_ip",
909 "parameters" : {
910 "additionalProperties" : 0,
911 "properties" : {
912 "cidr" : {
913 "description" : "Network/IP specification in CIDR format.",
914 "format" : "IPorCIDRorAlias",
915 "type" : "string"
916 },
917 "name" : {
918 "description" : "IP set name.",
919 "maxLength" : 64,
920 "minLength" : 2,
921 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
922 "type" : "string"
923 }
924 }
925 },
926 "permissions" : {
927 "check" : [
928 "perm",
929 "/",
930 [
931 "Sys.Audit"
932 ]
933 ]
934 },
935 "protected" : 1,
936 "returns" : {
937 "type" : "object"
938 }
7aacca6f 939 },
44660702
DM
940 "PUT" : {
941 "description" : "Update IP or Network settings",
942 "method" : "PUT",
943 "name" : "update_ip",
944 "parameters" : {
945 "additionalProperties" : 0,
946 "properties" : {
947 "cidr" : {
948 "description" : "Network/IP specification in CIDR format.",
949 "format" : "IPorCIDRorAlias",
950 "type" : "string"
951 },
952 "comment" : {
953 "optional" : 1,
954 "type" : "string"
955 },
956 "digest" : {
957 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
958 "maxLength" : 40,
959 "optional" : 1,
960 "type" : "string"
961 },
962 "name" : {
963 "description" : "IP set name.",
964 "maxLength" : 64,
965 "minLength" : 2,
966 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
967 "type" : "string"
968 },
969 "nomatch" : {
970 "optional" : 1,
971 "type" : "boolean"
972 }
973 }
974 },
975 "permissions" : {
976 "check" : [
977 "perm",
978 "/",
979 [
980 "Sys.Modify"
981 ]
982 ]
983 },
984 "protected" : 1,
985 "returns" : {
986 "type" : "null"
987 }
7aacca6f
DM
988 }
989 },
44660702
DM
990 "leaf" : 1,
991 "path" : "/cluster/firewall/ipset/{name}/{cidr}",
992 "text" : "{cidr}"
7aacca6f 993 }
44660702 994 ],
7aacca6f
DM
995 "info" : {
996 "DELETE" : {
44660702
DM
997 "description" : "Delete IPSet",
998 "method" : "DELETE",
999 "name" : "delete_ipset",
56122987 1000 "parameters" : {
44660702 1001 "additionalProperties" : 0,
56122987
DM
1002 "properties" : {
1003 "name" : {
44660702 1004 "description" : "IP set name.",
56122987 1005 "maxLength" : 64,
44660702 1006 "minLength" : 2,
56122987 1007 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 1008 "type" : "string"
56122987 1009 }
44660702 1010 }
7aacca6f 1011 },
56122987
DM
1012 "permissions" : {
1013 "check" : [
1014 "perm",
1015 "/",
1016 [
1017 "Sys.Modify"
1018 ]
1019 ]
1020 },
7aacca6f
DM
1021 "protected" : 1,
1022 "returns" : {
1023 "type" : "null"
44660702 1024 }
7aacca6f 1025 },
44660702
DM
1026 "GET" : {
1027 "description" : "List IPSet content",
1028 "method" : "GET",
1029 "name" : "get_ipset",
56122987
DM
1030 "parameters" : {
1031 "additionalProperties" : 0,
1032 "properties" : {
7aacca6f 1033 "name" : {
44660702 1034 "description" : "IP set name.",
7aacca6f 1035 "maxLength" : 64,
7aacca6f 1036 "minLength" : 2,
44660702 1037 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 1038 "type" : "string"
56122987 1039 }
7aacca6f 1040 }
56122987 1041 },
56122987
DM
1042 "permissions" : {
1043 "check" : [
1044 "perm",
1045 "/",
1046 [
44660702 1047 "Sys.Audit"
56122987
DM
1048 ]
1049 ]
44660702
DM
1050 },
1051 "returns" : {
1052 "items" : {
1053 "properties" : {
1054 "cidr" : {
1055 "type" : "string"
1056 },
1057 "comment" : {
1058 "optional" : 1,
1059 "type" : "string"
1060 },
1061 "digest" : {
1062 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1063 "maxLength" : 40,
1064 "optional" : 0,
1065 "type" : "string"
1066 },
1067 "nomatch" : {
1068 "optional" : 1,
1069 "type" : "boolean"
1070 }
1071 },
1072 "type" : "object"
1073 },
1074 "links" : [
1075 {
1076 "href" : "{cidr}",
1077 "rel" : "child"
1078 }
1079 ],
1080 "type" : "array"
7aacca6f
DM
1081 }
1082 },
44660702
DM
1083 "POST" : {
1084 "description" : "Add IP or Network to IPSet.",
1085 "method" : "POST",
1086 "name" : "create_ip",
56122987
DM
1087 "parameters" : {
1088 "additionalProperties" : 0,
1089 "properties" : {
44660702
DM
1090 "cidr" : {
1091 "description" : "Network/IP specification in CIDR format.",
1092 "format" : "IPorCIDRorAlias",
1093 "type" : "string"
1094 },
1095 "comment" : {
1096 "optional" : 1,
1097 "type" : "string"
1098 },
1099 "name" : {
1100 "description" : "IP set name.",
1101 "maxLength" : 64,
1102 "minLength" : 2,
1103 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1104 "type" : "string"
1105 },
1106 "nomatch" : {
1107 "optional" : 1,
1108 "type" : "boolean"
56122987
DM
1109 }
1110 }
1111 },
56122987
DM
1112 "permissions" : {
1113 "check" : [
1114 "perm",
1115 "/",
1116 [
44660702 1117 "Sys.Modify"
56122987
DM
1118 ]
1119 ]
1120 },
44660702 1121 "protected" : 1,
56122987 1122 "returns" : {
44660702
DM
1123 "type" : "null"
1124 }
56122987
DM
1125 }
1126 },
44660702
DM
1127 "leaf" : 0,
1128 "path" : "/cluster/firewall/ipset/{name}",
1129 "text" : "{name}"
56122987
DM
1130 }
1131 ],
56122987 1132 "info" : {
44660702
DM
1133 "GET" : {
1134 "description" : "List IPSets",
1135 "method" : "GET",
1136 "name" : "ipset_index",
56122987 1137 "parameters" : {
7aacca6f 1138 "additionalProperties" : 0
56122987 1139 },
56122987
DM
1140 "permissions" : {
1141 "check" : [
1142 "perm",
1143 "/",
1144 [
7aacca6f 1145 "Sys.Audit"
56122987
DM
1146 ]
1147 ]
1148 },
56122987
DM
1149 "returns" : {
1150 "items" : {
1151 "properties" : {
44660702
DM
1152 "comment" : {
1153 "optional" : 1,
1154 "type" : "string"
56122987 1155 },
44660702
DM
1156 "digest" : {
1157 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1158 "maxLength" : 40,
1159 "optional" : 0,
1160 "type" : "string"
1161 },
1162 "name" : {
1163 "description" : "IP set name.",
1164 "maxLength" : 64,
1165 "minLength" : 2,
1166 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 1167 "type" : "string"
56122987
DM
1168 }
1169 },
1170 "type" : "object"
44660702
DM
1171 },
1172 "links" : [
1173 {
1174 "href" : "{name}",
1175 "rel" : "child"
1176 }
1177 ],
1178 "type" : "array"
56122987 1179 }
44660702
DM
1180 },
1181 "POST" : {
1182 "description" : "Create new IPSet",
1183 "method" : "POST",
1184 "name" : "create_ipset",
7aacca6f
DM
1185 "parameters" : {
1186 "additionalProperties" : 0,
1187 "properties" : {
44660702
DM
1188 "comment" : {
1189 "optional" : 1,
1190 "type" : "string"
1191 },
1192 "digest" : {
1193 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1194 "maxLength" : 40,
1195 "optional" : 1,
1196 "type" : "string"
1197 },
1198 "name" : {
1199 "description" : "IP set name.",
1200 "maxLength" : 64,
1201 "minLength" : 2,
1202 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1203 "type" : "string"
1204 },
1205 "rename" : {
1206 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
1207 "maxLength" : 64,
1208 "minLength" : 2,
1209 "optional" : 1,
1210 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1211 "type" : "string"
7aacca6f
DM
1212 }
1213 }
1214 },
56122987
DM
1215 "permissions" : {
1216 "check" : [
1217 "perm",
1218 "/",
1219 [
44660702 1220 "Sys.Modify"
56122987
DM
1221 ]
1222 ]
1223 },
44660702 1224 "protected" : 1,
56122987 1225 "returns" : {
44660702
DM
1226 "type" : "null"
1227 }
56122987 1228 }
7aacca6f 1229 },
44660702
DM
1230 "leaf" : 0,
1231 "path" : "/cluster/firewall/ipset",
1232 "text" : "ipset"
1233 },
56122987 1234 {
44660702
DM
1235 "children" : [
1236 {
1237 "info" : {
1238 "DELETE" : {
1239 "description" : "Remove IP or Network alias.",
1240 "method" : "DELETE",
1241 "name" : "remove_alias",
1242 "parameters" : {
1243 "additionalProperties" : 0,
1244 "properties" : {
1245 "digest" : {
1246 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1247 "maxLength" : 40,
1248 "optional" : 1,
1249 "type" : "string"
1250 },
1251 "name" : {
1252 "description" : "Alias name.",
1253 "maxLength" : 64,
1254 "minLength" : 2,
1255 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1256 "type" : "string"
1257 }
1258 }
1259 },
1260 "permissions" : {
1261 "check" : [
1262 "perm",
1263 "/",
1264 [
1265 "Sys.Modify"
1266 ]
1267 ]
1268 },
1269 "protected" : 1,
1270 "returns" : {
1271 "type" : "null"
1272 }
1273 },
1274 "GET" : {
1275 "description" : "Read alias.",
1276 "method" : "GET",
1277 "name" : "read_alias",
1278 "parameters" : {
1279 "additionalProperties" : 0,
1280 "properties" : {
1281 "name" : {
1282 "description" : "Alias name.",
1283 "maxLength" : 64,
1284 "minLength" : 2,
1285 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1286 "type" : "string"
1287 }
1288 }
1289 },
1290 "permissions" : {
1291 "check" : [
1292 "perm",
1293 "/",
1294 [
1295 "Sys.Audit"
1296 ]
1297 ]
1298 },
1299 "returns" : {
1300 "type" : "object"
1301 }
1302 },
1303 "PUT" : {
1304 "description" : "Update IP or Network alias.",
1305 "method" : "PUT",
1306 "name" : "update_alias",
1307 "parameters" : {
1308 "additionalProperties" : 0,
1309 "properties" : {
1310 "cidr" : {
1311 "description" : "Network/IP specification in CIDR format.",
1312 "format" : "IPorCIDR",
1313 "type" : "string"
1314 },
1315 "comment" : {
1316 "optional" : 1,
1317 "type" : "string"
1318 },
1319 "digest" : {
1320 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1321 "maxLength" : 40,
1322 "optional" : 1,
1323 "type" : "string"
1324 },
1325 "name" : {
1326 "description" : "Alias name.",
1327 "maxLength" : 64,
1328 "minLength" : 2,
1329 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1330 "type" : "string"
1331 },
1332 "rename" : {
1333 "description" : "Rename an existing alias.",
1334 "maxLength" : 64,
1335 "minLength" : 2,
1336 "optional" : 1,
1337 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1338 "type" : "string"
1339 }
1340 }
1341 },
1342 "permissions" : {
1343 "check" : [
1344 "perm",
1345 "/",
1346 [
1347 "Sys.Modify"
1348 ]
1349 ]
1350 },
1351 "protected" : 1,
1352 "returns" : {
1353 "type" : "null"
1354 }
1355 }
1356 },
1357 "leaf" : 1,
1358 "path" : "/cluster/firewall/aliases/{name}",
1359 "text" : "{name}"
1360 }
1361 ],
1362 "info" : {
1363 "GET" : {
1364 "description" : "List aliases",
1365 "method" : "GET",
1366 "name" : "get_aliases",
1367 "parameters" : {
1368 "additionalProperties" : 0
1369 },
1370 "permissions" : {
1371 "check" : [
1372 "perm",
1373 "/",
1374 [
1375 "Sys.Audit"
1376 ]
1377 ]
1378 },
1379 "returns" : {
1380 "items" : {
1381 "properties" : {
1382 "cidr" : {
1383 "type" : "string"
1384 },
1385 "comment" : {
1386 "optional" : 1,
1387 "type" : "string"
1388 },
1389 "digest" : {
1390 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1391 "maxLength" : 40,
1392 "optional" : 0,
1393 "type" : "string"
1394 },
1395 "name" : {
1396 "type" : "string"
1397 }
1398 },
1399 "type" : "object"
1400 },
1401 "links" : [
1402 {
1403 "href" : "{name}",
1404 "rel" : "child"
1405 }
1406 ],
1407 "type" : "array"
1408 }
1409 },
1410 "POST" : {
1411 "description" : "Create IP or Network Alias.",
1412 "method" : "POST",
1413 "name" : "create_alias",
56122987
DM
1414 "parameters" : {
1415 "additionalProperties" : 0,
1416 "properties" : {
44660702
DM
1417 "cidr" : {
1418 "description" : "Network/IP specification in CIDR format.",
1419 "format" : "IPorCIDR",
1420 "type" : "string"
1421 },
1422 "comment" : {
1423 "optional" : 1,
1424 "type" : "string"
1425 },
1426 "name" : {
1427 "description" : "Alias name.",
1428 "maxLength" : 64,
1429 "minLength" : 2,
1430 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1431 "type" : "string"
56122987
DM
1432 }
1433 }
1434 },
56122987
DM
1435 "permissions" : {
1436 "check" : [
1437 "perm",
1438 "/",
1439 [
1440 "Sys.Modify"
1441 ]
1442 ]
1443 },
44660702 1444 "protected" : 1,
56122987
DM
1445 "returns" : {
1446 "type" : "null"
1447 }
44660702
DM
1448 }
1449 },
1450 "leaf" : 0,
1451 "path" : "/cluster/firewall/aliases",
1452 "text" : "aliases"
1453 },
1454 {
1455 "info" : {
1456 "GET" : {
1457 "description" : "Get Firewall options.",
1458 "method" : "GET",
1459 "name" : "get_options",
1460 "parameters" : {
1461 "additionalProperties" : 0
7aacca6f 1462 },
56122987
DM
1463 "permissions" : {
1464 "check" : [
1465 "perm",
1466 "/",
1467 [
44660702 1468 "Sys.Audit"
56122987
DM
1469 ]
1470 ]
1471 },
44660702 1472 "returns" : {
56122987 1473 "properties" : {
44660702
DM
1474 "enable" : {
1475 "description" : "Enable or disable the firewall cluster wide.",
1476 "minimum" : 0,
56122987 1477 "optional" : 1,
7aacca6f 1478 "type" : "integer"
56122987 1479 },
44660702
DM
1480 "policy_in" : {
1481 "description" : "Input policy.",
1482 "enum" : [
1483 "ACCEPT",
1484 "REJECT",
1485 "DROP"
1486 ],
56122987 1487 "optional" : 1,
44660702 1488 "type" : "string"
7aacca6f 1489 },
44660702
DM
1490 "policy_out" : {
1491 "description" : "Output policy.",
1492 "enum" : [
1493 "ACCEPT",
1494 "REJECT",
1495 "DROP"
1496 ],
7aacca6f 1497 "optional" : 1,
44660702
DM
1498 "type" : "string"
1499 }
1500 },
1501 "type" : "object"
1502 }
1503 },
1504 "PUT" : {
1505 "description" : "Set Firewall options.",
1506 "method" : "PUT",
1507 "name" : "set_options",
1508 "parameters" : {
1509 "additionalProperties" : 0,
1510 "properties" : {
1511 "delete" : {
1512 "description" : "A list of settings you want to delete.",
1513 "format" : "pve-configid-list",
56122987 1514 "optional" : 1,
44660702 1515 "type" : "string"
56122987 1516 },
44660702
DM
1517 "digest" : {
1518 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1519 "maxLength" : 40,
56122987 1520 "optional" : 1,
44660702 1521 "type" : "string"
56122987 1522 },
44660702
DM
1523 "enable" : {
1524 "description" : "Enable or disable the firewall cluster wide.",
7aacca6f 1525 "minimum" : 0,
56122987 1526 "optional" : 1,
44660702 1527 "type" : "integer"
56122987 1528 },
44660702
DM
1529 "policy_in" : {
1530 "description" : "Input policy.",
56122987 1531 "enum" : [
44660702
DM
1532 "ACCEPT",
1533 "REJECT",
1534 "DROP"
56122987 1535 ],
56122987 1536 "optional" : 1,
44660702 1537 "type" : "string"
56122987 1538 },
44660702
DM
1539 "policy_out" : {
1540 "description" : "Output policy.",
56122987 1541 "enum" : [
44660702
DM
1542 "ACCEPT",
1543 "REJECT",
1544 "DROP"
56122987 1545 ],
7aacca6f 1546 "optional" : 1,
44660702 1547 "type" : "string"
56122987 1548 }
44660702
DM
1549 }
1550 },
1551 "permissions" : {
1552 "check" : [
1553 "perm",
1554 "/",
1555 [
1556 "Sys.Modify"
1557 ]
1558 ]
7aacca6f
DM
1559 },
1560 "protected" : 1,
44660702
DM
1561 "returns" : {
1562 "type" : "null"
1563 }
1564 }
1565 },
1566 "leaf" : 1,
1567 "path" : "/cluster/firewall/options",
1568 "text" : "options"
1569 },
1570 {
1571 "info" : {
7aacca6f 1572 "GET" : {
44660702 1573 "description" : "List available macros",
7aacca6f 1574 "method" : "GET",
44660702
DM
1575 "name" : "get_macros",
1576 "parameters" : {
1577 "additionalProperties" : 0
7aacca6f 1578 },
44660702
DM
1579 "permissions" : {
1580 "user" : "all"
1581 },
1582 "returns" : {
1583 "items" : {
1584 "properties" : {
1585 "descr" : {
1586 "description" : "More verbose description (if available).",
1587 "type" : "string"
1588 },
1589 "macro" : {
1590 "description" : "Macro name.",
1591 "type" : "string"
1592 }
1593 },
1594 "type" : "object"
1595 },
1596 "type" : "array"
1597 }
1598 }
1599 },
1600 "leaf" : 1,
1601 "path" : "/cluster/firewall/macros",
1602 "text" : "macros"
1603 },
1604 {
1605 "info" : {
1606 "GET" : {
1607 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
1608 "method" : "GET",
1609 "name" : "refs",
7aacca6f 1610 "parameters" : {
44660702 1611 "additionalProperties" : 0,
7aacca6f 1612 "properties" : {
44660702
DM
1613 "type" : {
1614 "description" : "Only list references of specified type.",
1615 "enum" : [
1616 "alias",
1617 "ipset"
1618 ],
1619 "optional" : 1,
1620 "type" : "string"
7aacca6f 1621 }
44660702 1622 }
7aacca6f
DM
1623 },
1624 "permissions" : {
1625 "check" : [
1626 "perm",
1627 "/",
1628 [
1629 "Sys.Audit"
1630 ]
1631 ]
1632 },
44660702
DM
1633 "returns" : {
1634 "items" : {
1635 "properties" : {
1636 "comment" : {
1637 "optional" : 1,
1638 "type" : "string"
1639 },
1640 "name" : {
1641 "type" : "string"
1642 },
1643 "ref" : {
1644 "type" : "string"
1645 },
1646 "type" : {
1647 "enum" : [
1648 "alias",
1649 "ipset"
1650 ],
1651 "type" : "string"
1652 }
1653 },
1654 "type" : "object"
1655 },
1656 "type" : "array"
1657 }
56122987
DM
1658 }
1659 },
7aacca6f 1660 "leaf" : 1,
44660702
DM
1661 "path" : "/cluster/firewall/refs",
1662 "text" : "refs"
56122987
DM
1663 }
1664 ],
56122987 1665 "info" : {
44660702
DM
1666 "GET" : {
1667 "description" : "Directory index.",
1668 "method" : "GET",
1669 "name" : "index",
56122987 1670 "parameters" : {
56122987
DM
1671 "additionalProperties" : 0
1672 },
44660702
DM
1673 "permissions" : {
1674 "user" : "all"
1675 },
56122987 1676 "returns" : {
44660702
DM
1677 "items" : {
1678 "properties" : {},
1679 "type" : "object"
1680 },
7aacca6f
DM
1681 "links" : [
1682 {
44660702
DM
1683 "href" : "{name}",
1684 "rel" : "child"
7aacca6f
DM
1685 }
1686 ],
7aacca6f 1687 "type" : "array"
7aacca6f 1688 }
56122987
DM
1689 }
1690 },
44660702
DM
1691 "leaf" : 0,
1692 "path" : "/cluster/firewall",
1693 "text" : "firewall"
7aacca6f
DM
1694 },
1695 {
56122987
DM
1696 "children" : [
1697 {
56122987 1698 "info" : {
44660702
DM
1699 "DELETE" : {
1700 "description" : "Delete vzdump backup job definition.",
1701 "method" : "DELETE",
1702 "name" : "delete_job",
1703 "parameters" : {
1704 "additionalProperties" : 0,
1705 "properties" : {
1706 "id" : {
1707 "description" : "The job ID.",
1708 "maxLength" : 50,
1709 "type" : "string"
1710 }
1711 }
1712 },
1713 "permissions" : {
1714 "check" : [
1715 "perm",
1716 "/",
1717 [
1718 "Sys.Modify"
1719 ]
1720 ]
1721 },
1722 "protected" : 1,
56122987
DM
1723 "returns" : {
1724 "type" : "null"
44660702
DM
1725 }
1726 },
1727 "GET" : {
1728 "description" : "Read vzdump backup job definition.",
1729 "method" : "GET",
1730 "name" : "read_job",
1731 "parameters" : {
1732 "additionalProperties" : 0,
1733 "properties" : {
1734 "id" : {
1735 "description" : "The job ID.",
1736 "maxLength" : 50,
1737 "type" : "string"
1738 }
1739 }
56122987 1740 },
7aacca6f
DM
1741 "permissions" : {
1742 "check" : [
1743 "perm",
1744 "/",
1745 [
44660702 1746 "Sys.Audit"
7aacca6f
DM
1747 ]
1748 ]
1749 },
44660702
DM
1750 "returns" : {
1751 "type" : "object"
1752 }
1753 },
1754 "PUT" : {
1755 "description" : "Update vzdump backup job definition.",
1756 "method" : "PUT",
1757 "name" : "update_job",
56122987 1758 "parameters" : {
44660702 1759 "additionalProperties" : 0,
56122987 1760 "properties" : {
44660702
DM
1761 "all" : {
1762 "default" : 0,
1763 "description" : "Backup all known guest systems on this host.",
7aacca6f 1764 "optional" : 1,
44660702 1765 "type" : "boolean"
7aacca6f 1766 },
44660702
DM
1767 "bwlimit" : {
1768 "default" : 0,
1769 "description" : "Limit I/O bandwidth (KBytes per second).",
1770 "minimum" : 0,
1771 "optional" : 1,
1772 "type" : "integer"
1773 },
1774 "compress" : {
1775 "default" : "0",
1776 "description" : "Compress dump file.",
7aacca6f 1777 "enum" : [
44660702
DM
1778 "0",
1779 "1",
1780 "gzip",
1781 "lzo"
7aacca6f 1782 ],
44660702
DM
1783 "optional" : 1,
1784 "type" : "string"
7aacca6f 1785 },
44660702
DM
1786 "delete" : {
1787 "description" : "A list of settings you want to delete.",
1788 "format" : "pve-configid-list",
7aacca6f 1789 "optional" : 1,
44660702 1790 "type" : "string"
56122987 1791 },
44660702
DM
1792 "dow" : {
1793 "description" : "Day of week selection.",
1794 "format" : "pve-day-of-week-list",
7aacca6f 1795 "optional" : 1,
44660702 1796 "type" : "string"
56122987 1797 },
44660702
DM
1798 "dumpdir" : {
1799 "description" : "Store resulting files to specified directory.",
56122987 1800 "optional" : 1,
44660702 1801 "type" : "string"
56122987 1802 },
44660702
DM
1803 "enabled" : {
1804 "default" : "1",
1805 "description" : "Enable or disable the job.",
1806 "optional" : 1,
1807 "type" : "boolean"
1808 },
1809 "exclude" : {
1810 "description" : "Exclude specified guest systems (assumes --all)",
1811 "format" : "pve-vmid-list",
1812 "optional" : 1,
1813 "type" : "string"
1814 },
1815 "exclude-path" : {
1816 "description" : "Exclude certain files/directories (shell globs).",
1817 "format" : "string-alist",
1818 "optional" : 1,
1819 "type" : "string"
1820 },
1821 "id" : {
1822 "description" : "The job ID.",
1823 "maxLength" : 50,
1824 "type" : "string"
1825 },
1826 "ionice" : {
1827 "default" : 7,
1828 "description" : "Set CFQ ionice priority.",
1829 "maximum" : 8,
1830 "minimum" : 0,
1831 "optional" : 1,
1832 "type" : "integer"
1833 },
1834 "lockwait" : {
1835 "default" : 180,
1836 "description" : "Maximal time to wait for the global lock (minutes).",
1837 "minimum" : 0,
1838 "optional" : 1,
1839 "type" : "integer"
1840 },
1841 "mailnotification" : {
1842 "default" : "always",
1843 "description" : "Specify when to send an email",
56122987 1844 "enum" : [
44660702
DM
1845 "always",
1846 "failure"
56122987 1847 ],
44660702
DM
1848 "optional" : 1,
1849 "type" : "string"
1850 },
1851 "mailto" : {
1852 "description" : "Comma-separated list of email addresses that should receive email notifications.",
1853 "format" : "string-list",
1854 "optional" : 1,
1855 "type" : "string"
1856 },
1857 "maxfiles" : {
1858 "default" : 1,
1859 "description" : "Maximal number of backup files per guest system.",
1860 "minimum" : 1,
1861 "optional" : 1,
1862 "type" : "integer"
1863 },
1864 "mode" : {
1865 "default" : "snapshot",
1866 "description" : "Backup mode.",
1867 "enum" : [
1868 "snapshot",
1869 "suspend",
1870 "stop"
1871 ],
1872 "optional" : 1,
1873 "type" : "string"
1874 },
1875 "node" : {
1876 "description" : "Only run if executed on this node.",
1877 "format" : "pve-node",
1878 "optional" : 1,
1879 "type" : "string"
1880 },
1881 "pigz" : {
1882 "default" : 0,
1883 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
1884 "optional" : 1,
1885 "type" : "integer"
1886 },
1887 "quiet" : {
1888 "default" : 0,
1889 "description" : "Be quiet.",
1890 "optional" : 1,
1891 "type" : "boolean"
1892 },
1893 "remove" : {
1894 "default" : 1,
1895 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
1896 "optional" : 1,
1897 "type" : "boolean"
1898 },
1899 "script" : {
1900 "description" : "Use specified hook script.",
1901 "optional" : 1,
1902 "type" : "string"
1903 },
1904 "size" : {
1905 "default" : 1024,
1906 "description" : "Unused, will be removed in a future release.",
1907 "minimum" : 500,
1908 "optional" : 1,
1909 "type" : "integer"
1910 },
1911 "starttime" : {
1912 "description" : "Job Start time.",
1913 "pattern" : "\\d{1,2}:\\d{1,2}",
56122987 1914 "type" : "string",
44660702 1915 "typetext" : "HH:MM"
7aacca6f 1916 },
44660702
DM
1917 "stdexcludes" : {
1918 "default" : 1,
1919 "description" : "Exclude temporary files and logs.",
1920 "optional" : 1,
1921 "type" : "boolean"
1922 },
1923 "stop" : {
1924 "default" : 0,
1925 "description" : "Stop runnig backup jobs on this host.",
1926 "optional" : 1,
1927 "type" : "boolean"
1928 },
1929 "stopwait" : {
1930 "default" : 10,
1931 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
1932 "minimum" : 0,
1933 "optional" : 1,
1934 "type" : "integer"
1935 },
1936 "storage" : {
1937 "description" : "Store resulting file to this storage.",
1938 "format" : "pve-storage-id",
1939 "optional" : 1,
7aacca6f 1940 "type" : "string"
56122987 1941 },
44660702
DM
1942 "tmpdir" : {
1943 "description" : "Store temporary files to specified directory.",
1944 "optional" : 1,
1945 "type" : "string"
1946 },
1947 "vmid" : {
1948 "description" : "The ID of the guest system you want to backup.",
1949 "format" : "pve-vmid-list",
1950 "optional" : 1,
1951 "type" : "string"
56122987 1952 }
44660702 1953 }
56122987
DM
1954 },
1955 "permissions" : {
1956 "check" : [
1957 "perm",
1958 "/",
1959 [
44660702 1960 "Sys.Modify"
56122987
DM
1961 ]
1962 ]
1963 },
44660702
DM
1964 "protected" : 1,
1965 "returns" : {
1966 "type" : "null"
7aacca6f 1967 }
56122987
DM
1968 }
1969 },
44660702
DM
1970 "leaf" : 1,
1971 "path" : "/cluster/backup/{id}",
1972 "text" : "{id}"
1973 }
1974 ],
1975 "info" : {
1976 "GET" : {
1977 "description" : "List vzdump backup schedule.",
1978 "method" : "GET",
1979 "name" : "index",
1980 "parameters" : {
1981 "additionalProperties" : 0
1982 },
1983 "permissions" : {
1984 "check" : [
1985 "perm",
1986 "/",
1987 [
1988 "Sys.Audit"
1989 ]
1990 ]
1991 },
1992 "returns" : {
1993 "items" : {
1994 "properties" : {
1995 "id" : {
1996 "type" : "string"
1997 }
1998 },
1999 "type" : "object"
2000 },
2001 "links" : [
2002 {
2003 "href" : "{id}",
2004 "rel" : "child"
2005 }
2006 ],
2007 "type" : "array"
2008 }
2009 },
2010 "POST" : {
2011 "description" : "Create new vzdump backup job.",
2012 "method" : "POST",
2013 "name" : "create_job",
2014 "parameters" : {
2015 "additionalProperties" : 0,
2016 "properties" : {
2017 "all" : {
2018 "default" : 0,
2019 "description" : "Backup all known guest systems on this host.",
2020 "optional" : 1,
2021 "type" : "boolean"
2022 },
2023 "bwlimit" : {
2024 "default" : 0,
2025 "description" : "Limit I/O bandwidth (KBytes per second).",
2026 "minimum" : 0,
2027 "optional" : 1,
2028 "type" : "integer"
2029 },
2030 "compress" : {
2031 "default" : "0",
2032 "description" : "Compress dump file.",
2033 "enum" : [
2034 "0",
2035 "1",
2036 "gzip",
2037 "lzo"
2038 ],
2039 "optional" : 1,
2040 "type" : "string"
2041 },
2042 "dow" : {
2043 "default" : "mon,tue,wed,thu,fri,sat,sun",
2044 "description" : "Day of week selection.",
2045 "format" : "pve-day-of-week-list",
2046 "optional" : 1,
2047 "type" : "string"
2048 },
2049 "dumpdir" : {
2050 "description" : "Store resulting files to specified directory.",
2051 "optional" : 1,
2052 "type" : "string"
2053 },
2054 "enabled" : {
2055 "default" : "1",
2056 "description" : "Enable or disable the job.",
2057 "optional" : 1,
2058 "type" : "boolean"
2059 },
2060 "exclude" : {
2061 "description" : "Exclude specified guest systems (assumes --all)",
2062 "format" : "pve-vmid-list",
2063 "optional" : 1,
2064 "type" : "string"
2065 },
2066 "exclude-path" : {
2067 "description" : "Exclude certain files/directories (shell globs).",
2068 "format" : "string-alist",
2069 "optional" : 1,
2070 "type" : "string"
2071 },
2072 "ionice" : {
2073 "default" : 7,
2074 "description" : "Set CFQ ionice priority.",
2075 "maximum" : 8,
2076 "minimum" : 0,
2077 "optional" : 1,
2078 "type" : "integer"
2079 },
2080 "lockwait" : {
2081 "default" : 180,
2082 "description" : "Maximal time to wait for the global lock (minutes).",
2083 "minimum" : 0,
2084 "optional" : 1,
2085 "type" : "integer"
2086 },
2087 "mailnotification" : {
2088 "default" : "always",
2089 "description" : "Specify when to send an email",
2090 "enum" : [
2091 "always",
2092 "failure"
2093 ],
2094 "optional" : 1,
2095 "type" : "string"
2096 },
2097 "mailto" : {
2098 "description" : "Comma-separated list of email addresses that should receive email notifications.",
2099 "format" : "string-list",
2100 "optional" : 1,
2101 "type" : "string"
2102 },
2103 "maxfiles" : {
2104 "default" : 1,
2105 "description" : "Maximal number of backup files per guest system.",
2106 "minimum" : 1,
2107 "optional" : 1,
2108 "type" : "integer"
2109 },
2110 "mode" : {
2111 "default" : "snapshot",
2112 "description" : "Backup mode.",
2113 "enum" : [
2114 "snapshot",
2115 "suspend",
2116 "stop"
2117 ],
2118 "optional" : 1,
2119 "type" : "string"
2120 },
2121 "node" : {
2122 "description" : "Only run if executed on this node.",
2123 "format" : "pve-node",
2124 "optional" : 1,
2125 "type" : "string"
2126 },
2127 "pigz" : {
2128 "default" : 0,
2129 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
2130 "optional" : 1,
2131 "type" : "integer"
2132 },
2133 "quiet" : {
2134 "default" : 0,
2135 "description" : "Be quiet.",
2136 "optional" : 1,
2137 "type" : "boolean"
2138 },
2139 "remove" : {
2140 "default" : 1,
2141 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
2142 "optional" : 1,
2143 "type" : "boolean"
2144 },
2145 "script" : {
2146 "description" : "Use specified hook script.",
2147 "optional" : 1,
2148 "type" : "string"
2149 },
2150 "size" : {
2151 "default" : 1024,
2152 "description" : "Unused, will be removed in a future release.",
2153 "minimum" : 500,
2154 "optional" : 1,
2155 "type" : "integer"
2156 },
2157 "starttime" : {
2158 "description" : "Job Start time.",
2159 "pattern" : "\\d{1,2}:\\d{1,2}",
2160 "type" : "string",
2161 "typetext" : "HH:MM"
2162 },
2163 "stdexcludes" : {
2164 "default" : 1,
2165 "description" : "Exclude temporary files and logs.",
2166 "optional" : 1,
2167 "type" : "boolean"
2168 },
2169 "stop" : {
2170 "default" : 0,
2171 "description" : "Stop runnig backup jobs on this host.",
2172 "optional" : 1,
2173 "type" : "boolean"
2174 },
2175 "stopwait" : {
2176 "default" : 10,
2177 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
2178 "minimum" : 0,
2179 "optional" : 1,
2180 "type" : "integer"
2181 },
2182 "storage" : {
2183 "description" : "Store resulting file to this storage.",
2184 "format" : "pve-storage-id",
2185 "optional" : 1,
2186 "type" : "string"
2187 },
2188 "tmpdir" : {
2189 "description" : "Store temporary files to specified directory.",
2190 "optional" : 1,
2191 "type" : "string"
2192 },
2193 "vmid" : {
2194 "description" : "The ID of the guest system you want to backup.",
2195 "format" : "pve-vmid-list",
2196 "optional" : 1,
2197 "type" : "string"
2198 }
2199 }
2200 },
2201 "permissions" : {
2202 "check" : [
2203 "perm",
2204 "/",
2205 [
2206 "Sys.Modify"
2207 ]
2208 ]
2209 },
2210 "protected" : 1,
2211 "returns" : {
2212 "type" : "null"
2213 }
2214 }
2215 },
2216 "leaf" : 0,
2217 "path" : "/cluster/backup",
2218 "text" : "backup"
2219 },
2220 {
2221 "children" : [
2222 {
2223 "children" : [
2224 {
2225 "children" : [
56122987 2226 {
56122987
DM
2227 "info" : {
2228 "POST" : {
44660702
DM
2229 "description" : "Request resource migration (online) to another node.",
2230 "method" : "POST",
2231 "name" : "migrate",
56122987 2232 "parameters" : {
7aacca6f 2233 "additionalProperties" : 0,
56122987
DM
2234 "properties" : {
2235 "node" : {
7aacca6f 2236 "description" : "The cluster node name.",
44660702 2237 "format" : "pve-node",
7aacca6f 2238 "type" : "string"
56122987
DM
2239 },
2240 "sid" : {
44660702 2241 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
56122987 2242 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2243 "type" : "string",
44660702 2244 "typetext" : "<type>:<name>"
56122987 2245 }
7aacca6f 2246 }
56122987 2247 },
56122987
DM
2248 "permissions" : {
2249 "check" : [
2250 "perm",
2251 "/",
2252 [
2253 "Sys.Console"
2254 ]
2255 ]
2256 },
7aacca6f 2257 "protected" : 1,
7aacca6f
DM
2258 "returns" : {
2259 "type" : "null"
44660702 2260 }
56122987 2261 }
44660702
DM
2262 },
2263 "leaf" : 1,
2264 "path" : "/cluster/ha/resources/{sid}/migrate",
2265 "text" : "migrate"
2266 },
2267 {
2268 "info" : {
2269 "POST" : {
2270 "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.",
2271 "method" : "POST",
2272 "name" : "relocate",
2273 "parameters" : {
2274 "additionalProperties" : 0,
2275 "properties" : {
2276 "node" : {
2277 "description" : "The cluster node name.",
2278 "format" : "pve-node",
2279 "type" : "string"
2280 },
2281 "sid" : {
2282 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2283 "format" : "pve-ha-resource-or-vm-id",
2284 "type" : "string",
2285 "typetext" : "<type>:<name>"
2286 }
2287 }
2288 },
2289 "permissions" : {
2290 "check" : [
2291 "perm",
2292 "/",
2293 [
2294 "Sys.Console"
2295 ]
2296 ]
2297 },
2298 "protected" : 1,
2299 "returns" : {
2300 "type" : "null"
2301 }
2302 }
2303 },
2304 "leaf" : 1,
2305 "path" : "/cluster/ha/resources/{sid}/relocate",
2306 "text" : "relocate"
2307 }
2308 ],
2309 "info" : {
2310 "DELETE" : {
2311 "description" : "Delete resource configuration.",
2312 "method" : "DELETE",
2313 "name" : "delete",
7aacca6f 2314 "parameters" : {
44660702 2315 "additionalProperties" : 0,
7aacca6f
DM
2316 "properties" : {
2317 "sid" : {
2318 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
44660702 2319 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2320 "type" : "string",
44660702
DM
2321 "typetext" : "<type>:<name>"
2322 }
2323 }
2324 },
2325 "permissions" : {
2326 "check" : [
2327 "perm",
2328 "/",
2329 [
2330 "Sys.Console"
2331 ]
2332 ]
2333 },
2334 "protected" : 1,
2335 "returns" : {
2336 "type" : "null"
2337 }
2338 },
2339 "GET" : {
2340 "description" : "Read resource configuration.",
2341 "method" : "GET",
2342 "name" : "read",
2343 "parameters" : {
2344 "additionalProperties" : 0,
2345 "properties" : {
2346 "sid" : {
2347 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
7aacca6f 2348 "format" : "pve-ha-resource-or-vm-id",
44660702 2349 "type" : "string",
7aacca6f
DM
2350 "typetext" : "<type>:<name>"
2351 }
44660702 2352 }
7aacca6f
DM
2353 },
2354 "permissions" : {
2355 "check" : [
2356 "perm",
2357 "/",
2358 [
2359 "Sys.Audit"
2360 ]
2361 ]
2362 },
44660702 2363 "returns" : {}
7aacca6f 2364 },
56122987 2365 "PUT" : {
44660702 2366 "description" : "Update resource configuration.",
7aacca6f 2367 "method" : "PUT",
44660702 2368 "name" : "update",
56122987
DM
2369 "parameters" : {
2370 "additionalProperties" : 0,
2371 "properties" : {
44660702
DM
2372 "comment" : {
2373 "description" : "Description.",
2374 "maxLength" : 4096,
56122987 2375 "optional" : 1,
44660702 2376 "type" : "string"
56122987 2377 },
7aacca6f
DM
2378 "delete" : {
2379 "description" : "A list of settings you want to delete.",
7aacca6f 2380 "format" : "pve-configid-list",
44660702
DM
2381 "maxLength" : 4096,
2382 "optional" : 1,
2383 "type" : "string"
56122987 2384 },
44660702
DM
2385 "digest" : {
2386 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2387 "maxLength" : 40,
2388 "optional" : 1,
2389 "type" : "string"
56122987 2390 },
44660702
DM
2391 "group" : {
2392 "description" : "The HA group identifier.",
2393 "format" : "pve-configid",
7aacca6f 2394 "optional" : 1,
44660702 2395 "type" : "string"
56122987
DM
2396 },
2397 "max_relocate" : {
7aacca6f 2398 "default" : 1,
56122987 2399 "description" : "Maximal number of service relocate tries when a service failes to start.",
44660702
DM
2400 "minimum" : 0,
2401 "optional" : 1,
2402 "type" : "integer"
7aacca6f 2403 },
44660702
DM
2404 "max_restart" : {
2405 "default" : 1,
2406 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2407 "minimum" : 0,
7aacca6f 2408 "optional" : 1,
44660702
DM
2409 "type" : "integer"
2410 },
2411 "sid" : {
2412 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2413 "format" : "pve-ha-resource-or-vm-id",
2414 "type" : "string",
2415 "typetext" : "<type>:<name>"
7aacca6f
DM
2416 },
2417 "state" : {
44660702
DM
2418 "default" : "enabled",
2419 "description" : "Resource state.",
7aacca6f
DM
2420 "enum" : [
2421 "enabled",
2422 "disabled"
2423 ],
7aacca6f 2424 "optional" : 1,
44660702 2425 "type" : "string"
56122987 2426 }
44660702
DM
2427 },
2428 "type" : "object"
56122987 2429 },
56122987
DM
2430 "permissions" : {
2431 "check" : [
2432 "perm",
2433 "/",
2434 [
2435 "Sys.Console"
2436 ]
2437 ]
2438 },
7aacca6f 2439 "protected" : 1,
56122987
DM
2440 "returns" : {
2441 "type" : "null"
2442 }
2443 }
2444 },
44660702 2445 "leaf" : 0,
7aacca6f 2446 "path" : "/cluster/ha/resources/{sid}",
44660702 2447 "text" : "{sid}"
56122987
DM
2448 }
2449 ],
7aacca6f
DM
2450 "info" : {
2451 "GET" : {
44660702
DM
2452 "description" : "List HA resources.",
2453 "method" : "GET",
2454 "name" : "index",
7aacca6f 2455 "parameters" : {
44660702
DM
2456 "additionalProperties" : 0,
2457 "properties" : {
2458 "type" : {
2459 "description" : "Only list resources of specific type",
2460 "enum" : [
2461 "ct",
2462 "vm"
2463 ],
2464 "optional" : 1,
2465 "type" : "string"
2466 }
2467 }
7aacca6f 2468 },
7aacca6f
DM
2469 "permissions" : {
2470 "check" : [
2471 "perm",
2472 "/",
2473 [
2474 "Sys.Audit"
2475 ]
2476 ]
2477 },
7aacca6f 2478 "returns" : {
7aacca6f 2479 "items" : {
7aacca6f 2480 "properties" : {
44660702 2481 "sid" : {
7aacca6f
DM
2482 "type" : "string"
2483 }
44660702
DM
2484 },
2485 "type" : "object"
7aacca6f
DM
2486 },
2487 "links" : [
2488 {
44660702 2489 "href" : "{sid}",
7aacca6f
DM
2490 "rel" : "child"
2491 }
44660702
DM
2492 ],
2493 "type" : "array"
7aacca6f
DM
2494 }
2495 },
2496 "POST" : {
44660702 2497 "description" : "Create a new HA resource.",
7aacca6f 2498 "method" : "POST",
44660702 2499 "name" : "create",
7aacca6f 2500 "parameters" : {
44660702 2501 "additionalProperties" : 0,
7aacca6f
DM
2502 "properties" : {
2503 "comment" : {
7aacca6f 2504 "description" : "Description.",
44660702 2505 "maxLength" : 4096,
7aacca6f
DM
2506 "optional" : 1,
2507 "type" : "string"
2508 },
44660702
DM
2509 "group" : {
2510 "description" : "The HA group identifier.",
2511 "format" : "pve-configid",
7aacca6f 2512 "optional" : 1,
44660702 2513 "type" : "string"
7aacca6f 2514 },
44660702
DM
2515 "max_relocate" : {
2516 "default" : 1,
2517 "description" : "Maximal number of service relocate tries when a service failes to start.",
2518 "minimum" : 0,
7aacca6f 2519 "optional" : 1,
44660702 2520 "type" : "integer"
7aacca6f 2521 },
44660702
DM
2522 "max_restart" : {
2523 "default" : 1,
2524 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2525 "minimum" : 0,
2526 "optional" : 1,
2527 "type" : "integer"
2528 },
2529 "sid" : {
2530 "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).",
2531 "format" : "pve-ha-resource-or-vm-id",
2532 "type" : "string",
2533 "typetext" : "<type>:<name>"
2534 },
2535 "state" : {
2536 "default" : "enabled",
2537 "description" : "Resource state.",
7aacca6f 2538 "enum" : [
44660702
DM
2539 "enabled",
2540 "disabled"
7aacca6f 2541 ],
7aacca6f
DM
2542 "optional" : 1,
2543 "type" : "string"
2544 },
44660702
DM
2545 "type" : {
2546 "description" : "Resource type.",
2547 "enum" : [
2548 "ct",
2549 "vm"
2550 ],
2551 "optional" : 1,
2552 "type" : "string"
2553 }
7aacca6f 2554 },
44660702 2555 "type" : "object"
7aacca6f
DM
2556 },
2557 "permissions" : {
2558 "check" : [
2559 "perm",
2560 "/",
2561 [
2562 "Sys.Console"
2563 ]
2564 ]
2565 },
44660702
DM
2566 "protected" : 1,
2567 "returns" : {
2568 "type" : "null"
2569 }
7aacca6f
DM
2570 }
2571 },
44660702
DM
2572 "leaf" : 0,
2573 "path" : "/cluster/ha/resources",
2574 "text" : "resources"
2575 },
2576 {
56122987
DM
2577 "children" : [
2578 {
56122987 2579 "info" : {
44660702
DM
2580 "DELETE" : {
2581 "description" : "Delete ha group configuration.",
2582 "method" : "DELETE",
2583 "name" : "delete",
56122987 2584 "parameters" : {
7aacca6f 2585 "additionalProperties" : 0,
56122987 2586 "properties" : {
7aacca6f
DM
2587 "group" : {
2588 "description" : "The HA group identifier.",
44660702
DM
2589 "format" : "pve-configid",
2590 "type" : "string"
56122987 2591 }
7aacca6f 2592 }
56122987 2593 },
56122987
DM
2594 "permissions" : {
2595 "check" : [
2596 "perm",
2597 "/",
2598 [
7aacca6f 2599 "Sys.Console"
56122987
DM
2600 ]
2601 ]
2602 },
44660702 2603 "protected" : 1,
7aacca6f
DM
2604 "returns" : {
2605 "type" : "null"
56122987
DM
2606 }
2607 },
44660702
DM
2608 "GET" : {
2609 "description" : "Read ha group configuration.",
2610 "method" : "GET",
2611 "name" : "read",
56122987 2612 "parameters" : {
44660702 2613 "additionalProperties" : 0,
56122987
DM
2614 "properties" : {
2615 "group" : {
2616 "description" : "The HA group identifier.",
44660702
DM
2617 "format" : "pve-configid",
2618 "type" : "string"
56122987 2619 }
44660702 2620 }
56122987 2621 },
56122987
DM
2622 "permissions" : {
2623 "check" : [
2624 "perm",
2625 "/",
2626 [
44660702 2627 "Sys.Audit"
56122987
DM
2628 ]
2629 ]
2630 },
44660702 2631 "returns" : {}
7aacca6f 2632 },
44660702
DM
2633 "PUT" : {
2634 "description" : "Update ha group configuration.",
2635 "method" : "PUT",
2636 "name" : "update",
7aacca6f 2637 "parameters" : {
44660702 2638 "additionalProperties" : 0,
7aacca6f 2639 "properties" : {
44660702
DM
2640 "comment" : {
2641 "description" : "Description.",
2642 "maxLength" : 4096,
2643 "optional" : 1,
2644 "type" : "string"
2645 },
2646 "delete" : {
2647 "description" : "A list of settings you want to delete.",
2648 "format" : "pve-configid-list",
2649 "maxLength" : 4096,
2650 "optional" : 1,
2651 "type" : "string"
2652 },
2653 "digest" : {
2654 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2655 "maxLength" : 40,
2656 "optional" : 1,
2657 "type" : "string"
2658 },
7aacca6f
DM
2659 "group" : {
2660 "description" : "The HA group identifier.",
44660702
DM
2661 "format" : "pve-configid",
2662 "type" : "string"
2663 },
2664 "nodes" : {
2665 "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').",
2666 "format" : "pve-ha-group-node-list",
2667 "optional" : 1,
7aacca6f 2668 "type" : "string",
44660702
DM
2669 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2670 },
2671 "nofailback" : {
2672 "default" : 0,
2673 "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.",
2674 "optional" : 1,
2675 "type" : "boolean"
2676 },
2677 "restricted" : {
2678 "default" : 0,
2679 "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.",
2680 "optional" : 1,
2681 "type" : "boolean"
7aacca6f
DM
2682 }
2683 },
44660702 2684 "type" : "object"
7aacca6f 2685 },
7aacca6f
DM
2686 "permissions" : {
2687 "check" : [
2688 "perm",
2689 "/",
2690 [
44660702 2691 "Sys.Console"
7aacca6f
DM
2692 ]
2693 ]
2694 },
44660702
DM
2695 "protected" : 1,
2696 "returns" : {
2697 "type" : "null"
2698 }
56122987
DM
2699 }
2700 },
2701 "leaf" : 1,
44660702
DM
2702 "path" : "/cluster/ha/groups/{group}",
2703 "text" : "{group}"
56122987 2704 }
44660702
DM
2705 ],
2706 "info" : {
2707 "GET" : {
2708 "description" : "Get HA groups.",
2709 "method" : "GET",
2710 "name" : "index",
2711 "parameters" : {
2712 "additionalProperties" : 0
2713 },
2714 "permissions" : {
2715 "check" : [
2716 "perm",
2717 "/",
2718 [
2719 "Sys.Audit"
2720 ]
2721 ]
2722 },
2723 "returns" : {
2724 "items" : {
2725 "properties" : {
2726 "group" : {
2727 "type" : "string"
2728 }
2729 },
2730 "type" : "object"
2731 },
2732 "links" : [
2733 {
2734 "href" : "{group}",
2735 "rel" : "child"
2736 }
2737 ],
2738 "type" : "array"
2739 }
2740 },
2741 "POST" : {
2742 "description" : "Create a new HA group.",
2743 "method" : "POST",
2744 "name" : "create",
2745 "parameters" : {
2746 "additionalProperties" : 0,
2747 "properties" : {
2748 "comment" : {
2749 "description" : "Description.",
2750 "maxLength" : 4096,
2751 "optional" : 1,
2752 "type" : "string"
2753 },
2754 "group" : {
2755 "description" : "The HA group identifier.",
2756 "format" : "pve-configid",
2757 "type" : "string"
2758 },
2759 "nodes" : {
2760 "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').",
2761 "format" : "pve-ha-group-node-list",
2762 "optional" : 0,
2763 "type" : "string",
2764 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2765 },
2766 "nofailback" : {
2767 "default" : 0,
2768 "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.",
2769 "optional" : 1,
2770 "type" : "boolean"
2771 },
2772 "restricted" : {
2773 "default" : 0,
2774 "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.",
2775 "optional" : 1,
2776 "type" : "boolean"
2777 },
2778 "type" : {
2779 "description" : "Group type.",
2780 "enum" : [
2781 "group"
2782 ],
2783 "optional" : 1,
2784 "type" : "string"
2785 }
2786 },
2787 "type" : "object"
2788 },
2789 "permissions" : {
2790 "check" : [
2791 "perm",
2792 "/",
2793 [
2794 "Sys.Console"
2795 ]
2796 ]
2797 },
2798 "protected" : 1,
2799 "returns" : {
2800 "type" : "null"
2801 }
2802 }
2803 },
2804 "leaf" : 0,
2805 "path" : "/cluster/ha/groups",
2806 "text" : "groups"
7aacca6f
DM
2807 },
2808 {
7aacca6f
DM
2809 "children" : [
2810 {
2811 "info" : {
2812 "GET" : {
56122987 2813 "description" : "Get HA manger status.",
44660702 2814 "method" : "GET",
7aacca6f 2815 "name" : "status",
44660702
DM
2816 "parameters" : {
2817 "additionalProperties" : 0
2818 },
56122987
DM
2819 "permissions" : {
2820 "check" : [
2821 "perm",
2822 "/",
2823 [
2824 "Sys.Audit"
2825 ]
2826 ]
7aacca6f 2827 },
44660702
DM
2828 "returns" : {
2829 "type" : "array"
56122987
DM
2830 }
2831 }
7aacca6f 2832 },
7aacca6f 2833 "leaf" : 1,
44660702
DM
2834 "path" : "/cluster/ha/status/current",
2835 "text" : "current"
56122987
DM
2836 },
2837 {
2838 "info" : {
2839 "GET" : {
7aacca6f 2840 "description" : "Get full HA manger status, including LRM status.",
44660702
DM
2841 "method" : "GET",
2842 "name" : "manager_status",
7aacca6f
DM
2843 "parameters" : {
2844 "additionalProperties" : 0
2845 },
56122987
DM
2846 "permissions" : {
2847 "check" : [
2848 "perm",
2849 "/",
2850 [
2851 "Sys.Audit"
2852 ]
2853 ]
44660702
DM
2854 },
2855 "returns" : {
2856 "type" : "object"
7aacca6f 2857 }
56122987
DM
2858 }
2859 },
56122987 2860 "leaf" : 1,
44660702
DM
2861 "path" : "/cluster/ha/status/manager_status",
2862 "text" : "manager_status"
56122987
DM
2863 }
2864 ],
56122987
DM
2865 "info" : {
2866 "GET" : {
44660702 2867 "description" : "Directory index.",
7aacca6f 2868 "method" : "GET",
44660702
DM
2869 "name" : "index",
2870 "parameters" : {
2871 "additionalProperties" : 0
2872 },
2873 "permissions" : {
2874 "user" : "all"
2875 },
56122987 2876 "returns" : {
56122987
DM
2877 "items" : {
2878 "properties" : {},
2879 "type" : "object"
2880 },
2881 "links" : [
2882 {
44660702
DM
2883 "href" : "{name}",
2884 "rel" : "child"
56122987 2885 }
7aacca6f
DM
2886 ],
2887 "type" : "array"
44660702 2888 }
56122987 2889 }
7aacca6f 2890 },
44660702 2891 "leaf" : 0,
7aacca6f 2892 "path" : "/cluster/ha/status",
44660702 2893 "text" : "status"
56122987
DM
2894 }
2895 ],
56122987
DM
2896 "info" : {
2897 "GET" : {
7aacca6f 2898 "description" : "Directory index.",
44660702
DM
2899 "method" : "GET",
2900 "name" : "index",
2901 "parameters" : {
2902 "additionalProperties" : 0
2903 },
7aacca6f
DM
2904 "permissions" : {
2905 "check" : [
2906 "perm",
2907 "/",
2908 [
2909 "Sys.Audit"
2910 ]
2911 ]
2912 },
56122987 2913 "returns" : {
56122987 2914 "items" : {
7aacca6f
DM
2915 "properties" : {
2916 "id" : {
2917 "type" : "string"
2918 }
44660702
DM
2919 },
2920 "type" : "object"
7aacca6f
DM
2921 },
2922 "links" : [
2923 {
2924 "href" : "{id}",
2925 "rel" : "child"
2926 }
44660702
DM
2927 ],
2928 "type" : "array"
7aacca6f
DM
2929 }
2930 }
44660702
DM
2931 },
2932 "leaf" : 0,
2933 "path" : "/cluster/ha",
2934 "text" : "ha"
7aacca6f
DM
2935 },
2936 {
7aacca6f
DM
2937 "info" : {
2938 "GET" : {
2939 "description" : "Read cluster log",
44660702
DM
2940 "method" : "GET",
2941 "name" : "log",
56122987 2942 "parameters" : {
7aacca6f 2943 "additionalProperties" : 0,
56122987
DM
2944 "properties" : {
2945 "max" : {
7aacca6f 2946 "description" : "Maximum number of entries.",
44660702
DM
2947 "minimum" : 1,
2948 "optional" : 1,
2949 "type" : "integer"
56122987 2950 }
7aacca6f 2951 }
56122987 2952 },
44660702
DM
2953 "permissions" : {
2954 "user" : "all"
2955 },
7aacca6f 2956 "returns" : {
7aacca6f 2957 "items" : {
44660702
DM
2958 "properties" : {},
2959 "type" : "object"
2960 },
2961 "type" : "array"
7aacca6f 2962 }
56122987 2963 }
44660702
DM
2964 },
2965 "leaf" : 1,
2966 "path" : "/cluster/log",
2967 "text" : "log"
56122987
DM
2968 },
2969 {
56122987
DM
2970 "info" : {
2971 "GET" : {
44660702 2972 "description" : "Resources index (cluster wide).",
7aacca6f 2973 "method" : "GET",
7aacca6f 2974 "name" : "resources",
56122987
DM
2975 "parameters" : {
2976 "additionalProperties" : 0,
2977 "properties" : {
2978 "type" : {
2979 "enum" : [
2980 "vm",
2981 "storage",
2982 "node"
44660702
DM
2983 ],
2984 "optional" : 1,
2985 "type" : "string"
56122987
DM
2986 }
2987 }
2988 },
44660702
DM
2989 "permissions" : {
2990 "user" : "all"
2991 },
2992 "returns" : {
2993 "items" : {
2994 "properties" : {},
2995 "type" : "object"
2996 },
2997 "type" : "array"
2998 }
56122987
DM
2999 }
3000 },
7aacca6f 3001 "leaf" : 1,
44660702
DM
3002 "path" : "/cluster/resources",
3003 "text" : "resources"
56122987
DM
3004 },
3005 {
56122987
DM
3006 "info" : {
3007 "GET" : {
7aacca6f 3008 "description" : "List recent tasks (cluster wide).",
44660702 3009 "method" : "GET",
7aacca6f 3010 "name" : "tasks",
56122987
DM
3011 "parameters" : {
3012 "additionalProperties" : 0
3013 },
44660702
DM
3014 "permissions" : {
3015 "user" : "all"
3016 },
56122987
DM
3017 "returns" : {
3018 "items" : {
3019 "properties" : {
3020 "upid" : {
3021 "type" : "string"
3022 }
44660702
DM
3023 },
3024 "type" : "object"
3025 },
3026 "type" : "array"
7aacca6f 3027 }
56122987
DM
3028 }
3029 },
7aacca6f 3030 "leaf" : 1,
44660702
DM
3031 "path" : "/cluster/tasks",
3032 "text" : "tasks"
56122987
DM
3033 },
3034 {
56122987 3035 "info" : {
7aacca6f 3036 "GET" : {
44660702
DM
3037 "description" : "Get datacenter options.",
3038 "method" : "GET",
3039 "name" : "get_options",
56122987 3040 "parameters" : {
7aacca6f
DM
3041 "additionalProperties" : 0
3042 },
3043 "permissions" : {
3044 "check" : [
3045 "perm",
3046 "/",
3047 [
3048 "Sys.Audit"
3049 ]
3050 ]
3051 },
7aacca6f 3052 "returns" : {
44660702
DM
3053 "properties" : {},
3054 "type" : "object"
7aacca6f
DM
3055 }
3056 },
3057 "PUT" : {
44660702
DM
3058 "description" : "Set datacenter options.",
3059 "method" : "PUT",
7aacca6f
DM
3060 "name" : "set_options",
3061 "parameters" : {
3062 "additionalProperties" : 0,
3063 "properties" : {
56122987 3064 "console" : {
56122987 3065 "description" : "Select the default Console viewer. You can either use the builtin java applet (VNC), an external virt-viewer comtatible application (SPICE), or an HTML5 based viewer (noVNC).",
56122987
DM
3066 "enum" : [
3067 "applet",
3068 "vv",
3069 "html5"
44660702
DM
3070 ],
3071 "optional" : 1,
3072 "type" : "string"
56122987 3073 },
7aacca6f 3074 "delete" : {
7aacca6f 3075 "description" : "A list of settings you want to delete.",
44660702 3076 "format" : "pve-configid-list",
7aacca6f
DM
3077 "optional" : 1,
3078 "type" : "string"
3079 },
44660702
DM
3080 "email_from" : {
3081 "description" : "Specify email address to send notification from (default is root@$hostname)",
3082 "format" : "email-opt",
7aacca6f 3083 "optional" : 1,
44660702
DM
3084 "type" : "string"
3085 },
3086 "fencing" : {
3087 "default" : "watchdog",
3088 "description" : "Set the fencing mode of the HA cluster. Hardware mode needs a valid configuration of fence devices in /etc/pve/ha/fence.cfg. With both all two modes are used.\n\nWARNING: 'hardware' and 'both' are EXPERIMENTAL & WIP",
7aacca6f 3089 "enum" : [
44660702
DM
3090 "watchdog",
3091 "hardware",
3092 "both"
7aacca6f 3093 ],
44660702
DM
3094 "optional" : 1,
3095 "type" : "string"
3096 },
3097 "http_proxy" : {
3098 "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')",
3099 "optional" : 1,
3100 "pattern" : "http://.*",
3101 "type" : "string"
7aacca6f 3102 },
56122987 3103 "keyboard" : {
44660702 3104 "description" : "Default keybord layout for vnc server.",
56122987 3105 "enum" : [
44660702
DM
3106 "de",
3107 "de-ch",
7aacca6f 3108 "da",
56122987 3109 "en-gb",
44660702
DM
3110 "en-us",
3111 "es",
3112 "fi",
3113 "fr",
3114 "fr-be",
3115 "fr-ca",
3116 "fr-ch",
3117 "hu",
7aacca6f 3118 "is",
44660702
DM
3119 "it",
3120 "ja",
3121 "lt",
56122987 3122 "mk",
7aacca6f 3123 "nl",
56122987 3124 "no",
44660702 3125 "pl",
7aacca6f 3126 "pt",
44660702
DM
3127 "pt-br",
3128 "sv",
3129 "sl",
3130 "tr"
56122987 3131 ],
56122987
DM
3132 "optional" : 1,
3133 "type" : "string"
3134 },
44660702
DM
3135 "language" : {
3136 "description" : "Default GUI language.",
3137 "enum" : [
3138 "en",
3139 "de"
3140 ],
56122987 3141 "optional" : 1,
44660702 3142 "type" : "string"
56122987 3143 },
44660702
DM
3144 "max_workers" : {
3145 "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.",
3146 "minimum" : 1,
56122987 3147 "optional" : 1,
44660702 3148 "type" : "integer"
56122987 3149 },
7aacca6f 3150 "migration_unsecure" : {
44660702 3151 "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration.",
56122987 3152 "optional" : 1,
44660702 3153 "type" : "boolean"
56122987
DM
3154 }
3155 }
3156 },
44660702
DM
3157 "permissions" : {
3158 "check" : [
3159 "perm",
3160 "/",
3161 [
3162 "Sys.Modify"
3163 ]
3164 ]
3165 },
56122987 3166 "protected" : 1,
7aacca6f
DM
3167 "returns" : {
3168 "type" : "null"
44660702 3169 }
7aacca6f
DM
3170 }
3171 },
44660702
DM
3172 "leaf" : 1,
3173 "path" : "/cluster/options",
7aacca6f
DM
3174 "text" : "options"
3175 },
3176 {
7aacca6f 3177 "info" : {
56122987 3178 "GET" : {
44660702
DM
3179 "description" : "Get cluster status informations.",
3180 "method" : "GET",
3181 "name" : "get_status",
56122987
DM
3182 "parameters" : {
3183 "additionalProperties" : 0
3184 },
56122987
DM
3185 "permissions" : {
3186 "check" : [
3187 "perm",
3188 "/",
3189 [
3190 "Sys.Audit"
3191 ]
3192 ]
3193 },
7aacca6f 3194 "protected" : 1,
56122987 3195 "returns" : {
56122987 3196 "items" : {
56122987
DM
3197 "properties" : {
3198 "type" : {
3199 "type" : "string"
3200 }
44660702
DM
3201 },
3202 "type" : "object"
7aacca6f
DM
3203 },
3204 "type" : "array"
56122987
DM
3205 }
3206 }
3207 },
44660702 3208 "leaf" : 1,
7aacca6f 3209 "path" : "/cluster/status",
44660702 3210 "text" : "status"
56122987
DM
3211 },
3212 {
56122987
DM
3213 "info" : {
3214 "GET" : {
56122987 3215 "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.",
44660702
DM
3216 "method" : "GET",
3217 "name" : "nextid",
56122987 3218 "parameters" : {
44660702 3219 "additionalProperties" : 0,
56122987
DM
3220 "properties" : {
3221 "vmid" : {
44660702 3222 "description" : "The (unique) ID of the VM.",
56122987 3223 "format" : "pve-vmid",
7aacca6f 3224 "minimum" : 1,
7aacca6f
DM
3225 "optional" : 1,
3226 "type" : "integer"
56122987 3227 }
44660702 3228 }
56122987 3229 },
7aacca6f
DM
3230 "permissions" : {
3231 "user" : "all"
44660702
DM
3232 },
3233 "returns" : {
3234 "description" : "The next free VMID.",
3235 "type" : "integer"
7aacca6f 3236 }
56122987
DM
3237 }
3238 },
7aacca6f 3239 "leaf" : 1,
44660702
DM
3240 "path" : "/cluster/nextid",
3241 "text" : "nextid"
56122987
DM
3242 }
3243 ],
44660702
DM
3244 "info" : {
3245 "GET" : {
3246 "description" : "Cluster index.",
3247 "method" : "GET",
3248 "name" : "index",
3249 "parameters" : {
3250 "additionalProperties" : 0
3251 },
3252 "permissions" : {
3253 "user" : "all"
3254 },
3255 "returns" : {
3256 "items" : {
3257 "properties" : {},
3258 "type" : "object"
3259 },
3260 "links" : [
3261 {
3262 "href" : "{name}",
3263 "rel" : "child"
3264 }
3265 ],
3266 "type" : "array"
3267 }
3268 }
3269 },
3270 "leaf" : 0,
3271 "path" : "/cluster",
7aacca6f 3272 "text" : "cluster"
56122987
DM
3273 },
3274 {
56122987
DM
3275 "children" : [
3276 {
7aacca6f
DM
3277 "children" : [
3278 {
3279 "children" : [
3280 {
56122987
DM
3281 "children" : [
3282 {
56122987
DM
3283 "children" : [
3284 {
3285 "children" : [
3286 {
56122987
DM
3287 "info" : {
3288 "DELETE" : {
44660702 3289 "description" : "Delete rule.",
7aacca6f 3290 "method" : "DELETE",
44660702 3291 "name" : "delete_rule",
56122987 3292 "parameters" : {
44660702 3293 "additionalProperties" : 0,
56122987 3294 "properties" : {
44660702
DM
3295 "digest" : {
3296 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3297 "maxLength" : 40,
3298 "optional" : 1,
3299 "type" : "string"
3300 },
56122987 3301 "node" : {
7aacca6f 3302 "description" : "The cluster node name.",
44660702
DM
3303 "format" : "pve-node",
3304 "type" : "string"
7aacca6f 3305 },
56122987 3306 "pos" : {
7aacca6f 3307 "description" : "Update rule at position <pos>.",
44660702 3308 "minimum" : 0,
56122987 3309 "optional" : 1,
44660702
DM
3310 "type" : "integer"
3311 },
3312 "vmid" : {
3313 "description" : "The (unique) ID of the VM.",
3314 "format" : "pve-vmid",
3315 "minimum" : 1,
3316 "type" : "integer"
56122987 3317 }
44660702 3318 }
7aacca6f 3319 },
56122987
DM
3320 "permissions" : {
3321 "check" : [
3322 "perm",
3323 "/vms/{vmid}",
3324 [
3325 "VM.Config.Network"
3326 ]
3327 ]
3328 },
44660702
DM
3329 "protected" : 1,
3330 "proxyto" : null,
56122987
DM
3331 "returns" : {
3332 "type" : "null"
44660702
DM
3333 }
3334 },
3335 "GET" : {
3336 "description" : "Get single rule data.",
3337 "method" : "GET",
3338 "name" : "get_rule",
3339 "parameters" : {
3340 "additionalProperties" : 0,
3341 "properties" : {
3342 "node" : {
3343 "description" : "The cluster node name.",
3344 "format" : "pve-node",
3345 "type" : "string"
3346 },
3347 "pos" : {
3348 "description" : "Update rule at position <pos>.",
3349 "minimum" : 0,
3350 "optional" : 1,
3351 "type" : "integer"
3352 },
3353 "vmid" : {
3354 "description" : "The (unique) ID of the VM.",
3355 "format" : "pve-vmid",
3356 "minimum" : 1,
3357 "type" : "integer"
3358 }
3359 }
56122987 3360 },
56122987
DM
3361 "permissions" : {
3362 "check" : [
3363 "perm",
3364 "/vms/{vmid}",
3365 [
44660702 3366 "VM.Audit"
56122987
DM
3367 ]
3368 ]
3369 },
56122987 3370 "proxyto" : null,
44660702
DM
3371 "returns" : {
3372 "properties" : {
3373 "pos" : {
3374 "type" : "integer"
3375 }
3376 },
3377 "type" : "object"
3378 }
3379 },
3380 "PUT" : {
7aacca6f
DM
3381 "description" : "Modify rule data.",
3382 "method" : "PUT",
44660702 3383 "name" : "update_rule",
56122987 3384 "parameters" : {
44660702 3385 "additionalProperties" : 0,
56122987 3386 "properties" : {
44660702
DM
3387 "action" : {
3388 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3389 "maxLength" : 20,
3390 "minLength" : 2,
56122987 3391 "optional" : 1,
44660702 3392 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
3393 "type" : "string"
3394 },
7aacca6f
DM
3395 "comment" : {
3396 "optional" : 1,
3397 "type" : "string"
3398 },
3399 "delete" : {
7aacca6f 3400 "description" : "A list of settings you want to delete.",
44660702
DM
3401 "format" : "pve-configid-list",
3402 "optional" : 1,
3403 "type" : "string"
7aacca6f
DM
3404 },
3405 "dest" : {
44660702 3406 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
7aacca6f 3407 "format" : "pve-fw-addr-spec",
56122987 3408 "optional" : 1,
44660702 3409 "type" : "string"
56122987 3410 },
7aacca6f 3411 "digest" : {
44660702 3412 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 3413 "maxLength" : 40,
56122987 3414 "optional" : 1,
44660702
DM
3415 "type" : "string"
3416 },
3417 "dport" : {
3418 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
3419 "format" : "pve-fw-dport-spec",
3420 "optional" : 1,
3421 "type" : "string"
56122987 3422 },
7aacca6f 3423 "enable" : {
44660702 3424 "minimum" : 0,
56122987 3425 "optional" : 1,
44660702 3426 "type" : "integer"
7aacca6f 3427 },
44660702
DM
3428 "iface" : {
3429 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
3430 "format" : "pve-iface",
3431 "maxLength" : 20,
7aacca6f 3432 "minLength" : 2,
56122987 3433 "optional" : 1,
44660702 3434 "type" : "string"
56122987 3435 },
44660702
DM
3436 "macro" : {
3437 "maxLength" : 128,
56122987 3438 "optional" : 1,
44660702 3439 "type" : "string"
56122987 3440 },
44660702
DM
3441 "moveto" : {
3442 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
3443 "minimum" : 0,
56122987 3444 "optional" : 1,
44660702 3445 "type" : "integer"
56122987 3446 },
44660702
DM
3447 "node" : {
3448 "description" : "The cluster node name.",
3449 "format" : "pve-node",
3450 "type" : "string"
3451 },
3452 "pos" : {
3453 "description" : "Update rule at position <pos>.",
3454 "minimum" : 0,
3455 "optional" : 1,
7aacca6f 3456 "type" : "integer"
56122987 3457 },
44660702
DM
3458 "proto" : {
3459 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3460 "format" : "pve-fw-protocol-spec",
3461 "optional" : 1,
3462 "type" : "string"
7aacca6f 3463 },
44660702
DM
3464 "source" : {
3465 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
3466 "format" : "pve-fw-addr-spec",
56122987 3467 "optional" : 1,
7aacca6f 3468 "type" : "string"
56122987
DM
3469 },
3470 "sport" : {
3471 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
44660702
DM
3472 "format" : "pve-fw-sport-spec",
3473 "optional" : 1,
3474 "type" : "string"
3475 },
3476 "type" : {
3477 "enum" : [
3478 "in",
3479 "out",
3480 "group"
3481 ],
56122987 3482 "optional" : 1,
56122987 3483 "type" : "string"
44660702
DM
3484 },
3485 "vmid" : {
3486 "description" : "The (unique) ID of the VM.",
3487 "format" : "pve-vmid",
3488 "minimum" : 1,
3489 "type" : "integer"
56122987 3490 }
44660702 3491 }
56122987 3492 },
56122987
DM
3493 "permissions" : {
3494 "check" : [
3495 "perm",
3496 "/vms/{vmid}",
3497 [
44660702 3498 "VM.Config.Network"
56122987
DM
3499 ]
3500 ]
7aacca6f 3501 },
44660702 3502 "protected" : 1,
7aacca6f 3503 "proxyto" : null,
7aacca6f 3504 "returns" : {
44660702
DM
3505 "type" : "null"
3506 }
56122987 3507 }
7aacca6f 3508 },
44660702 3509 "leaf" : 1,
7aacca6f 3510 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}",
44660702 3511 "text" : "{pos}"
56122987
DM
3512 }
3513 ],
56122987 3514 "info" : {
44660702
DM
3515 "GET" : {
3516 "description" : "List rules.",
3517 "method" : "GET",
3518 "name" : "get_rules",
3519 "parameters" : {
3520 "additionalProperties" : 0,
3521 "properties" : {
3522 "node" : {
3523 "description" : "The cluster node name.",
3524 "format" : "pve-node",
3525 "type" : "string"
3526 },
3527 "vmid" : {
3528 "description" : "The (unique) ID of the VM.",
3529 "format" : "pve-vmid",
3530 "minimum" : 1,
3531 "type" : "integer"
3532 }
3533 }
56122987 3534 },
56122987
DM
3535 "permissions" : {
3536 "check" : [
3537 "perm",
3538 "/vms/{vmid}",
3539 [
44660702 3540 "VM.Audit"
56122987
DM
3541 ]
3542 ]
7aacca6f 3543 },
44660702
DM
3544 "proxyto" : null,
3545 "returns" : {
3546 "items" : {
3547 "properties" : {
3548 "pos" : {
3549 "type" : "integer"
3550 }
3551 },
3552 "type" : "object"
3553 },
3554 "links" : [
3555 {
3556 "href" : "{pos}",
3557 "rel" : "child"
3558 }
3559 ],
3560 "type" : "array"
3561 }
3562 },
3563 "POST" : {
3564 "description" : "Create new rule.",
7aacca6f 3565 "method" : "POST",
44660702 3566 "name" : "create_rule",
56122987 3567 "parameters" : {
44660702 3568 "additionalProperties" : 0,
56122987 3569 "properties" : {
44660702
DM
3570 "action" : {
3571 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3572 "maxLength" : 20,
3573 "minLength" : 2,
3574 "optional" : 0,
3575 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3576 "type" : "string"
56122987 3577 },
44660702 3578 "comment" : {
56122987 3579 "optional" : 1,
56122987
DM
3580 "type" : "string"
3581 },
44660702
DM
3582 "dest" : {
3583 "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
3584 "format" : "pve-fw-addr-spec",
3585 "optional" : 1,
3586 "type" : "string"
56122987 3587 },
44660702
DM
3588 "digest" : {
3589 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3590 "maxLength" : 40,
56122987 3591 "optional" : 1,
44660702 3592 "type" : "string"
56122987 3593 },
7aacca6f
DM
3594 "dport" : {
3595 "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
44660702 3596 "format" : "pve-fw-dport-spec",
7aacca6f 3597 "optional" : 1,
44660702 3598 "type" : "string"
56122987
DM
3599 },
3600 "enable" : {
3601 "minimum" : 0,
44660702
DM
3602 "optional" : 1,
3603 "type" : "integer"
56122987 3604 },
44660702
DM
3605 "iface" : {
3606 "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.",
3607 "format" : "pve-iface",
3608 "maxLength" : 20,
7aacca6f 3609 "minLength" : 2,
44660702
DM
3610 "optional" : 1,
3611 "type" : "string"
56122987 3612 },
44660702
DM
3613 "macro" : {
3614 "maxLength" : 128,
56122987 3615 "optional" : 1,
44660702 3616 "type" : "string"
7aacca6f 3617 },
44660702
DM
3618 "node" : {
3619 "description" : "The cluster node name.",
3620 "format" : "pve-node",
3621 "type" : "string"
3622 },
3623 "pos" : {
3624 "description" : "Update rule at position <pos>.",
3625 "minimum" : 0,
3626 "optional" : 1,
3627 "type" : "integer"
3628 },
3629 "proto" : {
3630 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3631 "format" : "pve-fw-protocol-spec",
7aacca6f 3632 "optional" : 1,
56122987 3633 "type" : "string"
7aacca6f
DM
3634 },
3635 "source" : {
3636 "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.",
44660702 3637 "format" : "pve-fw-addr-spec",
7aacca6f 3638 "optional" : 1,
44660702 3639 "type" : "string"
7aacca6f 3640 },
44660702
DM
3641 "sport" : {
3642 "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.",
3643 "format" : "pve-fw-sport-spec",
7aacca6f 3644 "optional" : 1,
44660702 3645 "type" : "string"
7aacca6f 3646 },
44660702
DM
3647 "type" : {
3648 "enum" : [
3649 "in",
3650 "out",
3651 "group"
3652 ],
3653 "optional" : 0,
3654 "type" : "string"
7aacca6f 3655 },
7aacca6f 3656 "vmid" : {
44660702 3657 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
3658 "format" : "pve-vmid",
3659 "minimum" : 1,
7aacca6f 3660 "type" : "integer"
7aacca6f
DM
3661 }
3662 }
3663 },
56122987
DM
3664 "permissions" : {
3665 "check" : [
3666 "perm",
3667 "/vms/{vmid}",
3668 [
44660702 3669 "VM.Config.Network"
56122987
DM
3670 ]
3671 ]
3672 },
44660702
DM
3673 "protected" : 1,
3674 "proxyto" : null,
56122987 3675 "returns" : {
44660702
DM
3676 "type" : "null"
3677 }
56122987
DM
3678 }
3679 },
44660702 3680 "leaf" : 0,
7aacca6f 3681 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules",
44660702 3682 "text" : "rules"
56122987
DM
3683 },
3684 {
3685 "children" : [
3686 {
56122987 3687 "info" : {
44660702
DM
3688 "DELETE" : {
3689 "description" : "Remove IP or Network alias.",
3690 "method" : "DELETE",
3691 "name" : "remove_alias",
56122987 3692 "parameters" : {
44660702 3693 "additionalProperties" : 0,
56122987 3694 "properties" : {
44660702
DM
3695 "digest" : {
3696 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3697 "maxLength" : 40,
3698 "optional" : 1,
3699 "type" : "string"
56122987
DM
3700 },
3701 "name" : {
56122987 3702 "description" : "Alias name.",
44660702 3703 "maxLength" : 64,
7aacca6f 3704 "minLength" : 2,
44660702 3705 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
3706 "type" : "string"
3707 },
7aacca6f 3708 "node" : {
44660702 3709 "description" : "The cluster node name.",
7aacca6f 3710 "format" : "pve-node",
44660702
DM
3711 "type" : "string"
3712 },
3713 "vmid" : {
3714 "description" : "The (unique) ID of the VM.",
3715 "format" : "pve-vmid",
3716 "minimum" : 1,
3717 "type" : "integer"
56122987 3718 }
44660702 3719 }
56122987 3720 },
7aacca6f
DM
3721 "permissions" : {
3722 "check" : [
3723 "perm",
3724 "/vms/{vmid}",
3725 [
3726 "VM.Config.Network"
3727 ]
3728 ]
56122987 3729 },
44660702
DM
3730 "protected" : 1,
3731 "returns" : {
3732 "type" : "null"
3733 }
3734 },
3735 "GET" : {
3736 "description" : "Read alias.",
3737 "method" : "GET",
3738 "name" : "read_alias",
56122987 3739 "parameters" : {
44660702 3740 "additionalProperties" : 0,
56122987 3741 "properties" : {
56122987 3742 "name" : {
7aacca6f 3743 "description" : "Alias name.",
44660702 3744 "maxLength" : 64,
56122987 3745 "minLength" : 2,
44660702 3746 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 3747 "type" : "string"
7aacca6f
DM
3748 },
3749 "node" : {
3750 "description" : "The cluster node name.",
44660702
DM
3751 "format" : "pve-node",
3752 "type" : "string"
3753 },
3754 "vmid" : {
3755 "description" : "The (unique) ID of the VM.",
3756 "format" : "pve-vmid",
3757 "minimum" : 1,
3758 "type" : "integer"
56122987 3759 }
44660702 3760 }
56122987 3761 },
44660702
DM
3762 "permissions" : {
3763 "check" : [
3764 "perm",
3765 "/vms/{vmid}",
3766 [
3767 "VM.Audit"
3768 ]
3769 ]
56122987 3770 },
44660702
DM
3771 "returns" : {
3772 "type" : "object"
3773 }
7aacca6f 3774 },
44660702
DM
3775 "PUT" : {
3776 "description" : "Update IP or Network alias.",
3777 "method" : "PUT",
3778 "name" : "update_alias",
56122987
DM
3779 "parameters" : {
3780 "additionalProperties" : 0,
3781 "properties" : {
44660702
DM
3782 "cidr" : {
3783 "description" : "Network/IP specification in CIDR format.",
3784 "format" : "IPorCIDR",
3785 "type" : "string"
3786 },
3787 "comment" : {
3788 "optional" : 1,
3789 "type" : "string"
56122987
DM
3790 },
3791 "digest" : {
44660702 3792 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987
DM
3793 "maxLength" : 40,
3794 "optional" : 1,
44660702 3795 "type" : "string"
56122987 3796 },
7aacca6f 3797 "name" : {
44660702 3798 "description" : "Alias name.",
56122987
DM
3799 "maxLength" : 64,
3800 "minLength" : 2,
3801 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 3802 "type" : "string"
7aacca6f
DM
3803 },
3804 "node" : {
7aacca6f 3805 "description" : "The cluster node name.",
44660702
DM
3806 "format" : "pve-node",
3807 "type" : "string"
3808 },
3809 "rename" : {
3810 "description" : "Rename an existing alias.",
3811 "maxLength" : 64,
3812 "minLength" : 2,
3813 "optional" : 1,
3814 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3815 "type" : "string"
3816 },
3817 "vmid" : {
3818 "description" : "The (unique) ID of the VM.",
3819 "format" : "pve-vmid",
3820 "minimum" : 1,
3821 "type" : "integer"
56122987
DM
3822 }
3823 }
3824 },
7aacca6f
DM
3825 "permissions" : {
3826 "check" : [
3827 "perm",
3828 "/vms/{vmid}",
3829 [
3830 "VM.Config.Network"
3831 ]
3832 ]
3833 },
3834 "protected" : 1,
7aacca6f
DM
3835 "returns" : {
3836 "type" : "null"
44660702 3837 }
56122987
DM
3838 }
3839 },
44660702 3840 "leaf" : 1,
7aacca6f 3841 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}",
44660702 3842 "text" : "{name}"
56122987
DM
3843 }
3844 ],
3845 "info" : {
44660702
DM
3846 "GET" : {
3847 "description" : "List aliases",
3848 "method" : "GET",
3849 "name" : "get_aliases",
56122987 3850 "parameters" : {
44660702 3851 "additionalProperties" : 0,
56122987 3852 "properties" : {
7aacca6f 3853 "node" : {
7aacca6f 3854 "description" : "The cluster node name.",
44660702 3855 "format" : "pve-node",
7aacca6f 3856 "type" : "string"
56122987 3857 },
44660702
DM
3858 "vmid" : {
3859 "description" : "The (unique) ID of the VM.",
3860 "format" : "pve-vmid",
3861 "minimum" : 1,
3862 "type" : "integer"
56122987 3863 }
44660702 3864 }
56122987 3865 },
56122987
DM
3866 "permissions" : {
3867 "check" : [
3868 "perm",
3869 "/vms/{vmid}",
3870 [
44660702 3871 "VM.Audit"
56122987
DM
3872 ]
3873 ]
3874 },
56122987
DM
3875 "returns" : {
3876 "items" : {
3877 "properties" : {
44660702 3878 "cidr" : {
56122987
DM
3879 "type" : "string"
3880 },
44660702
DM
3881 "comment" : {
3882 "optional" : 1,
7aacca6f 3883 "type" : "string"
56122987
DM
3884 },
3885 "digest" : {
56122987 3886 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 3887 "maxLength" : 40,
56122987
DM
3888 "optional" : 0,
3889 "type" : "string"
3890 },
44660702 3891 "name" : {
56122987
DM
3892 "type" : "string"
3893 }
44660702
DM
3894 },
3895 "type" : "object"
56122987 3896 },
56122987
DM
3897 "links" : [
3898 {
3899 "href" : "{name}",
3900 "rel" : "child"
3901 }
44660702
DM
3902 ],
3903 "type" : "array"
3904 }
3905 },
3906 "POST" : {
3907 "description" : "Create IP or Network Alias.",
3908 "method" : "POST",
3909 "name" : "create_alias",
56122987 3910 "parameters" : {
7aacca6f 3911 "additionalProperties" : 0,
56122987 3912 "properties" : {
44660702
DM
3913 "cidr" : {
3914 "description" : "Network/IP specification in CIDR format.",
3915 "format" : "IPorCIDR",
3916 "type" : "string"
3917 },
3918 "comment" : {
3919 "optional" : 1,
3920 "type" : "string"
3921 },
3922 "name" : {
3923 "description" : "Alias name.",
3924 "maxLength" : 64,
3925 "minLength" : 2,
3926 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3927 "type" : "string"
56122987
DM
3928 },
3929 "node" : {
7aacca6f 3930 "description" : "The cluster node name.",
44660702 3931 "format" : "pve-node",
56122987 3932 "type" : "string"
44660702
DM
3933 },
3934 "vmid" : {
3935 "description" : "The (unique) ID of the VM.",
3936 "format" : "pve-vmid",
3937 "minimum" : 1,
3938 "type" : "integer"
56122987 3939 }
7aacca6f 3940 }
56122987 3941 },
44660702
DM
3942 "permissions" : {
3943 "check" : [
3944 "perm",
3945 "/vms/{vmid}",
3946 [
3947 "VM.Config.Network"
3948 ]
3949 ]
3950 },
3951 "protected" : 1,
3952 "returns" : {
3953 "type" : "null"
3954 }
56122987 3955 }
44660702
DM
3956 },
3957 "leaf" : 0,
3958 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases",
3959 "text" : "aliases"
56122987
DM
3960 },
3961 {
56122987
DM
3962 "children" : [
3963 {
7aacca6f
DM
3964 "children" : [
3965 {
3966 "info" : {
3967 "DELETE" : {
44660702 3968 "description" : "Remove IP or Network from IPSet.",
7aacca6f 3969 "method" : "DELETE",
44660702 3970 "name" : "remove_ip",
7aacca6f 3971 "parameters" : {
44660702 3972 "additionalProperties" : 0,
7aacca6f 3973 "properties" : {
44660702
DM
3974 "cidr" : {
3975 "description" : "Network/IP specification in CIDR format.",
3976 "format" : "IPorCIDRorAlias",
3977 "type" : "string"
3978 },
3979 "digest" : {
3980 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3981 "maxLength" : 40,
3982 "optional" : 1,
3983 "type" : "string"
3984 },
7aacca6f 3985 "name" : {
7aacca6f 3986 "description" : "IP set name.",
44660702
DM
3987 "maxLength" : 64,
3988 "minLength" : 2,
7aacca6f 3989 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 3990 "type" : "string"
7aacca6f
DM
3991 },
3992 "node" : {
3993 "description" : "The cluster node name.",
44660702
DM
3994 "format" : "pve-node",
3995 "type" : "string"
7aacca6f
DM
3996 },
3997 "vmid" : {
44660702 3998 "description" : "The (unique) ID of the VM.",
7aacca6f 3999 "format" : "pve-vmid",
44660702
DM
4000 "minimum" : 1,
4001 "type" : "integer"
7aacca6f 4002 }
44660702 4003 }
7aacca6f 4004 },
7aacca6f
DM
4005 "permissions" : {
4006 "check" : [
4007 "perm",
4008 "/vms/{vmid}",
4009 [
4010 "VM.Config.Network"
4011 ]
4012 ]
4013 },
4014 "protected" : 1,
44660702
DM
4015 "returns" : {
4016 "type" : "null"
4017 }
56122987 4018 },
44660702
DM
4019 "GET" : {
4020 "description" : "Read IP or Network settings from IPSet.",
4021 "method" : "GET",
4022 "name" : "read_ip",
7aacca6f 4023 "parameters" : {
44660702 4024 "additionalProperties" : 0,
7aacca6f 4025 "properties" : {
7aacca6f 4026 "cidr" : {
44660702 4027 "description" : "Network/IP specification in CIDR format.",
7aacca6f 4028 "format" : "IPorCIDRorAlias",
44660702 4029 "type" : "string"
7aacca6f
DM
4030 },
4031 "name" : {
7aacca6f 4032 "description" : "IP set name.",
44660702 4033 "maxLength" : 64,
7aacca6f 4034 "minLength" : 2,
44660702
DM
4035 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4036 "type" : "string"
7aacca6f 4037 },
44660702
DM
4038 "node" : {
4039 "description" : "The cluster node name.",
4040 "format" : "pve-node",
7aacca6f
DM
4041 "type" : "string"
4042 },
44660702
DM
4043 "vmid" : {
4044 "description" : "The (unique) ID of the VM.",
4045 "format" : "pve-vmid",
4046 "minimum" : 1,
4047 "type" : "integer"
7aacca6f 4048 }
44660702 4049 }
7aacca6f 4050 },
44660702
DM
4051 "permissions" : {
4052 "check" : [
4053 "perm",
4054 "/vms/{vmid}",
4055 [
4056 "VM.Audit"
4057 ]
4058 ]
4059 },
4060 "protected" : 1,
7aacca6f 4061 "returns" : {
44660702 4062 "type" : "object"
7aacca6f 4063 }
56122987 4064 },
44660702
DM
4065 "PUT" : {
4066 "description" : "Update IP or Network settings",
4067 "method" : "PUT",
4068 "name" : "update_ip",
7aacca6f
DM
4069 "parameters" : {
4070 "additionalProperties" : 0,
4071 "properties" : {
44660702
DM
4072 "cidr" : {
4073 "description" : "Network/IP specification in CIDR format.",
4074 "format" : "IPorCIDRorAlias",
4075 "type" : "string"
4076 },
4077 "comment" : {
4078 "optional" : 1,
4079 "type" : "string"
4080 },
4081 "digest" : {
4082 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4083 "maxLength" : 40,
4084 "optional" : 1,
4085 "type" : "string"
4086 },
7aacca6f 4087 "name" : {
7aacca6f 4088 "description" : "IP set name.",
44660702 4089 "maxLength" : 64,
7aacca6f 4090 "minLength" : 2,
44660702
DM
4091 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4092 "type" : "string"
7aacca6f
DM
4093 },
4094 "node" : {
7aacca6f 4095 "description" : "The cluster node name.",
44660702 4096 "format" : "pve-node",
7aacca6f
DM
4097 "type" : "string"
4098 },
44660702
DM
4099 "nomatch" : {
4100 "optional" : 1,
4101 "type" : "boolean"
7aacca6f
DM
4102 },
4103 "vmid" : {
4104 "description" : "The (unique) ID of the VM.",
44660702 4105 "format" : "pve-vmid",
7aacca6f 4106 "minimum" : 1,
44660702 4107 "type" : "integer"
7aacca6f
DM
4108 }
4109 }
4110 },
4111 "permissions" : {
4112 "check" : [
4113 "perm",
4114 "/vms/{vmid}",
4115 [
44660702 4116 "VM.Config.Network"
7aacca6f
DM
4117 ]
4118 ]
4119 },
7aacca6f 4120 "protected" : 1,
7aacca6f 4121 "returns" : {
44660702 4122 "type" : "null"
7aacca6f 4123 }
56122987 4124 }
7aacca6f 4125 },
7aacca6f 4126 "leaf" : 1,
44660702
DM
4127 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}",
4128 "text" : "{cidr}"
7aacca6f 4129 }
44660702
DM
4130 ],
4131 "info" : {
4132 "DELETE" : {
4133 "description" : "Delete IPSet",
4134 "method" : "DELETE",
4135 "name" : "delete_ipset",
4136 "parameters" : {
4137 "additionalProperties" : 0,
4138 "properties" : {
4139 "name" : {
4140 "description" : "IP set name.",
4141 "maxLength" : 64,
4142 "minLength" : 2,
4143 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4144 "type" : "string"
4145 },
4146 "node" : {
4147 "description" : "The cluster node name.",
4148 "format" : "pve-node",
4149 "type" : "string"
4150 },
4151 "vmid" : {
4152 "description" : "The (unique) ID of the VM.",
4153 "format" : "pve-vmid",
4154 "minimum" : 1,
4155 "type" : "integer"
4156 }
4157 }
7aacca6f 4158 },
44660702
DM
4159 "permissions" : {
4160 "check" : [
4161 "perm",
4162 "/vms/{vmid}",
4163 [
4164 "VM.Config.Network"
4165 ]
4166 ]
7aacca6f 4167 },
44660702
DM
4168 "protected" : 1,
4169 "returns" : {
4170 "type" : "null"
4171 }
4172 },
4173 "GET" : {
4174 "description" : "List IPSet content",
4175 "method" : "GET",
4176 "name" : "get_ipset",
4177 "parameters" : {
4178 "additionalProperties" : 0,
4179 "properties" : {
4180 "name" : {
4181 "description" : "IP set name.",
4182 "maxLength" : 64,
4183 "minLength" : 2,
4184 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4185 "type" : "string"
4186 },
4187 "node" : {
4188 "description" : "The cluster node name.",
4189 "format" : "pve-node",
4190 "type" : "string"
4191 },
4192 "vmid" : {
4193 "description" : "The (unique) ID of the VM.",
4194 "format" : "pve-vmid",
4195 "minimum" : 1,
4196 "type" : "integer"
4197 }
4198 }
7aacca6f 4199 },
44660702
DM
4200 "permissions" : {
4201 "check" : [
4202 "perm",
4203 "/vms/{vmid}",
4204 [
4205 "VM.Audit"
4206 ]
4207 ]
7aacca6f 4208 },
44660702
DM
4209 "returns" : {
4210 "items" : {
4211 "properties" : {
4212 "cidr" : {
4213 "type" : "string"
4214 },
4215 "comment" : {
4216 "optional" : 1,
4217 "type" : "string"
4218 },
4219 "digest" : {
4220 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4221 "maxLength" : 40,
4222 "optional" : 0,
4223 "type" : "string"
4224 },
4225 "nomatch" : {
4226 "optional" : 1,
4227 "type" : "boolean"
4228 }
4229 },
4230 "type" : "object"
4231 },
4232 "links" : [
4233 {
4234 "href" : "{cidr}",
4235 "rel" : "child"
4236 }
4237 ],
4238 "type" : "array"
56122987
DM
4239 }
4240 },
44660702
DM
4241 "POST" : {
4242 "description" : "Add IP or Network to IPSet.",
4243 "method" : "POST",
4244 "name" : "create_ip",
4245 "parameters" : {
4246 "additionalProperties" : 0,
4247 "properties" : {
4248 "cidr" : {
4249 "description" : "Network/IP specification in CIDR format.",
4250 "format" : "IPorCIDRorAlias",
4251 "type" : "string"
4252 },
4253 "comment" : {
4254 "optional" : 1,
4255 "type" : "string"
4256 },
4257 "name" : {
4258 "description" : "IP set name.",
4259 "maxLength" : 64,
4260 "minLength" : 2,
4261 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4262 "type" : "string"
4263 },
4264 "node" : {
4265 "description" : "The cluster node name.",
4266 "format" : "pve-node",
4267 "type" : "string"
4268 },
4269 "nomatch" : {
4270 "optional" : 1,
4271 "type" : "boolean"
4272 },
4273 "vmid" : {
4274 "description" : "The (unique) ID of the VM.",
4275 "format" : "pve-vmid",
4276 "minimum" : 1,
4277 "type" : "integer"
4278 }
4279 }
4280 },
4281 "permissions" : {
4282 "check" : [
4283 "perm",
4284 "/vms/{vmid}",
4285 [
4286 "VM.Config.Network"
4287 ]
4288 ]
4289 },
4290 "protected" : 1,
4291 "returns" : {
4292 "type" : "null"
4293 }
4294 }
4295 },
4296 "leaf" : 0,
4297 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}",
4298 "text" : "{name}"
4299 }
4300 ],
4301 "info" : {
4302 "GET" : {
4303 "description" : "List IPSets",
4304 "method" : "GET",
4305 "name" : "ipset_index",
4306 "parameters" : {
4307 "additionalProperties" : 0,
4308 "properties" : {
4309 "node" : {
4310 "description" : "The cluster node name.",
4311 "format" : "pve-node",
4312 "type" : "string"
4313 },
4314 "vmid" : {
4315 "description" : "The (unique) ID of the VM.",
4316 "format" : "pve-vmid",
4317 "minimum" : 1,
4318 "type" : "integer"
4319 }
4320 }
56122987
DM
4321 },
4322 "permissions" : {
4323 "check" : [
4324 "perm",
4325 "/vms/{vmid}",
4326 [
44660702 4327 "VM.Audit"
56122987
DM
4328 ]
4329 ]
4330 },
7aacca6f 4331 "returns" : {
7aacca6f
DM
4332 "items" : {
4333 "properties" : {
7aacca6f
DM
4334 "comment" : {
4335 "optional" : 1,
4336 "type" : "string"
4337 },
4338 "digest" : {
7aacca6f 4339 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
4340 "maxLength" : 40,
4341 "optional" : 0,
4342 "type" : "string"
4343 },
4344 "name" : {
4345 "description" : "IP set name.",
4346 "maxLength" : 64,
4347 "minLength" : 2,
4348 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4349 "type" : "string"
7aacca6f
DM
4350 }
4351 },
4352 "type" : "object"
4353 },
4354 "links" : [
4355 {
44660702
DM
4356 "href" : "{name}",
4357 "rel" : "child"
7aacca6f 4358 }
44660702
DM
4359 ],
4360 "type" : "array"
4361 }
4362 },
4363 "POST" : {
4364 "description" : "Create new IPSet",
4365 "method" : "POST",
4366 "name" : "create_ipset",
56122987
DM
4367 "parameters" : {
4368 "additionalProperties" : 0,
4369 "properties" : {
44660702
DM
4370 "comment" : {
4371 "optional" : 1,
4372 "type" : "string"
56122987 4373 },
44660702
DM
4374 "digest" : {
4375 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4376 "maxLength" : 40,
4377 "optional" : 1,
4378 "type" : "string"
4379 },
4380 "name" : {
4381 "description" : "IP set name.",
4382 "maxLength" : 64,
4383 "minLength" : 2,
4384 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4385 "type" : "string"
4386 },
4387 "node" : {
4388 "description" : "The cluster node name.",
4389 "format" : "pve-node",
4390 "type" : "string"
4391 },
4392 "rename" : {
4393 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
4394 "maxLength" : 64,
4395 "minLength" : 2,
4396 "optional" : 1,
4397 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4398 "type" : "string"
4399 },
4400 "vmid" : {
4401 "description" : "The (unique) ID of the VM.",
4402 "format" : "pve-vmid",
4403 "minimum" : 1,
4404 "type" : "integer"
4405 }
4406 }
4407 },
7aacca6f
DM
4408 "permissions" : {
4409 "check" : [
4410 "perm",
4411 "/vms/{vmid}",
4412 [
4413 "VM.Config.Network"
4414 ]
4415 ]
4416 },
44660702 4417 "protected" : 1,
56122987 4418 "returns" : {
7aacca6f 4419 "type" : "null"
44660702
DM
4420 }
4421 }
4422 },
4423 "leaf" : 0,
4424 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset",
4425 "text" : "ipset"
4426 },
4427 {
4428 "info" : {
4429 "GET" : {
4430 "description" : "Get VM firewall options.",
4431 "method" : "GET",
4432 "name" : "get_options",
7aacca6f
DM
4433 "parameters" : {
4434 "additionalProperties" : 0,
56122987 4435 "properties" : {
7aacca6f
DM
4436 "node" : {
4437 "description" : "The cluster node name.",
44660702
DM
4438 "format" : "pve-node",
4439 "type" : "string"
7aacca6f 4440 },
44660702
DM
4441 "vmid" : {
4442 "description" : "The (unique) ID of the VM.",
4443 "format" : "pve-vmid",
4444 "minimum" : 1,
4445 "type" : "integer"
4446 }
4447 }
4448 },
4449 "permissions" : {
4450 "check" : [
4451 "perm",
4452 "/vms/{vmid}",
4453 [
4454 "VM.Audit"
4455 ]
4456 ]
4457 },
4458 "proxyto" : "node",
4459 "returns" : {
4460 "properties" : {
4461 "dhcp" : {
4462 "description" : "Enable DHCP.",
56122987 4463 "optional" : 1,
44660702 4464 "type" : "boolean"
56122987 4465 },
44660702
DM
4466 "enable" : {
4467 "description" : "Enable/disable firewall rules.",
7aacca6f 4468 "optional" : 1,
44660702 4469 "type" : "boolean"
56122987 4470 },
44660702
DM
4471 "ipfilter" : {
4472 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
7aacca6f 4473 "optional" : 1,
44660702 4474 "type" : "boolean"
7aacca6f 4475 },
56122987 4476 "log_level_in" : {
7aacca6f 4477 "description" : "Log level for incoming traffic.",
56122987
DM
4478 "enum" : [
4479 "emerg",
4480 "alert",
4481 "crit",
4482 "err",
4483 "warning",
4484 "notice",
4485 "info",
4486 "debug",
4487 "nolog"
4488 ],
56122987
DM
4489 "optional" : 1,
4490 "type" : "string"
4491 },
44660702
DM
4492 "log_level_out" : {
4493 "description" : "Log level for outgoing traffic.",
4494 "enum" : [
4495 "emerg",
4496 "alert",
4497 "crit",
4498 "err",
4499 "warning",
4500 "notice",
4501 "info",
4502 "debug",
4503 "nolog"
4504 ],
4505 "optional" : 1,
4506 "type" : "string"
4507 },
4508 "macfilter" : {
4509 "description" : "Enable/disable MAC address filter.",
56122987 4510 "optional" : 1,
7aacca6f 4511 "type" : "boolean"
56122987
DM
4512 },
4513 "ndp" : {
44660702 4514 "description" : "Enable NDP.",
56122987 4515 "optional" : 1,
44660702 4516 "type" : "boolean"
56122987
DM
4517 },
4518 "policy_in" : {
56122987
DM
4519 "description" : "Input policy.",
4520 "enum" : [
4521 "ACCEPT",
4522 "REJECT",
4523 "DROP"
44660702
DM
4524 ],
4525 "optional" : 1,
4526 "type" : "string"
56122987 4527 },
44660702
DM
4528 "policy_out" : {
4529 "description" : "Output policy.",
4530 "enum" : [
4531 "ACCEPT",
4532 "REJECT",
4533 "DROP"
4534 ],
4535 "optional" : 1,
4536 "type" : "string"
4537 },
4538 "radv" : {
4539 "description" : "Allow sending Router Advertisement.",
4540 "optional" : 1,
4541 "type" : "boolean"
4542 }
4543 },
4544 "type" : "object"
4545 }
4546 },
4547 "PUT" : {
4548 "description" : "Set Firewall options.",
4549 "method" : "PUT",
4550 "name" : "set_options",
4551 "parameters" : {
4552 "additionalProperties" : 0,
4553 "properties" : {
4554 "delete" : {
4555 "description" : "A list of settings you want to delete.",
4556 "format" : "pve-configid-list",
4557 "optional" : 1,
4558 "type" : "string"
4559 },
4560 "dhcp" : {
4561 "description" : "Enable DHCP.",
7aacca6f 4562 "optional" : 1,
44660702 4563 "type" : "boolean"
7aacca6f
DM
4564 },
4565 "digest" : {
4566 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 4567 "maxLength" : 40,
7aacca6f 4568 "optional" : 1,
44660702 4569 "type" : "string"
7aacca6f
DM
4570 },
4571 "enable" : {
4572 "description" : "Enable/disable firewall rules.",
56122987 4573 "optional" : 1,
7aacca6f
DM
4574 "type" : "boolean"
4575 },
44660702
DM
4576 "ipfilter" : {
4577 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
4578 "optional" : 1,
4579 "type" : "boolean"
4580 },
4581 "log_level_in" : {
4582 "description" : "Log level for incoming traffic.",
56122987
DM
4583 "enum" : [
4584 "emerg",
4585 "alert",
4586 "crit",
4587 "err",
4588 "warning",
4589 "notice",
4590 "info",
4591 "debug",
4592 "nolog"
7aacca6f 4593 ],
7aacca6f 4594 "optional" : 1,
44660702 4595 "type" : "string"
7aacca6f 4596 },
44660702
DM
4597 "log_level_out" : {
4598 "description" : "Log level for outgoing traffic.",
56122987
DM
4599 "enum" : [
4600 "emerg",
4601 "alert",
4602 "crit",
4603 "err",
4604 "warning",
4605 "notice",
4606 "info",
4607 "debug",
4608 "nolog"
4609 ],
56122987 4610 "optional" : 1,
44660702 4611 "type" : "string"
56122987
DM
4612 },
4613 "macfilter" : {
56122987 4614 "description" : "Enable/disable MAC address filter.",
7aacca6f
DM
4615 "optional" : 1,
4616 "type" : "boolean"
56122987 4617 },
44660702
DM
4618 "ndp" : {
4619 "description" : "Enable NDP.",
4620 "optional" : 1,
4621 "type" : "boolean"
4622 },
4623 "node" : {
4624 "description" : "The cluster node name.",
4625 "format" : "pve-node",
4626 "type" : "string"
4627 },
56122987 4628 "policy_in" : {
44660702 4629 "description" : "Input policy.",
56122987
DM
4630 "enum" : [
4631 "ACCEPT",
4632 "REJECT",
4633 "DROP"
7aacca6f 4634 ],
56122987 4635 "optional" : 1,
7aacca6f 4636 "type" : "string"
56122987 4637 },
44660702
DM
4638 "policy_out" : {
4639 "description" : "Output policy.",
4640 "enum" : [
4641 "ACCEPT",
4642 "REJECT",
4643 "DROP"
4644 ],
56122987 4645 "optional" : 1,
44660702 4646 "type" : "string"
56122987 4647 },
44660702
DM
4648 "radv" : {
4649 "description" : "Allow sending Router Advertisement.",
56122987 4650 "optional" : 1,
44660702 4651 "type" : "boolean"
7aacca6f
DM
4652 },
4653 "vmid" : {
4654 "description" : "The (unique) ID of the VM.",
44660702 4655 "format" : "pve-vmid",
7aacca6f 4656 "minimum" : 1,
44660702 4657 "type" : "integer"
56122987
DM
4658 }
4659 }
4660 },
56122987
DM
4661 "permissions" : {
4662 "check" : [
4663 "perm",
4664 "/vms/{vmid}",
4665 [
44660702 4666 "VM.Config.Network"
56122987
DM
4667 ]
4668 ]
7aacca6f 4669 },
44660702 4670 "protected" : 1,
7aacca6f 4671 "proxyto" : "node",
44660702
DM
4672 "returns" : {
4673 "type" : "null"
4674 }
56122987
DM
4675 }
4676 },
44660702 4677 "leaf" : 1,
7aacca6f 4678 "path" : "/nodes/{node}/qemu/{vmid}/firewall/options",
44660702 4679 "text" : "options"
56122987
DM
4680 },
4681 {
56122987
DM
4682 "info" : {
4683 "GET" : {
44660702
DM
4684 "description" : "Read firewall log",
4685 "method" : "GET",
4686 "name" : "log",
4687 "parameters" : {
4688 "additionalProperties" : 0,
4689 "properties" : {
4690 "limit" : {
4691 "minimum" : 0,
4692 "optional" : 1,
4693 "type" : "integer"
56122987 4694 },
44660702
DM
4695 "node" : {
4696 "description" : "The cluster node name.",
4697 "format" : "pve-node",
4698 "type" : "string"
4699 },
4700 "start" : {
4701 "minimum" : 0,
4702 "optional" : 1,
4703 "type" : "integer"
4704 },
4705 "vmid" : {
4706 "description" : "The (unique) ID of the VM.",
4707 "format" : "pve-vmid",
4708 "minimum" : 1,
4709 "type" : "integer"
4710 }
4711 }
7aacca6f 4712 },
7aacca6f
DM
4713 "permissions" : {
4714 "check" : [
4715 "perm",
4716 "/vms/{vmid}",
4717 [
4718 "VM.Console"
4719 ]
4720 ]
56122987 4721 },
7aacca6f 4722 "protected" : 1,
44660702
DM
4723 "proxyto" : "node",
4724 "returns" : {
4725 "items" : {
4726 "properties" : {
4727 "n" : {
4728 "description" : "Line number",
4729 "type" : "integer"
4730 },
4731 "t" : {
4732 "description" : "Line text",
4733 "type" : "string"
4734 }
56122987 4735 },
44660702 4736 "type" : "object"
7aacca6f 4737 },
44660702 4738 "type" : "array"
7aacca6f
DM
4739 }
4740 }
4741 },
44660702 4742 "leaf" : 1,
7aacca6f 4743 "path" : "/nodes/{node}/qemu/{vmid}/firewall/log",
44660702 4744 "text" : "log"
7aacca6f
DM
4745 },
4746 {
7aacca6f
DM
4747 "info" : {
4748 "GET" : {
4749 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
4750 "method" : "GET",
4751 "name" : "refs",
56122987 4752 "parameters" : {
44660702 4753 "additionalProperties" : 0,
56122987
DM
4754 "properties" : {
4755 "node" : {
7aacca6f 4756 "description" : "The cluster node name.",
44660702 4757 "format" : "pve-node",
7aacca6f 4758 "type" : "string"
56122987
DM
4759 },
4760 "type" : {
56122987
DM
4761 "description" : "Only list references of specified type.",
4762 "enum" : [
4763 "alias",
4764 "ipset"
7aacca6f 4765 ],
44660702
DM
4766 "optional" : 1,
4767 "type" : "string"
4768 },
4769 "vmid" : {
4770 "description" : "The (unique) ID of the VM.",
4771 "format" : "pve-vmid",
4772 "minimum" : 1,
4773 "type" : "integer"
56122987 4774 }
44660702
DM
4775 }
4776 },
4777 "permissions" : {
4778 "check" : [
4779 "perm",
4780 "/vms/{vmid}",
4781 [
4782 "VM.Audit"
4783 ]
4784 ]
56122987
DM
4785 },
4786 "returns" : {
56122987
DM
4787 "items" : {
4788 "properties" : {
44660702
DM
4789 "comment" : {
4790 "optional" : 1,
56122987
DM
4791 "type" : "string"
4792 },
4793 "name" : {
4794 "type" : "string"
4795 },
44660702
DM
4796 "type" : {
4797 "enum" : [
4798 "alias",
4799 "ipset"
4800 ],
7aacca6f 4801 "type" : "string"
56122987
DM
4802 }
4803 },
4804 "type" : "object"
7aacca6f
DM
4805 },
4806 "type" : "array"
4807 }
56122987 4808 }
44660702
DM
4809 },
4810 "leaf" : 1,
4811 "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs",
4812 "text" : "refs"
56122987
DM
4813 }
4814 ],
56122987
DM
4815 "info" : {
4816 "GET" : {
44660702 4817 "description" : "Directory index.",
56122987 4818 "method" : "GET",
44660702 4819 "name" : "index",
56122987 4820 "parameters" : {
44660702 4821 "additionalProperties" : 0,
56122987
DM
4822 "properties" : {
4823 "node" : {
4824 "description" : "The cluster node name.",
44660702
DM
4825 "format" : "pve-node",
4826 "type" : "string"
56122987
DM
4827 },
4828 "vmid" : {
44660702 4829 "description" : "The (unique) ID of the VM.",
56122987
DM
4830 "format" : "pve-vmid",
4831 "minimum" : 1,
44660702 4832 "type" : "integer"
56122987 4833 }
44660702 4834 }
56122987 4835 },
56122987
DM
4836 "permissions" : {
4837 "user" : "all"
7aacca6f 4838 },
44660702
DM
4839 "returns" : {
4840 "items" : {
4841 "properties" : {},
4842 "type" : "object"
4843 },
4844 "links" : [
4845 {
4846 "href" : "{name}",
4847 "rel" : "child"
4848 }
4849 ],
4850 "type" : "array"
4851 }
56122987 4852 }
44660702
DM
4853 },
4854 "leaf" : 0,
4855 "path" : "/nodes/{node}/qemu/{vmid}/firewall",
4856 "text" : "firewall"
56122987
DM
4857 },
4858 {
56122987
DM
4859 "info" : {
4860 "GET" : {
44660702
DM
4861 "description" : "Read VM RRD statistics (returns PNG)",
4862 "method" : "GET",
7aacca6f 4863 "name" : "rrd",
56122987
DM
4864 "parameters" : {
4865 "additionalProperties" : 0,
4866 "properties" : {
7aacca6f 4867 "cf" : {
44660702 4868 "description" : "The RRD consolidation function",
7aacca6f
DM
4869 "enum" : [
4870 "AVERAGE",
4871 "MAX"
4872 ],
7aacca6f
DM
4873 "optional" : 1,
4874 "type" : "string"
4875 },
44660702
DM
4876 "ds" : {
4877 "description" : "The list of datasources you want to display.",
4878 "format" : "pve-configid-list",
4879 "type" : "string"
56122987
DM
4880 },
4881 "node" : {
44660702 4882 "description" : "The cluster node name.",
56122987 4883 "format" : "pve-node",
44660702 4884 "type" : "string"
56122987
DM
4885 },
4886 "timeframe" : {
44660702 4887 "description" : "Specify the time frame you are interested in.",
56122987
DM
4888 "enum" : [
4889 "hour",
4890 "day",
4891 "week",
4892 "month",
4893 "year"
4894 ],
56122987
DM
4895 "type" : "string"
4896 },
44660702
DM
4897 "vmid" : {
4898 "description" : "The (unique) ID of the VM.",
4899 "format" : "pve-vmid",
4900 "minimum" : 1,
4901 "type" : "integer"
56122987
DM
4902 }
4903 }
4904 },
56122987
DM
4905 "permissions" : {
4906 "check" : [
4907 "perm",
4908 "/vms/{vmid}",
4909 [
4910 "VM.Audit"
4911 ]
4912 ]
4913 },
7aacca6f
DM
4914 "protected" : 1,
4915 "returns" : {
4916 "properties" : {
4917 "filename" : {
4918 "type" : "string"
4919 }
4920 },
4921 "type" : "object"
44660702 4922 }
56122987 4923 }
44660702
DM
4924 },
4925 "leaf" : 1,
4926 "path" : "/nodes/{node}/qemu/{vmid}/rrd",
4927 "text" : "rrd"
56122987
DM
4928 },
4929 {
7aacca6f 4930 "info" : {
56122987 4931 "GET" : {
7aacca6f 4932 "description" : "Read VM RRD statistics",
44660702 4933 "method" : "GET",
56122987 4934 "name" : "rrddata",
56122987 4935 "parameters" : {
44660702 4936 "additionalProperties" : 0,
56122987 4937 "properties" : {
44660702
DM
4938 "cf" : {
4939 "description" : "The RRD consolidation function",
4940 "enum" : [
4941 "AVERAGE",
4942 "MAX"
4943 ],
4944 "optional" : 1,
4945 "type" : "string"
4946 },
56122987 4947 "node" : {
44660702 4948 "description" : "The cluster node name.",
56122987 4949 "format" : "pve-node",
44660702 4950 "type" : "string"
56122987
DM
4951 },
4952 "timeframe" : {
44660702 4953 "description" : "Specify the time frame you are interested in.",
56122987
DM
4954 "enum" : [
4955 "hour",
4956 "day",
4957 "week",
4958 "month",
4959 "year"
7aacca6f 4960 ],
44660702 4961 "type" : "string"
7aacca6f
DM
4962 },
4963 "vmid" : {
7aacca6f
DM
4964 "description" : "The (unique) ID of the VM.",
4965 "format" : "pve-vmid",
44660702
DM
4966 "minimum" : 1,
4967 "type" : "integer"
56122987 4968 }
44660702 4969 }
56122987 4970 },
56122987
DM
4971 "permissions" : {
4972 "check" : [
4973 "perm",
4974 "/vms/{vmid}",
4975 [
4976 "VM.Audit"
4977 ]
4978 ]
4979 },
44660702 4980 "protected" : 1,
7aacca6f 4981 "returns" : {
7aacca6f 4982 "items" : {
44660702
DM
4983 "properties" : {},
4984 "type" : "object"
4985 },
4986 "type" : "array"
7aacca6f 4987 }
56122987
DM
4988 }
4989 },
44660702
DM
4990 "leaf" : 1,
4991 "path" : "/nodes/{node}/qemu/{vmid}/rrddata",
56122987
DM
4992 "text" : "rrddata"
4993 },
4994 {
56122987 4995 "info" : {
44660702
DM
4996 "GET" : {
4997 "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API).",
4998 "method" : "GET",
4999 "name" : "vm_config",
5000 "parameters" : {
5001 "additionalProperties" : 0,
5002 "properties" : {
5003 "current" : {
5004 "default" : 0,
5005 "description" : "Get current values (instead of pending values).",
5006 "optional" : 1,
5007 "type" : "boolean"
5008 },
5009 "node" : {
5010 "description" : "The cluster node name.",
5011 "format" : "pve-node",
5012 "type" : "string"
5013 },
5014 "vmid" : {
5015 "description" : "The (unique) ID of the VM.",
5016 "format" : "pve-vmid",
5017 "minimum" : 1,
5018 "type" : "integer"
5019 }
5020 }
7aacca6f 5021 },
56122987
DM
5022 "permissions" : {
5023 "check" : [
5024 "perm",
5025 "/vms/{vmid}",
5026 [
44660702
DM
5027 "VM.Audit"
5028 ]
56122987
DM
5029 ]
5030 },
56122987 5031 "proxyto" : "node",
44660702
DM
5032 "returns" : {
5033 "properties" : {
5034 "digest" : {
5035 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
5036 "type" : "string"
5037 }
5038 },
5039 "type" : "object"
5040 }
5041 },
5042 "POST" : {
7aacca6f
DM
5043 "description" : "Set virtual machine options (asynchrounous API).",
5044 "method" : "POST",
44660702 5045 "name" : "update_vm_async",
56122987 5046 "parameters" : {
44660702 5047 "additionalProperties" : 0,
56122987 5048 "properties" : {
44660702
DM
5049 "acpi" : {
5050 "default" : 1,
5051 "description" : "Enable/disable ACPI.",
5052 "optional" : 1,
5053 "type" : "boolean"
5054 },
5055 "agent" : {
7aacca6f 5056 "default" : 0,
44660702 5057 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 5058 "optional" : 1,
44660702 5059 "type" : "boolean"
7aacca6f 5060 },
44660702
DM
5061 "args" : {
5062 "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n",
5063 "optional" : 1,
5064 "type" : "string"
7aacca6f 5065 },
44660702
DM
5066 "autostart" : {
5067 "default" : 0,
5068 "description" : "Automatic restart after crash (currently ignored).",
56122987 5069 "optional" : 1,
44660702 5070 "type" : "boolean"
56122987 5071 },
44660702
DM
5072 "background_delay" : {
5073 "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.",
5074 "maximum" : 30,
5075 "minimum" : 1,
7aacca6f 5076 "optional" : 1,
44660702 5077 "type" : "integer"
56122987 5078 },
44660702
DM
5079 "balloon" : {
5080 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
5081 "minimum" : 0,
7aacca6f 5082 "optional" : 1,
44660702 5083 "type" : "integer"
7aacca6f 5084 },
44660702
DM
5085 "bios" : {
5086 "default" : "seabios",
5087 "description" : "Select BIOS implementation.",
5088 "enum" : [
5089 "seabios",
5090 "ovmf"
5091 ],
56122987 5092 "optional" : 1,
44660702 5093 "type" : "string"
7aacca6f 5094 },
44660702
DM
5095 "boot" : {
5096 "default" : "cdn",
5097 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
5098 "optional" : 1,
5099 "pattern" : "[acdn]{1,4}",
5100 "type" : "string"
5101 },
5102 "bootdisk" : {
5103 "description" : "Enable booting from specified disk.",
5104 "format" : "pve-qm-bootdisk",
5105 "optional" : 1,
5106 "pattern" : "(ide|sata|scsi|virtio)\\d+",
5107 "type" : "string"
5108 },
5109 "cdrom" : {
5110 "description" : "This is an alias for option -ide2",
5111 "format" : "pve-qm-drive",
5112 "optional" : 1,
7aacca6f 5113 "type" : "string",
44660702
DM
5114 "typetext" : "volume"
5115 },
5116 "cores" : {
5117 "default" : 1,
5118 "description" : "The number of cores per socket.",
5119 "minimum" : 1,
7aacca6f 5120 "optional" : 1,
44660702 5121 "type" : "integer"
7aacca6f 5122 },
44660702
DM
5123 "cpu" : {
5124 "description" : "Emulated CPU type.",
56122987 5125 "format" : {
44660702
DM
5126 "cputype" : {
5127 "default" : "kvm64",
7aacca6f 5128 "default_key" : 1,
44660702 5129 "description" : "Emulated CPU type.",
56122987 5130 "enum" : [
44660702
DM
5131 "486",
5132 "athlon",
f004f5b9
DM
5133 "Broadwell",
5134 "Broadwell-noTSX",
5135 "Conroe",
44660702 5136 "core2duo",
f004f5b9
DM
5137 "coreduo",
5138 "Haswell",
5139 "Haswell-noTSX",
5140 "host",
5141 "IvyBridge",
44660702
DM
5142 "kvm32",
5143 "kvm64",
44660702 5144 "Nehalem",
44660702
DM
5145 "Opteron_G1",
5146 "Opteron_G2",
5147 "Opteron_G3",
5148 "Opteron_G4",
5149 "Opteron_G5",
f004f5b9
DM
5150 "Penryn",
5151 "pentium",
5152 "pentium2",
5153 "pentium3",
5154 "phenom",
5155 "qemu32",
5156 "qemu64",
5157 "SandyBridge",
5158 "Westmere"
56122987 5159 ],
44660702 5160 "format_description" : "cputype",
56122987
DM
5161 "type" : "string"
5162 },
44660702
DM
5163 "hidden" : {
5164 "default" : 0,
5165 "description" : "Do not identify as a KVM virtual machine.",
56122987 5166 "optional" : 1,
44660702
DM
5167 "type" : "boolean"
5168 }
5169 },
5170 "optional" : 1,
5171 "type" : "string"
5172 },
5173 "cpulimit" : {
5174 "default" : 0,
5175 "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.",
5176 "maximum" : 128,
5177 "minimum" : 0,
5178 "optional" : 1,
5179 "type" : "number"
5180 },
5181 "cpuunits" : {
5182 "default" : 1000,
5183 "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.",
5184 "maximum" : 500000,
5185 "minimum" : 0,
5186 "optional" : 1,
5187 "type" : "integer"
5188 },
5189 "delete" : {
5190 "description" : "A list of settings you want to delete.",
5191 "format" : "pve-configid-list",
5192 "optional" : 1,
5193 "type" : "string"
5194 },
5195 "description" : {
5196 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
5197 "optional" : 1,
5198 "type" : "string"
5199 },
5200 "digest" : {
5201 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
5202 "maxLength" : 40,
5203 "optional" : 1,
5204 "type" : "string"
5205 },
5206 "force" : {
5207 "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.",
5208 "optional" : 1,
5209 "requires" : "delete",
5210 "type" : "boolean"
5211 },
5212 "freeze" : {
5213 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
5214 "optional" : 1,
5215 "type" : "boolean"
5216 },
5217 "hostpci[n]" : {
5218 "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
5219 "format" : "pve-qm-hostpci",
5220 "optional" : 1,
5221 "type" : "string"
5222 },
5223 "hotplug" : {
5224 "default" : "network,disk,usb",
5225 "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.",
5226 "format" : "pve-hotplug-features",
5227 "optional" : 1,
5228 "type" : "string"
5229 },
5230 "ide[n]" : {
5231 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
5232 "format" : {
5233 "aio" : {
5234 "description" : "AIO type to use.",
5235 "enum" : [
5236 "native",
5237 "threads"
56122987 5238 ],
56122987 5239 "optional" : 1,
44660702 5240 "type" : "string"
56122987 5241 },
44660702
DM
5242 "backup" : {
5243 "description" : "Whether the drive should be included when making backups.",
56122987 5244 "optional" : 1,
44660702 5245 "type" : "boolean"
56122987 5246 },
7aacca6f
DM
5247 "bps" : {
5248 "description" : "Maximum r/w speed speed in bytes per second.",
44660702
DM
5249 "format_description" : "bps",
5250 "optional" : 1,
5251 "type" : "integer"
5252 },
5253 "bps_rd" : {
5254 "description" : "Maximum read speed speed in bytes per second.",
5255 "format_description" : "bps",
56122987 5256 "optional" : 1,
44660702 5257 "type" : "integer"
56122987 5258 },
44660702
DM
5259 "bps_wr" : {
5260 "description" : "Maximum write speed speed in bytes per second.",
5261 "format_description" : "bps",
5262 "optional" : 1,
5263 "type" : "integer"
5264 },
5265 "cache" : {
5266 "description" : "The drive's cache mode",
5267 "enum" : [
5268 "none",
5269 "writethrough",
5270 "writeback",
5271 "unsafe",
5272 "directsync"
5273 ],
44660702
DM
5274 "optional" : 1,
5275 "type" : "string"
5276 },
5277 "cyls" : {
5278 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
5279 "optional" : 1,
5280 "type" : "integer"
5281 },
5282 "detect_zeroes" : {
5283 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
5284 "optional" : 1,
5285 "type" : "boolean"
5286 },
5287 "discard" : {
5288 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5289 "enum" : [
5290 "ignore",
5291 "on"
5292 ],
56122987 5293 "optional" : 1,
44660702
DM
5294 "type" : "string"
5295 },
5296 "file" : {
5297 "default_key" : 1,
5298 "description" : "The drive's backing volume.",
5299 "format" : "pve-volume-id-or-qm-path",
5300 "format_description" : "volume",
5301 "type" : "string"
56122987 5302 },
7aacca6f 5303 "format" : {
7aacca6f 5304 "description" : "The drive's backing file's data format.",
56122987 5305 "enum" : [
7aacca6f
DM
5306 "raw",
5307 "cow",
5308 "qcow",
5309 "qed",
5310 "qcow2",
5311 "vmdk",
5312 "cloop"
56122987 5313 ],
f004f5b9 5314 "format_description" : "image format",
56122987 5315 "optional" : 1,
56122987
DM
5316 "type" : "string"
5317 },
44660702
DM
5318 "heads" : {
5319 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
5320 "optional" : 1,
5321 "type" : "integer"
7aacca6f 5322 },
44660702
DM
5323 "iops" : {
5324 "description" : "Maximum r/w I/O speed in operations per second.",
5325 "format_description" : "iops",
56122987 5326 "optional" : 1,
44660702 5327 "type" : "integer"
56122987 5328 },
44660702
DM
5329 "iops_max" : {
5330 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5331 "format_description" : "iops",
56122987 5332 "optional" : 1,
44660702 5333 "type" : "integer"
56122987 5334 },
44660702
DM
5335 "iops_rd" : {
5336 "description" : "Maximum read I/O speed in operations per second.",
5337 "format_description" : "iops",
5338 "optional" : 1,
5339 "type" : "integer"
5340 },
5341 "iops_rd_max" : {
5342 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 5343 "format_description" : "iops",
44660702
DM
5344 "optional" : 1,
5345 "type" : "integer"
5346 },
5347 "iops_wr" : {
7aacca6f 5348 "description" : "Maximum write I/O speed in operations per second.",
44660702 5349 "format_description" : "iops",
56122987 5350 "optional" : 1,
7aacca6f 5351 "type" : "integer"
56122987 5352 },
44660702
DM
5353 "iops_wr_max" : {
5354 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
5355 "format_description" : "iops",
7aacca6f 5356 "optional" : 1,
44660702 5357 "type" : "integer"
56122987 5358 },
44660702
DM
5359 "mbps" : {
5360 "description" : "Maximum r/w speed speed in megabytes per second.",
5361 "format_description" : "mbps",
5362 "optional" : 1,
5363 "type" : "number"
5364 },
5365 "mbps_max" : {
5366 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5367 "format_description" : "mbps",
5368 "optional" : 1,
5369 "type" : "number"
5370 },
5371 "mbps_rd" : {
5372 "description" : "Maximum read speed speed in megabytes per second.",
5373 "format_description" : "mbps",
5374 "optional" : 1,
5375 "type" : "number"
5376 },
5377 "mbps_rd_max" : {
5378 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5379 "format_description" : "mbps",
5380 "optional" : 1,
5381 "type" : "number"
5382 },
5383 "mbps_wr" : {
5384 "description" : "Maximum write speed speed in megabytes per second.",
5385 "format_description" : "mbps",
5386 "optional" : 1,
5387 "type" : "number"
5388 },
5389 "mbps_wr_max" : {
5390 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5391 "format_description" : "mbps",
56122987 5392 "optional" : 1,
44660702 5393 "type" : "number"
56122987 5394 },
7aacca6f 5395 "media" : {
7aacca6f 5396 "default" : "disk",
7aacca6f
DM
5397 "description" : "The drive's media type.",
5398 "enum" : [
5399 "cdrom",
5400 "disk"
44660702 5401 ],
44660702
DM
5402 "optional" : 1,
5403 "type" : "string"
56122987 5404 },
44660702
DM
5405 "model" : {
5406 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
5407 "format" : "urlencoded",
5408 "format_description" : "model",
5409 "maxLength" : 120,
56122987 5410 "optional" : 1,
44660702 5411 "type" : "string"
56122987 5412 },
44660702
DM
5413 "rerror" : {
5414 "description" : "Read error action.",
5415 "enum" : [
5416 "ignore",
5417 "report",
5418 "stop"
5419 ],
56122987 5420 "optional" : 1,
44660702
DM
5421 "type" : "string"
5422 },
5423 "secs" : {
5424 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
5425 "optional" : 1,
5426 "type" : "integer"
5427 },
5428 "serial" : {
5429 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5430 "format" : "urlencoded",
5431 "format_description" : "serial",
5432 "maxLength" : 60,
5433 "optional" : 1,
5434 "type" : "string"
5435 },
5436 "size" : {
5437 "description" : "Disk size. This is purely informational and has no effect.",
5438 "format" : "disk-size",
f004f5b9 5439 "format_description" : "DiskSize",
44660702
DM
5440 "optional" : 1,
5441 "type" : "string"
5442 },
5443 "snapshot" : {
5444 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
5445 "optional" : 1,
5446 "type" : "boolean"
5447 },
5448 "trans" : {
5449 "description" : "Force disk geometry bios translation mode.",
5450 "enum" : [
5451 "none",
5452 "lba",
5453 "auto"
5454 ],
44660702
DM
5455 "optional" : 1,
5456 "type" : "string"
5457 },
5458 "volume" : {
5459 "alias" : "file"
5460 },
5461 "werror" : {
5462 "description" : "Write error action.",
5463 "enum" : [
5464 "enospc",
5465 "ignore",
5466 "report",
5467 "stop"
5468 ],
44660702
DM
5469 "optional" : 1,
5470 "type" : "string"
56122987
DM
5471 }
5472 },
44660702
DM
5473 "optional" : 1,
5474 "type" : "string"
56122987 5475 },
44660702
DM
5476 "keyboard" : {
5477 "default" : "en-us",
5478 "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.",
5479 "enum" : [
5480 "de",
5481 "de-ch",
5482 "da",
5483 "en-gb",
5484 "en-us",
5485 "es",
5486 "fi",
5487 "fr",
5488 "fr-be",
5489 "fr-ca",
5490 "fr-ch",
5491 "hu",
5492 "is",
5493 "it",
5494 "ja",
5495 "lt",
5496 "mk",
5497 "nl",
5498 "no",
5499 "pl",
5500 "pt",
5501 "pt-br",
5502 "sv",
5503 "sl",
5504 "tr"
5505 ],
56122987 5506 "optional" : 1,
44660702
DM
5507 "type" : "string"
5508 },
5509 "kvm" : {
7aacca6f 5510 "default" : 1,
44660702
DM
5511 "description" : "Enable/disable KVM hardware virtualization.",
5512 "optional" : 1,
5513 "type" : "boolean"
56122987 5514 },
44660702
DM
5515 "localtime" : {
5516 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 5517 "optional" : 1,
44660702 5518 "type" : "boolean"
56122987 5519 },
44660702
DM
5520 "lock" : {
5521 "description" : "Lock/unlock the VM.",
5522 "enum" : [
5523 "migrate",
5524 "backup",
5525 "snapshot",
5526 "rollback"
5527 ],
7aacca6f 5528 "optional" : 1,
44660702
DM
5529 "type" : "string"
5530 },
5531 "machine" : {
5532 "description" : "Specific the Qemu machine type.",
5533 "maxLength" : 40,
5534 "optional" : 1,
5535 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
5536 "type" : "string"
5537 },
5538 "memory" : {
5539 "default" : 512,
5540 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
5541 "minimum" : 16,
5542 "optional" : 1,
5543 "type" : "integer"
5544 },
5545 "migrate_downtime" : {
5546 "default" : 0.1,
5547 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
5548 "minimum" : 0,
5549 "optional" : 1,
5550 "type" : "number"
5551 },
5552 "migrate_speed" : {
5553 "default" : 0,
5554 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
5555 "minimum" : 0,
5556 "optional" : 1,
5557 "type" : "integer"
5558 },
5559 "name" : {
5560 "description" : "Set a name for the VM. Only used on the configuration web interface.",
5561 "format" : "dns-name",
5562 "optional" : 1,
5563 "type" : "string"
5564 },
5565 "net[n]" : {
5566 "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n",
f004f5b9
DM
5567 "format" : {
5568 "bridge" : {
5569 "description" : "Bridge to attach the network device to.",
5570 "format_description" : "bridge",
5571 "optional" : 1,
5572 "type" : "string"
5573 },
5574 "e1000" : {
5575 "alias" : "macaddr",
5576 "keyAlias" : "model"
5577 },
5578 "e1000-82540em" : {
5579 "alias" : "macaddr",
5580 "keyAlias" : "model"
5581 },
5582 "e1000-82544gc" : {
5583 "alias" : "macaddr",
5584 "keyAlias" : "model"
5585 },
5586 "e1000-82545em" : {
5587 "alias" : "macaddr",
5588 "keyAlias" : "model"
5589 },
5590 "firewall" : {
5591 "description" : "Whether this interface should be protected by the firewall.",
5592 "optional" : 1,
5593 "type" : "boolean"
5594 },
5595 "i82551" : {
5596 "alias" : "macaddr",
5597 "keyAlias" : "model"
5598 },
5599 "i82557b" : {
5600 "alias" : "macaddr",
5601 "keyAlias" : "model"
5602 },
5603 "i82559er" : {
5604 "alias" : "macaddr",
5605 "keyAlias" : "model"
5606 },
5607 "link_down" : {
5608 "description" : "Whether this interface should be DISconnected (like pulling the plug).",
5609 "optional" : 1,
5610 "type" : "boolean"
5611 },
5612 "macaddr" : {
5613 "description" : "MAC address",
5614 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
5615 "optional" : 1,
5616 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
5617 "type" : "string"
5618 },
5619 "model" : {
5620 "default_key" : 1,
5621 "description" : "Network Card Model.",
5622 "enum" : [
5623 "rtl8139",
5624 "ne2k_pci",
5625 "e1000",
5626 "pcnet",
5627 "virtio",
5628 "ne2k_isa",
5629 "i82551",
5630 "i82557b",
5631 "i82559er",
5632 "vmxnet3",
5633 "e1000-82540em",
5634 "e1000-82544gc",
5635 "e1000-82545em"
5636 ],
5637 "format_description" : "model",
5638 "type" : "string"
5639 },
5640 "ne2k_isa" : {
5641 "alias" : "macaddr",
5642 "keyAlias" : "model"
5643 },
5644 "ne2k_pci" : {
5645 "alias" : "macaddr",
5646 "keyAlias" : "model"
5647 },
5648 "pcnet" : {
5649 "alias" : "macaddr",
5650 "keyAlias" : "model"
5651 },
5652 "queues" : {
5653 "description" : "Number of packet queues to be used on the device.",
5654 "maximum" : 16,
5655 "minimum" : 0,
5656 "optional" : 1,
5657 "type" : "integer"
5658 },
5659 "rate" : {
5660 "description" : "Rate limit in mbps as floating point number.",
5661 "minimum" : 0,
5662 "optional" : 1,
5663 "type" : "number"
5664 },
5665 "rtl8139" : {
5666 "alias" : "macaddr",
5667 "keyAlias" : "model"
5668 },
5669 "tag" : {
5670 "description" : "VLAN tag to apply to packets on this interface.",
5671 "maximum" : 4094,
5672 "minimum" : 2,
5673 "optional" : 1,
5674 "type" : "integer"
5675 },
5676 "trunks" : {
5677 "description" : "VLAN trunks to pass through this interface.",
5678 "format_description" : "vlanid[;vlanid...]",
5679 "optional" : 1,
5680 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5681 "type" : "string"
5682 },
5683 "virtio" : {
5684 "alias" : "macaddr",
5685 "keyAlias" : "model"
5686 },
5687 "vmxnet3" : {
5688 "alias" : "macaddr",
5689 "keyAlias" : "model"
5690 }
5691 },
44660702
DM
5692 "optional" : 1,
5693 "type" : "string"
5694 },
5695 "node" : {
5696 "description" : "The cluster node name.",
5697 "format" : "pve-node",
5698 "type" : "string"
5699 },
5700 "numa" : {
5701 "default" : 0,
5702 "description" : "Enable/disable NUMA.",
5703 "optional" : 1,
5704 "type" : "boolean"
5705 },
5706 "numa[n]" : {
7aacca6f 5707 "description" : "numa topology",
56122987 5708 "format" : {
7aacca6f 5709 "cpus" : {
7aacca6f 5710 "description" : "CPUs accessing this numa node.",
44660702
DM
5711 "format_description" : "id[-id];...",
5712 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5713 "type" : "string"
7aacca6f
DM
5714 },
5715 "hostnodes" : {
44660702
DM
5716 "description" : "host numa nodes to use",
5717 "format_description" : "id[-id];...",
7aacca6f 5718 "optional" : 1,
7aacca6f 5719 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
44660702 5720 "type" : "string"
7aacca6f 5721 },
44660702
DM
5722 "memory" : {
5723 "description" : "Amount of memory this numa node provides.",
7aacca6f 5724 "optional" : 1,
44660702
DM
5725 "type" : "number"
5726 },
5727 "policy" : {
7aacca6f
DM
5728 "description" : "numa allocation policy.",
5729 "enum" : [
5730 "preferred",
5731 "bind",
5732 "interleave"
5733 ],
44660702
DM
5734 "optional" : 1,
5735 "type" : "string"
56122987 5736 }
44660702 5737 },
56122987 5738 "optional" : 1,
44660702 5739 "type" : "string"
56122987 5740 },
44660702 5741 "onboot" : {
7aacca6f 5742 "default" : 0,
44660702
DM
5743 "description" : "Specifies whether a VM will be started during system bootup.",
5744 "optional" : 1,
5745 "type" : "boolean"
7aacca6f
DM
5746 },
5747 "ostype" : {
44660702 5748 "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n",
7aacca6f
DM
5749 "enum" : [
5750 "other",
5751 "wxp",
5752 "w2k",
5753 "w2k3",
5754 "w2k8",
5755 "wvista",
5756 "win7",
5757 "win8",
5758 "l24",
5759 "l26",
5760 "solaris"
5761 ],
7aacca6f 5762 "optional" : 1,
56122987
DM
5763 "type" : "string"
5764 },
44660702
DM
5765 "parallel[n]" : {
5766 "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
7aacca6f 5767 "optional" : 1,
44660702
DM
5768 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
5769 "type" : "string"
7aacca6f
DM
5770 },
5771 "protection" : {
5772 "default" : 0,
44660702 5773 "description" : "Sets the protection flag of the VM. This will prevent the remove operation.",
7aacca6f 5774 "optional" : 1,
44660702 5775 "type" : "boolean"
7aacca6f 5776 },
44660702
DM
5777 "reboot" : {
5778 "default" : 1,
5779 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 5780 "optional" : 1,
44660702 5781 "type" : "boolean"
7aacca6f 5782 },
44660702
DM
5783 "revert" : {
5784 "description" : "Revert a pending change.",
5785 "format" : "pve-configid-list",
7aacca6f 5786 "optional" : 1,
44660702
DM
5787 "type" : "string"
5788 },
5789 "sata[n]" : {
5790 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 5791 "format" : {
44660702
DM
5792 "aio" : {
5793 "description" : "AIO type to use.",
7aacca6f 5794 "enum" : [
44660702
DM
5795 "native",
5796 "threads"
7aacca6f 5797 ],
44660702
DM
5798 "optional" : 1,
5799 "type" : "string"
7aacca6f 5800 },
44660702
DM
5801 "backup" : {
5802 "description" : "Whether the drive should be included when making backups.",
56122987 5803 "optional" : 1,
7aacca6f 5804 "type" : "boolean"
44660702
DM
5805 },
5806 "bps" : {
5807 "description" : "Maximum r/w speed speed in bytes per second.",
5808 "format_description" : "bps",
7aacca6f 5809 "optional" : 1,
44660702 5810 "type" : "integer"
56122987 5811 },
44660702
DM
5812 "bps_rd" : {
5813 "description" : "Maximum read speed speed in bytes per second.",
5814 "format_description" : "bps",
56122987 5815 "optional" : 1,
44660702 5816 "type" : "integer"
56122987 5817 },
44660702
DM
5818 "bps_wr" : {
5819 "description" : "Maximum write speed speed in bytes per second.",
5820 "format_description" : "bps",
56122987 5821 "optional" : 1,
44660702 5822 "type" : "integer"
56122987
DM
5823 },
5824 "cache" : {
44660702 5825 "description" : "The drive's cache mode",
56122987
DM
5826 "enum" : [
5827 "none",
5828 "writethrough",
5829 "writeback",
5830 "unsafe",
5831 "directsync"
5832 ],
56122987 5833 "optional" : 1,
44660702 5834 "type" : "string"
56122987 5835 },
44660702
DM
5836 "cyls" : {
5837 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 5838 "optional" : 1,
44660702 5839 "type" : "integer"
7aacca6f
DM
5840 },
5841 "detect_zeroes" : {
5842 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 5843 "optional" : 1,
44660702 5844 "type" : "boolean"
56122987 5845 },
44660702
DM
5846 "discard" : {
5847 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5848 "enum" : [
5849 "ignore",
5850 "on"
5851 ],
56122987 5852 "optional" : 1,
44660702 5853 "type" : "string"
7aacca6f 5854 },
44660702
DM
5855 "file" : {
5856 "default_key" : 1,
5857 "description" : "The drive's backing volume.",
5858 "format" : "pve-volume-id-or-qm-path",
5859 "format_description" : "volume",
5860 "type" : "string"
56122987 5861 },
7aacca6f 5862 "format" : {
44660702 5863 "description" : "The drive's backing file's data format.",
7aacca6f
DM
5864 "enum" : [
5865 "raw",
5866 "cow",
5867 "qcow",
5868 "qed",
5869 "qcow2",
5870 "vmdk",
5871 "cloop"
5872 ],
f004f5b9 5873 "format_description" : "image format",
7aacca6f 5874 "optional" : 1,
44660702 5875 "type" : "string"
56122987 5876 },
7aacca6f 5877 "heads" : {
7aacca6f 5878 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 5879 "optional" : 1,
7aacca6f 5880 "type" : "integer"
56122987 5881 },
44660702
DM
5882 "iops" : {
5883 "description" : "Maximum r/w I/O speed in operations per second.",
5884 "format_description" : "iops",
56122987 5885 "optional" : 1,
44660702 5886 "type" : "integer"
56122987 5887 },
44660702
DM
5888 "iops_max" : {
5889 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5890 "format_description" : "iops",
56122987 5891 "optional" : 1,
44660702 5892 "type" : "integer"
56122987 5893 },
44660702
DM
5894 "iops_rd" : {
5895 "description" : "Maximum read I/O speed in operations per second.",
5896 "format_description" : "iops",
7aacca6f 5897 "optional" : 1,
44660702 5898 "type" : "integer"
56122987 5899 },
44660702
DM
5900 "iops_rd_max" : {
5901 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
5902 "format_description" : "iops",
56122987 5903 "optional" : 1,
44660702 5904 "type" : "integer"
7aacca6f 5905 },
44660702
DM
5906 "iops_wr" : {
5907 "description" : "Maximum write I/O speed in operations per second.",
5908 "format_description" : "iops",
56122987 5909 "optional" : 1,
44660702 5910 "type" : "integer"
56122987
DM
5911 },
5912 "iops_wr_max" : {
5913 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
44660702 5914 "format_description" : "iops",
56122987 5915 "optional" : 1,
44660702 5916 "type" : "integer"
56122987 5917 },
44660702
DM
5918 "mbps" : {
5919 "description" : "Maximum r/w speed speed in megabytes per second.",
5920 "format_description" : "mbps",
56122987 5921 "optional" : 1,
44660702 5922 "type" : "number"
56122987 5923 },
44660702
DM
5924 "mbps_max" : {
5925 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5926 "format_description" : "mbps",
5927 "optional" : 1,
5928 "type" : "number"
56122987 5929 },
44660702
DM
5930 "mbps_rd" : {
5931 "description" : "Maximum read speed speed in megabytes per second.",
5932 "format_description" : "mbps",
56122987 5933 "optional" : 1,
44660702 5934 "type" : "number"
56122987 5935 },
44660702
DM
5936 "mbps_rd_max" : {
5937 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5938 "format_description" : "mbps",
56122987 5939 "optional" : 1,
44660702 5940 "type" : "number"
56122987 5941 },
44660702
DM
5942 "mbps_wr" : {
5943 "description" : "Maximum write speed speed in megabytes per second.",
56122987 5944 "format_description" : "mbps",
44660702
DM
5945 "optional" : 1,
5946 "type" : "number"
56122987 5947 },
44660702
DM
5948 "mbps_wr_max" : {
5949 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5950 "format_description" : "mbps",
5951 "optional" : 1,
5952 "type" : "number"
7aacca6f 5953 },
44660702
DM
5954 "media" : {
5955 "default" : "disk",
5956 "description" : "The drive's media type.",
5957 "enum" : [
5958 "cdrom",
5959 "disk"
5960 ],
56122987 5961 "optional" : 1,
44660702
DM
5962 "type" : "string"
5963 },
5964 "rerror" : {
5965 "description" : "Read error action.",
7aacca6f 5966 "enum" : [
44660702
DM
5967 "ignore",
5968 "report",
5969 "stop"
5970 ],
7aacca6f 5971 "optional" : 1,
44660702 5972 "type" : "string"
56122987 5973 },
44660702
DM
5974 "secs" : {
5975 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 5976 "optional" : 1,
44660702 5977 "type" : "integer"
56122987 5978 },
44660702
DM
5979 "serial" : {
5980 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5981 "format" : "urlencoded",
5982 "format_description" : "serial",
5983 "maxLength" : 60,
56122987 5984 "optional" : 1,
44660702 5985 "type" : "string"
56122987 5986 },
44660702
DM
5987 "size" : {
5988 "description" : "Disk size. This is purely informational and has no effect.",
5989 "format" : "disk-size",
f004f5b9 5990 "format_description" : "DiskSize",
44660702
DM
5991 "optional" : 1,
5992 "type" : "string"
5993 },
5994 "snapshot" : {
5995 "description" : "Whether the drive should be included when making snapshots.",
56122987 5996 "optional" : 1,
44660702
DM
5997 "type" : "boolean"
5998 },
5999 "trans" : {
6000 "description" : "Force disk geometry bios translation mode.",
56122987 6001 "enum" : [
7aacca6f
DM
6002 "none",
6003 "lba",
6004 "auto"
56122987 6005 ],
44660702
DM
6006 "optional" : 1,
6007 "type" : "string"
56122987 6008 },
7aacca6f
DM
6009 "volume" : {
6010 "alias" : "file"
56122987 6011 },
44660702
DM
6012 "werror" : {
6013 "description" : "Write error action.",
6014 "enum" : [
6015 "enospc",
6016 "ignore",
6017 "report",
6018 "stop"
6019 ],
7aacca6f 6020 "optional" : 1,
44660702
DM
6021 "type" : "string"
6022 }
6023 },
6024 "optional" : 1,
6025 "type" : "string"
6026 },
6027 "scsi[n]" : {
6028 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
6029 "format" : {
56122987 6030 "aio" : {
56122987
DM
6031 "description" : "AIO type to use.",
6032 "enum" : [
6033 "native",
6034 "threads"
6035 ],
7aacca6f 6036 "optional" : 1,
44660702 6037 "type" : "string"
56122987 6038 },
44660702
DM
6039 "backup" : {
6040 "description" : "Whether the drive should be included when making backups.",
56122987 6041 "optional" : 1,
44660702 6042 "type" : "boolean"
56122987 6043 },
44660702
DM
6044 "bps" : {
6045 "description" : "Maximum r/w speed speed in bytes per second.",
6046 "format_description" : "bps",
56122987 6047 "optional" : 1,
44660702 6048 "type" : "integer"
56122987 6049 },
44660702
DM
6050 "bps_rd" : {
6051 "description" : "Maximum read speed speed in bytes per second.",
6052 "format_description" : "bps",
56122987 6053 "optional" : 1,
44660702 6054 "type" : "integer"
56122987 6055 },
7aacca6f 6056 "bps_wr" : {
44660702 6057 "description" : "Maximum write speed speed in bytes per second.",
7aacca6f 6058 "format_description" : "bps",
56122987 6059 "optional" : 1,
44660702 6060 "type" : "integer"
56122987 6061 },
44660702
DM
6062 "cache" : {
6063 "description" : "The drive's cache mode",
7aacca6f 6064 "enum" : [
44660702
DM
6065 "none",
6066 "writethrough",
6067 "writeback",
6068 "unsafe",
6069 "directsync"
7aacca6f 6070 ],
56122987 6071 "optional" : 1,
44660702 6072 "type" : "string"
56122987 6073 },
44660702
DM
6074 "cyls" : {
6075 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 6076 "optional" : 1,
44660702 6077 "type" : "integer"
56122987 6078 },
44660702
DM
6079 "detect_zeroes" : {
6080 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 6081 "optional" : 1,
44660702 6082 "type" : "boolean"
56122987 6083 },
44660702
DM
6084 "discard" : {
6085 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6086 "enum" : [
6087 "ignore",
6088 "on"
6089 ],
7aacca6f 6090 "optional" : 1,
44660702 6091 "type" : "string"
56122987 6092 },
44660702
DM
6093 "file" : {
6094 "default_key" : 1,
6095 "description" : "The drive's backing volume.",
6096 "format" : "pve-volume-id-or-qm-path",
6097 "format_description" : "volume",
6098 "type" : "string"
56122987 6099 },
7aacca6f 6100 "format" : {
44660702 6101 "description" : "The drive's backing file's data format.",
56122987 6102 "enum" : [
7aacca6f
DM
6103 "raw",
6104 "cow",
6105 "qcow",
6106 "qed",
6107 "qcow2",
6108 "vmdk",
6109 "cloop"
6110 ],
f004f5b9 6111 "format_description" : "image format",
44660702
DM
6112 "optional" : 1,
6113 "type" : "string"
56122987 6114 },
44660702
DM
6115 "heads" : {
6116 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6117 "optional" : 1,
7aacca6f 6118 "type" : "integer"
56122987 6119 },
44660702
DM
6120 "iops" : {
6121 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6122 "format_description" : "iops",
44660702
DM
6123 "optional" : 1,
6124 "type" : "integer"
7aacca6f 6125 },
44660702
DM
6126 "iops_max" : {
6127 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6128 "format_description" : "iops",
56122987 6129 "optional" : 1,
44660702 6130 "type" : "integer"
7aacca6f 6131 },
44660702
DM
6132 "iops_rd" : {
6133 "description" : "Maximum read I/O speed in operations per second.",
6134 "format_description" : "iops",
7aacca6f 6135 "optional" : 1,
44660702 6136 "type" : "integer"
56122987 6137 },
44660702
DM
6138 "iops_rd_max" : {
6139 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6140 "format_description" : "iops",
6141 "optional" : 1,
6142 "type" : "integer"
6143 },
6144 "iops_wr" : {
6145 "description" : "Maximum write I/O speed in operations per second.",
6146 "format_description" : "iops",
56122987 6147 "optional" : 1,
44660702
DM
6148 "type" : "integer"
6149 },
6150 "iops_wr_max" : {
6151 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6152 "format_description" : "iops",
6153 "optional" : 1,
6154 "type" : "integer"
56122987 6155 },
7aacca6f 6156 "iothread" : {
7aacca6f 6157 "description" : "Whether to use iothreads for this drive",
56122987 6158 "optional" : 1,
56122987
DM
6159 "type" : "boolean"
6160 },
44660702
DM
6161 "mbps" : {
6162 "description" : "Maximum r/w speed speed in megabytes per second.",
6163 "format_description" : "mbps",
6164 "optional" : 1,
6165 "type" : "number"
6166 },
6167 "mbps_max" : {
6168 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6169 "format_description" : "mbps",
6170 "optional" : 1,
6171 "type" : "number"
6172 },
6173 "mbps_rd" : {
6174 "description" : "Maximum read speed speed in megabytes per second.",
6175 "format_description" : "mbps",
6176 "optional" : 1,
6177 "type" : "number"
6178 },
6179 "mbps_rd_max" : {
6180 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6181 "format_description" : "mbps",
6182 "optional" : 1,
6183 "type" : "number"
6184 },
6185 "mbps_wr" : {
6186 "description" : "Maximum write speed speed in megabytes per second.",
6187 "format_description" : "mbps",
6188 "optional" : 1,
6189 "type" : "number"
6190 },
6191 "mbps_wr_max" : {
6192 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6193 "format_description" : "mbps",
6194 "optional" : 1,
6195 "type" : "number"
6196 },
7aacca6f 6197 "media" : {
44660702
DM
6198 "default" : "disk",
6199 "description" : "The drive's media type.",
7aacca6f
DM
6200 "enum" : [
6201 "cdrom",
6202 "disk"
6203 ],
56122987 6204 "optional" : 1,
44660702
DM
6205 "type" : "string"
6206 },
6207 "queues" : {
6208 "description" : "Number of queues.",
44660702
DM
6209 "minimum" : 2,
6210 "optional" : 1,
6211 "type" : "integer"
6212 },
6213 "secs" : {
6214 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6215 "optional" : 1,
6216 "type" : "integer"
6217 },
6218 "serial" : {
6219 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6220 "format" : "urlencoded",
6221 "format_description" : "serial",
6222 "maxLength" : 60,
6223 "optional" : 1,
6224 "type" : "string"
6225 },
6226 "size" : {
6227 "description" : "Disk size. This is purely informational and has no effect.",
6228 "format" : "disk-size",
f004f5b9 6229 "format_description" : "DiskSize",
44660702
DM
6230 "optional" : 1,
6231 "type" : "string"
56122987 6232 },
7aacca6f
DM
6233 "snapshot" : {
6234 "description" : "Whether the drive should be included when making snapshots.",
6235 "optional" : 1,
44660702 6236 "type" : "boolean"
7aacca6f 6237 },
44660702
DM
6238 "trans" : {
6239 "description" : "Force disk geometry bios translation mode.",
6240 "enum" : [
6241 "none",
6242 "lba",
6243 "auto"
6244 ],
44660702
DM
6245 "optional" : 1,
6246 "type" : "string"
6247 },
6248 "volume" : {
6249 "alias" : "file"
6250 },
6251 "werror" : {
6252 "description" : "Write error action.",
6253 "enum" : [
6254 "enospc",
6255 "ignore",
6256 "report",
6257 "stop"
6258 ],
56122987 6259 "optional" : 1,
44660702 6260 "type" : "string"
56122987 6261 }
44660702 6262 },
7aacca6f 6263 "optional" : 1,
44660702
DM
6264 "type" : "string"
6265 },
6266 "scsihw" : {
6267 "default" : "lsi",
6268 "description" : "scsi controller model",
7aacca6f 6269 "enum" : [
44660702
DM
6270 "lsi",
6271 "lsi53c810",
6272 "virtio-scsi-pci",
6273 "virtio-scsi-single",
6274 "megasas",
6275 "pvscsi"
7aacca6f 6276 ],
44660702
DM
6277 "optional" : 1,
6278 "type" : "string"
56122987 6279 },
44660702
DM
6280 "serial[n]" : {
6281 "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
7aacca6f 6282 "optional" : 1,
44660702
DM
6283 "pattern" : "(/dev/.+|socket)",
6284 "type" : "string"
7aacca6f 6285 },
44660702
DM
6286 "shares" : {
6287 "default" : 1000,
6288 "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",
6289 "maximum" : 50000,
6290 "minimum" : 0,
56122987 6291 "optional" : 1,
44660702 6292 "type" : "integer"
56122987 6293 },
44660702
DM
6294 "skiplock" : {
6295 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 6296 "optional" : 1,
44660702 6297 "type" : "boolean"
56122987 6298 },
44660702
DM
6299 "smbios1" : {
6300 "description" : "Specify SMBIOS type 1 fields.",
6301 "format" : "pve-qm-smbios1",
6302 "maxLength" : 256,
56122987 6303 "optional" : 1,
44660702 6304 "type" : "string"
56122987 6305 },
44660702
DM
6306 "smp" : {
6307 "default" : 1,
6308 "description" : "The number of CPUs. Please use option -sockets instead.",
7aacca6f 6309 "minimum" : 1,
7aacca6f 6310 "optional" : 1,
44660702 6311 "type" : "integer"
7aacca6f 6312 },
44660702
DM
6313 "sockets" : {
6314 "default" : 1,
6315 "description" : "The number of CPU sockets.",
6316 "minimum" : 1,
7aacca6f 6317 "optional" : 1,
44660702 6318 "type" : "integer"
56122987 6319 },
44660702
DM
6320 "startdate" : {
6321 "default" : "now",
6322 "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 6323 "optional" : 1,
44660702 6324 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 6325 "type" : "string",
44660702 6326 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
56122987 6327 },
7aacca6f 6328 "startup" : {
7aacca6f 6329 "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 6330 "format" : "pve-startup-order",
56122987 6331 "optional" : 1,
44660702
DM
6332 "type" : "string",
6333 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
56122987 6334 },
44660702 6335 "tablet" : {
7aacca6f 6336 "default" : 1,
44660702 6337 "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 6338 "optional" : 1,
44660702 6339 "type" : "boolean"
56122987 6340 },
44660702
DM
6341 "tdf" : {
6342 "default" : 0,
6343 "description" : "Enable/disable time drift fix.",
7aacca6f 6344 "optional" : 1,
44660702 6345 "type" : "boolean"
7aacca6f 6346 },
44660702
DM
6347 "template" : {
6348 "default" : 0,
6349 "description" : "Enable/disable Template.",
7aacca6f 6350 "optional" : 1,
44660702 6351 "type" : "boolean"
7aacca6f 6352 },
44660702
DM
6353 "unused[n]" : {
6354 "description" : "Reference to unused volumes.",
6355 "format" : "pve-volume-id",
7aacca6f 6356 "optional" : 1,
44660702 6357 "type" : "string"
7aacca6f 6358 },
44660702
DM
6359 "usb[n]" : {
6360 "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n",
6361 "format" : {
6362 "host" : {
6363 "default_key" : 1,
6364 "description" : "The Host USB device or port or the value spice",
6365 "format" : "pve-qm-usb-device",
6366 "format_description" : "HOSTUSBDEVICE|spice",
6367 "type" : "string"
6368 },
6369 "usb3" : {
6370 "description" : "Specifies whether if given host option is a USB3 device or port",
44660702
DM
6371 "optional" : 1,
6372 "type" : "boolean"
6373 }
6374 },
7aacca6f 6375 "optional" : 1,
44660702 6376 "type" : "string"
56122987 6377 },
44660702
DM
6378 "vcpus" : {
6379 "default" : 0,
6380 "description" : "Number of hotplugged vcpus.",
6381 "minimum" : 1,
56122987 6382 "optional" : 1,
44660702 6383 "type" : "integer"
56122987 6384 },
44660702
DM
6385 "vga" : {
6386 "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.",
6387 "enum" : [
6388 "std",
6389 "cirrus",
6390 "vmware",
6391 "qxl",
6392 "serial0",
6393 "serial1",
6394 "serial2",
6395 "serial3",
6396 "qxl2",
6397 "qxl3",
6398 "qxl4"
6399 ],
56122987 6400 "optional" : 1,
44660702 6401 "type" : "string"
56122987 6402 },
44660702
DM
6403 "virtio[n]" : {
6404 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
56122987 6405 "format" : {
44660702
DM
6406 "aio" : {
6407 "description" : "AIO type to use.",
56122987 6408 "enum" : [
44660702
DM
6409 "native",
6410 "threads"
56122987 6411 ],
56122987
DM
6412 "optional" : 1,
6413 "type" : "string"
6414 },
44660702
DM
6415 "backup" : {
6416 "description" : "Whether the drive should be included when making backups.",
44660702
DM
6417 "optional" : 1,
6418 "type" : "boolean"
7aacca6f 6419 },
44660702
DM
6420 "bps" : {
6421 "description" : "Maximum r/w speed speed in bytes per second.",
6422 "format_description" : "bps",
6423 "optional" : 1,
6424 "type" : "integer"
56122987 6425 },
44660702
DM
6426 "bps_rd" : {
6427 "description" : "Maximum read speed speed in bytes per second.",
6428 "format_description" : "bps",
56122987 6429 "optional" : 1,
44660702 6430 "type" : "integer"
56122987 6431 },
44660702
DM
6432 "bps_wr" : {
6433 "description" : "Maximum write speed speed in bytes per second.",
6434 "format_description" : "bps",
56122987 6435 "optional" : 1,
44660702
DM
6436 "type" : "integer"
6437 },
6438 "cache" : {
6439 "description" : "The drive's cache mode",
56122987 6440 "enum" : [
44660702
DM
6441 "none",
6442 "writethrough",
6443 "writeback",
6444 "unsafe",
6445 "directsync"
56122987 6446 ],
56122987 6447 "optional" : 1,
44660702 6448 "type" : "string"
56122987 6449 },
44660702
DM
6450 "cyls" : {
6451 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 6452 "optional" : 1,
44660702 6453 "type" : "integer"
7aacca6f 6454 },
44660702
DM
6455 "detect_zeroes" : {
6456 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6457 "optional" : 1,
6458 "type" : "boolean"
7aacca6f 6459 },
44660702
DM
6460 "discard" : {
6461 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6462 "enum" : [
6463 "ignore",
6464 "on"
6465 ],
56122987 6466 "optional" : 1,
44660702 6467 "type" : "string"
56122987
DM
6468 },
6469 "file" : {
7aacca6f 6470 "default_key" : 1,
44660702 6471 "description" : "The drive's backing volume.",
7aacca6f 6472 "format" : "pve-volume-id-or-qm-path",
44660702
DM
6473 "format_description" : "volume",
6474 "type" : "string"
7aacca6f
DM
6475 },
6476 "format" : {
7aacca6f
DM
6477 "description" : "The drive's backing file's data format.",
6478 "enum" : [
6479 "raw",
6480 "cow",
6481 "qcow",
6482 "qed",
6483 "qcow2",
6484 "vmdk",
6485 "cloop"
56122987 6486 ],
f004f5b9 6487 "format_description" : "image format",
56122987 6488 "optional" : 1,
56122987
DM
6489 "type" : "string"
6490 },
44660702
DM
6491 "heads" : {
6492 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6493 "optional" : 1,
44660702 6494 "type" : "integer"
56122987 6495 },
44660702
DM
6496 "iops" : {
6497 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6498 "format_description" : "iops",
56122987 6499 "optional" : 1,
44660702 6500 "type" : "integer"
56122987 6501 },
44660702
DM
6502 "iops_max" : {
6503 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6504 "format_description" : "iops",
56122987 6505 "optional" : 1,
56122987
DM
6506 "type" : "integer"
6507 },
44660702
DM
6508 "iops_rd" : {
6509 "description" : "Maximum read I/O speed in operations per second.",
6510 "format_description" : "iops",
56122987 6511 "optional" : 1,
44660702 6512 "type" : "integer"
56122987 6513 },
44660702
DM
6514 "iops_rd_max" : {
6515 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6516 "format_description" : "iops",
7aacca6f 6517 "optional" : 1,
44660702 6518 "type" : "integer"
56122987 6519 },
44660702
DM
6520 "iops_wr" : {
6521 "description" : "Maximum write I/O speed in operations per second.",
6522 "format_description" : "iops",
7aacca6f 6523 "optional" : 1,
44660702 6524 "type" : "integer"
56122987 6525 },
44660702
DM
6526 "iops_wr_max" : {
6527 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6528 "format_description" : "iops",
56122987
DM
6529 "optional" : 1,
6530 "type" : "integer"
6531 },
44660702
DM
6532 "iothread" : {
6533 "description" : "Whether to use iothreads for this drive",
44660702
DM
6534 "optional" : 1,
6535 "type" : "boolean"
6536 },
6537 "mbps" : {
6538 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 6539 "format_description" : "mbps",
44660702
DM
6540 "optional" : 1,
6541 "type" : "number"
6542 },
6543 "mbps_max" : {
7aacca6f 6544 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702
DM
6545 "format_description" : "mbps",
6546 "optional" : 1,
6547 "type" : "number"
7aacca6f 6548 },
44660702
DM
6549 "mbps_rd" : {
6550 "description" : "Maximum read speed speed in megabytes per second.",
6551 "format_description" : "mbps",
56122987 6552 "optional" : 1,
44660702 6553 "type" : "number"
56122987 6554 },
44660702
DM
6555 "mbps_rd_max" : {
6556 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6557 "format_description" : "mbps",
7aacca6f 6558 "optional" : 1,
44660702 6559 "type" : "number"
56122987 6560 },
44660702
DM
6561 "mbps_wr" : {
6562 "description" : "Maximum write speed speed in megabytes per second.",
6563 "format_description" : "mbps",
56122987 6564 "optional" : 1,
44660702 6565 "type" : "number"
56122987 6566 },
44660702
DM
6567 "mbps_wr_max" : {
6568 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6569 "format_description" : "mbps",
56122987 6570 "optional" : 1,
44660702 6571 "type" : "number"
56122987
DM
6572 },
6573 "media" : {
7aacca6f 6574 "default" : "disk",
44660702 6575 "description" : "The drive's media type.",
56122987
DM
6576 "enum" : [
6577 "cdrom",
6578 "disk"
6579 ],
44660702
DM
6580 "optional" : 1,
6581 "type" : "string"
56122987 6582 },
7aacca6f 6583 "rerror" : {
44660702 6584 "description" : "Read error action.",
56122987 6585 "enum" : [
7aacca6f
DM
6586 "ignore",
6587 "report",
6588 "stop"
56122987 6589 ],
56122987 6590 "optional" : 1,
44660702 6591 "type" : "string"
56122987 6592 },
44660702
DM
6593 "secs" : {
6594 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6595 "optional" : 1,
6596 "type" : "integer"
6597 },
6598 "serial" : {
6599 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6600 "format" : "urlencoded",
6601 "format_description" : "serial",
6602 "maxLength" : 60,
56122987 6603 "optional" : 1,
7aacca6f 6604 "type" : "string"
56122987 6605 },
44660702
DM
6606 "size" : {
6607 "description" : "Disk size. This is purely informational and has no effect.",
6608 "format" : "disk-size",
f004f5b9 6609 "format_description" : "DiskSize",
56122987 6610 "optional" : 1,
44660702 6611 "type" : "string"
56122987 6612 },
44660702
DM
6613 "snapshot" : {
6614 "description" : "Whether the drive should be included when making snapshots.",
56122987 6615 "optional" : 1,
44660702 6616 "type" : "boolean"
56122987 6617 },
44660702
DM
6618 "trans" : {
6619 "description" : "Force disk geometry bios translation mode.",
6620 "enum" : [
6621 "none",
6622 "lba",
6623 "auto"
6624 ],
44660702
DM
6625 "optional" : 1,
6626 "type" : "string"
6627 },
6628 "volume" : {
6629 "alias" : "file"
6630 },
6631 "werror" : {
6632 "description" : "Write error action.",
6633 "enum" : [
6634 "enospc",
6635 "ignore",
6636 "report",
6637 "stop"
6638 ],
56122987 6639 "optional" : 1,
44660702 6640 "type" : "string"
56122987 6641 }
44660702 6642 },
56122987 6643 "optional" : 1,
44660702 6644 "type" : "string"
56122987 6645 },
7aacca6f
DM
6646 "vmid" : {
6647 "description" : "The (unique) ID of the VM.",
7aacca6f 6648 "format" : "pve-vmid",
44660702
DM
6649 "minimum" : 1,
6650 "type" : "integer"
56122987 6651 },
44660702
DM
6652 "watchdog" : {
6653 "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)",
6654 "format" : "pve-qm-watchdog",
56122987 6655 "optional" : 1,
44660702 6656 "type" : "string"
56122987 6657 }
44660702 6658 }
56122987 6659 },
7aacca6f
DM
6660 "permissions" : {
6661 "check" : [
6662 "perm",
6663 "/vms/{vmid}",
6664 [
44660702
DM
6665 "VM.Config.Disk",
6666 "VM.Config.CDROM",
6667 "VM.Config.CPU",
6668 "VM.Config.Memory",
6669 "VM.Config.Network",
6670 "VM.Config.HWType",
6671 "VM.Config.Options"
6672 ],
6673 "any",
6674 1
7aacca6f 6675 ]
56122987 6676 },
44660702 6677 "protected" : 1,
7aacca6f 6678 "proxyto" : "node",
44660702
DM
6679 "returns" : {
6680 "optional" : 1,
6681 "type" : "string"
6682 }
56122987 6683 },
7aacca6f 6684 "PUT" : {
44660702
DM
6685 "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.",
6686 "method" : "PUT",
6687 "name" : "update_vm",
56122987 6688 "parameters" : {
7aacca6f 6689 "additionalProperties" : 0,
56122987 6690 "properties" : {
44660702
DM
6691 "acpi" : {
6692 "default" : 1,
6693 "description" : "Enable/disable ACPI.",
7aacca6f 6694 "optional" : 1,
44660702 6695 "type" : "boolean"
7aacca6f 6696 },
44660702
DM
6697 "agent" : {
6698 "default" : 0,
6699 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 6700 "optional" : 1,
44660702 6701 "type" : "boolean"
56122987 6702 },
44660702
DM
6703 "args" : {
6704 "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n",
7aacca6f
DM
6705 "optional" : 1,
6706 "type" : "string"
6707 },
44660702
DM
6708 "autostart" : {
6709 "default" : 0,
6710 "description" : "Automatic restart after crash (currently ignored).",
7aacca6f
DM
6711 "optional" : 1,
6712 "type" : "boolean"
6713 },
44660702
DM
6714 "balloon" : {
6715 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
6716 "minimum" : 0,
6717 "optional" : 1,
6718 "type" : "integer"
6719 },
6720 "bios" : {
6721 "default" : "seabios",
6722 "description" : "Select BIOS implementation.",
7aacca6f 6723 "enum" : [
44660702
DM
6724 "seabios",
6725 "ovmf"
7aacca6f 6726 ],
56122987 6727 "optional" : 1,
7aacca6f
DM
6728 "type" : "string"
6729 },
44660702
DM
6730 "boot" : {
6731 "default" : "cdn",
6732 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
7aacca6f 6733 "optional" : 1,
44660702
DM
6734 "pattern" : "[acdn]{1,4}",
6735 "type" : "string"
56122987 6736 },
44660702
DM
6737 "bootdisk" : {
6738 "description" : "Enable booting from specified disk.",
6739 "format" : "pve-qm-bootdisk",
6740 "optional" : 1,
6741 "pattern" : "(ide|sata|scsi|virtio)\\d+",
6742 "type" : "string"
6743 },
6744 "cdrom" : {
6745 "description" : "This is an alias for option -ide2",
6746 "format" : "pve-qm-drive",
56122987 6747 "optional" : 1,
7aacca6f 6748 "type" : "string",
44660702
DM
6749 "typetext" : "volume"
6750 },
6751 "cores" : {
6752 "default" : 1,
6753 "description" : "The number of cores per socket.",
6754 "minimum" : 1,
6755 "optional" : 1,
6756 "type" : "integer"
6757 },
6758 "cpu" : {
6759 "description" : "Emulated CPU type.",
6760 "format" : {
6761 "cputype" : {
6762 "default" : "kvm64",
6763 "default_key" : 1,
6764 "description" : "Emulated CPU type.",
6765 "enum" : [
6766 "486",
6767 "athlon",
f004f5b9
DM
6768 "Broadwell",
6769 "Broadwell-noTSX",
6770 "Conroe",
44660702 6771 "core2duo",
f004f5b9
DM
6772 "coreduo",
6773 "Haswell",
6774 "Haswell-noTSX",
6775 "host",
6776 "IvyBridge",
44660702
DM
6777 "kvm32",
6778 "kvm64",
44660702 6779 "Nehalem",
44660702
DM
6780 "Opteron_G1",
6781 "Opteron_G2",
6782 "Opteron_G3",
6783 "Opteron_G4",
6784 "Opteron_G5",
f004f5b9
DM
6785 "Penryn",
6786 "pentium",
6787 "pentium2",
6788 "pentium3",
6789 "phenom",
6790 "qemu32",
6791 "qemu64",
6792 "SandyBridge",
6793 "Westmere"
44660702
DM
6794 ],
6795 "format_description" : "cputype",
6796 "type" : "string"
6797 },
6798 "hidden" : {
6799 "default" : 0,
6800 "description" : "Do not identify as a KVM virtual machine.",
6801 "optional" : 1,
6802 "type" : "boolean"
6803 }
6804 },
6805 "optional" : 1,
6806 "type" : "string"
6807 },
6808 "cpulimit" : {
6809 "default" : 0,
6810 "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.",
6811 "maximum" : 128,
6812 "minimum" : 0,
6813 "optional" : 1,
6814 "type" : "number"
6815 },
6816 "cpuunits" : {
6817 "default" : 1000,
6818 "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.",
6819 "maximum" : 500000,
6820 "minimum" : 0,
6821 "optional" : 1,
6822 "type" : "integer"
6823 },
6824 "delete" : {
6825 "description" : "A list of settings you want to delete.",
6826 "format" : "pve-configid-list",
6827 "optional" : 1,
6828 "type" : "string"
6829 },
6830 "description" : {
6831 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
6832 "optional" : 1,
6833 "type" : "string"
6834 },
6835 "digest" : {
6836 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
6837 "maxLength" : 40,
6838 "optional" : 1,
6839 "type" : "string"
6840 },
6841 "force" : {
6842 "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.",
6843 "optional" : 1,
6844 "requires" : "delete",
6845 "type" : "boolean"
6846 },
6847 "freeze" : {
6848 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
6849 "optional" : 1,
6850 "type" : "boolean"
6851 },
6852 "hostpci[n]" : {
6853 "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
6854 "format" : "pve-qm-hostpci",
6855 "optional" : 1,
6856 "type" : "string"
56122987 6857 },
7aacca6f 6858 "hotplug" : {
7aacca6f 6859 "default" : "network,disk,usb",
44660702
DM
6860 "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'.",
6861 "format" : "pve-hotplug-features",
56122987 6862 "optional" : 1,
56122987
DM
6863 "type" : "string"
6864 },
6865 "ide[n]" : {
7aacca6f 6866 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 6867 "format" : {
44660702
DM
6868 "aio" : {
6869 "description" : "AIO type to use.",
6870 "enum" : [
6871 "native",
6872 "threads"
6873 ],
56122987 6874 "optional" : 1,
44660702 6875 "type" : "string"
56122987 6876 },
44660702
DM
6877 "backup" : {
6878 "description" : "Whether the drive should be included when making backups.",
44660702
DM
6879 "optional" : 1,
6880 "type" : "boolean"
6881 },
6882 "bps" : {
6883 "description" : "Maximum r/w speed speed in bytes per second.",
6884 "format_description" : "bps",
56122987 6885 "optional" : 1,
44660702 6886 "type" : "integer"
56122987 6887 },
44660702
DM
6888 "bps_rd" : {
6889 "description" : "Maximum read speed speed in bytes per second.",
6890 "format_description" : "bps",
56122987 6891 "optional" : 1,
44660702 6892 "type" : "integer"
56122987 6893 },
7aacca6f 6894 "bps_wr" : {
7aacca6f 6895 "description" : "Maximum write speed speed in bytes per second.",
44660702
DM
6896 "format_description" : "bps",
6897 "optional" : 1,
6898 "type" : "integer"
7aacca6f 6899 },
44660702
DM
6900 "cache" : {
6901 "description" : "The drive's cache mode",
6902 "enum" : [
6903 "none",
6904 "writethrough",
6905 "writeback",
6906 "unsafe",
6907 "directsync"
6908 ],
56122987 6909 "optional" : 1,
44660702
DM
6910 "type" : "string"
6911 },
6912 "cyls" : {
6913 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
6914 "optional" : 1,
6915 "type" : "integer"
6916 },
6917 "detect_zeroes" : {
6918 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6919 "optional" : 1,
6920 "type" : "boolean"
56122987 6921 },
7aacca6f 6922 "discard" : {
7aacca6f 6923 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 6924 "enum" : [
7aacca6f
DM
6925 "ignore",
6926 "on"
56122987
DM
6927 ],
6928 "optional" : 1,
44660702 6929 "type" : "string"
7aacca6f 6930 },
44660702
DM
6931 "file" : {
6932 "default_key" : 1,
6933 "description" : "The drive's backing volume.",
6934 "format" : "pve-volume-id-or-qm-path",
6935 "format_description" : "volume",
6936 "type" : "string"
7aacca6f
DM
6937 },
6938 "format" : {
44660702 6939 "description" : "The drive's backing file's data format.",
7aacca6f
DM
6940 "enum" : [
6941 "raw",
6942 "cow",
6943 "qcow",
6944 "qed",
6945 "qcow2",
6946 "vmdk",
6947 "cloop"
6948 ],
f004f5b9 6949 "format_description" : "image format",
7aacca6f 6950 "optional" : 1,
44660702 6951 "type" : "string"
56122987 6952 },
7aacca6f 6953 "heads" : {
44660702 6954 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6955 "optional" : 1,
44660702 6956 "type" : "integer"
7aacca6f 6957 },
44660702
DM
6958 "iops" : {
6959 "description" : "Maximum r/w I/O speed in operations per second.",
6960 "format_description" : "iops",
7aacca6f 6961 "optional" : 1,
44660702 6962 "type" : "integer"
56122987 6963 },
44660702
DM
6964 "iops_max" : {
6965 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6966 "format_description" : "iops",
56122987 6967 "optional" : 1,
44660702 6968 "type" : "integer"
56122987 6969 },
44660702
DM
6970 "iops_rd" : {
6971 "description" : "Maximum read I/O speed in operations per second.",
6972 "format_description" : "iops",
56122987 6973 "optional" : 1,
44660702 6974 "type" : "integer"
7aacca6f 6975 },
44660702
DM
6976 "iops_rd_max" : {
6977 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6978 "format_description" : "iops",
7aacca6f 6979 "optional" : 1,
44660702 6980 "type" : "integer"
7aacca6f 6981 },
44660702
DM
6982 "iops_wr" : {
6983 "description" : "Maximum write I/O speed in operations per second.",
6984 "format_description" : "iops",
7aacca6f 6985 "optional" : 1,
44660702 6986 "type" : "integer"
56122987 6987 },
44660702
DM
6988 "iops_wr_max" : {
6989 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6990 "format_description" : "iops",
7aacca6f 6991 "optional" : 1,
44660702 6992 "type" : "integer"
7aacca6f
DM
6993 },
6994 "mbps" : {
44660702 6995 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 6996 "format_description" : "mbps",
7aacca6f 6997 "optional" : 1,
44660702 6998 "type" : "number"
7aacca6f 6999 },
44660702
DM
7000 "mbps_max" : {
7001 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7002 "format_description" : "mbps",
7aacca6f 7003 "optional" : 1,
44660702 7004 "type" : "number"
7aacca6f 7005 },
44660702
DM
7006 "mbps_rd" : {
7007 "description" : "Maximum read speed speed in megabytes per second.",
7008 "format_description" : "mbps",
7aacca6f 7009 "optional" : 1,
44660702 7010 "type" : "number"
7aacca6f 7011 },
44660702
DM
7012 "mbps_rd_max" : {
7013 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7014 "format_description" : "mbps",
7015 "optional" : 1,
7016 "type" : "number"
7aacca6f 7017 },
44660702
DM
7018 "mbps_wr" : {
7019 "description" : "Maximum write speed speed in megabytes per second.",
7020 "format_description" : "mbps",
7aacca6f 7021 "optional" : 1,
44660702
DM
7022 "type" : "number"
7023 },
7024 "mbps_wr_max" : {
7025 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7026 "format_description" : "mbps",
7027 "optional" : 1,
7028 "type" : "number"
7029 },
7030 "media" : {
7031 "default" : "disk",
7032 "description" : "The drive's media type.",
56122987 7033 "enum" : [
44660702
DM
7034 "cdrom",
7035 "disk"
56122987 7036 ],
44660702
DM
7037 "optional" : 1,
7038 "type" : "string"
56122987 7039 },
7aacca6f 7040 "model" : {
44660702 7041 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
56122987 7042 "format" : "urlencoded",
7aacca6f 7043 "format_description" : "model",
44660702 7044 "maxLength" : 120,
56122987 7045 "optional" : 1,
44660702 7046 "type" : "string"
56122987 7047 },
44660702
DM
7048 "rerror" : {
7049 "description" : "Read error action.",
7050 "enum" : [
7051 "ignore",
7052 "report",
7053 "stop"
7054 ],
56122987 7055 "optional" : 1,
44660702 7056 "type" : "string"
56122987 7057 },
44660702
DM
7058 "secs" : {
7059 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
7060 "optional" : 1,
7061 "type" : "integer"
56122987 7062 },
44660702
DM
7063 "serial" : {
7064 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7065 "format" : "urlencoded",
7066 "format_description" : "serial",
7067 "maxLength" : 60,
56122987 7068 "optional" : 1,
44660702 7069 "type" : "string"
56122987 7070 },
44660702
DM
7071 "size" : {
7072 "description" : "Disk size. This is purely informational and has no effect.",
7073 "format" : "disk-size",
f004f5b9 7074 "format_description" : "DiskSize",
56122987 7075 "optional" : 1,
44660702 7076 "type" : "string"
56122987 7077 },
44660702
DM
7078 "snapshot" : {
7079 "description" : "Whether the drive should be included when making snapshots.",
56122987 7080 "optional" : 1,
44660702 7081 "type" : "boolean"
56122987 7082 },
44660702
DM
7083 "trans" : {
7084 "description" : "Force disk geometry bios translation mode.",
7085 "enum" : [
7086 "none",
7087 "lba",
7088 "auto"
7089 ],
56122987 7090 "optional" : 1,
44660702
DM
7091 "type" : "string"
7092 },
7093 "volume" : {
7094 "alias" : "file"
56122987 7095 },
7aacca6f 7096 "werror" : {
44660702 7097 "description" : "Write error action.",
7aacca6f
DM
7098 "enum" : [
7099 "enospc",
7100 "ignore",
7101 "report",
7102 "stop"
7103 ],
56122987 7104 "optional" : 1,
44660702 7105 "type" : "string"
7aacca6f 7106 }
44660702
DM
7107 },
7108 "optional" : 1,
7109 "type" : "string"
7aacca6f 7110 },
44660702
DM
7111 "keyboard" : {
7112 "default" : "en-us",
7113 "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.",
7114 "enum" : [
7115 "de",
7116 "de-ch",
7117 "da",
7118 "en-gb",
7119 "en-us",
7120 "es",
7121 "fi",
7122 "fr",
7123 "fr-be",
7124 "fr-ca",
7125 "fr-ch",
7126 "hu",
7127 "is",
7128 "it",
7129 "ja",
7130 "lt",
7131 "mk",
7132 "nl",
7133 "no",
7134 "pl",
7135 "pt",
7136 "pt-br",
7137 "sv",
7138 "sl",
7139 "tr"
7140 ],
7aacca6f 7141 "optional" : 1,
44660702 7142 "type" : "string"
7aacca6f 7143 },
44660702 7144 "kvm" : {
7aacca6f 7145 "default" : 1,
44660702 7146 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 7147 "optional" : 1,
44660702 7148 "type" : "boolean"
7aacca6f 7149 },
44660702
DM
7150 "localtime" : {
7151 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
7aacca6f 7152 "optional" : 1,
44660702 7153 "type" : "boolean"
7aacca6f 7154 },
44660702
DM
7155 "lock" : {
7156 "description" : "Lock/unlock the VM.",
7157 "enum" : [
7158 "migrate",
7159 "backup",
7160 "snapshot",
7161 "rollback"
7162 ],
7aacca6f 7163 "optional" : 1,
44660702 7164 "type" : "string"
7aacca6f 7165 },
44660702
DM
7166 "machine" : {
7167 "description" : "Specific the Qemu machine type.",
7168 "maxLength" : 40,
7aacca6f 7169 "optional" : 1,
44660702
DM
7170 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
7171 "type" : "string"
7aacca6f 7172 },
44660702
DM
7173 "memory" : {
7174 "default" : 512,
7175 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
7176 "minimum" : 16,
7aacca6f 7177 "optional" : 1,
44660702 7178 "type" : "integer"
7aacca6f 7179 },
44660702
DM
7180 "migrate_downtime" : {
7181 "default" : 0.1,
7182 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
7183 "minimum" : 0,
7aacca6f 7184 "optional" : 1,
44660702 7185 "type" : "number"
7aacca6f 7186 },
44660702 7187 "migrate_speed" : {
7aacca6f 7188 "default" : 0,
44660702
DM
7189 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
7190 "minimum" : 0,
7191 "optional" : 1,
7192 "type" : "integer"
7aacca6f 7193 },
44660702
DM
7194 "name" : {
7195 "description" : "Set a name for the VM. Only used on the configuration web interface.",
7196 "format" : "dns-name",
7aacca6f 7197 "optional" : 1,
44660702 7198 "type" : "string"
7aacca6f 7199 },
44660702
DM
7200 "net[n]" : {
7201 "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n",
f004f5b9
DM
7202 "format" : {
7203 "bridge" : {
7204 "description" : "Bridge to attach the network device to.",
7205 "format_description" : "bridge",
7206 "optional" : 1,
7207 "type" : "string"
7208 },
7209 "e1000" : {
7210 "alias" : "macaddr",
7211 "keyAlias" : "model"
7212 },
7213 "e1000-82540em" : {
7214 "alias" : "macaddr",
7215 "keyAlias" : "model"
7216 },
7217 "e1000-82544gc" : {
7218 "alias" : "macaddr",
7219 "keyAlias" : "model"
7220 },
7221 "e1000-82545em" : {
7222 "alias" : "macaddr",
7223 "keyAlias" : "model"
7224 },
7225 "firewall" : {
7226 "description" : "Whether this interface should be protected by the firewall.",
7227 "optional" : 1,
7228 "type" : "boolean"
7229 },
7230 "i82551" : {
7231 "alias" : "macaddr",
7232 "keyAlias" : "model"
7233 },
7234 "i82557b" : {
7235 "alias" : "macaddr",
7236 "keyAlias" : "model"
7237 },
7238 "i82559er" : {
7239 "alias" : "macaddr",
7240 "keyAlias" : "model"
7241 },
7242 "link_down" : {
7243 "description" : "Whether this interface should be DISconnected (like pulling the plug).",
7244 "optional" : 1,
7245 "type" : "boolean"
7246 },
7247 "macaddr" : {
7248 "description" : "MAC address",
7249 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
7250 "optional" : 1,
7251 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
7252 "type" : "string"
7253 },
7254 "model" : {
7255 "default_key" : 1,
7256 "description" : "Network Card Model.",
7257 "enum" : [
7258 "rtl8139",
7259 "ne2k_pci",
7260 "e1000",
7261 "pcnet",
7262 "virtio",
7263 "ne2k_isa",
7264 "i82551",
7265 "i82557b",
7266 "i82559er",
7267 "vmxnet3",
7268 "e1000-82540em",
7269 "e1000-82544gc",
7270 "e1000-82545em"
7271 ],
7272 "format_description" : "model",
7273 "type" : "string"
7274 },
7275 "ne2k_isa" : {
7276 "alias" : "macaddr",
7277 "keyAlias" : "model"
7278 },
7279 "ne2k_pci" : {
7280 "alias" : "macaddr",
7281 "keyAlias" : "model"
7282 },
7283 "pcnet" : {
7284 "alias" : "macaddr",
7285 "keyAlias" : "model"
7286 },
7287 "queues" : {
7288 "description" : "Number of packet queues to be used on the device.",
7289 "maximum" : 16,
7290 "minimum" : 0,
7291 "optional" : 1,
7292 "type" : "integer"
7293 },
7294 "rate" : {
7295 "description" : "Rate limit in mbps as floating point number.",
7296 "minimum" : 0,
7297 "optional" : 1,
7298 "type" : "number"
7299 },
7300 "rtl8139" : {
7301 "alias" : "macaddr",
7302 "keyAlias" : "model"
7303 },
7304 "tag" : {
7305 "description" : "VLAN tag to apply to packets on this interface.",
7306 "maximum" : 4094,
7307 "minimum" : 2,
7308 "optional" : 1,
7309 "type" : "integer"
7310 },
7311 "trunks" : {
7312 "description" : "VLAN trunks to pass through this interface.",
7313 "format_description" : "vlanid[;vlanid...]",
7314 "optional" : 1,
7315 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7316 "type" : "string"
7317 },
7318 "virtio" : {
7319 "alias" : "macaddr",
7320 "keyAlias" : "model"
7321 },
7322 "vmxnet3" : {
7323 "alias" : "macaddr",
7324 "keyAlias" : "model"
7325 }
7326 },
7aacca6f 7327 "optional" : 1,
44660702 7328 "type" : "string"
7aacca6f 7329 },
44660702
DM
7330 "node" : {
7331 "description" : "The cluster node name.",
7332 "format" : "pve-node",
7333 "type" : "string"
7334 },
7335 "numa" : {
7336 "default" : 0,
7337 "description" : "Enable/disable NUMA.",
7aacca6f
DM
7338 "optional" : 1,
7339 "type" : "boolean"
7340 },
44660702
DM
7341 "numa[n]" : {
7342 "description" : "numa topology",
7343 "format" : {
7344 "cpus" : {
7345 "description" : "CPUs accessing this numa node.",
7346 "format_description" : "id[-id];...",
7347 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7348 "type" : "string"
7349 },
7350 "hostnodes" : {
7351 "description" : "host numa nodes to use",
7352 "format_description" : "id[-id];...",
7353 "optional" : 1,
7354 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7355 "type" : "string"
7356 },
7357 "memory" : {
7358 "description" : "Amount of memory this numa node provides.",
44660702
DM
7359 "optional" : 1,
7360 "type" : "number"
7361 },
7362 "policy" : {
7363 "description" : "numa allocation policy.",
7364 "enum" : [
7365 "preferred",
7366 "bind",
7367 "interleave"
7368 ],
44660702
DM
7369 "optional" : 1,
7370 "type" : "string"
7371 }
7372 },
7aacca6f 7373 "optional" : 1,
44660702 7374 "type" : "string"
7aacca6f 7375 },
44660702
DM
7376 "onboot" : {
7377 "default" : 0,
7378 "description" : "Specifies whether a VM will be started during system bootup.",
7aacca6f 7379 "optional" : 1,
44660702 7380 "type" : "boolean"
7aacca6f 7381 },
44660702
DM
7382 "ostype" : {
7383 "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n",
7384 "enum" : [
7385 "other",
7386 "wxp",
7387 "w2k",
7388 "w2k3",
7389 "w2k8",
7390 "wvista",
7391 "win7",
7392 "win8",
7393 "l24",
7394 "l26",
7395 "solaris"
7396 ],
7aacca6f
DM
7397 "optional" : 1,
7398 "type" : "string"
7399 },
44660702
DM
7400 "parallel[n]" : {
7401 "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
7aacca6f 7402 "optional" : 1,
44660702
DM
7403 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
7404 "type" : "string"
7aacca6f 7405 },
44660702
DM
7406 "protection" : {
7407 "default" : 0,
7408 "description" : "Sets the protection flag of the VM. This will prevent the remove operation.",
7aacca6f 7409 "optional" : 1,
44660702 7410 "type" : "boolean"
7aacca6f 7411 },
44660702
DM
7412 "reboot" : {
7413 "default" : 1,
7414 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 7415 "optional" : 1,
44660702 7416 "type" : "boolean"
7aacca6f 7417 },
44660702
DM
7418 "revert" : {
7419 "description" : "Revert a pending change.",
7420 "format" : "pve-configid-list",
7aacca6f 7421 "optional" : 1,
44660702 7422 "type" : "string"
7aacca6f 7423 },
44660702
DM
7424 "sata[n]" : {
7425 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
7aacca6f 7426 "format" : {
44660702
DM
7427 "aio" : {
7428 "description" : "AIO type to use.",
7429 "enum" : [
7430 "native",
7431 "threads"
7432 ],
44660702
DM
7433 "optional" : 1,
7434 "type" : "string"
7435 },
7436 "backup" : {
7437 "description" : "Whether the drive should be included when making backups.",
44660702
DM
7438 "optional" : 1,
7439 "type" : "boolean"
7440 },
7441 "bps" : {
7442 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 7443 "format_description" : "bps",
7aacca6f
DM
7444 "optional" : 1,
7445 "type" : "integer"
56122987 7446 },
44660702
DM
7447 "bps_rd" : {
7448 "description" : "Maximum read speed speed in bytes per second.",
7449 "format_description" : "bps",
7aacca6f 7450 "optional" : 1,
44660702 7451 "type" : "integer"
7aacca6f 7452 },
44660702
DM
7453 "bps_wr" : {
7454 "description" : "Maximum write speed speed in bytes per second.",
7455 "format_description" : "bps",
7aacca6f 7456 "optional" : 1,
44660702 7457 "type" : "integer"
7aacca6f 7458 },
44660702
DM
7459 "cache" : {
7460 "description" : "The drive's cache mode",
7461 "enum" : [
7462 "none",
7463 "writethrough",
7464 "writeback",
7465 "unsafe",
7466 "directsync"
7467 ],
7aacca6f 7468 "optional" : 1,
44660702 7469 "type" : "string"
7aacca6f 7470 },
44660702
DM
7471 "cyls" : {
7472 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 7473 "optional" : 1,
44660702 7474 "type" : "integer"
7aacca6f 7475 },
44660702
DM
7476 "detect_zeroes" : {
7477 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7aacca6f 7478 "optional" : 1,
44660702 7479 "type" : "boolean"
7aacca6f 7480 },
44660702
DM
7481 "discard" : {
7482 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7483 "enum" : [
7484 "ignore",
7485 "on"
7486 ],
7aacca6f 7487 "optional" : 1,
44660702
DM
7488 "type" : "string"
7489 },
7490 "file" : {
7491 "default_key" : 1,
7492 "description" : "The drive's backing volume.",
7493 "format" : "pve-volume-id-or-qm-path",
7494 "format_description" : "volume",
7495 "type" : "string"
7aacca6f
DM
7496 },
7497 "format" : {
7aacca6f 7498 "description" : "The drive's backing file's data format.",
56122987
DM
7499 "enum" : [
7500 "raw",
7501 "cow",
7502 "qcow",
7503 "qed",
7504 "qcow2",
7505 "vmdk",
7506 "cloop"
7507 ],
f004f5b9 7508 "format_description" : "image format",
56122987 7509 "optional" : 1,
7aacca6f 7510 "type" : "string"
56122987 7511 },
7aacca6f 7512 "heads" : {
7aacca6f 7513 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
7514 "optional" : 1,
7515 "type" : "integer"
56122987 7516 },
44660702
DM
7517 "iops" : {
7518 "description" : "Maximum r/w I/O speed in operations per second.",
7519 "format_description" : "iops",
56122987 7520 "optional" : 1,
44660702 7521 "type" : "integer"
7aacca6f 7522 },
44660702
DM
7523 "iops_max" : {
7524 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7525 "format_description" : "iops",
7aacca6f 7526 "optional" : 1,
44660702 7527 "type" : "integer"
56122987 7528 },
44660702
DM
7529 "iops_rd" : {
7530 "description" : "Maximum read I/O speed in operations per second.",
7531 "format_description" : "iops",
56122987 7532 "optional" : 1,
44660702 7533 "type" : "integer"
7aacca6f 7534 },
44660702
DM
7535 "iops_rd_max" : {
7536 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7537 "format_description" : "iops",
56122987 7538 "optional" : 1,
44660702 7539 "type" : "integer"
56122987 7540 },
44660702
DM
7541 "iops_wr" : {
7542 "description" : "Maximum write I/O speed in operations per second.",
7543 "format_description" : "iops",
7544 "optional" : 1,
7545 "type" : "integer"
56122987 7546 },
44660702
DM
7547 "iops_wr_max" : {
7548 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7549 "format_description" : "iops",
7550 "optional" : 1,
7551 "type" : "integer"
7552 },
7553 "mbps" : {
7554 "description" : "Maximum r/w speed speed in megabytes per second.",
7555 "format_description" : "mbps",
7556 "optional" : 1,
7557 "type" : "number"
7558 },
7559 "mbps_max" : {
7560 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7561 "format_description" : "mbps",
7562 "optional" : 1,
7563 "type" : "number"
7564 },
7565 "mbps_rd" : {
7566 "description" : "Maximum read speed speed in megabytes per second.",
7567 "format_description" : "mbps",
7568 "optional" : 1,
7569 "type" : "number"
7570 },
7571 "mbps_rd_max" : {
7572 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7573 "format_description" : "mbps",
7574 "optional" : 1,
7575 "type" : "number"
7576 },
7577 "mbps_wr" : {
7578 "description" : "Maximum write speed speed in megabytes per second.",
7579 "format_description" : "mbps",
7580 "optional" : 1,
7581 "type" : "number"
7582 },
7583 "mbps_wr_max" : {
7584 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7585 "format_description" : "mbps",
7586 "optional" : 1,
7587 "type" : "number"
7588 },
7589 "media" : {
7590 "default" : "disk",
7591 "description" : "The drive's media type.",
7592 "enum" : [
7593 "cdrom",
7594 "disk"
7595 ],
56122987 7596 "optional" : 1,
44660702
DM
7597 "type" : "string"
7598 },
7599 "rerror" : {
7aacca6f
DM
7600 "description" : "Read error action.",
7601 "enum" : [
7602 "ignore",
7603 "report",
7604 "stop"
44660702 7605 ],
56122987 7606 "optional" : 1,
44660702 7607 "type" : "string"
56122987 7608 },
7aacca6f 7609 "secs" : {
44660702 7610 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7611 "optional" : 1,
44660702 7612 "type" : "integer"
56122987 7613 },
44660702
DM
7614 "serial" : {
7615 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7616 "format" : "urlencoded",
7617 "format_description" : "serial",
7618 "maxLength" : 60,
56122987 7619 "optional" : 1,
44660702 7620 "type" : "string"
56122987 7621 },
44660702
DM
7622 "size" : {
7623 "description" : "Disk size. This is purely informational and has no effect.",
7624 "format" : "disk-size",
f004f5b9 7625 "format_description" : "DiskSize",
56122987 7626 "optional" : 1,
44660702 7627 "type" : "string"
56122987
DM
7628 },
7629 "snapshot" : {
7aacca6f 7630 "description" : "Whether the drive should be included when making snapshots.",
56122987 7631 "optional" : 1,
44660702 7632 "type" : "boolean"
56122987 7633 },
56122987 7634 "trans" : {
7aacca6f 7635 "description" : "Force disk geometry bios translation mode.",
56122987
DM
7636 "enum" : [
7637 "none",
7638 "lba",
7639 "auto"
7640 ],
7641 "optional" : 1,
44660702 7642 "type" : "string"
56122987 7643 },
44660702
DM
7644 "volume" : {
7645 "alias" : "file"
56122987 7646 },
7aacca6f 7647 "werror" : {
44660702 7648 "description" : "Write error action.",
56122987 7649 "enum" : [
7aacca6f 7650 "enospc",
56122987 7651 "ignore",
7aacca6f
DM
7652 "report",
7653 "stop"
7654 ],
7aacca6f 7655 "optional" : 1,
44660702
DM
7656 "type" : "string"
7657 }
7658 },
7659 "optional" : 1,
7660 "type" : "string"
7661 },
7662 "scsi[n]" : {
7663 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
7664 "format" : {
7665 "aio" : {
7aacca6f 7666 "description" : "AIO type to use.",
56122987
DM
7667 "enum" : [
7668 "native",
7669 "threads"
44660702 7670 ],
56122987 7671 "optional" : 1,
44660702 7672 "type" : "string"
56122987 7673 },
7aacca6f 7674 "backup" : {
7aacca6f 7675 "description" : "Whether the drive should be included when making backups.",
7aacca6f 7676 "optional" : 1,
44660702 7677 "type" : "boolean"
56122987 7678 },
44660702
DM
7679 "bps" : {
7680 "description" : "Maximum r/w speed speed in bytes per second.",
7681 "format_description" : "bps",
7aacca6f 7682 "optional" : 1,
44660702 7683 "type" : "integer"
7aacca6f 7684 },
44660702
DM
7685 "bps_rd" : {
7686 "description" : "Maximum read speed speed in bytes per second.",
7687 "format_description" : "bps",
56122987 7688 "optional" : 1,
44660702 7689 "type" : "integer"
56122987 7690 },
44660702
DM
7691 "bps_wr" : {
7692 "description" : "Maximum write speed speed in bytes per second.",
7693 "format_description" : "bps",
56122987 7694 "optional" : 1,
44660702 7695 "type" : "integer"
56122987 7696 },
44660702
DM
7697 "cache" : {
7698 "description" : "The drive's cache mode",
7699 "enum" : [
7700 "none",
7701 "writethrough",
7702 "writeback",
7703 "unsafe",
7704 "directsync"
7705 ],
56122987 7706 "optional" : 1,
44660702
DM
7707 "type" : "string"
7708 },
7709 "cyls" : {
7710 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
7711 "optional" : 1,
7712 "type" : "integer"
7713 },
7714 "detect_zeroes" : {
7715 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7716 "optional" : 1,
7717 "type" : "boolean"
7718 },
7719 "discard" : {
7720 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7721 "enum" : [
7722 "ignore",
7723 "on"
7724 ],
44660702
DM
7725 "optional" : 1,
7726 "type" : "string"
7727 },
7728 "file" : {
7729 "default_key" : 1,
7730 "description" : "The drive's backing volume.",
7731 "format" : "pve-volume-id-or-qm-path",
7732 "format_description" : "volume",
7733 "type" : "string"
56122987 7734 },
7aacca6f 7735 "format" : {
44660702 7736 "description" : "The drive's backing file's data format.",
7aacca6f
DM
7737 "enum" : [
7738 "raw",
7739 "cow",
7740 "qcow",
7741 "qed",
7742 "qcow2",
7743 "vmdk",
7744 "cloop"
7745 ],
f004f5b9 7746 "format_description" : "image format",
56122987 7747 "optional" : 1,
44660702 7748 "type" : "string"
56122987 7749 },
44660702
DM
7750 "heads" : {
7751 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 7752 "optional" : 1,
44660702 7753 "type" : "integer"
56122987 7754 },
44660702
DM
7755 "iops" : {
7756 "description" : "Maximum r/w I/O speed in operations per second.",
7757 "format_description" : "iops",
7aacca6f 7758 "optional" : 1,
44660702 7759 "type" : "integer"
56122987 7760 },
44660702
DM
7761 "iops_max" : {
7762 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7aacca6f 7763 "format_description" : "iops",
7aacca6f 7764 "optional" : 1,
44660702 7765 "type" : "integer"
56122987 7766 },
44660702
DM
7767 "iops_rd" : {
7768 "description" : "Maximum read I/O speed in operations per second.",
7769 "format_description" : "iops",
56122987 7770 "optional" : 1,
44660702 7771 "type" : "integer"
56122987 7772 },
44660702
DM
7773 "iops_rd_max" : {
7774 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7775 "format_description" : "iops",
56122987 7776 "optional" : 1,
44660702 7777 "type" : "integer"
56122987 7778 },
44660702
DM
7779 "iops_wr" : {
7780 "description" : "Maximum write I/O speed in operations per second.",
7781 "format_description" : "iops",
56122987 7782 "optional" : 1,
44660702 7783 "type" : "integer"
56122987 7784 },
44660702
DM
7785 "iops_wr_max" : {
7786 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7aacca6f 7787 "format_description" : "iops",
44660702
DM
7788 "optional" : 1,
7789 "type" : "integer"
7aacca6f
DM
7790 },
7791 "iothread" : {
44660702 7792 "description" : "Whether to use iothreads for this drive",
56122987 7793 "optional" : 1,
44660702 7794 "type" : "boolean"
56122987 7795 },
44660702
DM
7796 "mbps" : {
7797 "description" : "Maximum r/w speed speed in megabytes per second.",
7798 "format_description" : "mbps",
56122987 7799 "optional" : 1,
44660702 7800 "type" : "number"
56122987 7801 },
44660702
DM
7802 "mbps_max" : {
7803 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7804 "format_description" : "mbps",
56122987 7805 "optional" : 1,
44660702 7806 "type" : "number"
56122987 7807 },
44660702
DM
7808 "mbps_rd" : {
7809 "description" : "Maximum read speed speed in megabytes per second.",
7810 "format_description" : "mbps",
7aacca6f 7811 "optional" : 1,
44660702 7812 "type" : "number"
56122987 7813 },
44660702
DM
7814 "mbps_rd_max" : {
7815 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7816 "format_description" : "mbps",
7aacca6f 7817 "optional" : 1,
44660702 7818 "type" : "number"
7aacca6f 7819 },
44660702
DM
7820 "mbps_wr" : {
7821 "description" : "Maximum write speed speed in megabytes per second.",
7822 "format_description" : "mbps",
56122987 7823 "optional" : 1,
44660702 7824 "type" : "number"
56122987 7825 },
44660702
DM
7826 "mbps_wr_max" : {
7827 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7828 "format_description" : "mbps",
56122987 7829 "optional" : 1,
44660702
DM
7830 "type" : "number"
7831 },
7832 "media" : {
7833 "default" : "disk",
7834 "description" : "The drive's media type.",
7aacca6f 7835 "enum" : [
44660702
DM
7836 "cdrom",
7837 "disk"
7aacca6f 7838 ],
56122987 7839 "optional" : 1,
44660702 7840 "type" : "string"
56122987 7841 },
7aacca6f 7842 "queues" : {
44660702 7843 "description" : "Number of queues.",
7aacca6f 7844 "minimum" : 2,
7aacca6f
DM
7845 "optional" : 1,
7846 "type" : "integer"
56122987 7847 },
44660702
DM
7848 "secs" : {
7849 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7850 "optional" : 1,
44660702 7851 "type" : "integer"
56122987 7852 },
44660702
DM
7853 "serial" : {
7854 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7855 "format" : "urlencoded",
7856 "format_description" : "serial",
7857 "maxLength" : 60,
56122987 7858 "optional" : 1,
44660702 7859 "type" : "string"
56122987 7860 },
44660702
DM
7861 "size" : {
7862 "description" : "Disk size. This is purely informational and has no effect.",
7863 "format" : "disk-size",
f004f5b9 7864 "format_description" : "DiskSize",
44660702
DM
7865 "optional" : 1,
7866 "type" : "string"
7867 },
7868 "snapshot" : {
7869 "description" : "Whether the drive should be included when making snapshots.",
56122987 7870 "optional" : 1,
44660702
DM
7871 "type" : "boolean"
7872 },
7873 "trans" : {
7874 "description" : "Force disk geometry bios translation mode.",
56122987 7875 "enum" : [
44660702
DM
7876 "none",
7877 "lba",
7878 "auto"
56122987 7879 ],
44660702
DM
7880 "optional" : 1,
7881 "type" : "string"
7882 },
7883 "volume" : {
7884 "alias" : "file"
56122987 7885 },
7aacca6f 7886 "werror" : {
7aacca6f
DM
7887 "description" : "Write error action.",
7888 "enum" : [
7889 "enospc",
7890 "ignore",
7891 "report",
7892 "stop"
44660702 7893 ],
56122987 7894 "optional" : 1,
7aacca6f 7895 "type" : "string"
56122987 7896 }
44660702 7897 },
56122987 7898 "optional" : 1,
44660702 7899 "type" : "string"
56122987
DM
7900 },
7901 "scsihw" : {
44660702 7902 "default" : "lsi",
7aacca6f 7903 "description" : "scsi controller model",
56122987
DM
7904 "enum" : [
7905 "lsi",
7906 "lsi53c810",
7907 "virtio-scsi-pci",
7908 "virtio-scsi-single",
7909 "megasas",
7910 "pvscsi"
7911 ],
7912 "optional" : 1,
56122987
DM
7913 "type" : "string"
7914 },
44660702
DM
7915 "serial[n]" : {
7916 "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
56122987 7917 "optional" : 1,
44660702
DM
7918 "pattern" : "(/dev/.+|socket)",
7919 "type" : "string"
56122987 7920 },
44660702
DM
7921 "shares" : {
7922 "default" : 1000,
7923 "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",
7924 "maximum" : 50000,
7925 "minimum" : 0,
7aacca6f 7926 "optional" : 1,
44660702 7927 "type" : "integer"
56122987 7928 },
7aacca6f
DM
7929 "skiplock" : {
7930 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
7931 "optional" : 1,
7932 "type" : "boolean"
56122987 7933 },
44660702
DM
7934 "smbios1" : {
7935 "description" : "Specify SMBIOS type 1 fields.",
7936 "format" : "pve-qm-smbios1",
7937 "maxLength" : 256,
56122987 7938 "optional" : 1,
44660702 7939 "type" : "string"
56122987 7940 },
44660702
DM
7941 "smp" : {
7942 "default" : 1,
7943 "description" : "The number of CPUs. Please use option -sockets instead.",
7944 "minimum" : 1,
56122987 7945 "optional" : 1,
44660702 7946 "type" : "integer"
56122987 7947 },
44660702
DM
7948 "sockets" : {
7949 "default" : 1,
7950 "description" : "The number of CPU sockets.",
7951 "minimum" : 1,
56122987 7952 "optional" : 1,
44660702 7953 "type" : "integer"
56122987 7954 },
44660702
DM
7955 "startdate" : {
7956 "default" : "now",
7957 "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'.",
7958 "optional" : 1,
7959 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 7960 "type" : "string",
44660702
DM
7961 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
7962 },
7963 "startup" : {
7964 "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.",
7965 "format" : "pve-startup-order",
7aacca6f 7966 "optional" : 1,
44660702
DM
7967 "type" : "string",
7968 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 7969 },
44660702
DM
7970 "tablet" : {
7971 "default" : 1,
7972 "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 7973 "optional" : 1,
44660702 7974 "type" : "boolean"
7aacca6f 7975 },
44660702
DM
7976 "tdf" : {
7977 "default" : 0,
7978 "description" : "Enable/disable time drift fix.",
7aacca6f 7979 "optional" : 1,
44660702 7980 "type" : "boolean"
7aacca6f 7981 },
44660702
DM
7982 "template" : {
7983 "default" : 0,
7984 "description" : "Enable/disable Template.",
7aacca6f 7985 "optional" : 1,
44660702 7986 "type" : "boolean"
7aacca6f 7987 },
44660702
DM
7988 "unused[n]" : {
7989 "description" : "Reference to unused volumes.",
7990 "format" : "pve-volume-id",
7aacca6f
DM
7991 "optional" : 1,
7992 "type" : "string"
7993 },
44660702
DM
7994 "usb[n]" : {
7995 "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n",
56122987 7996 "format" : {
44660702
DM
7997 "host" : {
7998 "default_key" : 1,
7999 "description" : "The Host USB device or port or the value spice",
8000 "format" : "pve-qm-usb-device",
8001 "format_description" : "HOSTUSBDEVICE|spice",
8002 "type" : "string"
7aacca6f 8003 },
44660702
DM
8004 "usb3" : {
8005 "description" : "Specifies whether if given host option is a USB3 device or port",
7aacca6f 8006 "optional" : 1,
44660702 8007 "type" : "boolean"
7aacca6f 8008 }
44660702 8009 },
7aacca6f 8010 "optional" : 1,
44660702 8011 "type" : "string"
7aacca6f 8012 },
44660702 8013 "vcpus" : {
7aacca6f 8014 "default" : 0,
44660702
DM
8015 "description" : "Number of hotplugged vcpus.",
8016 "minimum" : 1,
7aacca6f 8017 "optional" : 1,
44660702 8018 "type" : "integer"
7aacca6f 8019 },
44660702
DM
8020 "vga" : {
8021 "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.",
8022 "enum" : [
8023 "std",
8024 "cirrus",
8025 "vmware",
8026 "qxl",
8027 "serial0",
8028 "serial1",
8029 "serial2",
8030 "serial3",
8031 "qxl2",
8032 "qxl3",
8033 "qxl4"
8034 ],
7aacca6f 8035 "optional" : 1,
44660702 8036 "type" : "string"
7aacca6f 8037 },
44660702
DM
8038 "virtio[n]" : {
8039 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
7aacca6f 8040 "format" : {
7aacca6f 8041 "aio" : {
7aacca6f 8042 "description" : "AIO type to use.",
56122987 8043 "enum" : [
7aacca6f
DM
8044 "native",
8045 "threads"
7aacca6f 8046 ],
44660702
DM
8047 "optional" : 1,
8048 "type" : "string"
56122987 8049 },
44660702
DM
8050 "backup" : {
8051 "description" : "Whether the drive should be included when making backups.",
56122987 8052 "optional" : 1,
44660702 8053 "type" : "boolean"
7aacca6f 8054 },
44660702
DM
8055 "bps" : {
8056 "description" : "Maximum r/w speed speed in bytes per second.",
8057 "format_description" : "bps",
7aacca6f 8058 "optional" : 1,
44660702 8059 "type" : "integer"
56122987
DM
8060 },
8061 "bps_rd" : {
7aacca6f 8062 "description" : "Maximum read speed speed in bytes per second.",
44660702 8063 "format_description" : "bps",
56122987 8064 "optional" : 1,
7aacca6f 8065 "type" : "integer"
56122987 8066 },
44660702
DM
8067 "bps_wr" : {
8068 "description" : "Maximum write speed speed in bytes per second.",
8069 "format_description" : "bps",
56122987 8070 "optional" : 1,
7aacca6f 8071 "type" : "integer"
56122987 8072 },
7aacca6f 8073 "cache" : {
44660702 8074 "description" : "The drive's cache mode",
7aacca6f
DM
8075 "enum" : [
8076 "none",
8077 "writethrough",
8078 "writeback",
8079 "unsafe",
8080 "directsync"
8081 ],
56122987 8082 "optional" : 1,
44660702 8083 "type" : "string"
7aacca6f 8084 },
44660702
DM
8085 "cyls" : {
8086 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
8087 "optional" : 1,
8088 "type" : "integer"
8089 },
8090 "detect_zeroes" : {
8091 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
8092 "optional" : 1,
8093 "type" : "boolean"
8094 },
8095 "discard" : {
8096 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 8097 "enum" : [
44660702
DM
8098 "ignore",
8099 "on"
56122987
DM
8100 ],
8101 "optional" : 1,
44660702 8102 "type" : "string"
56122987 8103 },
44660702
DM
8104 "file" : {
8105 "default_key" : 1,
8106 "description" : "The drive's backing volume.",
8107 "format" : "pve-volume-id-or-qm-path",
8108 "format_description" : "volume",
8109 "type" : "string"
8110 },
8111 "format" : {
8112 "description" : "The drive's backing file's data format.",
8113 "enum" : [
8114 "raw",
8115 "cow",
8116 "qcow",
8117 "qed",
8118 "qcow2",
8119 "vmdk",
8120 "cloop"
8121 ],
f004f5b9 8122 "format_description" : "image format",
56122987 8123 "optional" : 1,
44660702 8124 "type" : "string"
56122987 8125 },
44660702
DM
8126 "heads" : {
8127 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
8128 "optional" : 1,
8129 "type" : "integer"
8130 },
8131 "iops" : {
8132 "description" : "Maximum r/w I/O speed in operations per second.",
8133 "format_description" : "iops",
56122987 8134 "optional" : 1,
44660702
DM
8135 "type" : "integer"
8136 },
8137 "iops_max" : {
7aacca6f 8138 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
44660702
DM
8139 "format_description" : "iops",
8140 "optional" : 1,
8141 "type" : "integer"
56122987 8142 },
7aacca6f 8143 "iops_rd" : {
44660702 8144 "description" : "Maximum read I/O speed in operations per second.",
7aacca6f 8145 "format_description" : "iops",
7aacca6f 8146 "optional" : 1,
44660702 8147 "type" : "integer"
56122987 8148 },
44660702
DM
8149 "iops_rd_max" : {
8150 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
8151 "format_description" : "iops",
8152 "optional" : 1,
8153 "type" : "integer"
8154 },
8155 "iops_wr" : {
8156 "description" : "Maximum write I/O speed in operations per second.",
8157 "format_description" : "iops",
8158 "optional" : 1,
8159 "type" : "integer"
8160 },
8161 "iops_wr_max" : {
8162 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
8163 "format_description" : "iops",
8164 "optional" : 1,
8165 "type" : "integer"
8166 },
8167 "iothread" : {
8168 "description" : "Whether to use iothreads for this drive",
44660702
DM
8169 "optional" : 1,
8170 "type" : "boolean"
8171 },
8172 "mbps" : {
8173 "description" : "Maximum r/w speed speed in megabytes per second.",
8174 "format_description" : "mbps",
7aacca6f 8175 "optional" : 1,
44660702 8176 "type" : "number"
7aacca6f
DM
8177 },
8178 "mbps_max" : {
8179 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 8180 "format_description" : "mbps",
56122987 8181 "optional" : 1,
44660702 8182 "type" : "number"
56122987 8183 },
44660702
DM
8184 "mbps_rd" : {
8185 "description" : "Maximum read speed speed in megabytes per second.",
8186 "format_description" : "mbps",
56122987 8187 "optional" : 1,
44660702 8188 "type" : "number"
56122987 8189 },
44660702
DM
8190 "mbps_rd_max" : {
8191 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
8192 "format_description" : "mbps",
8193 "optional" : 1,
8194 "type" : "number"
8195 },
8196 "mbps_wr" : {
8197 "description" : "Maximum write speed speed in megabytes per second.",
8198 "format_description" : "mbps",
8199 "optional" : 1,
8200 "type" : "number"
8201 },
8202 "mbps_wr_max" : {
8203 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
8204 "format_description" : "mbps",
8205 "optional" : 1,
8206 "type" : "number"
8207 },
8208 "media" : {
8209 "default" : "disk",
8210 "description" : "The drive's media type.",
56122987 8211 "enum" : [
44660702
DM
8212 "cdrom",
8213 "disk"
56122987
DM
8214 ],
8215 "optional" : 1,
44660702 8216 "type" : "string"
56122987 8217 },
44660702
DM
8218 "rerror" : {
8219 "description" : "Read error action.",
8220 "enum" : [
8221 "ignore",
8222 "report",
8223 "stop"
8224 ],
56122987 8225 "optional" : 1,
44660702 8226 "type" : "string"
56122987 8227 },
44660702
DM
8228 "secs" : {
8229 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 8230 "optional" : 1,
44660702 8231 "type" : "integer"
56122987 8232 },
7aacca6f
DM
8233 "serial" : {
8234 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7aacca6f 8235 "format" : "urlencoded",
44660702 8236 "format_description" : "serial",
7aacca6f 8237 "maxLength" : 60,
44660702
DM
8238 "optional" : 1,
8239 "type" : "string"
56122987 8240 },
44660702
DM
8241 "size" : {
8242 "description" : "Disk size. This is purely informational and has no effect.",
8243 "format" : "disk-size",
f004f5b9 8244 "format_description" : "DiskSize",
44660702
DM
8245 "optional" : 1,
8246 "type" : "string"
56122987 8247 },
44660702
DM
8248 "snapshot" : {
8249 "description" : "Whether the drive should be included when making snapshots.",
56122987 8250 "optional" : 1,
44660702 8251 "type" : "boolean"
56122987 8252 },
44660702
DM
8253 "trans" : {
8254 "description" : "Force disk geometry bios translation mode.",
8255 "enum" : [
8256 "none",
8257 "lba",
8258 "auto"
8259 ],
7aacca6f 8260 "optional" : 1,
44660702 8261 "type" : "string"
7aacca6f 8262 },
44660702
DM
8263 "volume" : {
8264 "alias" : "file"
8265 },
8266 "werror" : {
8267 "description" : "Write error action.",
8268 "enum" : [
8269 "enospc",
8270 "ignore",
8271 "report",
8272 "stop"
8273 ],
7aacca6f 8274 "optional" : 1,
44660702 8275 "type" : "string"
56122987
DM
8276 }
8277 },
7aacca6f 8278 "optional" : 1,
44660702 8279 "type" : "string"
7aacca6f 8280 },
44660702
DM
8281 "vmid" : {
8282 "description" : "The (unique) ID of the VM.",
8283 "format" : "pve-vmid",
8284 "minimum" : 1,
8285 "type" : "integer"
56122987 8286 },
44660702
DM
8287 "watchdog" : {
8288 "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)",
8289 "format" : "pve-qm-watchdog",
56122987 8290 "optional" : 1,
44660702 8291 "type" : "string"
56122987 8292 }
7aacca6f 8293 }
56122987 8294 },
56122987
DM
8295 "permissions" : {
8296 "check" : [
8297 "perm",
8298 "/vms/{vmid}",
8299 [
8300 "VM.Config.Disk",
8301 "VM.Config.CDROM",
8302 "VM.Config.CPU",
8303 "VM.Config.Memory",
8304 "VM.Config.Network",
8305 "VM.Config.HWType",
8306 "VM.Config.Options"
8307 ],
8308 "any",
8309 1
8310 ]
8311 },
44660702 8312 "protected" : 1,
7aacca6f 8313 "proxyto" : "node",
56122987 8314 "returns" : {
7aacca6f
DM
8315 "type" : "null"
8316 }
8317 }
8318 },
44660702
DM
8319 "leaf" : 1,
8320 "path" : "/nodes/{node}/qemu/{vmid}/config",
7aacca6f
DM
8321 "text" : "config"
8322 },
8323 {
8324 "info" : {
56122987 8325 "GET" : {
44660702 8326 "description" : "Get virtual machine configuration, including pending changes.",
56122987 8327 "method" : "GET",
44660702 8328 "name" : "vm_pending",
7aacca6f 8329 "parameters" : {
44660702 8330 "additionalProperties" : 0,
7aacca6f
DM
8331 "properties" : {
8332 "node" : {
7aacca6f 8333 "description" : "The cluster node name.",
44660702 8334 "format" : "pve-node",
7aacca6f
DM
8335 "type" : "string"
8336 },
8337 "vmid" : {
44660702 8338 "description" : "The (unique) ID of the VM.",
7aacca6f 8339 "format" : "pve-vmid",
44660702
DM
8340 "minimum" : 1,
8341 "type" : "integer"
7aacca6f 8342 }
44660702 8343 }
7aacca6f 8344 },
56122987
DM
8345 "permissions" : {
8346 "check" : [
8347 "perm",
8348 "/vms/{vmid}",
8349 [
8350 "VM.Audit"
8351 ]
8352 ]
8353 },
7aacca6f 8354 "proxyto" : "node",
44660702
DM
8355 "returns" : {
8356 "items" : {
8357 "properties" : {
8358 "delete" : {
8359 "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.",
8360 "maximum" : 2,
8361 "minimum" : 0,
8362 "optional" : 1,
8363 "type" : "integer"
8364 },
8365 "key" : {
8366 "description" : "Configuration option name.",
8367 "type" : "string"
8368 },
8369 "pending" : {
8370 "description" : "Pending value.",
8371 "optional" : 1,
8372 "type" : "string"
8373 },
8374 "value" : {
8375 "description" : "Current value.",
8376 "optional" : 1,
8377 "type" : "string"
8378 }
8379 },
8380 "type" : "object"
8381 },
8382 "type" : "array"
8383 }
56122987
DM
8384 }
8385 },
7aacca6f 8386 "leaf" : 1,
44660702
DM
8387 "path" : "/nodes/{node}/qemu/{vmid}/pending",
8388 "text" : "pending"
56122987
DM
8389 },
8390 {
56122987
DM
8391 "info" : {
8392 "PUT" : {
7aacca6f 8393 "description" : "Unlink/delete disk images.",
7aacca6f 8394 "method" : "PUT",
7aacca6f 8395 "name" : "unlink",
56122987 8396 "parameters" : {
44660702 8397 "additionalProperties" : 0,
56122987 8398 "properties" : {
7aacca6f 8399 "force" : {
44660702 8400 "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 8401 "optional" : 1,
44660702 8402 "type" : "boolean"
7aacca6f 8403 },
56122987
DM
8404 "idlist" : {
8405 "description" : "A list of disk IDs you want to delete.",
44660702
DM
8406 "format" : "pve-configid-list",
8407 "type" : "string"
8408 },
8409 "node" : {
8410 "description" : "The cluster node name.",
8411 "format" : "pve-node",
8412 "type" : "string"
56122987
DM
8413 },
8414 "vmid" : {
7aacca6f 8415 "description" : "The (unique) ID of the VM.",
44660702 8416 "format" : "pve-vmid",
7aacca6f 8417 "minimum" : 1,
44660702 8418 "type" : "integer"
56122987 8419 }
44660702
DM
8420 }
8421 },
8422 "permissions" : {
8423 "check" : [
8424 "perm",
8425 "/vms/{vmid}",
8426 [
8427 "VM.Config.Disk"
8428 ]
8429 ]
8430 },
8431 "protected" : 1,
8432 "proxyto" : "node",
8433 "returns" : {
8434 "type" : "null"
7aacca6f 8435 }
56122987 8436 }
7aacca6f 8437 },
44660702 8438 "leaf" : 1,
7aacca6f 8439 "path" : "/nodes/{node}/qemu/{vmid}/unlink",
44660702 8440 "text" : "unlink"
56122987
DM
8441 },
8442 {
56122987
DM
8443 "info" : {
8444 "POST" : {
7aacca6f 8445 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
8446 "method" : "POST",
8447 "name" : "vncproxy",
56122987 8448 "parameters" : {
44660702 8449 "additionalProperties" : 0,
56122987 8450 "properties" : {
44660702
DM
8451 "node" : {
8452 "description" : "The cluster node name.",
8453 "format" : "pve-node",
8454 "type" : "string"
8455 },
56122987 8456 "vmid" : {
7aacca6f 8457 "description" : "The (unique) ID of the VM.",
44660702 8458 "format" : "pve-vmid",
56122987 8459 "minimum" : 1,
44660702 8460 "type" : "integer"
7aacca6f
DM
8461 },
8462 "websocket" : {
8463 "description" : "starts websockify instead of vncproxy",
44660702
DM
8464 "optional" : 1,
8465 "type" : "boolean"
56122987 8466 }
44660702 8467 }
56122987 8468 },
44660702
DM
8469 "permissions" : {
8470 "check" : [
8471 "perm",
8472 "/vms/{vmid}",
8473 [
8474 "VM.Console"
8475 ]
8476 ]
8477 },
8478 "protected" : 1,
56122987 8479 "returns" : {
7aacca6f 8480 "additionalProperties" : 0,
56122987 8481 "properties" : {
7aacca6f 8482 "cert" : {
56122987
DM
8483 "type" : "string"
8484 },
56122987
DM
8485 "port" : {
8486 "type" : "integer"
8487 },
7aacca6f
DM
8488 "ticket" : {
8489 "type" : "string"
8490 },
44660702
DM
8491 "upid" : {
8492 "type" : "string"
8493 },
7aacca6f 8494 "user" : {
56122987
DM
8495 "type" : "string"
8496 }
7aacca6f 8497 }
56122987
DM
8498 }
8499 }
8500 },
44660702
DM
8501 "leaf" : 1,
8502 "path" : "/nodes/{node}/qemu/{vmid}/vncproxy",
7aacca6f 8503 "text" : "vncproxy"
56122987
DM
8504 },
8505 {
56122987
DM
8506 "info" : {
8507 "GET" : {
44660702
DM
8508 "description" : "Opens a weksocket for VNC traffic.",
8509 "method" : "GET",
8510 "name" : "vncwebsocket",
56122987 8511 "parameters" : {
44660702 8512 "additionalProperties" : 0,
56122987 8513 "properties" : {
7aacca6f 8514 "node" : {
7aacca6f 8515 "description" : "The cluster node name.",
44660702 8516 "format" : "pve-node",
7aacca6f
DM
8517 "type" : "string"
8518 },
44660702
DM
8519 "port" : {
8520 "description" : "Port number returned by previous vncproxy call.",
8521 "maximum" : 5999,
8522 "minimum" : 5900,
8523 "type" : "integer"
56122987 8524 },
7aacca6f 8525 "vmid" : {
44660702 8526 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8527 "format" : "pve-vmid",
8528 "minimum" : 1,
44660702
DM
8529 "type" : "integer"
8530 },
8531 "vncticket" : {
8532 "description" : "Ticket from previous call to vncproxy.",
8533 "maxLength" : 512,
8534 "type" : "string"
56122987 8535 }
44660702
DM
8536 }
8537 },
8538 "permissions" : {
8539 "check" : [
8540 "perm",
8541 "/vms/{vmid}",
8542 [
8543 "VM.Console"
8544 ]
8545 ],
8546 "description" : "You also need to pass a valid ticket (vncticket)."
56122987 8547 },
7aacca6f
DM
8548 "returns" : {
8549 "properties" : {
8550 "port" : {
8551 "type" : "string"
8552 }
8553 },
8554 "type" : "object"
8555 }
56122987
DM
8556 }
8557 },
7aacca6f 8558 "leaf" : 1,
44660702
DM
8559 "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket",
8560 "text" : "vncwebsocket"
56122987
DM
8561 },
8562 {
8563 "info" : {
8564 "POST" : {
44660702
DM
8565 "description" : "Returns a SPICE configuration to connect to the VM.",
8566 "method" : "POST",
7aacca6f
DM
8567 "name" : "spiceproxy",
8568 "parameters" : {
44660702 8569 "additionalProperties" : 0,
56122987 8570 "properties" : {
44660702
DM
8571 "node" : {
8572 "description" : "The cluster node name.",
8573 "format" : "pve-node",
8574 "type" : "string"
8575 },
7aacca6f 8576 "proxy" : {
44660702 8577 "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 8578 "format" : "address",
7aacca6f 8579 "optional" : 1,
44660702 8580 "type" : "string"
56122987 8581 },
7aacca6f 8582 "vmid" : {
44660702 8583 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8584 "format" : "pve-vmid",
8585 "minimum" : 1,
44660702 8586 "type" : "integer"
56122987 8587 }
44660702 8588 }
56122987 8589 },
56122987
DM
8590 "permissions" : {
8591 "check" : [
8592 "perm",
8593 "/vms/{vmid}",
8594 [
8595 "VM.Console"
8596 ]
8597 ]
8598 },
44660702
DM
8599 "protected" : 1,
8600 "proxyto" : "node",
7aacca6f 8601 "returns" : {
44660702
DM
8602 "additionalProperties" : 1,
8603 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 8604 "properties" : {
44660702 8605 "host" : {
7aacca6f
DM
8606 "type" : "string"
8607 },
7aacca6f
DM
8608 "password" : {
8609 "type" : "string"
8610 },
44660702 8611 "proxy" : {
7aacca6f
DM
8612 "type" : "string"
8613 },
44660702
DM
8614 "tls-port" : {
8615 "type" : "integer"
8616 },
8617 "type" : {
7aacca6f
DM
8618 "type" : "string"
8619 }
44660702 8620 }
7aacca6f
DM
8621 }
8622 }
8623 },
44660702
DM
8624 "leaf" : 1,
8625 "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy",
7aacca6f
DM
8626 "text" : "spiceproxy"
8627 },
8628 {
56122987
DM
8629 "children" : [
8630 {
56122987
DM
8631 "info" : {
8632 "GET" : {
44660702
DM
8633 "description" : "Get virtual machine status.",
8634 "method" : "GET",
8635 "name" : "vm_status",
56122987 8636 "parameters" : {
44660702 8637 "additionalProperties" : 0,
56122987 8638 "properties" : {
44660702
DM
8639 "node" : {
8640 "description" : "The cluster node name.",
8641 "format" : "pve-node",
8642 "type" : "string"
8643 },
56122987 8644 "vmid" : {
44660702 8645 "description" : "The (unique) ID of the VM.",
7aacca6f 8646 "format" : "pve-vmid",
56122987 8647 "minimum" : 1,
7aacca6f 8648 "type" : "integer"
56122987 8649 }
44660702 8650 }
56122987
DM
8651 },
8652 "permissions" : {
8653 "check" : [
8654 "perm",
8655 "/vms/{vmid}",
8656 [
8657 "VM.Audit"
8658 ]
8659 ]
8660 },
44660702 8661 "protected" : 1,
7aacca6f 8662 "proxyto" : "node",
56122987
DM
8663 "returns" : {
8664 "type" : "object"
7aacca6f 8665 }
56122987 8666 }
7aacca6f 8667 },
7aacca6f 8668 "leaf" : 1,
44660702
DM
8669 "path" : "/nodes/{node}/qemu/{vmid}/status/current",
8670 "text" : "current"
56122987
DM
8671 },
8672 {
56122987
DM
8673 "info" : {
8674 "POST" : {
44660702 8675 "description" : "Start virtual machine.",
56122987 8676 "method" : "POST",
44660702 8677 "name" : "vm_start",
56122987 8678 "parameters" : {
44660702 8679 "additionalProperties" : 0,
56122987 8680 "properties" : {
44660702
DM
8681 "machine" : {
8682 "description" : "Specific the Qemu machine type.",
8683 "maxLength" : 40,
8684 "optional" : 1,
8685 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
8686 "type" : "string"
8687 },
8688 "migratedfrom" : {
8689 "description" : "The cluster node name.",
8690 "format" : "pve-node",
56122987 8691 "optional" : 1,
44660702 8692 "type" : "string"
56122987 8693 },
7aacca6f 8694 "node" : {
7aacca6f 8695 "description" : "The cluster node name.",
44660702
DM
8696 "format" : "pve-node",
8697 "type" : "string"
7aacca6f 8698 },
44660702
DM
8699 "skiplock" : {
8700 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8701 "optional" : 1,
44660702 8702 "type" : "boolean"
56122987 8703 },
44660702
DM
8704 "stateuri" : {
8705 "description" : "Some command save/restore state from this location.",
8706 "maxLength" : 128,
56122987 8707 "optional" : 1,
44660702 8708 "type" : "string"
56122987
DM
8709 },
8710 "vmid" : {
7aacca6f 8711 "description" : "The (unique) ID of the VM.",
44660702
DM
8712 "format" : "pve-vmid",
8713 "minimum" : 1,
7aacca6f 8714 "type" : "integer"
56122987 8715 }
44660702 8716 }
7aacca6f 8717 },
56122987
DM
8718 "permissions" : {
8719 "check" : [
8720 "perm",
8721 "/vms/{vmid}",
8722 [
8723 "VM.PowerMgmt"
8724 ]
8725 ]
44660702
DM
8726 },
8727 "protected" : 1,
8728 "proxyto" : "node",
8729 "returns" : {
8730 "type" : "string"
56122987
DM
8731 }
8732 }
44660702
DM
8733 },
8734 "leaf" : 1,
8735 "path" : "/nodes/{node}/qemu/{vmid}/status/start",
8736 "text" : "start"
56122987
DM
8737 },
8738 {
56122987
DM
8739 "info" : {
8740 "POST" : {
7aacca6f 8741 "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
8742 "method" : "POST",
8743 "name" : "vm_stop",
56122987 8744 "parameters" : {
44660702 8745 "additionalProperties" : 0,
56122987 8746 "properties" : {
44660702
DM
8747 "keepActive" : {
8748 "default" : 0,
8749 "description" : "Do not decativate storage volumes.",
56122987 8750 "optional" : 1,
44660702 8751 "type" : "boolean"
56122987
DM
8752 },
8753 "migratedfrom" : {
56122987 8754 "description" : "The cluster node name.",
44660702 8755 "format" : "pve-node",
7aacca6f 8756 "optional" : 1,
44660702 8757 "type" : "string"
7aacca6f 8758 },
44660702
DM
8759 "node" : {
8760 "description" : "The cluster node name.",
8761 "format" : "pve-node",
8762 "type" : "string"
56122987
DM
8763 },
8764 "skiplock" : {
8765 "description" : "Ignore locks - only root is allowed to use this option.",
8766 "optional" : 1,
8767 "type" : "boolean"
8768 },
44660702
DM
8769 "timeout" : {
8770 "description" : "Wait maximal timeout seconds.",
8771 "minimum" : 0,
56122987 8772 "optional" : 1,
44660702 8773 "type" : "integer"
7aacca6f 8774 },
44660702
DM
8775 "vmid" : {
8776 "description" : "The (unique) ID of the VM.",
8777 "format" : "pve-vmid",
8778 "minimum" : 1,
8779 "type" : "integer"
56122987 8780 }
44660702 8781 }
56122987 8782 },
56122987
DM
8783 "permissions" : {
8784 "check" : [
8785 "perm",
8786 "/vms/{vmid}",
8787 [
8788 "VM.PowerMgmt"
8789 ]
8790 ]
8791 },
44660702
DM
8792 "protected" : 1,
8793 "proxyto" : "node",
7aacca6f
DM
8794 "returns" : {
8795 "type" : "string"
44660702
DM
8796 }
8797 }
8798 },
8799 "leaf" : 1,
8800 "path" : "/nodes/{node}/qemu/{vmid}/status/stop",
8801 "text" : "stop"
8802 },
8803 {
8804 "info" : {
8805 "POST" : {
8806 "description" : "Reset virtual machine.",
8807 "method" : "POST",
8808 "name" : "vm_reset",
56122987 8809 "parameters" : {
7aacca6f 8810 "additionalProperties" : 0,
56122987 8811 "properties" : {
56122987
DM
8812 "node" : {
8813 "description" : "The cluster node name.",
44660702
DM
8814 "format" : "pve-node",
8815 "type" : "string"
56122987
DM
8816 },
8817 "skiplock" : {
44660702 8818 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8819 "optional" : 1,
44660702 8820 "type" : "boolean"
7aacca6f
DM
8821 },
8822 "vmid" : {
44660702 8823 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8824 "format" : "pve-vmid",
8825 "minimum" : 1,
44660702 8826 "type" : "integer"
56122987 8827 }
7aacca6f 8828 }
56122987 8829 },
7aacca6f
DM
8830 "permissions" : {
8831 "check" : [
8832 "perm",
8833 "/vms/{vmid}",
8834 [
8835 "VM.PowerMgmt"
8836 ]
8837 ]
8838 },
44660702 8839 "protected" : 1,
7aacca6f 8840 "proxyto" : "node",
56122987
DM
8841 "returns" : {
8842 "type" : "string"
44660702
DM
8843 }
8844 }
8845 },
8846 "leaf" : 1,
8847 "path" : "/nodes/{node}/qemu/{vmid}/status/reset",
8848 "text" : "reset"
8849 },
8850 {
8851 "info" : {
8852 "POST" : {
8853 "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.",
8854 "method" : "POST",
56122987 8855 "name" : "vm_shutdown",
56122987 8856 "parameters" : {
7aacca6f 8857 "additionalProperties" : 0,
56122987 8858 "properties" : {
56122987 8859 "forceStop" : {
56122987 8860 "default" : 0,
44660702 8861 "description" : "Make sure the VM stops.",
7aacca6f 8862 "optional" : 1,
44660702 8863 "type" : "boolean"
56122987
DM
8864 },
8865 "keepActive" : {
7aacca6f 8866 "default" : 0,
44660702
DM
8867 "description" : "Do not decativate storage volumes.",
8868 "optional" : 1,
8869 "type" : "boolean"
8870 },
8871 "node" : {
8872 "description" : "The cluster node name.",
8873 "format" : "pve-node",
8874 "type" : "string"
8875 },
8876 "skiplock" : {
8877 "description" : "Ignore locks - only root is allowed to use this option.",
8878 "optional" : 1,
8879 "type" : "boolean"
56122987 8880 },
7aacca6f 8881 "timeout" : {
7aacca6f 8882 "description" : "Wait maximal timeout seconds.",
44660702 8883 "minimum" : 0,
7aacca6f
DM
8884 "optional" : 1,
8885 "type" : "integer"
8886 },
56122987 8887 "vmid" : {
7aacca6f 8888 "description" : "The (unique) ID of the VM.",
44660702
DM
8889 "format" : "pve-vmid",
8890 "minimum" : 1,
7aacca6f 8891 "type" : "integer"
56122987 8892 }
7aacca6f 8893 }
56122987 8894 },
44660702
DM
8895 "permissions" : {
8896 "check" : [
8897 "perm",
8898 "/vms/{vmid}",
8899 [
8900 "VM.PowerMgmt"
8901 ]
8902 ]
8903 },
7aacca6f 8904 "protected" : 1,
44660702
DM
8905 "proxyto" : "node",
8906 "returns" : {
8907 "type" : "string"
8908 }
56122987
DM
8909 }
8910 },
44660702 8911 "leaf" : 1,
7aacca6f 8912 "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown",
44660702 8913 "text" : "shutdown"
56122987
DM
8914 },
8915 {
56122987
DM
8916 "info" : {
8917 "POST" : {
44660702 8918 "description" : "Suspend virtual machine.",
56122987 8919 "method" : "POST",
44660702 8920 "name" : "vm_suspend",
7aacca6f 8921 "parameters" : {
44660702 8922 "additionalProperties" : 0,
7aacca6f
DM
8923 "properties" : {
8924 "node" : {
7aacca6f 8925 "description" : "The cluster node name.",
44660702
DM
8926 "format" : "pve-node",
8927 "type" : "string"
7aacca6f
DM
8928 },
8929 "skiplock" : {
8930 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
8931 "optional" : 1,
8932 "type" : "boolean"
8933 },
8934 "vmid" : {
8935 "description" : "The (unique) ID of the VM.",
8936 "format" : "pve-vmid",
8937 "minimum" : 1,
8938 "type" : "integer"
8939 }
8940 }
56122987
DM
8941 },
8942 "permissions" : {
8943 "check" : [
8944 "perm",
8945 "/vms/{vmid}",
8946 [
8947 "VM.PowerMgmt"
8948 ]
8949 ]
8950 },
44660702
DM
8951 "protected" : 1,
8952 "proxyto" : "node",
8953 "returns" : {
8954 "type" : "string"
8955 }
56122987
DM
8956 }
8957 },
44660702 8958 "leaf" : 1,
7aacca6f 8959 "path" : "/nodes/{node}/qemu/{vmid}/status/suspend",
44660702 8960 "text" : "suspend"
56122987
DM
8961 },
8962 {
56122987
DM
8963 "info" : {
8964 "POST" : {
44660702
DM
8965 "description" : "Resume virtual machine.",
8966 "method" : "POST",
7aacca6f 8967 "name" : "vm_resume",
56122987
DM
8968 "parameters" : {
8969 "additionalProperties" : 0,
8970 "properties" : {
44660702
DM
8971 "nocheck" : {
8972 "optional" : 1,
8973 "type" : "boolean"
8974 },
7aacca6f 8975 "node" : {
44660702 8976 "description" : "The cluster node name.",
7aacca6f 8977 "format" : "pve-node",
44660702 8978 "type" : "string"
56122987
DM
8979 },
8980 "skiplock" : {
56122987 8981 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
8982 "optional" : 1,
8983 "type" : "boolean"
56122987 8984 },
7aacca6f 8985 "vmid" : {
7aacca6f
DM
8986 "description" : "The (unique) ID of the VM.",
8987 "format" : "pve-vmid",
44660702
DM
8988 "minimum" : 1,
8989 "type" : "integer"
56122987
DM
8990 }
8991 }
8992 },
8993 "permissions" : {
8994 "check" : [
8995 "perm",
8996 "/vms/{vmid}",
8997 [
8998 "VM.PowerMgmt"
8999 ]
9000 ]
9001 },
44660702
DM
9002 "protected" : 1,
9003 "proxyto" : "node",
56122987
DM
9004 "returns" : {
9005 "type" : "string"
7aacca6f 9006 }
56122987
DM
9007 }
9008 },
44660702
DM
9009 "leaf" : 1,
9010 "path" : "/nodes/{node}/qemu/{vmid}/status/resume",
7aacca6f 9011 "text" : "resume"
56122987
DM
9012 }
9013 ],
9014 "info" : {
44660702
DM
9015 "GET" : {
9016 "description" : "Directory index",
9017 "method" : "GET",
9018 "name" : "vmcmdidx",
56122987 9019 "parameters" : {
44660702 9020 "additionalProperties" : 0,
56122987 9021 "properties" : {
44660702
DM
9022 "node" : {
9023 "description" : "The cluster node name.",
9024 "format" : "pve-node",
7aacca6f
DM
9025 "type" : "string"
9026 },
56122987 9027 "vmid" : {
7aacca6f 9028 "description" : "The (unique) ID of the VM.",
44660702
DM
9029 "format" : "pve-vmid",
9030 "minimum" : 1,
7aacca6f 9031 "type" : "integer"
56122987 9032 }
44660702 9033 }
56122987 9034 },
44660702
DM
9035 "permissions" : {
9036 "user" : "all"
9037 },
9038 "proxyto" : "node",
9039 "returns" : {
9040 "items" : {
9041 "properties" : {
9042 "subdir" : {
9043 "type" : "string"
9044 }
9045 },
9046 "type" : "object"
9047 },
9048 "links" : [
9049 {
9050 "href" : "{subdir}",
9051 "rel" : "child"
9052 }
9053 ],
9054 "type" : "array"
9055 }
56122987 9056 }
7aacca6f 9057 },
44660702
DM
9058 "leaf" : 0,
9059 "path" : "/nodes/{node}/qemu/{vmid}/status",
9060 "text" : "status"
56122987
DM
9061 },
9062 {
56122987 9063 "info" : {
44660702
DM
9064 "PUT" : {
9065 "description" : "Send key event to virtual machine.",
9066 "method" : "PUT",
9067 "name" : "vm_sendkey",
9068 "parameters" : {
9069 "additionalProperties" : 0,
56122987 9070 "properties" : {
44660702
DM
9071 "key" : {
9072 "description" : "The key (qemu monitor encoding).",
9073 "type" : "string"
9074 },
9075 "node" : {
9076 "description" : "The cluster node name.",
9077 "format" : "pve-node",
9078 "type" : "string"
9079 },
9080 "skiplock" : {
9081 "description" : "Ignore locks - only root is allowed to use this option.",
9082 "optional" : 1,
56122987 9083 "type" : "boolean"
7aacca6f 9084 },
44660702
DM
9085 "vmid" : {
9086 "description" : "The (unique) ID of the VM.",
9087 "format" : "pve-vmid",
9088 "minimum" : 1,
9089 "type" : "integer"
56122987 9090 }
7aacca6f 9091 }
56122987 9092 },
56122987
DM
9093 "permissions" : {
9094 "check" : [
9095 "perm",
9096 "/vms/{vmid}",
9097 [
44660702 9098 "VM.Console"
56122987
DM
9099 ]
9100 ]
9101 },
7aacca6f 9102 "protected" : 1,
44660702
DM
9103 "proxyto" : "node",
9104 "returns" : {
9105 "type" : "null"
9106 }
9107 }
9108 },
9109 "leaf" : 1,
9110 "path" : "/nodes/{node}/qemu/{vmid}/sendkey",
9111 "text" : "sendkey"
9112 },
9113 {
9114 "info" : {
9115 "GET" : {
9116 "description" : "Check if feature for virtual machine is available.",
9117 "method" : "GET",
7aacca6f 9118 "name" : "vm_feature",
56122987 9119 "parameters" : {
44660702 9120 "additionalProperties" : 0,
56122987 9121 "properties" : {
56122987 9122 "feature" : {
44660702 9123 "description" : "Feature to check.",
56122987
DM
9124 "enum" : [
9125 "snapshot",
9126 "clone",
9127 "copy"
9128 ],
44660702
DM
9129 "type" : "string"
9130 },
9131 "node" : {
9132 "description" : "The cluster node name.",
9133 "format" : "pve-node",
7aacca6f 9134 "type" : "string"
56122987
DM
9135 },
9136 "snapname" : {
56122987 9137 "description" : "The name of the snapshot.",
44660702
DM
9138 "format" : "pve-configid",
9139 "maxLength" : 40,
7aacca6f
DM
9140 "optional" : 1,
9141 "type" : "string"
9142 },
44660702
DM
9143 "vmid" : {
9144 "description" : "The (unique) ID of the VM.",
9145 "format" : "pve-vmid",
9146 "minimum" : 1,
9147 "type" : "integer"
9148 }
9149 }
9150 },
9151 "permissions" : {
9152 "check" : [
9153 "perm",
9154 "/vms/{vmid}",
9155 [
9156 "VM.Audit"
9157 ]
9158 ]
9159 },
9160 "protected" : 1,
9161 "proxyto" : "node",
9162 "returns" : {
9163 "properties" : {
9164 "hasFeature" : {
9165 "type" : "boolean"
9166 },
9167 "nodes" : {
9168 "items" : {
9169 "type" : "string"
9170 },
9171 "type" : "array"
56122987
DM
9172 }
9173 },
44660702 9174 "type" : "object"
56122987
DM
9175 }
9176 }
9177 },
7aacca6f 9178 "leaf" : 1,
44660702
DM
9179 "path" : "/nodes/{node}/qemu/{vmid}/feature",
9180 "text" : "feature"
56122987
DM
9181 },
9182 {
56122987
DM
9183 "info" : {
9184 "POST" : {
44660702 9185 "description" : "Create a copy of virtual machine/template.",
56122987 9186 "method" : "POST",
7aacca6f 9187 "name" : "clone_vm",
56122987
DM
9188 "parameters" : {
9189 "additionalProperties" : 0,
9190 "properties" : {
44660702
DM
9191 "description" : {
9192 "description" : "Description for the new VM.",
56122987 9193 "optional" : 1,
7aacca6f 9194 "type" : "string"
56122987 9195 },
44660702
DM
9196 "format" : {
9197 "description" : "Target format for file storage.",
9198 "enum" : [
9199 "raw",
9200 "qcow2",
9201 "vmdk"
9202 ],
9203 "optional" : 1,
9204 "requires" : "full",
56122987
DM
9205 "type" : "string"
9206 },
44660702
DM
9207 "full" : {
9208 "default" : 0,
9209 "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 9210 "optional" : 1,
44660702
DM
9211 "type" : "boolean"
9212 },
9213 "name" : {
56122987 9214 "description" : "Set a name for the new VM.",
44660702
DM
9215 "format" : "dns-name",
9216 "optional" : 1,
9217 "type" : "string"
9218 },
9219 "newid" : {
9220 "description" : "VMID for the clone.",
9221 "format" : "pve-vmid",
9222 "minimum" : 1,
9223 "type" : "integer"
9224 },
9225 "node" : {
9226 "description" : "The cluster node name.",
9227 "format" : "pve-node",
9228 "type" : "string"
7aacca6f
DM
9229 },
9230 "pool" : {
9231 "description" : "Add the new VM to the specified pool.",
44660702 9232 "format" : "pve-poolid",
56122987 9233 "optional" : 1,
44660702 9234 "type" : "string"
56122987 9235 },
44660702
DM
9236 "snapname" : {
9237 "description" : "The name of the snapshot.",
9238 "format" : "pve-configid",
9239 "maxLength" : 40,
7aacca6f
DM
9240 "optional" : 1,
9241 "type" : "string"
56122987 9242 },
44660702
DM
9243 "storage" : {
9244 "description" : "Target storage for full clone.",
9245 "format" : "pve-storage-id",
7aacca6f 9246 "optional" : 1,
44660702
DM
9247 "requires" : "full",
9248 "type" : "string"
56122987 9249 },
44660702
DM
9250 "target" : {
9251 "description" : "Target node. Only allowed if the original VM is on shared storage.",
9252 "format" : "pve-node",
56122987 9253 "optional" : 1,
56122987 9254 "type" : "string"
44660702
DM
9255 },
9256 "vmid" : {
9257 "description" : "The (unique) ID of the VM.",
9258 "format" : "pve-vmid",
9259 "minimum" : 1,
9260 "type" : "integer"
56122987
DM
9261 }
9262 }
9263 },
56122987
DM
9264 "permissions" : {
9265 "check" : [
9266 "and",
9267 [
9268 "perm",
9269 "/vms/{vmid}",
9270 [
9271 "VM.Clone"
9272 ]
9273 ],
9274 [
9275 "or",
9276 [
9277 "perm",
9278 "/vms/{newid}",
9279 [
9280 "VM.Allocate"
9281 ]
9282 ],
9283 [
9284 "perm",
9285 "/pool/{pool}",
9286 [
9287 "VM.Allocate"
9288 ],
9289 "require_param",
9290 "pool"
9291 ]
9292 ]
44660702
DM
9293 ],
9294 "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."
9295 },
9296 "protected" : 1,
9297 "proxyto" : "node",
9298 "returns" : {
9299 "type" : "string"
56122987
DM
9300 }
9301 }
9302 },
44660702
DM
9303 "leaf" : 1,
9304 "path" : "/nodes/{node}/qemu/{vmid}/clone",
56122987
DM
9305 "text" : "clone"
9306 },
9307 {
56122987
DM
9308 "info" : {
9309 "POST" : {
7aacca6f 9310 "description" : "Move volume to different storage.",
44660702
DM
9311 "method" : "POST",
9312 "name" : "move_vm_disk",
56122987
DM
9313 "parameters" : {
9314 "additionalProperties" : 0,
9315 "properties" : {
9316 "delete" : {
44660702 9317 "default" : 0,
56122987 9318 "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.",
7aacca6f 9319 "optional" : 1,
44660702 9320 "type" : "boolean"
56122987 9321 },
44660702
DM
9322 "digest" : {
9323 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9324 "maxLength" : 40,
9325 "optional" : 1,
9326 "type" : "string"
56122987 9327 },
56122987 9328 "disk" : {
56122987
DM
9329 "description" : "The disk you want to move.",
9330 "enum" : [
9331 "ide0",
9332 "ide1",
9333 "ide2",
9334 "ide3",
9335 "scsi0",
9336 "scsi1",
9337 "scsi2",
9338 "scsi3",
9339 "scsi4",
9340 "scsi5",
9341 "scsi6",
9342 "scsi7",
9343 "scsi8",
9344 "scsi9",
9345 "scsi10",
9346 "scsi11",
9347 "scsi12",
9348 "scsi13",
9349 "virtio0",
9350 "virtio1",
9351 "virtio2",
9352 "virtio3",
9353 "virtio4",
9354 "virtio5",
9355 "virtio6",
9356 "virtio7",
9357 "virtio8",
9358 "virtio9",
9359 "virtio10",
9360 "virtio11",
9361 "virtio12",
9362 "virtio13",
9363 "virtio14",
9364 "virtio15",
9365 "sata0",
9366 "sata1",
9367 "sata2",
9368 "sata3",
9369 "sata4",
9370 "sata5"
44660702
DM
9371 ],
9372 "type" : "string"
7aacca6f
DM
9373 },
9374 "format" : {
9375 "description" : "Target Format.",
9376 "enum" : [
9377 "raw",
9378 "qcow2",
9379 "vmdk"
9380 ],
9381 "optional" : 1,
9382 "type" : "string"
44660702
DM
9383 },
9384 "node" : {
9385 "description" : "The cluster node name.",
9386 "format" : "pve-node",
9387 "type" : "string"
9388 },
9389 "storage" : {
9390 "description" : "Target storage.",
9391 "format" : "pve-storage-id",
9392 "type" : "string"
9393 },
9394 "vmid" : {
9395 "description" : "The (unique) ID of the VM.",
9396 "format" : "pve-vmid",
9397 "minimum" : 1,
9398 "type" : "integer"
56122987
DM
9399 }
9400 }
9401 },
44660702
DM
9402 "permissions" : {
9403 "check" : [
9404 "and",
9405 [
9406 "perm",
9407 "/vms/{vmid}",
9408 [
9409 "VM.Config.Disk"
9410 ]
9411 ],
9412 [
9413 "perm",
9414 "/storage/{storage}",
9415 [
9416 "Datastore.AllocateSpace"
9417 ]
9418 ]
9419 ],
9420 "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage."
9421 },
9422 "protected" : 1,
9423 "proxyto" : "node",
9424 "returns" : {
9425 "description" : "the task ID.",
9426 "type" : "string"
9427 }
56122987 9428 }
7aacca6f 9429 },
44660702 9430 "leaf" : 1,
7aacca6f 9431 "path" : "/nodes/{node}/qemu/{vmid}/move_disk",
44660702 9432 "text" : "move_disk"
56122987
DM
9433 },
9434 {
56122987
DM
9435 "info" : {
9436 "POST" : {
7aacca6f 9437 "description" : "Migrate virtual machine. Creates a new migration task.",
44660702 9438 "method" : "POST",
7aacca6f 9439 "name" : "migrate_vm",
56122987 9440 "parameters" : {
44660702 9441 "additionalProperties" : 0,
56122987 9442 "properties" : {
44660702
DM
9443 "force" : {
9444 "description" : "Allow to migrate VMs which use local devices. Only root may use this option.",
9445 "optional" : 1,
9446 "type" : "boolean"
9447 },
7aacca6f 9448 "node" : {
44660702 9449 "description" : "The cluster node name.",
7aacca6f 9450 "format" : "pve-node",
44660702 9451 "type" : "string"
56122987
DM
9452 },
9453 "online" : {
44660702 9454 "description" : "Use online/live migration.",
56122987 9455 "optional" : 1,
44660702 9456 "type" : "boolean"
56122987 9457 },
44660702
DM
9458 "target" : {
9459 "description" : "Target node.",
9460 "format" : "pve-node",
9461 "type" : "string"
56122987 9462 },
7aacca6f 9463 "vmid" : {
7aacca6f 9464 "description" : "The (unique) ID of the VM.",
44660702 9465 "format" : "pve-vmid",
7aacca6f 9466 "minimum" : 1,
44660702 9467 "type" : "integer"
56122987 9468 }
44660702
DM
9469 }
9470 },
9471 "permissions" : {
9472 "check" : [
9473 "perm",
9474 "/vms/{vmid}",
9475 [
9476 "VM.Migrate"
9477 ]
9478 ]
56122987
DM
9479 },
9480 "protected" : 1,
44660702
DM
9481 "proxyto" : "node",
9482 "returns" : {
9483 "description" : "the task ID.",
9484 "type" : "string"
9485 }
56122987 9486 }
7aacca6f 9487 },
44660702
DM
9488 "leaf" : 1,
9489 "path" : "/nodes/{node}/qemu/{vmid}/migrate",
7aacca6f 9490 "text" : "migrate"
56122987
DM
9491 },
9492 {
9493 "info" : {
9494 "POST" : {
44660702 9495 "description" : "Execute Qemu monitor commands.",
56122987 9496 "method" : "POST",
44660702 9497 "name" : "monitor",
56122987 9498 "parameters" : {
7aacca6f 9499 "additionalProperties" : 0,
56122987 9500 "properties" : {
44660702
DM
9501 "command" : {
9502 "description" : "The monitor command.",
9503 "type" : "string"
9504 },
56122987 9505 "node" : {
44660702 9506 "description" : "The cluster node name.",
7aacca6f 9507 "format" : "pve-node",
44660702 9508 "type" : "string"
56122987
DM
9509 },
9510 "vmid" : {
44660702 9511 "description" : "The (unique) ID of the VM.",
56122987 9512 "format" : "pve-vmid",
7aacca6f 9513 "minimum" : 1,
44660702 9514 "type" : "integer"
56122987 9515 }
7aacca6f 9516 }
56122987 9517 },
56122987
DM
9518 "permissions" : {
9519 "check" : [
9520 "perm",
9521 "/vms/{vmid}",
9522 [
9523 "VM.Monitor"
9524 ]
9525 ]
7aacca6f 9526 },
44660702
DM
9527 "protected" : 1,
9528 "proxyto" : "node",
9529 "returns" : {
9530 "type" : "string"
9531 }
56122987 9532 }
44660702
DM
9533 },
9534 "leaf" : 1,
9535 "path" : "/nodes/{node}/qemu/{vmid}/monitor",
9536 "text" : "monitor"
56122987
DM
9537 },
9538 {
56122987
DM
9539 "info" : {
9540 "PUT" : {
44660702
DM
9541 "description" : "Extend volume size.",
9542 "method" : "PUT",
9543 "name" : "resize_vm",
56122987 9544 "parameters" : {
44660702 9545 "additionalProperties" : 0,
56122987 9546 "properties" : {
44660702
DM
9547 "digest" : {
9548 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9549 "maxLength" : 40,
9550 "optional" : 1,
56122987
DM
9551 "type" : "string"
9552 },
56122987
DM
9553 "disk" : {
9554 "description" : "The disk you want to resize.",
9555 "enum" : [
9556 "ide0",
9557 "ide1",
9558 "ide2",
9559 "ide3",
9560 "scsi0",
9561 "scsi1",
9562 "scsi2",
9563 "scsi3",
9564 "scsi4",
9565 "scsi5",
9566 "scsi6",
9567 "scsi7",
9568 "scsi8",
9569 "scsi9",
9570 "scsi10",
9571 "scsi11",
9572 "scsi12",
9573 "scsi13",
9574 "virtio0",
9575 "virtio1",
9576 "virtio2",
9577 "virtio3",
9578 "virtio4",
9579 "virtio5",
9580 "virtio6",
9581 "virtio7",
9582 "virtio8",
9583 "virtio9",
9584 "virtio10",
9585 "virtio11",
9586 "virtio12",
9587 "virtio13",
9588 "virtio14",
9589 "virtio15",
9590 "sata0",
9591 "sata1",
9592 "sata2",
9593 "sata3",
9594 "sata4",
9595 "sata5"
44660702
DM
9596 ],
9597 "type" : "string"
56122987 9598 },
44660702
DM
9599 "node" : {
9600 "description" : "The cluster node name.",
9601 "format" : "pve-node",
9602 "type" : "string"
7aacca6f 9603 },
44660702
DM
9604 "size" : {
9605 "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.",
9606 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
9607 "type" : "string"
56122987
DM
9608 },
9609 "skiplock" : {
9610 "description" : "Ignore locks - only root is allowed to use this option.",
9611 "optional" : 1,
9612 "type" : "boolean"
56122987
DM
9613 },
9614 "vmid" : {
7aacca6f 9615 "description" : "The (unique) ID of the VM.",
56122987 9616 "format" : "pve-vmid",
44660702
DM
9617 "minimum" : 1,
9618 "type" : "integer"
56122987
DM
9619 }
9620 }
9621 },
9622 "permissions" : {
9623 "check" : [
9624 "perm",
9625 "/vms/{vmid}",
9626 [
44660702 9627 "VM.Config.Disk"
56122987
DM
9628 ]
9629 ]
9630 },
7aacca6f 9631 "protected" : 1,
7aacca6f 9632 "proxyto" : "node",
44660702
DM
9633 "returns" : {
9634 "type" : "null"
9635 }
7aacca6f
DM
9636 }
9637 },
44660702
DM
9638 "leaf" : 1,
9639 "path" : "/nodes/{node}/qemu/{vmid}/resize",
9640 "text" : "resize"
9641 },
9642 {
56122987
DM
9643 "children" : [
9644 {
9645 "children" : [
9646 {
56122987 9647 "info" : {
44660702
DM
9648 "GET" : {
9649 "description" : "Get snapshot configuration",
9650 "method" : "GET",
9651 "name" : "get_snapshot_config",
56122987 9652 "parameters" : {
44660702 9653 "additionalProperties" : 0,
56122987 9654 "properties" : {
56122987 9655 "node" : {
44660702 9656 "description" : "The cluster node name.",
56122987 9657 "format" : "pve-node",
44660702 9658 "type" : "string"
7aacca6f
DM
9659 },
9660 "snapname" : {
44660702 9661 "description" : "The name of the snapshot.",
7aacca6f 9662 "format" : "pve-configid",
44660702
DM
9663 "maxLength" : 40,
9664 "type" : "string"
7aacca6f
DM
9665 },
9666 "vmid" : {
44660702 9667 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
9668 "format" : "pve-vmid",
9669 "minimum" : 1,
44660702 9670 "type" : "integer"
56122987 9671 }
44660702 9672 }
56122987
DM
9673 },
9674 "permissions" : {
9675 "check" : [
9676 "perm",
9677 "/vms/{vmid}",
9678 [
9679 "VM.Snapshot"
9680 ]
9681 ]
9682 },
44660702 9683 "proxyto" : "node",
56122987 9684 "returns" : {
44660702 9685 "type" : "object"
7aacca6f
DM
9686 }
9687 },
44660702
DM
9688 "PUT" : {
9689 "description" : "Update snapshot metadata.",
9690 "method" : "PUT",
9691 "name" : "update_snapshot_config",
56122987 9692 "parameters" : {
44660702 9693 "additionalProperties" : 0,
56122987 9694 "properties" : {
44660702
DM
9695 "description" : {
9696 "description" : "A textual description or comment.",
9697 "optional" : 1,
9698 "type" : "string"
9699 },
56122987 9700 "node" : {
7aacca6f 9701 "description" : "The cluster node name.",
44660702
DM
9702 "format" : "pve-node",
9703 "type" : "string"
56122987 9704 },
56122987
DM
9705 "snapname" : {
9706 "description" : "The name of the snapshot.",
44660702 9707 "format" : "pve-configid",
7aacca6f 9708 "maxLength" : 40,
44660702 9709 "type" : "string"
7aacca6f
DM
9710 },
9711 "vmid" : {
9712 "description" : "The (unique) ID of the VM.",
44660702 9713 "format" : "pve-vmid",
7aacca6f 9714 "minimum" : 1,
44660702 9715 "type" : "integer"
56122987 9716 }
44660702 9717 }
56122987 9718 },
7aacca6f
DM
9719 "permissions" : {
9720 "check" : [
9721 "perm",
9722 "/vms/{vmid}",
9723 [
9724 "VM.Snapshot"
9725 ]
9726 ]
44660702
DM
9727 },
9728 "protected" : 1,
9729 "proxyto" : "node",
9730 "returns" : {
9731 "type" : "null"
7aacca6f 9732 }
56122987
DM
9733 }
9734 },
44660702 9735 "leaf" : 1,
7aacca6f 9736 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config",
44660702 9737 "text" : "config"
56122987
DM
9738 },
9739 {
56122987
DM
9740 "info" : {
9741 "POST" : {
44660702 9742 "description" : "Rollback VM state to specified snapshot.",
7aacca6f 9743 "method" : "POST",
44660702 9744 "name" : "rollback",
56122987
DM
9745 "parameters" : {
9746 "additionalProperties" : 0,
9747 "properties" : {
44660702
DM
9748 "node" : {
9749 "description" : "The cluster node name.",
9750 "format" : "pve-node",
9751 "type" : "string"
9752 },
56122987 9753 "snapname" : {
44660702 9754 "description" : "The name of the snapshot.",
56122987
DM
9755 "format" : "pve-configid",
9756 "maxLength" : 40,
7aacca6f
DM
9757 "type" : "string"
9758 },
56122987 9759 "vmid" : {
7aacca6f 9760 "description" : "The (unique) ID of the VM.",
44660702 9761 "format" : "pve-vmid",
56122987 9762 "minimum" : 1,
44660702 9763 "type" : "integer"
56122987
DM
9764 }
9765 }
9766 },
7aacca6f 9767 "permissions" : {
56122987
DM
9768 "check" : [
9769 "perm",
9770 "/vms/{vmid}",
9771 [
9772 "VM.Snapshot"
9773 ]
9774 ]
9775 },
44660702 9776 "protected" : 1,
7aacca6f 9777 "proxyto" : "node",
44660702
DM
9778 "returns" : {
9779 "description" : "the task ID.",
9780 "type" : "string"
9781 }
56122987
DM
9782 }
9783 },
44660702
DM
9784 "leaf" : 1,
9785 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback",
7aacca6f 9786 "text" : "rollback"
56122987 9787 }
44660702
DM
9788 ],
9789 "info" : {
9790 "DELETE" : {
9791 "description" : "Delete a VM snapshot.",
9792 "method" : "DELETE",
9793 "name" : "delsnapshot",
9794 "parameters" : {
9795 "additionalProperties" : 0,
9796 "properties" : {
9797 "force" : {
9798 "description" : "For removal from config file, even if removing disk snapshots fails.",
9799 "optional" : 1,
9800 "type" : "boolean"
9801 },
9802 "node" : {
9803 "description" : "The cluster node name.",
9804 "format" : "pve-node",
9805 "type" : "string"
9806 },
9807 "snapname" : {
9808 "description" : "The name of the snapshot.",
9809 "format" : "pve-configid",
9810 "maxLength" : 40,
9811 "type" : "string"
9812 },
9813 "vmid" : {
9814 "description" : "The (unique) ID of the VM.",
9815 "format" : "pve-vmid",
9816 "minimum" : 1,
9817 "type" : "integer"
9818 }
9819 }
9820 },
9821 "permissions" : {
9822 "check" : [
9823 "perm",
9824 "/vms/{vmid}",
9825 [
9826 "VM.Snapshot"
9827 ]
9828 ]
9829 },
9830 "protected" : 1,
9831 "proxyto" : "node",
9832 "returns" : {
9833 "description" : "the task ID.",
9834 "type" : "string"
9835 }
9836 },
9837 "GET" : {
9838 "description" : "",
9839 "method" : "GET",
9840 "name" : "snapshot_cmd_idx",
9841 "parameters" : {
9842 "additionalProperties" : 0,
9843 "properties" : {
9844 "node" : {
9845 "description" : "The cluster node name.",
9846 "format" : "pve-node",
9847 "type" : "string"
9848 },
9849 "snapname" : {
9850 "description" : "The name of the snapshot.",
9851 "format" : "pve-configid",
9852 "maxLength" : 40,
9853 "type" : "string"
9854 },
9855 "vmid" : {
9856 "description" : "The (unique) ID of the VM.",
9857 "format" : "pve-vmid",
9858 "minimum" : 1,
9859 "type" : "integer"
9860 }
9861 }
9862 },
9863 "permissions" : {
9864 "user" : "all"
9865 },
9866 "returns" : {
9867 "items" : {
9868 "properties" : {},
9869 "type" : "object"
9870 },
9871 "links" : [
9872 {
9873 "href" : "{cmd}",
9874 "rel" : "child"
9875 }
9876 ],
9877 "type" : "array"
9878 }
9879 }
9880 },
9881 "leaf" : 0,
9882 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}",
9883 "text" : "{snapname}"
56122987
DM
9884 }
9885 ],
44660702
DM
9886 "info" : {
9887 "GET" : {
9888 "description" : "List all snapshots.",
9889 "method" : "GET",
9890 "name" : "snapshot_list",
9891 "parameters" : {
9892 "additionalProperties" : 0,
9893 "properties" : {
9894 "node" : {
9895 "description" : "The cluster node name.",
9896 "format" : "pve-node",
9897 "type" : "string"
9898 },
9899 "vmid" : {
9900 "description" : "The (unique) ID of the VM.",
9901 "format" : "pve-vmid",
9902 "minimum" : 1,
9903 "type" : "integer"
9904 }
9905 }
9906 },
9907 "permissions" : {
9908 "check" : [
9909 "perm",
9910 "/vms/{vmid}",
9911 [
9912 "VM.Audit"
9913 ]
9914 ]
9915 },
9916 "protected" : 1,
9917 "proxyto" : "node",
9918 "returns" : {
9919 "items" : {
9920 "properties" : {},
9921 "type" : "object"
9922 },
9923 "links" : [
9924 {
9925 "href" : "{name}",
9926 "rel" : "child"
9927 }
9928 ],
9929 "type" : "array"
9930 }
9931 },
9932 "POST" : {
9933 "description" : "Snapshot a VM.",
9934 "method" : "POST",
9935 "name" : "snapshot",
9936 "parameters" : {
9937 "additionalProperties" : 0,
9938 "properties" : {
9939 "description" : {
9940 "description" : "A textual description or comment.",
9941 "optional" : 1,
9942 "type" : "string"
9943 },
9944 "node" : {
9945 "description" : "The cluster node name.",
9946 "format" : "pve-node",
9947 "type" : "string"
9948 },
9949 "snapname" : {
9950 "description" : "The name of the snapshot.",
9951 "format" : "pve-configid",
9952 "maxLength" : 40,
9953 "type" : "string"
9954 },
9955 "vmid" : {
9956 "description" : "The (unique) ID of the VM.",
9957 "format" : "pve-vmid",
9958 "minimum" : 1,
9959 "type" : "integer"
9960 },
9961 "vmstate" : {
9962 "description" : "Save the vmstate",
9963 "optional" : 1,
9964 "type" : "boolean"
9965 }
9966 }
9967 },
9968 "permissions" : {
9969 "check" : [
9970 "perm",
9971 "/vms/{vmid}",
9972 [
9973 "VM.Snapshot"
9974 ]
9975 ]
9976 },
9977 "protected" : 1,
9978 "proxyto" : "node",
9979 "returns" : {
9980 "description" : "the task ID.",
9981 "type" : "string"
9982 }
9983 }
9984 },
9985 "leaf" : 0,
9986 "path" : "/nodes/{node}/qemu/{vmid}/snapshot",
7aacca6f 9987 "text" : "snapshot"
56122987
DM
9988 },
9989 {
56122987
DM
9990 "info" : {
9991 "POST" : {
44660702
DM
9992 "description" : "Create a Template.",
9993 "method" : "POST",
56122987 9994 "name" : "template",
56122987 9995 "parameters" : {
7aacca6f 9996 "additionalProperties" : 0,
56122987 9997 "properties" : {
56122987 9998 "disk" : {
56122987
DM
9999 "description" : "If you want to convert only 1 disk to base image.",
10000 "enum" : [
10001 "ide0",
10002 "ide1",
10003 "ide2",
10004 "ide3",
10005 "scsi0",
10006 "scsi1",
10007 "scsi2",
10008 "scsi3",
10009 "scsi4",
10010 "scsi5",
10011 "scsi6",
10012 "scsi7",
10013 "scsi8",
10014 "scsi9",
10015 "scsi10",
10016 "scsi11",
10017 "scsi12",
10018 "scsi13",
10019 "virtio0",
10020 "virtio1",
10021 "virtio2",
10022 "virtio3",
10023 "virtio4",
10024 "virtio5",
10025 "virtio6",
10026 "virtio7",
10027 "virtio8",
10028 "virtio9",
10029 "virtio10",
10030 "virtio11",
10031 "virtio12",
10032 "virtio13",
10033 "virtio14",
10034 "virtio15",
10035 "sata0",
10036 "sata1",
10037 "sata2",
10038 "sata3",
10039 "sata4",
10040 "sata5"
10041 ],
7aacca6f 10042 "optional" : 1,
56122987
DM
10043 "type" : "string"
10044 },
44660702
DM
10045 "node" : {
10046 "description" : "The cluster node name.",
10047 "format" : "pve-node",
10048 "type" : "string"
10049 },
10050 "vmid" : {
10051 "description" : "The (unique) ID of the VM.",
7aacca6f 10052 "format" : "pve-vmid",
44660702
DM
10053 "minimum" : 1,
10054 "type" : "integer"
56122987 10055 }
7aacca6f 10056 }
56122987 10057 },
7aacca6f
DM
10058 "permissions" : {
10059 "check" : [
10060 "perm",
10061 "/vms/{vmid}",
10062 [
10063 "VM.Allocate"
10064 ]
10065 ],
10066 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
10067 },
44660702 10068 "protected" : 1,
7aacca6f 10069 "proxyto" : "node",
7aacca6f
DM
10070 "returns" : {
10071 "type" : "null"
10072 }
56122987
DM
10073 }
10074 },
44660702 10075 "leaf" : 1,
7aacca6f 10076 "path" : "/nodes/{node}/qemu/{vmid}/template",
44660702 10077 "text" : "template"
56122987
DM
10078 }
10079 ],
7aacca6f 10080 "info" : {
44660702
DM
10081 "DELETE" : {
10082 "description" : "Destroy the vm (also delete all used/owned volumes).",
10083 "method" : "DELETE",
10084 "name" : "destroy_vm",
7aacca6f 10085 "parameters" : {
44660702 10086 "additionalProperties" : 0,
7aacca6f
DM
10087 "properties" : {
10088 "node" : {
44660702 10089 "description" : "The cluster node name.",
7aacca6f 10090 "format" : "pve-node",
44660702
DM
10091 "type" : "string"
10092 },
10093 "skiplock" : {
10094 "description" : "Ignore locks - only root is allowed to use this option.",
10095 "optional" : 1,
10096 "type" : "boolean"
7aacca6f
DM
10097 },
10098 "vmid" : {
44660702 10099 "description" : "The (unique) ID of the VM.",
7aacca6f 10100 "format" : "pve-vmid",
44660702
DM
10101 "minimum" : 1,
10102 "type" : "integer"
7aacca6f 10103 }
44660702 10104 }
7aacca6f 10105 },
7aacca6f
DM
10106 "permissions" : {
10107 "check" : [
10108 "perm",
10109 "/vms/{vmid}",
10110 [
10111 "VM.Allocate"
10112 ]
10113 ]
10114 },
44660702
DM
10115 "protected" : 1,
10116 "proxyto" : "node",
7aacca6f
DM
10117 "returns" : {
10118 "type" : "string"
44660702
DM
10119 }
10120 },
10121 "GET" : {
10122 "description" : "Directory index",
10123 "method" : "GET",
10124 "name" : "vmdiridx",
7aacca6f 10125 "parameters" : {
44660702 10126 "additionalProperties" : 0,
7aacca6f 10127 "properties" : {
7aacca6f 10128 "node" : {
7aacca6f 10129 "description" : "The cluster node name.",
44660702
DM
10130 "format" : "pve-node",
10131 "type" : "string"
10132 },
10133 "vmid" : {
10134 "description" : "The (unique) ID of the VM.",
10135 "format" : "pve-vmid",
10136 "minimum" : 1,
10137 "type" : "integer"
7aacca6f 10138 }
44660702 10139 }
7aacca6f 10140 },
44660702
DM
10141 "permissions" : {
10142 "user" : "all"
10143 },
10144 "proxyto" : "node",
10145 "returns" : {
10146 "items" : {
10147 "properties" : {
10148 "subdir" : {
10149 "type" : "string"
10150 }
10151 },
10152 "type" : "object"
10153 },
10154 "links" : [
10155 {
10156 "href" : "{subdir}",
10157 "rel" : "child"
10158 }
10159 ],
10160 "type" : "array"
10161 }
7aacca6f 10162 }
44660702
DM
10163 },
10164 "leaf" : 0,
10165 "path" : "/nodes/{node}/qemu/{vmid}",
10166 "text" : "{vmid}"
56122987
DM
10167 }
10168 ],
10169 "info" : {
44660702
DM
10170 "GET" : {
10171 "description" : "Virtual machine index (per node).",
10172 "method" : "GET",
10173 "name" : "vmlist",
56122987 10174 "parameters" : {
44660702 10175 "additionalProperties" : 0,
56122987 10176 "properties" : {
44660702
DM
10177 "full" : {
10178 "description" : "Determine the full status of active VMs.",
56122987 10179 "optional" : 1,
44660702 10180 "type" : "boolean"
56122987 10181 },
44660702
DM
10182 "node" : {
10183 "description" : "The cluster node name.",
10184 "format" : "pve-node",
7aacca6f 10185 "type" : "string"
44660702
DM
10186 }
10187 }
10188 },
10189 "permissions" : {
10190 "description" : "Only list VMs where you have VM.Audit permissons on /vms/<vmid>.",
10191 "user" : "all"
10192 },
10193 "protected" : 1,
10194 "proxyto" : "node",
10195 "returns" : {
10196 "items" : {
10197 "properties" : {},
10198 "type" : "object"
10199 },
10200 "links" : [
10201 {
10202 "href" : "{vmid}",
10203 "rel" : "child"
10204 }
10205 ],
10206 "type" : "array"
10207 }
10208 },
10209 "POST" : {
10210 "description" : "Create or restore a virtual machine.",
10211 "method" : "POST",
10212 "name" : "create_vm",
10213 "parameters" : {
10214 "additionalProperties" : 0,
10215 "properties" : {
7aacca6f 10216 "acpi" : {
7aacca6f 10217 "default" : 1,
44660702 10218 "description" : "Enable/disable ACPI.",
56122987 10219 "optional" : 1,
7aacca6f 10220 "type" : "boolean"
56122987 10221 },
44660702
DM
10222 "agent" : {
10223 "default" : 0,
10224 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 10225 "optional" : 1,
44660702 10226 "type" : "boolean"
56122987 10227 },
44660702
DM
10228 "archive" : {
10229 "description" : "The backup file.",
10230 "maxLength" : 255,
56122987 10231 "optional" : 1,
44660702 10232 "type" : "string"
56122987 10233 },
44660702
DM
10234 "args" : {
10235 "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n",
56122987 10236 "optional" : 1,
44660702 10237 "type" : "string"
56122987 10238 },
44660702 10239 "autostart" : {
7aacca6f 10240 "default" : 0,
44660702
DM
10241 "description" : "Automatic restart after crash (currently ignored).",
10242 "optional" : 1,
10243 "type" : "boolean"
7aacca6f 10244 },
44660702
DM
10245 "balloon" : {
10246 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
10247 "minimum" : 0,
56122987 10248 "optional" : 1,
44660702 10249 "type" : "integer"
56122987 10250 },
44660702
DM
10251 "bios" : {
10252 "default" : "seabios",
10253 "description" : "Select BIOS implementation.",
10254 "enum" : [
10255 "seabios",
10256 "ovmf"
10257 ],
56122987 10258 "optional" : 1,
44660702 10259 "type" : "string"
56122987 10260 },
44660702
DM
10261 "boot" : {
10262 "default" : "cdn",
10263 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
56122987 10264 "optional" : 1,
44660702
DM
10265 "pattern" : "[acdn]{1,4}",
10266 "type" : "string"
56122987 10267 },
7aacca6f
DM
10268 "bootdisk" : {
10269 "description" : "Enable booting from specified disk.",
44660702
DM
10270 "format" : "pve-qm-bootdisk",
10271 "optional" : 1,
7aacca6f 10272 "pattern" : "(ide|sata|scsi|virtio)\\d+",
44660702
DM
10273 "type" : "string"
10274 },
10275 "cdrom" : {
10276 "description" : "This is an alias for option -ide2",
10277 "format" : "pve-qm-drive",
56122987 10278 "optional" : 1,
44660702
DM
10279 "type" : "string",
10280 "typetext" : "volume"
56122987 10281 },
44660702
DM
10282 "cores" : {
10283 "default" : 1,
10284 "description" : "The number of cores per socket.",
7aacca6f 10285 "minimum" : 1,
44660702 10286 "optional" : 1,
7aacca6f
DM
10287 "type" : "integer"
10288 },
44660702
DM
10289 "cpu" : {
10290 "description" : "Emulated CPU type.",
10291 "format" : {
10292 "cputype" : {
10293 "default" : "kvm64",
10294 "default_key" : 1,
10295 "description" : "Emulated CPU type.",
10296 "enum" : [
10297 "486",
10298 "athlon",
f004f5b9
DM
10299 "Broadwell",
10300 "Broadwell-noTSX",
10301 "Conroe",
44660702 10302 "core2duo",
f004f5b9
DM
10303 "coreduo",
10304 "Haswell",
10305 "Haswell-noTSX",
10306 "host",
10307 "IvyBridge",
44660702
DM
10308 "kvm32",
10309 "kvm64",
44660702 10310 "Nehalem",
44660702
DM
10311 "Opteron_G1",
10312 "Opteron_G2",
10313 "Opteron_G3",
10314 "Opteron_G4",
10315 "Opteron_G5",
f004f5b9
DM
10316 "Penryn",
10317 "pentium",
10318 "pentium2",
10319 "pentium3",
10320 "phenom",
10321 "qemu32",
10322 "qemu64",
10323 "SandyBridge",
10324 "Westmere"
44660702
DM
10325 ],
10326 "format_description" : "cputype",
10327 "type" : "string"
10328 },
10329 "hidden" : {
10330 "default" : 0,
10331 "description" : "Do not identify as a KVM virtual machine.",
10332 "optional" : 1,
10333 "type" : "boolean"
10334 }
10335 },
56122987 10336 "optional" : 1,
44660702 10337 "type" : "string"
56122987 10338 },
44660702 10339 "cpulimit" : {
7aacca6f 10340 "default" : 0,
44660702
DM
10341 "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.",
10342 "maximum" : 128,
10343 "minimum" : 0,
7aacca6f 10344 "optional" : 1,
44660702 10345 "type" : "number"
7aacca6f
DM
10346 },
10347 "cpuunits" : {
7aacca6f 10348 "default" : 1000,
44660702 10349 "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.",
7aacca6f 10350 "maximum" : 500000,
44660702
DM
10351 "minimum" : 0,
10352 "optional" : 1,
10353 "type" : "integer"
10354 },
10355 "description" : {
10356 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
56122987 10357 "optional" : 1,
44660702
DM
10358 "type" : "string"
10359 },
10360 "force" : {
10361 "description" : "Allow to overwrite existing VM.",
10362 "optional" : 1,
10363 "requires" : "archive",
10364 "type" : "boolean"
10365 },
10366 "freeze" : {
10367 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
10368 "optional" : 1,
10369 "type" : "boolean"
10370 },
10371 "hostpci[n]" : {
10372 "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
10373 "format" : "pve-qm-hostpci",
10374 "optional" : 1,
10375 "type" : "string"
10376 },
10377 "hotplug" : {
10378 "default" : "network,disk,usb",
10379 "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'.",
10380 "format" : "pve-hotplug-features",
10381 "optional" : 1,
10382 "type" : "string"
7aacca6f
DM
10383 },
10384 "ide[n]" : {
44660702 10385 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 10386 "format" : {
44660702
DM
10387 "aio" : {
10388 "description" : "AIO type to use.",
10389 "enum" : [
10390 "native",
10391 "threads"
10392 ],
44660702
DM
10393 "optional" : 1,
10394 "type" : "string"
10395 },
10396 "backup" : {
10397 "description" : "Whether the drive should be included when making backups.",
44660702
DM
10398 "optional" : 1,
10399 "type" : "boolean"
10400 },
10401 "bps" : {
10402 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 10403 "format_description" : "bps",
56122987 10404 "optional" : 1,
44660702 10405 "type" : "integer"
56122987 10406 },
44660702
DM
10407 "bps_rd" : {
10408 "description" : "Maximum read speed speed in bytes per second.",
10409 "format_description" : "bps",
56122987 10410 "optional" : 1,
44660702 10411 "type" : "integer"
56122987 10412 },
44660702
DM
10413 "bps_wr" : {
10414 "description" : "Maximum write speed speed in bytes per second.",
10415 "format_description" : "bps",
56122987 10416 "optional" : 1,
44660702 10417 "type" : "integer"
56122987 10418 },
44660702
DM
10419 "cache" : {
10420 "description" : "The drive's cache mode",
56122987 10421 "enum" : [
7aacca6f 10422 "none",
44660702
DM
10423 "writethrough",
10424 "writeback",
10425 "unsafe",
10426 "directsync"
56122987 10427 ],
56122987 10428 "optional" : 1,
44660702 10429 "type" : "string"
56122987 10430 },
44660702
DM
10431 "cyls" : {
10432 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
10433 "optional" : 1,
10434 "type" : "integer"
7aacca6f 10435 },
44660702
DM
10436 "detect_zeroes" : {
10437 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10438 "optional" : 1,
44660702 10439 "type" : "boolean"
56122987 10440 },
44660702
DM
10441 "discard" : {
10442 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
10443 "enum" : [
10444 "ignore",
10445 "on"
10446 ],
56122987 10447 "optional" : 1,
44660702 10448 "type" : "string"
56122987 10449 },
7aacca6f 10450 "file" : {
44660702 10451 "default_key" : 1,
7aacca6f 10452 "description" : "The drive's backing volume.",
7aacca6f
DM
10453 "format" : "pve-volume-id-or-qm-path",
10454 "format_description" : "volume",
7aacca6f 10455 "type" : "string"
56122987 10456 },
44660702
DM
10457 "format" : {
10458 "description" : "The drive's backing file's data format.",
56122987 10459 "enum" : [
44660702
DM
10460 "raw",
10461 "cow",
10462 "qcow",
10463 "qed",
10464 "qcow2",
10465 "vmdk",
10466 "cloop"
7aacca6f 10467 ],
f004f5b9 10468 "format_description" : "image format",
7aacca6f
DM
10469 "optional" : 1,
10470 "type" : "string"
56122987 10471 },
44660702
DM
10472 "heads" : {
10473 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 10474 "optional" : 1,
44660702 10475 "type" : "integer"
56122987 10476 },
44660702
DM
10477 "iops" : {
10478 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 10479 "format_description" : "iops",
56122987 10480 "optional" : 1,
44660702 10481 "type" : "integer"
56122987 10482 },
44660702
DM
10483 "iops_max" : {
10484 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
10485 "format_description" : "iops",
56122987 10486 "optional" : 1,
44660702 10487 "type" : "integer"
56122987 10488 },
7aacca6f 10489 "iops_rd" : {
7aacca6f 10490 "description" : "Maximum read I/O speed in operations per second.",
44660702
DM
10491 "format_description" : "iops",
10492 "optional" : 1,
10493 "type" : "integer"
7aacca6f 10494 },
44660702
DM
10495 "iops_rd_max" : {
10496 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
10497 "format_description" : "iops",
56122987 10498 "optional" : 1,
44660702 10499 "type" : "integer"
56122987 10500 },
44660702
DM
10501 "iops_wr" : {
10502 "description" : "Maximum write I/O speed in operations per second.",
10503 "format_description" : "iops",
56122987 10504 "optional" : 1,
44660702 10505 "type" : "integer"
7aacca6f 10506 },
44660702
DM
10507 "iops_wr_max" : {
10508 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
10509 "format_description" : "iops",
7aacca6f 10510 "optional" : 1,
44660702 10511 "type" : "integer"
56122987 10512 },
44660702
DM
10513 "mbps" : {
10514 "description" : "Maximum r/w speed speed in megabytes per second.",
10515 "format_description" : "mbps",
7aacca6f 10516 "optional" : 1,
44660702 10517 "type" : "number"
56122987 10518 },
44660702
DM
10519 "mbps_max" : {
10520 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7aacca6f 10521 "format_description" : "mbps",
56122987 10522 "optional" : 1,
44660702 10523 "type" : "number"
56122987 10524 },
44660702
DM
10525 "mbps_rd" : {
10526 "description" : "Maximum read speed speed in megabytes per second.",
10527 "format_description" : "mbps",
7aacca6f 10528 "optional" : 1,
44660702 10529 "type" : "number"
7aacca6f 10530 },
44660702
DM
10531 "mbps_rd_max" : {
10532 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
10533 "format_description" : "mbps",
56122987 10534 "optional" : 1,
44660702 10535 "type" : "number"
56122987 10536 },
44660702
DM
10537 "mbps_wr" : {
10538 "description" : "Maximum write speed speed in megabytes per second.",
10539 "format_description" : "mbps",
7aacca6f 10540 "optional" : 1,
44660702 10541 "type" : "number"
56122987 10542 },
44660702
DM
10543 "mbps_wr_max" : {
10544 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
10545 "format_description" : "mbps",
56122987 10546 "optional" : 1,
44660702 10547 "type" : "number"
7aacca6f
DM
10548 },
10549 "media" : {
44660702
DM
10550 "default" : "disk",
10551 "description" : "The drive's media type.",
56122987 10552 "enum" : [
7aacca6f
DM
10553 "cdrom",
10554 "disk"
56122987 10555 ],
56122987 10556 "optional" : 1,
44660702 10557 "type" : "string"
56122987 10558 },
44660702
DM
10559 "model" : {
10560 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
10561 "format" : "urlencoded",
10562 "format_description" : "model",
10563 "maxLength" : 120,
56122987 10564 "optional" : 1,
44660702 10565 "type" : "string"
56122987 10566 },
7aacca6f 10567 "rerror" : {
7aacca6f
DM
10568 "description" : "Read error action.",
10569 "enum" : [
10570 "ignore",
10571 "report",
10572 "stop"
44660702 10573 ],
44660702
DM
10574 "optional" : 1,
10575 "type" : "string"
56122987 10576 },
44660702
DM
10577 "secs" : {
10578 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 10579 "optional" : 1,
44660702
DM
10580 "type" : "integer"
10581 },
10582 "serial" : {
10583 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
10584 "format" : "urlencoded",
10585 "format_description" : "serial",
10586 "maxLength" : 60,
10587 "optional" : 1,
10588 "type" : "string"
10589 },
10590 "size" : {
10591 "description" : "Disk size. This is purely informational and has no effect.",
10592 "format" : "disk-size",
f004f5b9 10593 "format_description" : "DiskSize",
44660702
DM
10594 "optional" : 1,
10595 "type" : "string"
7aacca6f
DM
10596 },
10597 "snapshot" : {
44660702 10598 "description" : "Whether the drive should be included when making snapshots.",
7aacca6f 10599 "optional" : 1,
44660702 10600 "type" : "boolean"
7aacca6f 10601 },
44660702
DM
10602 "trans" : {
10603 "description" : "Force disk geometry bios translation mode.",
10604 "enum" : [
10605 "none",
10606 "lba",
10607 "auto"
10608 ],
7aacca6f 10609 "optional" : 1,
44660702
DM
10610 "type" : "string"
10611 },
10612 "volume" : {
10613 "alias" : "file"
10614 },
10615 "werror" : {
10616 "description" : "Write error action.",
10617 "enum" : [
10618 "enospc",
10619 "ignore",
10620 "report",
10621 "stop"
10622 ],
44660702
DM
10623 "optional" : 1,
10624 "type" : "string"
56122987
DM
10625 }
10626 },
56122987 10627 "optional" : 1,
7aacca6f 10628 "type" : "string"
56122987 10629 },
56122987 10630 "keyboard" : {
44660702 10631 "default" : "en-us",
7aacca6f 10632 "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.",
56122987 10633 "enum" : [
44660702
DM
10634 "de",
10635 "de-ch",
7aacca6f 10636 "da",
56122987 10637 "en-gb",
44660702
DM
10638 "en-us",
10639 "es",
10640 "fi",
10641 "fr",
10642 "fr-be",
10643 "fr-ca",
10644 "fr-ch",
10645 "hu",
7aacca6f 10646 "is",
44660702
DM
10647 "it",
10648 "ja",
10649 "lt",
56122987 10650 "mk",
7aacca6f 10651 "nl",
56122987 10652 "no",
44660702 10653 "pl",
7aacca6f 10654 "pt",
44660702
DM
10655 "pt-br",
10656 "sv",
10657 "sl",
10658 "tr"
56122987 10659 ],
44660702
DM
10660 "optional" : 1,
10661 "type" : "string"
56122987 10662 },
44660702
DM
10663 "kvm" : {
10664 "default" : 1,
10665 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 10666 "optional" : 1,
44660702 10667 "type" : "boolean"
7aacca6f 10668 },
44660702
DM
10669 "localtime" : {
10670 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 10671 "optional" : 1,
44660702
DM
10672 "type" : "boolean"
10673 },
10674 "lock" : {
10675 "description" : "Lock/unlock the VM.",
7aacca6f
DM
10676 "enum" : [
10677 "migrate",
10678 "backup",
10679 "snapshot",
10680 "rollback"
10681 ],
44660702
DM
10682 "optional" : 1,
10683 "type" : "string"
56122987 10684 },
44660702
DM
10685 "machine" : {
10686 "description" : "Specific the Qemu machine type.",
10687 "maxLength" : 40,
10688 "optional" : 1,
10689 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
10690 "type" : "string"
10691 },
10692 "memory" : {
10693 "default" : 512,
10694 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
10695 "minimum" : 16,
10696 "optional" : 1,
10697 "type" : "integer"
10698 },
10699 "migrate_downtime" : {
10700 "default" : 0.1,
10701 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
10702 "minimum" : 0,
10703 "optional" : 1,
10704 "type" : "number"
10705 },
10706 "migrate_speed" : {
56122987 10707 "default" : 0,
44660702
DM
10708 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
10709 "minimum" : 0,
56122987 10710 "optional" : 1,
44660702 10711 "type" : "integer"
56122987 10712 },
44660702
DM
10713 "name" : {
10714 "description" : "Set a name for the VM. Only used on the configuration web interface.",
10715 "format" : "dns-name",
10716 "optional" : 1,
10717 "type" : "string"
10718 },
10719 "net[n]" : {
10720 "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n",
f004f5b9
DM
10721 "format" : {
10722 "bridge" : {
10723 "description" : "Bridge to attach the network device to.",
10724 "format_description" : "bridge",
10725 "optional" : 1,
10726 "type" : "string"
10727 },
10728 "e1000" : {
10729 "alias" : "macaddr",
10730 "keyAlias" : "model"
10731 },
10732 "e1000-82540em" : {
10733 "alias" : "macaddr",
10734 "keyAlias" : "model"
10735 },
10736 "e1000-82544gc" : {
10737 "alias" : "macaddr",
10738 "keyAlias" : "model"
10739 },
10740 "e1000-82545em" : {
10741 "alias" : "macaddr",
10742 "keyAlias" : "model"
10743 },
10744 "firewall" : {
10745 "description" : "Whether this interface should be protected by the firewall.",
10746 "optional" : 1,
10747 "type" : "boolean"
10748 },
10749 "i82551" : {
10750 "alias" : "macaddr",
10751 "keyAlias" : "model"
10752 },
10753 "i82557b" : {
10754 "alias" : "macaddr",
10755 "keyAlias" : "model"
10756 },
10757 "i82559er" : {
10758 "alias" : "macaddr",
10759 "keyAlias" : "model"
10760 },
10761 "link_down" : {
10762 "description" : "Whether this interface should be DISconnected (like pulling the plug).",
10763 "optional" : 1,
10764 "type" : "boolean"
10765 },
10766 "macaddr" : {
10767 "description" : "MAC address",
10768 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
10769 "optional" : 1,
10770 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
10771 "type" : "string"
10772 },
10773 "model" : {
10774 "default_key" : 1,
10775 "description" : "Network Card Model.",
10776 "enum" : [
10777 "rtl8139",
10778 "ne2k_pci",
10779 "e1000",
10780 "pcnet",
10781 "virtio",
10782 "ne2k_isa",
10783 "i82551",
10784 "i82557b",
10785 "i82559er",
10786 "vmxnet3",
10787 "e1000-82540em",
10788 "e1000-82544gc",
10789 "e1000-82545em"
10790 ],
10791 "format_description" : "model",
10792 "type" : "string"
10793 },
10794 "ne2k_isa" : {
10795 "alias" : "macaddr",
10796 "keyAlias" : "model"
10797 },
10798 "ne2k_pci" : {
10799 "alias" : "macaddr",
10800 "keyAlias" : "model"
10801 },
10802 "pcnet" : {
10803 "alias" : "macaddr",
10804 "keyAlias" : "model"
10805 },
10806 "queues" : {
10807 "description" : "Number of packet queues to be used on the device.",
10808 "maximum" : 16,
10809 "minimum" : 0,
10810 "optional" : 1,
10811 "type" : "integer"
10812 },
10813 "rate" : {
10814 "description" : "Rate limit in mbps as floating point number.",
10815 "minimum" : 0,
10816 "optional" : 1,
10817 "type" : "number"
10818 },
10819 "rtl8139" : {
10820 "alias" : "macaddr",
10821 "keyAlias" : "model"
10822 },
10823 "tag" : {
10824 "description" : "VLAN tag to apply to packets on this interface.",
10825 "maximum" : 4094,
10826 "minimum" : 2,
10827 "optional" : 1,
10828 "type" : "integer"
10829 },
10830 "trunks" : {
10831 "description" : "VLAN trunks to pass through this interface.",
10832 "format_description" : "vlanid[;vlanid...]",
10833 "optional" : 1,
10834 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10835 "type" : "string"
10836 },
10837 "virtio" : {
10838 "alias" : "macaddr",
10839 "keyAlias" : "model"
10840 },
10841 "vmxnet3" : {
10842 "alias" : "macaddr",
10843 "keyAlias" : "model"
10844 }
10845 },
44660702
DM
10846 "optional" : 1,
10847 "type" : "string"
10848 },
10849 "node" : {
10850 "description" : "The cluster node name.",
10851 "format" : "pve-node",
10852 "type" : "string"
10853 },
10854 "numa" : {
7aacca6f 10855 "default" : 0,
44660702
DM
10856 "description" : "Enable/disable NUMA.",
10857 "optional" : 1,
10858 "type" : "boolean"
56122987 10859 },
7aacca6f 10860 "numa[n]" : {
44660702 10861 "description" : "numa topology",
7aacca6f 10862 "format" : {
44660702
DM
10863 "cpus" : {
10864 "description" : "CPUs accessing this numa node.",
10865 "format_description" : "id[-id];...",
10866 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10867 "type" : "string"
10868 },
7aacca6f
DM
10869 "hostnodes" : {
10870 "description" : "host numa nodes to use",
44660702 10871 "format_description" : "id[-id];...",
7aacca6f 10872 "optional" : 1,
44660702
DM
10873 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
10874 "type" : "string"
7aacca6f 10875 },
44660702
DM
10876 "memory" : {
10877 "description" : "Amount of memory this numa node provides.",
44660702
DM
10878 "optional" : 1,
10879 "type" : "number"
7aacca6f
DM
10880 },
10881 "policy" : {
10882 "description" : "numa allocation policy.",
10883 "enum" : [
10884 "preferred",
10885 "bind",
10886 "interleave"
10887 ],
7aacca6f 10888 "optional" : 1,
44660702 10889 "type" : "string"
7aacca6f
DM
10890 }
10891 },
56122987 10892 "optional" : 1,
44660702 10893 "type" : "string"
56122987 10894 },
44660702
DM
10895 "onboot" : {
10896 "default" : 0,
10897 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 10898 "optional" : 1,
44660702 10899 "type" : "boolean"
56122987
DM
10900 },
10901 "ostype" : {
7aacca6f 10902 "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n",
56122987
DM
10903 "enum" : [
10904 "other",
10905 "wxp",
10906 "w2k",
10907 "w2k3",
10908 "w2k8",
10909 "wvista",
10910 "win7",
10911 "win8",
10912 "l24",
10913 "l26",
10914 "solaris"
44660702 10915 ],
56122987 10916 "optional" : 1,
44660702 10917 "type" : "string"
56122987 10918 },
44660702
DM
10919 "parallel[n]" : {
10920 "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
56122987 10921 "optional" : 1,
44660702
DM
10922 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
10923 "type" : "string"
56122987 10924 },
44660702
DM
10925 "pool" : {
10926 "description" : "Add the VM to the specified pool.",
10927 "format" : "pve-poolid",
56122987 10928 "optional" : 1,
44660702 10929 "type" : "string"
56122987 10930 },
44660702
DM
10931 "protection" : {
10932 "default" : 0,
10933 "description" : "Sets the protection flag of the VM. This will prevent the remove operation.",
56122987 10934 "optional" : 1,
44660702 10935 "type" : "boolean"
56122987 10936 },
44660702 10937 "reboot" : {
7aacca6f 10938 "default" : 1,
44660702
DM
10939 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
10940 "optional" : 1,
10941 "type" : "boolean"
56122987 10942 },
56122987 10943 "sata[n]" : {
44660702 10944 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 10945 "format" : {
7aacca6f 10946 "aio" : {
44660702 10947 "description" : "AIO type to use.",
56122987 10948 "enum" : [
7aacca6f
DM
10949 "native",
10950 "threads"
56122987 10951 ],
7aacca6f 10952 "optional" : 1,
44660702 10953 "type" : "string"
7aacca6f
DM
10954 },
10955 "backup" : {
7aacca6f 10956 "description" : "Whether the drive should be included when making backups.",
7aacca6f 10957 "optional" : 1,
44660702 10958 "type" : "boolean"
56122987 10959 },
44660702
DM
10960 "bps" : {
10961 "description" : "Maximum r/w speed speed in bytes per second.",
10962 "format_description" : "bps",
7aacca6f 10963 "optional" : 1,
44660702 10964 "type" : "integer"
56122987 10965 },
44660702
DM
10966 "bps_rd" : {
10967 "description" : "Maximum read speed speed in bytes per second.",
10968 "format_description" : "bps",
56122987 10969 "optional" : 1,
44660702 10970 "type" : "integer"
7aacca6f 10971 },
44660702
DM
10972 "bps_wr" : {
10973 "description" : "Maximum write speed speed in bytes per second.",
10974 "format_description" : "bps",
56122987 10975 "optional" : 1,
44660702 10976 "type" : "integer"
56122987 10977 },
7aacca6f 10978 "cache" : {
7aacca6f
DM
10979 "description" : "The drive's cache mode",
10980 "enum" : [
10981 "none",
10982 "writethrough",
10983 "writeback",
10984 "unsafe",
10985 "directsync"
10986 ],
44660702
DM
10987 "optional" : 1,
10988 "type" : "string"
56122987 10989 },
44660702
DM
10990 "cyls" : {
10991 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 10992 "optional" : 1,
7aacca6f 10993 "type" : "integer"
56122987 10994 },
7aacca6f
DM
10995 "detect_zeroes" : {
10996 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10997 "optional" : 1,
7aacca6f 10998 "type" : "boolean"
56122987 10999 },
44660702
DM
11000 "discard" : {
11001 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11002 "enum" : [
11003 "ignore",
11004 "on"
11005 ],
56122987 11006 "optional" : 1,
44660702 11007 "type" : "string"
56122987 11008 },
44660702
DM
11009 "file" : {
11010 "default_key" : 1,
11011 "description" : "The drive's backing volume.",
11012 "format" : "pve-volume-id-or-qm-path",
11013 "format_description" : "volume",
11014 "type" : "string"
56122987
DM
11015 },
11016 "format" : {
44660702 11017 "description" : "The drive's backing file's data format.",
56122987
DM
11018 "enum" : [
11019 "raw",
11020 "cow",
11021 "qcow",
11022 "qed",
11023 "qcow2",
11024 "vmdk",
11025 "cloop"
11026 ],
f004f5b9 11027 "format_description" : "image format",
56122987 11028 "optional" : 1,
44660702 11029 "type" : "string"
56122987 11030 },
7aacca6f 11031 "heads" : {
7aacca6f 11032 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11033 "optional" : 1,
11034 "type" : "integer"
56122987 11035 },
44660702
DM
11036 "iops" : {
11037 "description" : "Maximum r/w I/O speed in operations per second.",
11038 "format_description" : "iops",
11039 "optional" : 1,
11040 "type" : "integer"
56122987 11041 },
44660702
DM
11042 "iops_max" : {
11043 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11044 "format_description" : "iops",
56122987 11045 "optional" : 1,
44660702 11046 "type" : "integer"
56122987 11047 },
44660702
DM
11048 "iops_rd" : {
11049 "description" : "Maximum read I/O speed in operations per second.",
11050 "format_description" : "iops",
56122987 11051 "optional" : 1,
44660702 11052 "type" : "integer"
56122987 11053 },
44660702
DM
11054 "iops_rd_max" : {
11055 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 11056 "format_description" : "iops",
56122987 11057 "optional" : 1,
44660702 11058 "type" : "integer"
56122987 11059 },
44660702
DM
11060 "iops_wr" : {
11061 "description" : "Maximum write I/O speed in operations per second.",
11062 "format_description" : "iops",
7aacca6f 11063 "optional" : 1,
44660702 11064 "type" : "integer"
7aacca6f 11065 },
44660702
DM
11066 "iops_wr_max" : {
11067 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11068 "format_description" : "iops",
56122987 11069 "optional" : 1,
7aacca6f 11070 "type" : "integer"
56122987 11071 },
44660702
DM
11072 "mbps" : {
11073 "description" : "Maximum r/w speed speed in megabytes per second.",
11074 "format_description" : "mbps",
56122987 11075 "optional" : 1,
44660702 11076 "type" : "number"
56122987 11077 },
44660702
DM
11078 "mbps_max" : {
11079 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11080 "format_description" : "mbps",
7aacca6f 11081 "optional" : 1,
44660702 11082 "type" : "number"
7aacca6f 11083 },
44660702
DM
11084 "mbps_rd" : {
11085 "description" : "Maximum read speed speed in megabytes per second.",
11086 "format_description" : "mbps",
7aacca6f 11087 "optional" : 1,
44660702 11088 "type" : "number"
7aacca6f 11089 },
44660702
DM
11090 "mbps_rd_max" : {
11091 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11092 "format_description" : "mbps",
7aacca6f 11093 "optional" : 1,
44660702 11094 "type" : "number"
7aacca6f 11095 },
44660702
DM
11096 "mbps_wr" : {
11097 "description" : "Maximum write speed speed in megabytes per second.",
11098 "format_description" : "mbps",
7aacca6f 11099 "optional" : 1,
44660702 11100 "type" : "number"
7aacca6f
DM
11101 },
11102 "mbps_wr_max" : {
7aacca6f 11103 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
44660702 11104 "format_description" : "mbps",
7aacca6f 11105 "optional" : 1,
44660702 11106 "type" : "number"
7aacca6f 11107 },
44660702
DM
11108 "media" : {
11109 "default" : "disk",
11110 "description" : "The drive's media type.",
56122987 11111 "enum" : [
44660702
DM
11112 "cdrom",
11113 "disk"
56122987 11114 ],
56122987 11115 "optional" : 1,
44660702 11116 "type" : "string"
56122987 11117 },
44660702
DM
11118 "rerror" : {
11119 "description" : "Read error action.",
7aacca6f
DM
11120 "enum" : [
11121 "ignore",
44660702
DM
11122 "report",
11123 "stop"
7aacca6f 11124 ],
56122987 11125 "optional" : 1,
44660702 11126 "type" : "string"
56122987 11127 },
44660702
DM
11128 "secs" : {
11129 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 11130 "optional" : 1,
44660702 11131 "type" : "integer"
56122987 11132 },
44660702
DM
11133 "serial" : {
11134 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11135 "format" : "urlencoded",
11136 "format_description" : "serial",
11137 "maxLength" : 60,
11138 "optional" : 1,
11139 "type" : "string"
7aacca6f
DM
11140 },
11141 "size" : {
11142 "description" : "Disk size. This is purely informational and has no effect.",
44660702 11143 "format" : "disk-size",
f004f5b9 11144 "format_description" : "DiskSize",
56122987 11145 "optional" : 1,
44660702 11146 "type" : "string"
56122987 11147 },
44660702
DM
11148 "snapshot" : {
11149 "description" : "Whether the drive should be included when making snapshots.",
56122987 11150 "optional" : 1,
44660702 11151 "type" : "boolean"
56122987 11152 },
44660702
DM
11153 "trans" : {
11154 "description" : "Force disk geometry bios translation mode.",
56122987 11155 "enum" : [
44660702
DM
11156 "none",
11157 "lba",
11158 "auto"
7aacca6f 11159 ],
44660702
DM
11160 "optional" : 1,
11161 "type" : "string"
11162 },
11163 "volume" : {
11164 "alias" : "file"
56122987
DM
11165 },
11166 "werror" : {
56122987
DM
11167 "description" : "Write error action.",
11168 "enum" : [
11169 "enospc",
11170 "ignore",
11171 "report",
11172 "stop"
11173 ],
56122987 11174 "optional" : 1,
44660702
DM
11175 "type" : "string"
11176 }
11177 },
11178 "optional" : 1,
11179 "type" : "string"
11180 },
11181 "scsi[n]" : {
11182 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
11183 "format" : {
11184 "aio" : {
11185 "description" : "AIO type to use.",
11186 "enum" : [
11187 "native",
11188 "threads"
11189 ],
44660702
DM
11190 "optional" : 1,
11191 "type" : "string"
56122987 11192 },
7aacca6f 11193 "backup" : {
44660702 11194 "description" : "Whether the drive should be included when making backups.",
7aacca6f 11195 "optional" : 1,
44660702 11196 "type" : "boolean"
7aacca6f 11197 },
44660702
DM
11198 "bps" : {
11199 "description" : "Maximum r/w speed speed in bytes per second.",
11200 "format_description" : "bps",
7aacca6f 11201 "optional" : 1,
44660702 11202 "type" : "integer"
7aacca6f 11203 },
44660702
DM
11204 "bps_rd" : {
11205 "description" : "Maximum read speed speed in bytes per second.",
11206 "format_description" : "bps",
56122987 11207 "optional" : 1,
44660702 11208 "type" : "integer"
56122987 11209 },
44660702
DM
11210 "bps_wr" : {
11211 "description" : "Maximum write speed speed in bytes per second.",
11212 "format_description" : "bps",
7aacca6f 11213 "optional" : 1,
44660702 11214 "type" : "integer"
56122987 11215 },
44660702
DM
11216 "cache" : {
11217 "description" : "The drive's cache mode",
7aacca6f
DM
11218 "enum" : [
11219 "none",
44660702
DM
11220 "writethrough",
11221 "writeback",
11222 "unsafe",
11223 "directsync"
7aacca6f 11224 ],
56122987 11225 "optional" : 1,
44660702 11226 "type" : "string"
56122987 11227 },
7aacca6f
DM
11228 "cyls" : {
11229 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
11230 "optional" : 1,
44660702 11231 "type" : "integer"
7aacca6f 11232 },
44660702
DM
11233 "detect_zeroes" : {
11234 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11235 "optional" : 1,
44660702 11236 "type" : "boolean"
56122987 11237 },
44660702
DM
11238 "discard" : {
11239 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7aacca6f 11240 "enum" : [
44660702
DM
11241 "ignore",
11242 "on"
7aacca6f 11243 ],
7aacca6f 11244 "optional" : 1,
44660702 11245 "type" : "string"
56122987
DM
11246 },
11247 "file" : {
7aacca6f
DM
11248 "default_key" : 1,
11249 "description" : "The drive's backing volume.",
44660702
DM
11250 "format" : "pve-volume-id-or-qm-path",
11251 "format_description" : "volume",
7aacca6f 11252 "type" : "string"
56122987 11253 },
7aacca6f 11254 "format" : {
44660702 11255 "description" : "The drive's backing file's data format.",
56122987 11256 "enum" : [
7aacca6f
DM
11257 "raw",
11258 "cow",
11259 "qcow",
11260 "qed",
11261 "qcow2",
11262 "vmdk",
11263 "cloop"
56122987 11264 ],
f004f5b9 11265 "format_description" : "image format",
44660702
DM
11266 "optional" : 1,
11267 "type" : "string"
56122987 11268 },
44660702
DM
11269 "heads" : {
11270 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11271 "optional" : 1,
11272 "type" : "integer"
11273 },
11274 "iops" : {
11275 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 11276 "format_description" : "iops",
56122987 11277 "optional" : 1,
44660702 11278 "type" : "integer"
56122987 11279 },
44660702
DM
11280 "iops_max" : {
11281 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11282 "format_description" : "iops",
7aacca6f 11283 "optional" : 1,
44660702 11284 "type" : "integer"
56122987 11285 },
44660702
DM
11286 "iops_rd" : {
11287 "description" : "Maximum read I/O speed in operations per second.",
11288 "format_description" : "iops",
56122987 11289 "optional" : 1,
44660702 11290 "type" : "integer"
56122987 11291 },
44660702
DM
11292 "iops_rd_max" : {
11293 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11294 "format_description" : "iops",
11295 "optional" : 1,
11296 "type" : "integer"
56122987 11297 },
44660702
DM
11298 "iops_wr" : {
11299 "description" : "Maximum write I/O speed in operations per second.",
11300 "format_description" : "iops",
56122987 11301 "optional" : 1,
44660702 11302 "type" : "integer"
56122987 11303 },
44660702
DM
11304 "iops_wr_max" : {
11305 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11306 "format_description" : "iops",
56122987 11307 "optional" : 1,
56122987
DM
11308 "type" : "integer"
11309 },
44660702
DM
11310 "iothread" : {
11311 "description" : "Whether to use iothreads for this drive",
44660702
DM
11312 "optional" : 1,
11313 "type" : "boolean"
11314 },
11315 "mbps" : {
11316 "description" : "Maximum r/w speed speed in megabytes per second.",
11317 "format_description" : "mbps",
11318 "optional" : 1,
11319 "type" : "number"
11320 },
7aacca6f
DM
11321 "mbps_max" : {
11322 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 11323 "format_description" : "mbps",
56122987 11324 "optional" : 1,
44660702 11325 "type" : "number"
56122987 11326 },
44660702
DM
11327 "mbps_rd" : {
11328 "description" : "Maximum read speed speed in megabytes per second.",
11329 "format_description" : "mbps",
11330 "optional" : 1,
11331 "type" : "number"
56122987 11332 },
44660702
DM
11333 "mbps_rd_max" : {
11334 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11335 "format_description" : "mbps",
56122987 11336 "optional" : 1,
44660702 11337 "type" : "number"
56122987 11338 },
44660702
DM
11339 "mbps_wr" : {
11340 "description" : "Maximum write speed speed in megabytes per second.",
11341 "format_description" : "mbps",
56122987 11342 "optional" : 1,
44660702 11343 "type" : "number"
56122987 11344 },
44660702
DM
11345 "mbps_wr_max" : {
11346 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11347 "format_description" : "mbps",
7aacca6f 11348 "optional" : 1,
44660702 11349 "type" : "number"
56122987 11350 },
7aacca6f 11351 "media" : {
44660702 11352 "default" : "disk",
7aacca6f
DM
11353 "description" : "The drive's media type.",
11354 "enum" : [
11355 "cdrom",
11356 "disk"
11357 ],
56122987 11358 "optional" : 1,
44660702 11359 "type" : "string"
56122987 11360 },
44660702
DM
11361 "queues" : {
11362 "description" : "Number of queues.",
44660702
DM
11363 "minimum" : 2,
11364 "optional" : 1,
11365 "type" : "integer"
56122987 11366 },
7aacca6f 11367 "secs" : {
7aacca6f 11368 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11369 "optional" : 1,
11370 "type" : "integer"
11371 },
11372 "serial" : {
11373 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11374 "format" : "urlencoded",
11375 "format_description" : "serial",
11376 "maxLength" : 60,
11377 "optional" : 1,
11378 "type" : "string"
11379 },
11380 "size" : {
11381 "description" : "Disk size. This is purely informational and has no effect.",
11382 "format" : "disk-size",
f004f5b9 11383 "format_description" : "DiskSize",
44660702
DM
11384 "optional" : 1,
11385 "type" : "string"
11386 },
11387 "snapshot" : {
11388 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
11389 "optional" : 1,
11390 "type" : "boolean"
11391 },
11392 "trans" : {
11393 "description" : "Force disk geometry bios translation mode.",
11394 "enum" : [
11395 "none",
11396 "lba",
11397 "auto"
11398 ],
44660702
DM
11399 "optional" : 1,
11400 "type" : "string"
11401 },
11402 "volume" : {
11403 "alias" : "file"
11404 },
11405 "werror" : {
11406 "description" : "Write error action.",
11407 "enum" : [
11408 "enospc",
11409 "ignore",
11410 "report",
11411 "stop"
11412 ],
44660702
DM
11413 "optional" : 1,
11414 "type" : "string"
56122987
DM
11415 }
11416 },
7aacca6f 11417 "optional" : 1,
44660702 11418 "type" : "string"
56122987 11419 },
44660702
DM
11420 "scsihw" : {
11421 "default" : "lsi",
11422 "description" : "scsi controller model",
11423 "enum" : [
11424 "lsi",
11425 "lsi53c810",
11426 "virtio-scsi-pci",
11427 "virtio-scsi-single",
11428 "megasas",
11429 "pvscsi"
11430 ],
7aacca6f 11431 "optional" : 1,
44660702 11432 "type" : "string"
7aacca6f 11433 },
44660702
DM
11434 "serial[n]" : {
11435 "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n",
11436 "optional" : 1,
11437 "pattern" : "(/dev/.+|socket)",
11438 "type" : "string"
11439 },
11440 "shares" : {
11441 "default" : 1000,
11442 "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",
11443 "maximum" : 50000,
11444 "minimum" : 0,
11445 "optional" : 1,
11446 "type" : "integer"
11447 },
11448 "smbios1" : {
11449 "description" : "Specify SMBIOS type 1 fields.",
11450 "format" : "pve-qm-smbios1",
11451 "maxLength" : 256,
7aacca6f
DM
11452 "optional" : 1,
11453 "type" : "string"
11454 },
11455 "smp" : {
44660702 11456 "default" : 1,
7aacca6f 11457 "description" : "The number of CPUs. Please use option -sockets instead.",
44660702 11458 "minimum" : 1,
56122987 11459 "optional" : 1,
44660702
DM
11460 "type" : "integer"
11461 },
11462 "sockets" : {
7aacca6f 11463 "default" : 1,
44660702
DM
11464 "description" : "The number of CPU sockets.",
11465 "minimum" : 1,
11466 "optional" : 1,
11467 "type" : "integer"
7aacca6f 11468 },
44660702
DM
11469 "startdate" : {
11470 "default" : "now",
11471 "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'.",
11472 "optional" : 1,
11473 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
11474 "type" : "string",
11475 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
11476 },
11477 "startup" : {
11478 "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.",
11479 "format" : "pve-startup-order",
11480 "optional" : 1,
11481 "type" : "string",
11482 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
11483 },
11484 "storage" : {
11485 "description" : "Default storage.",
11486 "format" : "pve-storage-id",
7aacca6f 11487 "optional" : 1,
56122987
DM
11488 "type" : "string"
11489 },
44660702
DM
11490 "tablet" : {
11491 "default" : 1,
11492 "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 11493 "optional" : 1,
44660702
DM
11494 "type" : "boolean"
11495 },
11496 "tdf" : {
11497 "default" : 0,
11498 "description" : "Enable/disable time drift fix.",
11499 "optional" : 1,
11500 "type" : "boolean"
7aacca6f
DM
11501 },
11502 "template" : {
7aacca6f 11503 "default" : 0,
44660702 11504 "description" : "Enable/disable Template.",
7aacca6f
DM
11505 "optional" : 1,
11506 "type" : "boolean"
11507 },
44660702
DM
11508 "unique" : {
11509 "description" : "Assign a unique random ethernet address.",
7aacca6f 11510 "optional" : 1,
44660702
DM
11511 "requires" : "archive",
11512 "type" : "boolean"
56122987 11513 },
44660702
DM
11514 "unused[n]" : {
11515 "description" : "Reference to unused volumes.",
11516 "format" : "pve-volume-id",
7aacca6f 11517 "optional" : 1,
44660702
DM
11518 "type" : "string"
11519 },
11520 "usb[n]" : {
7aacca6f 11521 "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n",
56122987 11522 "format" : {
7aacca6f
DM
11523 "host" : {
11524 "default_key" : 1,
44660702 11525 "description" : "The Host USB device or port or the value spice",
7aacca6f 11526 "format" : "pve-qm-usb-device",
44660702
DM
11527 "format_description" : "HOSTUSBDEVICE|spice",
11528 "type" : "string"
7aacca6f 11529 },
56122987
DM
11530 "usb3" : {
11531 "description" : "Specifies whether if given host option is a USB3 device or port",
11532 "optional" : 1,
56122987 11533 "type" : "boolean"
7aacca6f 11534 }
56122987 11535 },
56122987 11536 "optional" : 1,
44660702 11537 "type" : "string"
56122987 11538 },
44660702
DM
11539 "vcpus" : {
11540 "default" : 0,
11541 "description" : "Number of hotplugged vcpus.",
11542 "minimum" : 1,
56122987 11543 "optional" : 1,
44660702 11544 "type" : "integer"
7aacca6f 11545 },
44660702
DM
11546 "vga" : {
11547 "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.",
11548 "enum" : [
11549 "std",
11550 "cirrus",
11551 "vmware",
11552 "qxl",
11553 "serial0",
11554 "serial1",
11555 "serial2",
11556 "serial3",
11557 "qxl2",
11558 "qxl3",
11559 "qxl4"
11560 ],
11561 "optional" : 1,
11562 "type" : "string"
7aacca6f 11563 },
44660702
DM
11564 "virtio[n]" : {
11565 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
11566 "format" : {
11567 "aio" : {
11568 "description" : "AIO type to use.",
11569 "enum" : [
11570 "native",
11571 "threads"
11572 ],
44660702
DM
11573 "optional" : 1,
11574 "type" : "string"
11575 },
11576 "backup" : {
11577 "description" : "Whether the drive should be included when making backups.",
44660702
DM
11578 "optional" : 1,
11579 "type" : "boolean"
11580 },
11581 "bps" : {
11582 "description" : "Maximum r/w speed speed in bytes per second.",
11583 "format_description" : "bps",
11584 "optional" : 1,
11585 "type" : "integer"
11586 },
11587 "bps_rd" : {
11588 "description" : "Maximum read speed speed in bytes per second.",
11589 "format_description" : "bps",
11590 "optional" : 1,
11591 "type" : "integer"
11592 },
11593 "bps_wr" : {
11594 "description" : "Maximum write speed speed in bytes per second.",
11595 "format_description" : "bps",
11596 "optional" : 1,
11597 "type" : "integer"
11598 },
11599 "cache" : {
11600 "description" : "The drive's cache mode",
11601 "enum" : [
11602 "none",
11603 "writethrough",
11604 "writeback",
11605 "unsafe",
11606 "directsync"
11607 ],
44660702
DM
11608 "optional" : 1,
11609 "type" : "string"
11610 },
11611 "cyls" : {
11612 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
11613 "optional" : 1,
11614 "type" : "integer"
11615 },
11616 "detect_zeroes" : {
11617 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
11618 "optional" : 1,
11619 "type" : "boolean"
11620 },
11621 "discard" : {
11622 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11623 "enum" : [
11624 "ignore",
11625 "on"
11626 ],
44660702
DM
11627 "optional" : 1,
11628 "type" : "string"
11629 },
11630 "file" : {
11631 "default_key" : 1,
11632 "description" : "The drive's backing volume.",
11633 "format" : "pve-volume-id-or-qm-path",
11634 "format_description" : "volume",
11635 "type" : "string"
11636 },
11637 "format" : {
11638 "description" : "The drive's backing file's data format.",
11639 "enum" : [
11640 "raw",
11641 "cow",
11642 "qcow",
11643 "qed",
11644 "qcow2",
11645 "vmdk",
11646 "cloop"
11647 ],
f004f5b9 11648 "format_description" : "image format",
44660702
DM
11649 "optional" : 1,
11650 "type" : "string"
11651 },
11652 "heads" : {
11653 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11654 "optional" : 1,
11655 "type" : "integer"
11656 },
11657 "iops" : {
11658 "description" : "Maximum r/w I/O speed in operations per second.",
11659 "format_description" : "iops",
11660 "optional" : 1,
11661 "type" : "integer"
11662 },
11663 "iops_max" : {
11664 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11665 "format_description" : "iops",
11666 "optional" : 1,
11667 "type" : "integer"
11668 },
11669 "iops_rd" : {
11670 "description" : "Maximum read I/O speed in operations per second.",
11671 "format_description" : "iops",
11672 "optional" : 1,
11673 "type" : "integer"
11674 },
11675 "iops_rd_max" : {
11676 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11677 "format_description" : "iops",
11678 "optional" : 1,
11679 "type" : "integer"
11680 },
11681 "iops_wr" : {
11682 "description" : "Maximum write I/O speed in operations per second.",
11683 "format_description" : "iops",
11684 "optional" : 1,
11685 "type" : "integer"
11686 },
11687 "iops_wr_max" : {
11688 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11689 "format_description" : "iops",
11690 "optional" : 1,
11691 "type" : "integer"
11692 },
11693 "iothread" : {
11694 "description" : "Whether to use iothreads for this drive",
44660702
DM
11695 "optional" : 1,
11696 "type" : "boolean"
11697 },
11698 "mbps" : {
11699 "description" : "Maximum r/w speed speed in megabytes per second.",
11700 "format_description" : "mbps",
11701 "optional" : 1,
11702 "type" : "number"
11703 },
11704 "mbps_max" : {
11705 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11706 "format_description" : "mbps",
11707 "optional" : 1,
11708 "type" : "number"
11709 },
11710 "mbps_rd" : {
11711 "description" : "Maximum read speed speed in megabytes per second.",
11712 "format_description" : "mbps",
11713 "optional" : 1,
11714 "type" : "number"
11715 },
11716 "mbps_rd_max" : {
11717 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11718 "format_description" : "mbps",
11719 "optional" : 1,
11720 "type" : "number"
11721 },
11722 "mbps_wr" : {
11723 "description" : "Maximum write speed speed in megabytes per second.",
11724 "format_description" : "mbps",
11725 "optional" : 1,
11726 "type" : "number"
11727 },
11728 "mbps_wr_max" : {
11729 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11730 "format_description" : "mbps",
11731 "optional" : 1,
11732 "type" : "number"
11733 },
11734 "media" : {
11735 "default" : "disk",
11736 "description" : "The drive's media type.",
11737 "enum" : [
11738 "cdrom",
11739 "disk"
11740 ],
44660702
DM
11741 "optional" : 1,
11742 "type" : "string"
11743 },
11744 "rerror" : {
11745 "description" : "Read error action.",
11746 "enum" : [
11747 "ignore",
11748 "report",
11749 "stop"
11750 ],
44660702
DM
11751 "optional" : 1,
11752 "type" : "string"
11753 },
11754 "secs" : {
11755 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11756 "optional" : 1,
11757 "type" : "integer"
11758 },
11759 "serial" : {
11760 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11761 "format" : "urlencoded",
11762 "format_description" : "serial",
11763 "maxLength" : 60,
11764 "optional" : 1,
11765 "type" : "string"
11766 },
11767 "size" : {
11768 "description" : "Disk size. This is purely informational and has no effect.",
11769 "format" : "disk-size",
f004f5b9 11770 "format_description" : "DiskSize",
44660702
DM
11771 "optional" : 1,
11772 "type" : "string"
11773 },
11774 "snapshot" : {
11775 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
11776 "optional" : 1,
11777 "type" : "boolean"
11778 },
11779 "trans" : {
11780 "description" : "Force disk geometry bios translation mode.",
11781 "enum" : [
11782 "none",
11783 "lba",
11784 "auto"
11785 ],
44660702
DM
11786 "optional" : 1,
11787 "type" : "string"
11788 },
11789 "volume" : {
11790 "alias" : "file"
11791 },
11792 "werror" : {
11793 "description" : "Write error action.",
11794 "enum" : [
11795 "enospc",
11796 "ignore",
11797 "report",
11798 "stop"
11799 ],
44660702
DM
11800 "optional" : 1,
11801 "type" : "string"
11802 }
11803 },
11804 "optional" : 1,
11805 "type" : "string"
7aacca6f 11806 },
44660702
DM
11807 "vmid" : {
11808 "description" : "The (unique) ID of the VM.",
11809 "format" : "pve-vmid",
11810 "minimum" : 1,
11811 "type" : "integer"
11812 },
11813 "watchdog" : {
11814 "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)",
11815 "format" : "pve-qm-watchdog",
7aacca6f 11816 "optional" : 1,
44660702 11817 "type" : "string"
56122987 11818 }
44660702 11819 }
56122987 11820 },
56122987 11821 "permissions" : {
44660702
DM
11822 "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.",
11823 "user" : "all"
56122987 11824 },
44660702
DM
11825 "protected" : 1,
11826 "proxyto" : "node",
56122987 11827 "returns" : {
44660702 11828 "type" : "string"
7aacca6f 11829 }
56122987 11830 }
7aacca6f 11831 },
44660702 11832 "leaf" : 0,
7aacca6f 11833 "path" : "/nodes/{node}/qemu",
44660702 11834 "text" : "qemu"
56122987
DM
11835 },
11836 {
11837 "children" : [
11838 {
56122987
DM
11839 "children" : [
11840 {
56122987 11841 "info" : {
44660702
DM
11842 "GET" : {
11843 "description" : "Get container configuration.",
11844 "method" : "GET",
11845 "name" : "vm_config",
11846 "parameters" : {
11847 "additionalProperties" : 0,
11848 "properties" : {
11849 "node" : {
11850 "description" : "The cluster node name.",
11851 "format" : "pve-node",
11852 "type" : "string"
11853 },
11854 "vmid" : {
11855 "description" : "The (unique) ID of the VM.",
11856 "format" : "pve-vmid",
11857 "minimum" : 1,
11858 "type" : "integer"
11859 }
11860 }
11861 },
11862 "permissions" : {
11863 "check" : [
11864 "perm",
11865 "/vms/{vmid}",
11866 [
11867 "VM.Audit"
11868 ]
11869 ]
11870 },
11871 "proxyto" : "node",
11872 "returns" : {
11873 "properties" : {
11874 "digest" : {
11875 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
11876 "type" : "string"
11877 }
11878 },
11879 "type" : "object"
11880 }
11881 },
56122987 11882 "PUT" : {
44660702
DM
11883 "description" : "Set container options.",
11884 "method" : "PUT",
11885 "name" : "update_vm",
56122987 11886 "parameters" : {
44660702 11887 "additionalProperties" : 0,
56122987 11888 "properties" : {
44660702
DM
11889 "arch" : {
11890 "default" : "amd64",
11891 "description" : "OS architecture type.",
11892 "enum" : [
11893 "amd64",
11894 "i386"
11895 ],
7aacca6f 11896 "optional" : 1,
44660702
DM
11897 "type" : "string"
11898 },
11899 "cmode" : {
7aacca6f 11900 "default" : "tty",
44660702 11901 "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
11902 "enum" : [
11903 "shell",
11904 "console",
11905 "tty"
11906 ],
44660702
DM
11907 "optional" : 1,
11908 "type" : "string"
7aacca6f 11909 },
44660702
DM
11910 "console" : {
11911 "default" : 1,
11912 "description" : "Attach a console device (/dev/console) to the container.",
7aacca6f 11913 "optional" : 1,
44660702 11914 "type" : "boolean"
7aacca6f 11915 },
44660702
DM
11916 "cpulimit" : {
11917 "default" : 0,
11918 "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.",
11919 "maximum" : 128,
7aacca6f 11920 "minimum" : 0,
7aacca6f 11921 "optional" : 1,
44660702 11922 "type" : "number"
7aacca6f 11923 },
44660702
DM
11924 "cpuunits" : {
11925 "default" : 1024,
11926 "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.",
11927 "maximum" : 500000,
11928 "minimum" : 0,
11929 "optional" : 1,
11930 "type" : "integer"
7aacca6f 11931 },
44660702
DM
11932 "delete" : {
11933 "description" : "A list of settings you want to delete.",
11934 "format" : "pve-configid-list",
7aacca6f 11935 "optional" : 1,
44660702 11936 "type" : "string"
7aacca6f 11937 },
44660702
DM
11938 "description" : {
11939 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 11940 "optional" : 1,
44660702 11941 "type" : "string"
7aacca6f 11942 },
44660702
DM
11943 "digest" : {
11944 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
11945 "maxLength" : 40,
7aacca6f 11946 "optional" : 1,
44660702 11947 "type" : "string"
7aacca6f 11948 },
44660702
DM
11949 "hostname" : {
11950 "description" : "Set a host name for the container.",
11951 "format" : "dns-name",
11952 "maxLength" : 255,
56122987 11953 "optional" : 1,
44660702
DM
11954 "type" : "string"
11955 },
11956 "lock" : {
11957 "description" : "Lock/unlock the VM.",
11958 "enum" : [
11959 "migrate",
11960 "backup",
11961 "snapshot",
11962 "rollback"
11963 ],
11964 "optional" : 1,
11965 "type" : "string"
11966 },
11967 "memory" : {
11968 "default" : 512,
11969 "description" : "Amount of RAM for the VM in MB.",
11970 "minimum" : 16,
11971 "optional" : 1,
11972 "type" : "integer"
7aacca6f
DM
11973 },
11974 "mp[n]" : {
44660702 11975 "description" : "Use volume as container mount point (experimental feature).",
7aacca6f 11976 "format" : {
7aacca6f
DM
11977 "acl" : {
11978 "description" : "Explicitly enable or disable ACL support.",
7aacca6f 11979 "optional" : 1,
44660702 11980 "type" : "boolean"
7aacca6f
DM
11981 },
11982 "backup" : {
11983 "description" : "Whether to include the mountpoint in backups.",
11984 "optional" : 1,
44660702 11985 "type" : "boolean"
7aacca6f
DM
11986 },
11987 "mp" : {
11988 "description" : "Path to the mountpoint as seen from inside the container.",
7aacca6f 11989 "format" : "pve-lxc-mp-string",
44660702
DM
11990 "format_description" : "Path",
11991 "type" : "string"
11992 },
11993 "quota" : {
11994 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
11995 "optional" : 1,
11996 "type" : "boolean"
11997 },
11998 "ro" : {
11999 "description" : "Read-only mountpoint (not supported with bind mounts)",
44660702
DM
12000 "optional" : 1,
12001 "type" : "boolean"
12002 },
12003 "size" : {
12004 "description" : "Volume size (read only value).",
12005 "format" : "disk-size",
12006 "format_description" : "DiskSize",
12007 "optional" : 1,
12008 "type" : "string"
12009 },
12010 "volume" : {
12011 "default_key" : 1,
12012 "description" : "Volume, device or directory to mount into the container.",
12013 "format" : "pve-lxc-mp-string",
12014 "format_description" : "volume",
12015 "type" : "string"
12016 }
12017 },
7aacca6f 12018 "optional" : 1,
44660702 12019 "type" : "string"
56122987 12020 },
44660702
DM
12021 "nameserver" : {
12022 "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.",
12023 "format" : "address-list",
56122987 12024 "optional" : 1,
44660702 12025 "type" : "string"
56122987
DM
12026 },
12027 "net[n]" : {
44660702 12028 "description" : "Specifies network interfaces for the container.",
56122987 12029 "format" : {
44660702
DM
12030 "bridge" : {
12031 "description" : "Bridge to attach the network device to.",
f004f5b9 12032 "format_description" : "bridge",
56122987 12033 "optional" : 1,
44660702
DM
12034 "pattern" : "[-_.\\w\\d]+",
12035 "type" : "string"
56122987 12036 },
44660702
DM
12037 "firewall" : {
12038 "description" : "Controls whether this interface's firewall rules should be used.",
56122987 12039 "optional" : 1,
44660702 12040 "type" : "boolean"
56122987 12041 },
44660702
DM
12042 "gw" : {
12043 "description" : "Default gateway for IPv4 traffic.",
12044 "format" : "ipv4",
12045 "format_description" : "GatewayIPv4",
56122987 12046 "optional" : 1,
44660702 12047 "type" : "string"
56122987
DM
12048 },
12049 "gw6" : {
7aacca6f 12050 "description" : "Default gateway for IPv6 traffic.",
44660702
DM
12051 "format" : "ipv6",
12052 "format_description" : "GatewayIPv6",
7aacca6f 12053 "optional" : 1,
56122987
DM
12054 "type" : "string"
12055 },
44660702 12056 "hwaddr" : {
f004f5b9
DM
12057 "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)",
12058 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
12059 "optional" : 1,
12060 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
12061 "type" : "string"
12062 },
12063 "ip" : {
12064 "description" : "IPv4 address in CIDR format.",
12065 "format" : "pve-ipv4-config",
12066 "format_description" : "IPv4Format/CIDR",
56122987 12067 "optional" : 1,
44660702 12068 "type" : "string"
56122987 12069 },
7aacca6f 12070 "ip6" : {
7aacca6f
DM
12071 "description" : "IPv6 address in CIDR format.",
12072 "format" : "pve-ipv6-config",
44660702 12073 "format_description" : "IPv6Format/CIDR",
7aacca6f 12074 "optional" : 1,
44660702 12075 "type" : "string"
56122987 12076 },
44660702
DM
12077 "mtu" : {
12078 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702 12079 "minimum" : 64,
56122987 12080 "optional" : 1,
44660702 12081 "type" : "integer"
56122987
DM
12082 },
12083 "name" : {
44660702 12084 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 12085 "format_description" : "string",
56122987 12086 "pattern" : "[-_.\\w\\d]+",
44660702 12087 "type" : "string"
56122987 12088 },
44660702
DM
12089 "rate" : {
12090 "description" : "Apply rate limiting to the interface",
12091 "format_description" : "mbps",
56122987 12092 "optional" : 1,
44660702 12093 "type" : "number"
7aacca6f 12094 },
44660702
DM
12095 "tag" : {
12096 "description" : "VLAN tag for this interface.",
44660702
DM
12097 "maximum" : "4094",
12098 "minimum" : "2",
56122987 12099 "optional" : 1,
7aacca6f 12100 "type" : "integer"
56122987 12101 },
44660702
DM
12102 "trunks" : {
12103 "description" : "VLAN ids to pass through the interface",
12104 "format_description" : "vlanid[;vlanid...]",
12105 "optional" : 1,
12106 "pattern" : "(?^:\\d+(?:;\\d+)*)",
12107 "type" : "string"
12108 },
12109 "type" : {
12110 "description" : "Network interface type.",
12111 "enum" : [
12112 "veth"
12113 ],
56122987 12114 "optional" : 1,
44660702 12115 "type" : "string"
56122987
DM
12116 }
12117 },
7aacca6f 12118 "optional" : 1,
56122987
DM
12119 "type" : "string"
12120 },
44660702
DM
12121 "node" : {
12122 "description" : "The cluster node name.",
12123 "format" : "pve-node",
12124 "type" : "string"
56122987 12125 },
44660702
DM
12126 "onboot" : {
12127 "default" : 0,
12128 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 12129 "optional" : 1,
44660702 12130 "type" : "boolean"
56122987 12131 },
44660702
DM
12132 "ostype" : {
12133 "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.",
12134 "enum" : [
12135 "debian",
12136 "ubuntu",
12137 "centos",
12138 "fedora",
12139 "opensuse",
12140 "archlinux",
12141 "alpine",
12142 "unmanaged"
12143 ],
56122987 12144 "optional" : 1,
44660702 12145 "type" : "string"
56122987 12146 },
44660702
DM
12147 "protection" : {
12148 "default" : 0,
12149 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
56122987 12150 "optional" : 1,
44660702 12151 "type" : "boolean"
56122987 12152 },
7aacca6f
DM
12153 "rootfs" : {
12154 "description" : "Use volume as container root.",
56122987
DM
12155 "format" : {
12156 "acl" : {
44660702 12157 "description" : "Explicitly enable or disable ACL support.",
7aacca6f
DM
12158 "optional" : 1,
12159 "type" : "boolean"
56122987
DM
12160 },
12161 "backup" : {
7aacca6f
DM
12162 "description" : "Whether to include the mountpoint in backups.",
12163 "optional" : 1,
56122987
DM
12164 "type" : "boolean"
12165 },
44660702
DM
12166 "quota" : {
12167 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12168 "optional" : 1,
12169 "type" : "boolean"
12170 },
12171 "ro" : {
12172 "description" : "Read-only mountpoint (not supported with bind mounts)",
56122987 12173 "optional" : 1,
44660702
DM
12174 "type" : "boolean"
12175 },
12176 "size" : {
7aacca6f 12177 "description" : "Volume size (read only value).",
44660702 12178 "format" : "disk-size",
56122987 12179 "format_description" : "DiskSize",
56122987 12180 "optional" : 1,
44660702 12181 "type" : "string"
7aacca6f
DM
12182 },
12183 "volume" : {
7aacca6f
DM
12184 "default_key" : 1,
12185 "description" : "Volume, device or directory to mount into the container.",
44660702
DM
12186 "format" : "pve-lxc-mp-string",
12187 "format_description" : "volume",
7aacca6f 12188 "type" : "string"
56122987 12189 }
44660702
DM
12190 },
12191 "optional" : 1,
12192 "type" : "string"
12193 },
12194 "searchdomain" : {
12195 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
12196 "format" : "dns-name-list",
12197 "optional" : 1,
12198 "type" : "string"
12199 },
12200 "startup" : {
12201 "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.",
12202 "format" : "pve-startup-order",
12203 "optional" : 1,
12204 "type" : "string",
12205 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
12206 },
12207 "swap" : {
12208 "default" : 512,
12209 "description" : "Amount of SWAP for the VM in MB.",
12210 "minimum" : 0,
12211 "optional" : 1,
12212 "type" : "integer"
56122987 12213 },
56122987 12214 "template" : {
44660702 12215 "default" : 0,
7aacca6f 12216 "description" : "Enable/disable Template.",
56122987 12217 "optional" : 1,
44660702 12218 "type" : "boolean"
56122987 12219 },
44660702
DM
12220 "tty" : {
12221 "default" : 2,
12222 "description" : "Specify the number of tty available to the container",
12223 "maximum" : 6,
12224 "minimum" : 0,
12225 "optional" : 1,
12226 "type" : "integer"
56122987 12227 },
44660702
DM
12228 "unprivileged" : {
12229 "default" : 0,
12230 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
56122987 12231 "optional" : 1,
44660702 12232 "type" : "boolean"
56122987 12233 },
44660702
DM
12234 "unused[n]" : {
12235 "description" : "Reference to unused volumes.",
12236 "format" : "pve-volume-id",
56122987 12237 "optional" : 1,
44660702
DM
12238 "type" : "string"
12239 },
12240 "vmid" : {
12241 "description" : "The (unique) ID of the VM.",
12242 "format" : "pve-vmid",
12243 "minimum" : 1,
12244 "type" : "integer"
56122987 12245 }
44660702 12246 }
56122987 12247 },
56122987
DM
12248 "permissions" : {
12249 "check" : [
12250 "perm",
12251 "/vms/{vmid}",
12252 [
12253 "VM.Config.Disk",
12254 "VM.Config.CPU",
12255 "VM.Config.Memory",
12256 "VM.Config.Network",
12257 "VM.Config.Options"
12258 ],
12259 "any",
12260 1
12261 ]
12262 },
44660702
DM
12263 "protected" : 1,
12264 "proxyto" : "node",
56122987
DM
12265 "returns" : {
12266 "type" : "null"
7aacca6f 12267 }
56122987 12268 }
7aacca6f 12269 },
44660702 12270 "leaf" : 1,
7aacca6f 12271 "path" : "/nodes/{node}/lxc/{vmid}/config",
44660702 12272 "text" : "config"
56122987
DM
12273 },
12274 {
56122987
DM
12275 "children" : [
12276 {
12277 "info" : {
12278 "GET" : {
44660702 12279 "description" : "Get virtual machine status.",
7aacca6f 12280 "method" : "GET",
44660702 12281 "name" : "vm_status",
56122987 12282 "parameters" : {
44660702 12283 "additionalProperties" : 0,
56122987 12284 "properties" : {
56122987 12285 "node" : {
44660702 12286 "description" : "The cluster node name.",
56122987 12287 "format" : "pve-node",
44660702 12288 "type" : "string"
7aacca6f
DM
12289 },
12290 "vmid" : {
12291 "description" : "The (unique) ID of the VM.",
44660702 12292 "format" : "pve-vmid",
7aacca6f 12293 "minimum" : 1,
44660702 12294 "type" : "integer"
56122987 12295 }
44660702 12296 }
7aacca6f
DM
12297 },
12298 "permissions" : {
12299 "check" : [
12300 "perm",
12301 "/vms/{vmid}",
12302 [
12303 "VM.Audit"
12304 ]
12305 ]
12306 },
44660702 12307 "protected" : 1,
7aacca6f 12308 "proxyto" : "node",
44660702
DM
12309 "returns" : {
12310 "type" : "object"
12311 }
56122987
DM
12312 }
12313 },
44660702
DM
12314 "leaf" : 1,
12315 "path" : "/nodes/{node}/lxc/{vmid}/status/current",
56122987
DM
12316 "text" : "current"
12317 },
12318 {
56122987
DM
12319 "info" : {
12320 "POST" : {
7aacca6f 12321 "description" : "Start the container.",
44660702 12322 "method" : "POST",
7aacca6f 12323 "name" : "vm_start",
56122987
DM
12324 "parameters" : {
12325 "additionalProperties" : 0,
12326 "properties" : {
56122987 12327 "node" : {
7aacca6f 12328 "description" : "The cluster node name.",
44660702
DM
12329 "format" : "pve-node",
12330 "type" : "string"
56122987 12331 },
7aacca6f 12332 "skiplock" : {
44660702 12333 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 12334 "optional" : 1,
44660702 12335 "type" : "boolean"
7aacca6f 12336 },
56122987 12337 "vmid" : {
7aacca6f 12338 "description" : "The (unique) ID of the VM.",
44660702 12339 "format" : "pve-vmid",
56122987 12340 "minimum" : 1,
44660702 12341 "type" : "integer"
56122987
DM
12342 }
12343 }
12344 },
12345 "permissions" : {
12346 "check" : [
12347 "perm",
12348 "/vms/{vmid}",
12349 [
12350 "VM.PowerMgmt"
12351 ]
12352 ]
12353 },
44660702 12354 "protected" : 1,
7aacca6f 12355 "proxyto" : "node",
44660702
DM
12356 "returns" : {
12357 "type" : "string"
12358 }
12359 }
12360 },
12361 "leaf" : 1,
12362 "path" : "/nodes/{node}/lxc/{vmid}/status/start",
12363 "text" : "start"
12364 },
12365 {
12366 "info" : {
12367 "POST" : {
12368 "description" : "Stop the container. This will abruptly stop all processes running in the container.",
7aacca6f
DM
12369 "method" : "POST",
12370 "name" : "vm_stop",
12371 "parameters" : {
44660702 12372 "additionalProperties" : 0,
7aacca6f 12373 "properties" : {
44660702
DM
12374 "node" : {
12375 "description" : "The cluster node name.",
12376 "format" : "pve-node",
12377 "type" : "string"
12378 },
7aacca6f
DM
12379 "skiplock" : {
12380 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
12381 "optional" : 1,
12382 "type" : "boolean"
7aacca6f
DM
12383 },
12384 "vmid" : {
44660702 12385 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12386 "format" : "pve-vmid",
12387 "minimum" : 1,
7aacca6f 12388 "type" : "integer"
7aacca6f 12389 }
44660702
DM
12390 }
12391 },
12392 "permissions" : {
12393 "check" : [
12394 "perm",
12395 "/vms/{vmid}",
12396 [
12397 "VM.PowerMgmt"
12398 ]
12399 ]
7aacca6f 12400 },
44660702
DM
12401 "protected" : 1,
12402 "proxyto" : "node",
12403 "returns" : {
12404 "type" : "string"
12405 }
56122987 12406 }
7aacca6f 12407 },
7aacca6f 12408 "leaf" : 1,
44660702
DM
12409 "path" : "/nodes/{node}/lxc/{vmid}/status/stop",
12410 "text" : "stop"
56122987
DM
12411 },
12412 {
56122987
DM
12413 "info" : {
12414 "POST" : {
44660702
DM
12415 "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.",
12416 "method" : "POST",
7aacca6f 12417 "name" : "vm_shutdown",
56122987 12418 "parameters" : {
44660702 12419 "additionalProperties" : 0,
56122987 12420 "properties" : {
7aacca6f 12421 "forceStop" : {
44660702 12422 "default" : 0,
7aacca6f
DM
12423 "description" : "Make sure the Container stops.",
12424 "optional" : 1,
44660702
DM
12425 "type" : "boolean"
12426 },
12427 "node" : {
12428 "description" : "The cluster node name.",
12429 "format" : "pve-node",
12430 "type" : "string"
7aacca6f
DM
12431 },
12432 "timeout" : {
7aacca6f 12433 "default" : 60,
44660702
DM
12434 "description" : "Wait maximal timeout seconds.",
12435 "minimum" : 0,
56122987 12436 "optional" : 1,
44660702 12437 "type" : "integer"
56122987
DM
12438 },
12439 "vmid" : {
7aacca6f 12440 "description" : "The (unique) ID of the VM.",
44660702
DM
12441 "format" : "pve-vmid",
12442 "minimum" : 1,
7aacca6f 12443 "type" : "integer"
56122987 12444 }
44660702 12445 }
56122987
DM
12446 },
12447 "permissions" : {
12448 "check" : [
12449 "perm",
12450 "/vms/{vmid}",
12451 [
12452 "VM.PowerMgmt"
12453 ]
12454 ]
12455 },
44660702
DM
12456 "protected" : 1,
12457 "proxyto" : "node",
7aacca6f
DM
12458 "returns" : {
12459 "type" : "string"
12460 }
56122987
DM
12461 }
12462 },
44660702
DM
12463 "leaf" : 1,
12464 "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown",
7aacca6f 12465 "text" : "shutdown"
56122987
DM
12466 },
12467 {
56122987
DM
12468 "info" : {
12469 "POST" : {
7aacca6f 12470 "description" : "Suspend the container.",
7aacca6f 12471 "method" : "POST",
7aacca6f 12472 "name" : "vm_suspend",
56122987
DM
12473 "parameters" : {
12474 "additionalProperties" : 0,
12475 "properties" : {
44660702
DM
12476 "node" : {
12477 "description" : "The cluster node name.",
12478 "format" : "pve-node",
12479 "type" : "string"
12480 },
7aacca6f 12481 "vmid" : {
7aacca6f
DM
12482 "description" : "The (unique) ID of the VM.",
12483 "format" : "pve-vmid",
44660702
DM
12484 "minimum" : 1,
12485 "type" : "integer"
56122987
DM
12486 }
12487 }
7aacca6f 12488 },
56122987
DM
12489 "permissions" : {
12490 "check" : [
12491 "perm",
12492 "/vms/{vmid}",
12493 [
12494 "VM.PowerMgmt"
12495 ]
12496 ]
12497 },
7aacca6f 12498 "protected" : 1,
44660702
DM
12499 "proxyto" : "node",
12500 "returns" : {
12501 "type" : "string"
12502 }
12503 }
12504 },
12505 "leaf" : 1,
12506 "path" : "/nodes/{node}/lxc/{vmid}/status/suspend",
12507 "text" : "suspend"
12508 },
12509 {
12510 "info" : {
12511 "POST" : {
12512 "description" : "Resume the container.",
12513 "method" : "POST",
12514 "name" : "vm_resume",
56122987 12515 "parameters" : {
44660702 12516 "additionalProperties" : 0,
56122987
DM
12517 "properties" : {
12518 "node" : {
7aacca6f 12519 "description" : "The cluster node name.",
44660702
DM
12520 "format" : "pve-node",
12521 "type" : "string"
56122987
DM
12522 },
12523 "vmid" : {
7aacca6f 12524 "description" : "The (unique) ID of the VM.",
56122987 12525 "format" : "pve-vmid",
44660702
DM
12526 "minimum" : 1,
12527 "type" : "integer"
56122987 12528 }
44660702
DM
12529 }
12530 },
12531 "permissions" : {
12532 "check" : [
12533 "perm",
12534 "/vms/{vmid}",
12535 [
12536 "VM.PowerMgmt"
12537 ]
12538 ]
56122987 12539 },
44660702
DM
12540 "protected" : 1,
12541 "proxyto" : "node",
12542 "returns" : {
12543 "type" : "string"
12544 }
7aacca6f
DM
12545 }
12546 },
44660702
DM
12547 "leaf" : 1,
12548 "path" : "/nodes/{node}/lxc/{vmid}/status/resume",
7aacca6f
DM
12549 "text" : "resume"
12550 }
12551 ],
12552 "info" : {
12553 "GET" : {
7aacca6f 12554 "description" : "Directory index",
44660702 12555 "method" : "GET",
7aacca6f 12556 "name" : "vmcmdidx",
7aacca6f
DM
12557 "parameters" : {
12558 "additionalProperties" : 0,
12559 "properties" : {
12560 "node" : {
12561 "description" : "The cluster node name.",
44660702
DM
12562 "format" : "pve-node",
12563 "type" : "string"
56122987 12564 },
7aacca6f 12565 "vmid" : {
44660702 12566 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12567 "format" : "pve-vmid",
12568 "minimum" : 1,
44660702 12569 "type" : "integer"
7aacca6f 12570 }
56122987
DM
12571 }
12572 },
44660702
DM
12573 "permissions" : {
12574 "user" : "all"
12575 },
12576 "proxyto" : "node",
7aacca6f 12577 "returns" : {
7aacca6f
DM
12578 "items" : {
12579 "properties" : {
12580 "subdir" : {
12581 "type" : "string"
12582 }
12583 },
12584 "type" : "object"
12585 },
12586 "links" : [
12587 {
44660702
DM
12588 "href" : "{subdir}",
12589 "rel" : "child"
7aacca6f 12590 }
44660702
DM
12591 ],
12592 "type" : "array"
7aacca6f
DM
12593 }
12594 }
44660702
DM
12595 },
12596 "leaf" : 0,
12597 "path" : "/nodes/{node}/lxc/{vmid}/status",
12598 "text" : "status"
7aacca6f
DM
12599 },
12600 {
7aacca6f 12601 "children" : [
56122987 12602 {
7aacca6f
DM
12603 "children" : [
12604 {
12605 "info" : {
12606 "POST" : {
7aacca6f 12607 "description" : "Rollback LXC state to specified snapshot.",
7aacca6f 12608 "method" : "POST",
44660702 12609 "name" : "rollback",
7aacca6f 12610 "parameters" : {
44660702 12611 "additionalProperties" : 0,
7aacca6f 12612 "properties" : {
44660702
DM
12613 "node" : {
12614 "description" : "The cluster node name.",
12615 "format" : "pve-node",
12616 "type" : "string"
12617 },
7aacca6f 12618 "snapname" : {
44660702 12619 "description" : "The name of the snapshot.",
7aacca6f
DM
12620 "format" : "pve-configid",
12621 "maxLength" : 40,
7aacca6f
DM
12622 "type" : "string"
12623 },
7aacca6f 12624 "vmid" : {
44660702 12625 "description" : "The (unique) ID of the VM.",
7aacca6f 12626 "format" : "pve-vmid",
44660702
DM
12627 "minimum" : 1,
12628 "type" : "integer"
7aacca6f 12629 }
44660702
DM
12630 }
12631 },
12632 "permissions" : {
12633 "check" : [
12634 "perm",
12635 "/vms/{vmid}",
12636 [
12637 "VM.Snapshot"
12638 ]
12639 ]
7aacca6f 12640 },
44660702
DM
12641 "protected" : 1,
12642 "proxyto" : "node",
12643 "returns" : {
12644 "description" : "the task ID.",
12645 "type" : "string"
12646 }
7aacca6f
DM
12647 }
12648 },
7aacca6f 12649 "leaf" : 1,
44660702
DM
12650 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback",
12651 "text" : "rollback"
7aacca6f
DM
12652 },
12653 {
7aacca6f
DM
12654 "info" : {
12655 "GET" : {
7aacca6f 12656 "description" : "Get snapshot configuration",
44660702
DM
12657 "method" : "GET",
12658 "name" : "get_snapshot_config",
7aacca6f
DM
12659 "parameters" : {
12660 "additionalProperties" : 0,
12661 "properties" : {
7aacca6f 12662 "node" : {
7aacca6f 12663 "description" : "The cluster node name.",
44660702 12664 "format" : "pve-node",
7aacca6f
DM
12665 "type" : "string"
12666 },
12667 "snapname" : {
44660702 12668 "description" : "The name of the snapshot.",
7aacca6f
DM
12669 "format" : "pve-configid",
12670 "maxLength" : 40,
44660702
DM
12671 "type" : "string"
12672 },
12673 "vmid" : {
12674 "description" : "The (unique) ID of the VM.",
12675 "format" : "pve-vmid",
12676 "minimum" : 1,
12677 "type" : "integer"
7aacca6f
DM
12678 }
12679 }
12680 },
12681 "permissions" : {
12682 "check" : [
12683 "perm",
12684 "/vms/{vmid}",
12685 [
12686 "VM.Snapshot"
12687 ]
12688 ]
12689 },
44660702
DM
12690 "proxyto" : "node",
12691 "returns" : {
12692 "type" : "object"
12693 }
7aacca6f
DM
12694 },
12695 "PUT" : {
44660702
DM
12696 "description" : "Update snapshot metadata.",
12697 "method" : "PUT",
7aacca6f
DM
12698 "name" : "update_snapshot_config",
12699 "parameters" : {
12700 "additionalProperties" : 0,
12701 "properties" : {
44660702
DM
12702 "description" : {
12703 "description" : "A textual description or comment.",
12704 "optional" : 1,
12705 "type" : "string"
12706 },
7aacca6f 12707 "node" : {
7aacca6f 12708 "description" : "The cluster node name.",
44660702
DM
12709 "format" : "pve-node",
12710 "type" : "string"
7aacca6f
DM
12711 },
12712 "snapname" : {
12713 "description" : "The name of the snapshot.",
7aacca6f 12714 "format" : "pve-configid",
44660702
DM
12715 "maxLength" : 40,
12716 "type" : "string"
7aacca6f
DM
12717 },
12718 "vmid" : {
44660702 12719 "description" : "The (unique) ID of the VM.",
7aacca6f 12720 "format" : "pve-vmid",
44660702
DM
12721 "minimum" : 1,
12722 "type" : "integer"
7aacca6f
DM
12723 }
12724 }
12725 },
7aacca6f
DM
12726 "permissions" : {
12727 "check" : [
12728 "perm",
12729 "/vms/{vmid}",
12730 [
12731 "VM.Snapshot"
12732 ]
12733 ]
12734 },
44660702
DM
12735 "protected" : 1,
12736 "proxyto" : "node",
7aacca6f
DM
12737 "returns" : {
12738 "type" : "null"
12739 }
12740 }
12741 },
44660702 12742 "leaf" : 1,
7aacca6f 12743 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config",
44660702 12744 "text" : "config"
7aacca6f
DM
12745 }
12746 ],
56122987 12747 "info" : {
44660702
DM
12748 "DELETE" : {
12749 "description" : "Delete a LXC snapshot.",
12750 "method" : "DELETE",
12751 "name" : "delsnapshot",
56122987 12752 "parameters" : {
44660702 12753 "additionalProperties" : 0,
56122987 12754 "properties" : {
44660702
DM
12755 "force" : {
12756 "description" : "For removal from config file, even if removing disk snapshots fails.",
12757 "optional" : 1,
12758 "type" : "boolean"
12759 },
12760 "node" : {
12761 "description" : "The cluster node name.",
12762 "format" : "pve-node",
12763 "type" : "string"
7aacca6f
DM
12764 },
12765 "snapname" : {
7aacca6f
DM
12766 "description" : "The name of the snapshot.",
12767 "format" : "pve-configid",
44660702 12768 "maxLength" : 40,
7aacca6f 12769 "type" : "string"
44660702
DM
12770 },
12771 "vmid" : {
12772 "description" : "The (unique) ID of the VM.",
12773 "format" : "pve-vmid",
12774 "minimum" : 1,
12775 "type" : "integer"
56122987 12776 }
44660702 12777 }
7aacca6f 12778 },
56122987
DM
12779 "permissions" : {
12780 "check" : [
12781 "perm",
12782 "/vms/{vmid}",
12783 [
7aacca6f 12784 "VM.Snapshot"
56122987
DM
12785 ]
12786 ]
12787 },
44660702 12788 "protected" : 1,
7aacca6f 12789 "proxyto" : "node",
56122987 12790 "returns" : {
7aacca6f 12791 "description" : "the task ID.",
56122987 12792 "type" : "string"
44660702
DM
12793 }
12794 },
12795 "GET" : {
12796 "description" : "",
12797 "method" : "GET",
12798 "name" : "snapshot_cmd_idx",
7aacca6f
DM
12799 "parameters" : {
12800 "additionalProperties" : 0,
12801 "properties" : {
7aacca6f 12802 "node" : {
44660702 12803 "description" : "The cluster node name.",
7aacca6f 12804 "format" : "pve-node",
44660702 12805 "type" : "string"
7aacca6f
DM
12806 },
12807 "snapname" : {
44660702 12808 "description" : "The name of the snapshot.",
7aacca6f 12809 "format" : "pve-configid",
44660702
DM
12810 "maxLength" : 40,
12811 "type" : "string"
12812 },
12813 "vmid" : {
12814 "description" : "The (unique) ID of the VM.",
12815 "format" : "pve-vmid",
12816 "minimum" : 1,
12817 "type" : "integer"
7aacca6f
DM
12818 }
12819 }
12820 },
44660702
DM
12821 "permissions" : {
12822 "user" : "all"
12823 },
12824 "returns" : {
12825 "items" : {
12826 "properties" : {},
12827 "type" : "object"
12828 },
12829 "links" : [
12830 {
12831 "href" : "{cmd}",
12832 "rel" : "child"
12833 }
12834 ],
12835 "type" : "array"
12836 }
12837 }
12838 },
12839 "leaf" : 0,
12840 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}",
12841 "text" : "{snapname}"
12842 }
12843 ],
12844 "info" : {
12845 "GET" : {
12846 "description" : "List all snapshots.",
12847 "method" : "GET",
12848 "name" : "list",
12849 "parameters" : {
12850 "additionalProperties" : 0,
12851 "properties" : {
12852 "node" : {
12853 "description" : "The cluster node name.",
12854 "format" : "pve-node",
12855 "type" : "string"
12856 },
12857 "vmid" : {
12858 "description" : "The (unique) ID of the VM.",
12859 "format" : "pve-vmid",
12860 "minimum" : 1,
12861 "type" : "integer"
12862 }
56122987
DM
12863 }
12864 },
56122987 12865 "permissions" : {
7aacca6f
DM
12866 "check" : [
12867 "perm",
12868 "/vms/{vmid}",
12869 [
12870 "VM.Audit"
12871 ]
12872 ]
12873 },
44660702 12874 "protected" : 1,
56122987 12875 "proxyto" : "node",
7aacca6f 12876 "returns" : {
44660702
DM
12877 "items" : {
12878 "properties" : {},
12879 "type" : "object"
12880 },
7aacca6f
DM
12881 "links" : [
12882 {
12883 "href" : "{name}",
12884 "rel" : "child"
12885 }
12886 ],
7aacca6f 12887 "type" : "array"
44660702 12888 }
7aacca6f
DM
12889 },
12890 "POST" : {
44660702
DM
12891 "description" : "Snapshot a container.",
12892 "method" : "POST",
12893 "name" : "snapshot",
56122987
DM
12894 "parameters" : {
12895 "additionalProperties" : 0,
12896 "properties" : {
7aacca6f 12897 "description" : {
44660702 12898 "description" : "A textual description or comment.",
7aacca6f 12899 "optional" : 1,
44660702
DM
12900 "type" : "string"
12901 },
12902 "node" : {
12903 "description" : "The cluster node name.",
12904 "format" : "pve-node",
12905 "type" : "string"
56122987
DM
12906 },
12907 "snapname" : {
56122987 12908 "description" : "The name of the snapshot.",
44660702 12909 "format" : "pve-configid",
7aacca6f 12910 "maxLength" : 40,
44660702 12911 "type" : "string"
56122987 12912 },
44660702
DM
12913 "vmid" : {
12914 "description" : "The (unique) ID of the VM.",
12915 "format" : "pve-vmid",
12916 "minimum" : 1,
12917 "type" : "integer"
56122987 12918 }
7aacca6f 12919 }
56122987 12920 },
56122987
DM
12921 "permissions" : {
12922 "check" : [
12923 "perm",
12924 "/vms/{vmid}",
12925 [
7aacca6f 12926 "VM.Snapshot"
56122987
DM
12927 ]
12928 ]
7aacca6f 12929 },
44660702 12930 "protected" : 1,
7aacca6f
DM
12931 "proxyto" : "node",
12932 "returns" : {
12933 "description" : "the task ID.",
12934 "type" : "string"
56122987
DM
12935 }
12936 }
44660702
DM
12937 },
12938 "leaf" : 0,
12939 "path" : "/nodes/{node}/lxc/{vmid}/snapshot",
12940 "text" : "snapshot"
7aacca6f
DM
12941 },
12942 {
56122987
DM
12943 "children" : [
12944 {
56122987
DM
12945 "children" : [
12946 {
56122987 12947 "info" : {
44660702
DM
12948 "DELETE" : {
12949 "description" : "Delete rule.",
12950 "method" : "DELETE",
12951 "name" : "delete_rule",
56122987 12952 "parameters" : {
44660702 12953 "additionalProperties" : 0,
56122987 12954 "properties" : {
44660702
DM
12955 "digest" : {
12956 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
12957 "maxLength" : 40,
7aacca6f 12958 "optional" : 1,
44660702 12959 "type" : "string"
7aacca6f
DM
12960 },
12961 "node" : {
44660702 12962 "description" : "The cluster node name.",
7aacca6f 12963 "format" : "pve-node",
44660702
DM
12964 "type" : "string"
12965 },
12966 "pos" : {
12967 "description" : "Update rule at position <pos>.",
12968 "minimum" : 0,
12969 "optional" : 1,
12970 "type" : "integer"
12971 },
12972 "vmid" : {
12973 "description" : "The (unique) ID of the VM.",
12974 "format" : "pve-vmid",
12975 "minimum" : 1,
12976 "type" : "integer"
56122987 12977 }
44660702 12978 }
56122987 12979 },
56122987
DM
12980 "permissions" : {
12981 "check" : [
12982 "perm",
12983 "/vms/{vmid}",
12984 [
44660702 12985 "VM.Config.Network"
56122987
DM
12986 ]
12987 ]
12988 },
44660702 12989 "protected" : 1,
7aacca6f 12990 "proxyto" : null,
44660702
DM
12991 "returns" : {
12992 "type" : "null"
12993 }
7aacca6f 12994 },
44660702
DM
12995 "GET" : {
12996 "description" : "Get single rule data.",
12997 "method" : "GET",
12998 "name" : "get_rule",
56122987 12999 "parameters" : {
44660702 13000 "additionalProperties" : 0,
56122987 13001 "properties" : {
7aacca6f 13002 "node" : {
7aacca6f 13003 "description" : "The cluster node name.",
44660702 13004 "format" : "pve-node",
56122987
DM
13005 "type" : "string"
13006 },
7aacca6f 13007 "pos" : {
7aacca6f 13008 "description" : "Update rule at position <pos>.",
44660702 13009 "minimum" : 0,
7aacca6f 13010 "optional" : 1,
44660702 13011 "type" : "integer"
56122987 13012 },
7aacca6f 13013 "vmid" : {
44660702 13014 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13015 "format" : "pve-vmid",
13016 "minimum" : 1,
7aacca6f 13017 "type" : "integer"
56122987 13018 }
44660702 13019 }
56122987 13020 },
7aacca6f
DM
13021 "permissions" : {
13022 "check" : [
13023 "perm",
13024 "/vms/{vmid}",
13025 [
44660702 13026 "VM.Audit"
7aacca6f
DM
13027 ]
13028 ]
13029 },
7aacca6f
DM
13030 "proxyto" : null,
13031 "returns" : {
44660702
DM
13032 "properties" : {
13033 "pos" : {
13034 "type" : "integer"
13035 }
13036 },
13037 "type" : "object"
7aacca6f 13038 }
56122987 13039 },
44660702
DM
13040 "PUT" : {
13041 "description" : "Modify rule data.",
13042 "method" : "PUT",
13043 "name" : "update_rule",
56122987
DM
13044 "parameters" : {
13045 "additionalProperties" : 0,
13046 "properties" : {
44660702
DM
13047 "action" : {
13048 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
13049 "maxLength" : 20,
13050 "minLength" : 2,
13051 "optional" : 1,
13052 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13053 "type" : "string"
13054 },
13055 "comment" : {
13056 "optional" : 1,
13057 "type" : "string"
13058 },
13059 "delete" : {
13060 "description" : "A list of settings you want to delete.",
13061 "format" : "pve-configid-list",
13062 "optional" : 1,
13063 "type" : "string"
13064 },
13065 "dest" : {
13066 "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.",
13067 "format" : "pve-fw-addr-spec",
13068 "optional" : 1,
13069 "type" : "string"
13070 },
13071 "digest" : {
13072 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13073 "maxLength" : 40,
13074 "optional" : 1,
13075 "type" : "string"
13076 },
13077 "dport" : {
13078 "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.",
13079 "format" : "pve-fw-dport-spec",
13080 "optional" : 1,
13081 "type" : "string"
13082 },
13083 "enable" : {
13084 "minimum" : 0,
13085 "optional" : 1,
13086 "type" : "integer"
13087 },
13088 "iface" : {
13089 "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.",
13090 "format" : "pve-iface",
13091 "maxLength" : 20,
13092 "minLength" : 2,
13093 "optional" : 1,
13094 "type" : "string"
13095 },
13096 "macro" : {
13097 "maxLength" : 128,
13098 "optional" : 1,
13099 "type" : "string"
13100 },
13101 "moveto" : {
13102 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
13103 "minimum" : 0,
13104 "optional" : 1,
13105 "type" : "integer"
13106 },
7aacca6f
DM
13107 "node" : {
13108 "description" : "The cluster node name.",
44660702
DM
13109 "format" : "pve-node",
13110 "type" : "string"
56122987
DM
13111 },
13112 "pos" : {
44660702 13113 "description" : "Update rule at position <pos>.",
56122987 13114 "minimum" : 0,
7aacca6f 13115 "optional" : 1,
44660702 13116 "type" : "integer"
56122987 13117 },
44660702
DM
13118 "proto" : {
13119 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13120 "format" : "pve-fw-protocol-spec",
13121 "optional" : 1,
13122 "type" : "string"
7aacca6f 13123 },
44660702
DM
13124 "source" : {
13125 "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.",
13126 "format" : "pve-fw-addr-spec",
13127 "optional" : 1,
13128 "type" : "string"
13129 },
13130 "sport" : {
13131 "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.",
13132 "format" : "pve-fw-sport-spec",
13133 "optional" : 1,
13134 "type" : "string"
13135 },
13136 "type" : {
13137 "enum" : [
13138 "in",
13139 "out",
13140 "group"
13141 ],
7aacca6f 13142 "optional" : 1,
44660702
DM
13143 "type" : "string"
13144 },
13145 "vmid" : {
13146 "description" : "The (unique) ID of the VM.",
13147 "format" : "pve-vmid",
13148 "minimum" : 1,
13149 "type" : "integer"
56122987
DM
13150 }
13151 }
13152 },
56122987
DM
13153 "permissions" : {
13154 "check" : [
13155 "perm",
13156 "/vms/{vmid}",
13157 [
7aacca6f 13158 "VM.Config.Network"
56122987
DM
13159 ]
13160 ]
13161 },
44660702 13162 "protected" : 1,
56122987 13163 "proxyto" : null,
56122987 13164 "returns" : {
7aacca6f
DM
13165 "type" : "null"
13166 }
56122987 13167 }
44660702
DM
13168 },
13169 "leaf" : 1,
13170 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}",
13171 "text" : "{pos}"
56122987
DM
13172 }
13173 ],
13174 "info" : {
7aacca6f 13175 "GET" : {
44660702
DM
13176 "description" : "List rules.",
13177 "method" : "GET",
13178 "name" : "get_rules",
7aacca6f 13179 "parameters" : {
44660702 13180 "additionalProperties" : 0,
7aacca6f
DM
13181 "properties" : {
13182 "node" : {
7aacca6f 13183 "description" : "The cluster node name.",
44660702
DM
13184 "format" : "pve-node",
13185 "type" : "string"
7aacca6f
DM
13186 },
13187 "vmid" : {
13188 "description" : "The (unique) ID of the VM.",
44660702 13189 "format" : "pve-vmid",
7aacca6f 13190 "minimum" : 1,
44660702 13191 "type" : "integer"
7aacca6f 13192 }
44660702 13193 }
56122987 13194 },
56122987
DM
13195 "permissions" : {
13196 "check" : [
13197 "perm",
13198 "/vms/{vmid}",
13199 [
7aacca6f 13200 "VM.Audit"
56122987
DM
13201 ]
13202 ]
13203 },
13204 "proxyto" : null,
7aacca6f 13205 "returns" : {
7aacca6f
DM
13206 "items" : {
13207 "properties" : {
13208 "pos" : {
13209 "type" : "integer"
13210 }
13211 },
13212 "type" : "object"
13213 },
13214 "links" : [
13215 {
44660702
DM
13216 "href" : "{pos}",
13217 "rel" : "child"
7aacca6f 13218 }
44660702
DM
13219 ],
13220 "type" : "array"
13221 }
7aacca6f
DM
13222 },
13223 "POST" : {
44660702
DM
13224 "description" : "Create new rule.",
13225 "method" : "POST",
7aacca6f 13226 "name" : "create_rule",
56122987 13227 "parameters" : {
44660702 13228 "additionalProperties" : 0,
56122987 13229 "properties" : {
7aacca6f 13230 "action" : {
44660702 13231 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 13232 "maxLength" : 20,
44660702 13233 "minLength" : 2,
7aacca6f
DM
13234 "optional" : 0,
13235 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
13236 "type" : "string"
13237 },
44660702 13238 "comment" : {
7aacca6f 13239 "optional" : 1,
44660702 13240 "type" : "string"
56122987 13241 },
44660702
DM
13242 "dest" : {
13243 "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.",
13244 "format" : "pve-fw-addr-spec",
56122987 13245 "optional" : 1,
44660702 13246 "type" : "string"
56122987 13247 },
44660702
DM
13248 "digest" : {
13249 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13250 "maxLength" : 40,
56122987 13251 "optional" : 1,
44660702 13252 "type" : "string"
56122987 13253 },
44660702
DM
13254 "dport" : {
13255 "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.",
13256 "format" : "pve-fw-dport-spec",
56122987 13257 "optional" : 1,
44660702 13258 "type" : "string"
56122987 13259 },
44660702
DM
13260 "enable" : {
13261 "minimum" : 0,
56122987 13262 "optional" : 1,
44660702 13263 "type" : "integer"
56122987 13264 },
44660702
DM
13265 "iface" : {
13266 "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.",
13267 "format" : "pve-iface",
13268 "maxLength" : 20,
13269 "minLength" : 2,
7aacca6f 13270 "optional" : 1,
56122987 13271 "type" : "string"
56122987 13272 },
44660702
DM
13273 "macro" : {
13274 "maxLength" : 128,
56122987
DM
13275 "optional" : 1,
13276 "type" : "string"
13277 },
13278 "node" : {
7aacca6f 13279 "description" : "The cluster node name.",
44660702
DM
13280 "format" : "pve-node",
13281 "type" : "string"
7aacca6f 13282 },
44660702
DM
13283 "pos" : {
13284 "description" : "Update rule at position <pos>.",
13285 "minimum" : 0,
13286 "optional" : 1,
13287 "type" : "integer"
13288 },
13289 "proto" : {
13290 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13291 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
13292 "optional" : 1,
13293 "type" : "string"
7aacca6f 13294 },
44660702
DM
13295 "source" : {
13296 "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.",
13297 "format" : "pve-fw-addr-spec",
13298 "optional" : 1,
13299 "type" : "string"
56122987 13300 },
44660702
DM
13301 "sport" : {
13302 "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.",
13303 "format" : "pve-fw-sport-spec",
13304 "optional" : 1,
13305 "type" : "string"
7aacca6f 13306 },
44660702
DM
13307 "type" : {
13308 "enum" : [
13309 "in",
13310 "out",
13311 "group"
13312 ],
13313 "optional" : 0,
13314 "type" : "string"
13315 },
13316 "vmid" : {
13317 "description" : "The (unique) ID of the VM.",
13318 "format" : "pve-vmid",
13319 "minimum" : 1,
13320 "type" : "integer"
13321 }
13322 }
13323 },
13324 "permissions" : {
13325 "check" : [
13326 "perm",
13327 "/vms/{vmid}",
13328 [
13329 "VM.Config.Network"
13330 ]
13331 ]
13332 },
13333 "protected" : 1,
13334 "proxyto" : null,
13335 "returns" : {
13336 "type" : "null"
13337 }
13338 }
13339 },
13340 "leaf" : 0,
13341 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules",
13342 "text" : "rules"
13343 },
13344 {
13345 "children" : [
13346 {
13347 "info" : {
13348 "DELETE" : {
13349 "description" : "Remove IP or Network alias.",
13350 "method" : "DELETE",
13351 "name" : "remove_alias",
56122987 13352 "parameters" : {
44660702 13353 "additionalProperties" : 0,
56122987 13354 "properties" : {
44660702
DM
13355 "digest" : {
13356 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13357 "maxLength" : 40,
56122987
DM
13358 "optional" : 1,
13359 "type" : "string"
13360 },
7aacca6f 13361 "name" : {
44660702 13362 "description" : "Alias name.",
7aacca6f 13363 "maxLength" : 64,
7aacca6f
DM
13364 "minLength" : 2,
13365 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13366 "type" : "string"
7aacca6f
DM
13367 },
13368 "node" : {
44660702 13369 "description" : "The cluster node name.",
56122987 13370 "format" : "pve-node",
44660702 13371 "type" : "string"
7aacca6f 13372 },
56122987 13373 "vmid" : {
44660702 13374 "description" : "The (unique) ID of the VM.",
56122987 13375 "format" : "pve-vmid",
44660702
DM
13376 "minimum" : 1,
13377 "type" : "integer"
56122987 13378 }
44660702 13379 }
56122987 13380 },
56122987
DM
13381 "permissions" : {
13382 "check" : [
13383 "perm",
13384 "/vms/{vmid}",
13385 [
7aacca6f 13386 "VM.Config.Network"
56122987
DM
13387 ]
13388 ]
13389 },
44660702 13390 "protected" : 1,
56122987 13391 "returns" : {
7aacca6f 13392 "type" : "null"
44660702 13393 }
56122987 13394 },
44660702
DM
13395 "GET" : {
13396 "description" : "Read alias.",
13397 "method" : "GET",
13398 "name" : "read_alias",
13399 "parameters" : {
13400 "additionalProperties" : 0,
13401 "properties" : {
13402 "name" : {
13403 "description" : "Alias name.",
13404 "maxLength" : 64,
13405 "minLength" : 2,
13406 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13407 "type" : "string"
13408 },
13409 "node" : {
13410 "description" : "The cluster node name.",
13411 "format" : "pve-node",
13412 "type" : "string"
13413 },
13414 "vmid" : {
13415 "description" : "The (unique) ID of the VM.",
13416 "format" : "pve-vmid",
13417 "minimum" : 1,
13418 "type" : "integer"
13419 }
13420 }
56122987 13421 },
7aacca6f
DM
13422 "permissions" : {
13423 "check" : [
13424 "perm",
13425 "/vms/{vmid}",
13426 [
44660702 13427 "VM.Audit"
7aacca6f
DM
13428 ]
13429 ]
13430 },
44660702
DM
13431 "returns" : {
13432 "type" : "object"
13433 }
13434 },
13435 "PUT" : {
13436 "description" : "Update IP or Network alias.",
13437 "method" : "PUT",
13438 "name" : "update_alias",
56122987
DM
13439 "parameters" : {
13440 "additionalProperties" : 0,
13441 "properties" : {
44660702
DM
13442 "cidr" : {
13443 "description" : "Network/IP specification in CIDR format.",
13444 "format" : "IPorCIDR",
13445 "type" : "string"
13446 },
13447 "comment" : {
13448 "optional" : 1,
13449 "type" : "string"
13450 },
13451 "digest" : {
13452 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13453 "maxLength" : 40,
13454 "optional" : 1,
13455 "type" : "string"
13456 },
56122987 13457 "name" : {
7aacca6f 13458 "description" : "Alias name.",
44660702
DM
13459 "maxLength" : 64,
13460 "minLength" : 2,
7aacca6f 13461 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13462 "type" : "string"
56122987
DM
13463 },
13464 "node" : {
13465 "description" : "The cluster node name.",
44660702
DM
13466 "format" : "pve-node",
13467 "type" : "string"
13468 },
13469 "rename" : {
13470 "description" : "Rename an existing alias.",
13471 "maxLength" : 64,
13472 "minLength" : 2,
13473 "optional" : 1,
13474 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13475 "type" : "string"
56122987 13476 },
7aacca6f 13477 "vmid" : {
7aacca6f 13478 "description" : "The (unique) ID of the VM.",
44660702 13479 "format" : "pve-vmid",
7aacca6f 13480 "minimum" : 1,
44660702 13481 "type" : "integer"
56122987
DM
13482 }
13483 }
13484 },
44660702
DM
13485 "permissions" : {
13486 "check" : [
13487 "perm",
13488 "/vms/{vmid}",
13489 [
13490 "VM.Config.Network"
13491 ]
13492 ]
7aacca6f 13493 },
44660702
DM
13494 "protected" : 1,
13495 "returns" : {
13496 "type" : "null"
7aacca6f
DM
13497 }
13498 }
13499 },
44660702
DM
13500 "leaf" : 1,
13501 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}",
13502 "text" : "{name}"
13503 }
13504 ],
13505 "info" : {
13506 "GET" : {
13507 "description" : "List aliases",
13508 "method" : "GET",
13509 "name" : "get_aliases",
56122987
DM
13510 "parameters" : {
13511 "additionalProperties" : 0,
13512 "properties" : {
13513 "node" : {
44660702 13514 "description" : "The cluster node name.",
56122987 13515 "format" : "pve-node",
44660702 13516 "type" : "string"
56122987
DM
13517 },
13518 "vmid" : {
7aacca6f 13519 "description" : "The (unique) ID of the VM.",
44660702 13520 "format" : "pve-vmid",
7aacca6f 13521 "minimum" : 1,
44660702 13522 "type" : "integer"
56122987
DM
13523 }
13524 }
13525 },
44660702
DM
13526 "permissions" : {
13527 "check" : [
13528 "perm",
13529 "/vms/{vmid}",
13530 [
13531 "VM.Audit"
13532 ]
13533 ]
13534 },
56122987
DM
13535 "returns" : {
13536 "items" : {
56122987 13537 "properties" : {
44660702
DM
13538 "cidr" : {
13539 "type" : "string"
7aacca6f 13540 },
44660702
DM
13541 "comment" : {
13542 "optional" : 1,
56122987
DM
13543 "type" : "string"
13544 },
56122987 13545 "digest" : {
56122987 13546 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
13547 "maxLength" : 40,
13548 "optional" : 0,
13549 "type" : "string"
13550 },
13551 "name" : {
13552 "type" : "string"
56122987 13553 }
44660702
DM
13554 },
13555 "type" : "object"
13556 },
13557 "links" : [
13558 {
13559 "href" : "{name}",
13560 "rel" : "child"
56122987 13561 }
44660702
DM
13562 ],
13563 "type" : "array"
7aacca6f
DM
13564 }
13565 },
13566 "POST" : {
44660702 13567 "description" : "Create IP or Network Alias.",
7aacca6f 13568 "method" : "POST",
44660702 13569 "name" : "create_alias",
7aacca6f
DM
13570 "parameters" : {
13571 "additionalProperties" : 0,
13572 "properties" : {
44660702
DM
13573 "cidr" : {
13574 "description" : "Network/IP specification in CIDR format.",
13575 "format" : "IPorCIDR",
7aacca6f
DM
13576 "type" : "string"
13577 },
13578 "comment" : {
13579 "optional" : 1,
13580 "type" : "string"
13581 },
44660702
DM
13582 "name" : {
13583 "description" : "Alias name.",
13584 "maxLength" : 64,
7aacca6f
DM
13585 "minLength" : 2,
13586 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13587 "type" : "string"
7aacca6f
DM
13588 },
13589 "node" : {
44660702 13590 "description" : "The cluster node name.",
7aacca6f 13591 "format" : "pve-node",
44660702 13592 "type" : "string"
7aacca6f 13593 },
44660702
DM
13594 "vmid" : {
13595 "description" : "The (unique) ID of the VM.",
13596 "format" : "pve-vmid",
13597 "minimum" : 1,
13598 "type" : "integer"
7aacca6f
DM
13599 }
13600 }
13601 },
44660702
DM
13602 "permissions" : {
13603 "check" : [
13604 "perm",
13605 "/vms/{vmid}",
13606 [
13607 "VM.Config.Network"
13608 ]
13609 ]
13610 },
13611 "protected" : 1,
13612 "returns" : {
13613 "type" : "null"
13614 }
56122987
DM
13615 }
13616 },
44660702
DM
13617 "leaf" : 0,
13618 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases",
13619 "text" : "aliases"
13620 },
13621 {
56122987
DM
13622 "children" : [
13623 {
56122987
DM
13624 "children" : [
13625 {
13626 "info" : {
13627 "DELETE" : {
44660702 13628 "description" : "Remove IP or Network from IPSet.",
7aacca6f 13629 "method" : "DELETE",
44660702 13630 "name" : "remove_ip",
56122987
DM
13631 "parameters" : {
13632 "additionalProperties" : 0,
13633 "properties" : {
44660702
DM
13634 "cidr" : {
13635 "description" : "Network/IP specification in CIDR format.",
13636 "format" : "IPorCIDRorAlias",
13637 "type" : "string"
56122987
DM
13638 },
13639 "digest" : {
44660702 13640 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987 13641 "maxLength" : 40,
7aacca6f 13642 "optional" : 1,
44660702 13643 "type" : "string"
56122987 13644 },
56122987 13645 "name" : {
44660702 13646 "description" : "IP set name.",
56122987 13647 "maxLength" : 64,
7aacca6f 13648 "minLength" : 2,
56122987 13649 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 13650 "type" : "string"
7aacca6f
DM
13651 },
13652 "node" : {
7aacca6f 13653 "description" : "The cluster node name.",
44660702
DM
13654 "format" : "pve-node",
13655 "type" : "string"
13656 },
13657 "vmid" : {
13658 "description" : "The (unique) ID of the VM.",
13659 "format" : "pve-vmid",
13660 "minimum" : 1,
13661 "type" : "integer"
56122987
DM
13662 }
13663 }
13664 },
44660702
DM
13665 "permissions" : {
13666 "check" : [
13667 "perm",
13668 "/vms/{vmid}",
13669 [
13670 "VM.Config.Network"
13671 ]
13672 ]
13673 },
7aacca6f 13674 "protected" : 1,
56122987
DM
13675 "returns" : {
13676 "type" : "null"
44660702
DM
13677 }
13678 },
13679 "GET" : {
13680 "description" : "Read IP or Network settings from IPSet.",
13681 "method" : "GET",
13682 "name" : "read_ip",
56122987
DM
13683 "parameters" : {
13684 "additionalProperties" : 0,
13685 "properties" : {
7aacca6f 13686 "cidr" : {
7aacca6f 13687 "description" : "Network/IP specification in CIDR format.",
44660702 13688 "format" : "IPorCIDRorAlias",
56122987
DM
13689 "type" : "string"
13690 },
7aacca6f 13691 "name" : {
44660702 13692 "description" : "IP set name.",
7aacca6f
DM
13693 "maxLength" : 64,
13694 "minLength" : 2,
7aacca6f
DM
13695 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13696 "type" : "string"
56122987 13697 },
44660702
DM
13698 "node" : {
13699 "description" : "The cluster node name.",
13700 "format" : "pve-node",
13701 "type" : "string"
13702 },
13703 "vmid" : {
13704 "description" : "The (unique) ID of the VM.",
13705 "format" : "pve-vmid",
13706 "minimum" : 1,
13707 "type" : "integer"
56122987
DM
13708 }
13709 }
13710 },
56122987
DM
13711 "permissions" : {
13712 "check" : [
13713 "perm",
13714 "/vms/{vmid}",
13715 [
44660702 13716 "VM.Audit"
56122987
DM
13717 ]
13718 ]
7aacca6f 13719 },
44660702 13720 "protected" : 1,
7aacca6f
DM
13721 "returns" : {
13722 "type" : "object"
44660702
DM
13723 }
13724 },
13725 "PUT" : {
13726 "description" : "Update IP or Network settings",
13727 "method" : "PUT",
13728 "name" : "update_ip",
7aacca6f 13729 "parameters" : {
44660702 13730 "additionalProperties" : 0,
7aacca6f
DM
13731 "properties" : {
13732 "cidr" : {
44660702 13733 "description" : "Network/IP specification in CIDR format.",
7aacca6f 13734 "format" : "IPorCIDRorAlias",
44660702 13735 "type" : "string"
7aacca6f 13736 },
44660702
DM
13737 "comment" : {
13738 "optional" : 1,
13739 "type" : "string"
13740 },
13741 "digest" : {
13742 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13743 "maxLength" : 40,
13744 "optional" : 1,
13745 "type" : "string"
13746 },
13747 "name" : {
13748 "description" : "IP set name.",
13749 "maxLength" : 64,
13750 "minLength" : 2,
13751 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13752 "type" : "string"
7aacca6f
DM
13753 },
13754 "node" : {
7aacca6f 13755 "description" : "The cluster node name.",
44660702 13756 "format" : "pve-node",
7aacca6f
DM
13757 "type" : "string"
13758 },
44660702
DM
13759 "nomatch" : {
13760 "optional" : 1,
13761 "type" : "boolean"
13762 },
13763 "vmid" : {
13764 "description" : "The (unique) ID of the VM.",
13765 "format" : "pve-vmid",
13766 "minimum" : 1,
13767 "type" : "integer"
7aacca6f 13768 }
44660702
DM
13769 }
13770 },
13771 "permissions" : {
13772 "check" : [
13773 "perm",
13774 "/vms/{vmid}",
13775 [
13776 "VM.Config.Network"
13777 ]
13778 ]
7aacca6f
DM
13779 },
13780 "protected" : 1,
44660702
DM
13781 "returns" : {
13782 "type" : "null"
13783 }
56122987
DM
13784 }
13785 },
56122987 13786 "leaf" : 1,
44660702
DM
13787 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}",
13788 "text" : "{cidr}"
56122987
DM
13789 }
13790 ],
13791 "info" : {
44660702
DM
13792 "DELETE" : {
13793 "description" : "Delete IPSet",
13794 "method" : "DELETE",
13795 "name" : "delete_ipset",
13796 "parameters" : {
13797 "additionalProperties" : 0,
13798 "properties" : {
13799 "name" : {
13800 "description" : "IP set name.",
13801 "maxLength" : 64,
13802 "minLength" : 2,
13803 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13804 "type" : "string"
13805 },
13806 "node" : {
13807 "description" : "The cluster node name.",
13808 "format" : "pve-node",
13809 "type" : "string"
13810 },
13811 "vmid" : {
13812 "description" : "The (unique) ID of the VM.",
13813 "format" : "pve-vmid",
13814 "minimum" : 1,
13815 "type" : "integer"
13816 }
13817 }
13818 },
13819 "permissions" : {
13820 "check" : [
13821 "perm",
13822 "/vms/{vmid}",
13823 [
13824 "VM.Config.Network"
13825 ]
13826 ]
13827 },
13828 "protected" : 1,
13829 "returns" : {
13830 "type" : "null"
13831 }
13832 },
56122987 13833 "GET" : {
7aacca6f 13834 "description" : "List IPSet content",
44660702
DM
13835 "method" : "GET",
13836 "name" : "get_ipset",
7aacca6f
DM
13837 "parameters" : {
13838 "additionalProperties" : 0,
13839 "properties" : {
13840 "name" : {
13841 "description" : "IP set name.",
44660702 13842 "maxLength" : 64,
7aacca6f 13843 "minLength" : 2,
44660702
DM
13844 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13845 "type" : "string"
7aacca6f
DM
13846 },
13847 "node" : {
7aacca6f 13848 "description" : "The cluster node name.",
44660702 13849 "format" : "pve-node",
7aacca6f
DM
13850 "type" : "string"
13851 },
13852 "vmid" : {
13853 "description" : "The (unique) ID of the VM.",
44660702 13854 "format" : "pve-vmid",
7aacca6f 13855 "minimum" : 1,
44660702 13856 "type" : "integer"
56122987 13857 }
7aacca6f
DM
13858 }
13859 },
7aacca6f
DM
13860 "permissions" : {
13861 "check" : [
13862 "perm",
13863 "/vms/{vmid}",
13864 [
13865 "VM.Audit"
13866 ]
13867 ]
13868 },
13869 "returns" : {
56122987
DM
13870 "items" : {
13871 "properties" : {
13872 "cidr" : {
13873 "type" : "string"
13874 },
44660702
DM
13875 "comment" : {
13876 "optional" : 1,
13877 "type" : "string"
13878 },
56122987 13879 "digest" : {
56122987 13880 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 13881 "maxLength" : 40,
7aacca6f 13882 "optional" : 0,
56122987 13883 "type" : "string"
7aacca6f
DM
13884 },
13885 "nomatch" : {
44660702
DM
13886 "optional" : 1,
13887 "type" : "boolean"
56122987 13888 }
44660702
DM
13889 },
13890 "type" : "object"
56122987 13891 },
7aacca6f
DM
13892 "links" : [
13893 {
44660702
DM
13894 "href" : "{cidr}",
13895 "rel" : "child"
56122987 13896 }
44660702
DM
13897 ],
13898 "type" : "array"
13899 }
56122987 13900 },
7aacca6f
DM
13901 "POST" : {
13902 "description" : "Add IP or Network to IPSet.",
44660702 13903 "method" : "POST",
7aacca6f 13904 "name" : "create_ip",
56122987 13905 "parameters" : {
44660702 13906 "additionalProperties" : 0,
56122987 13907 "properties" : {
44660702
DM
13908 "cidr" : {
13909 "description" : "Network/IP specification in CIDR format.",
13910 "format" : "IPorCIDRorAlias",
13911 "type" : "string"
13912 },
13913 "comment" : {
13914 "optional" : 1,
13915 "type" : "string"
56122987
DM
13916 },
13917 "name" : {
56122987 13918 "description" : "IP set name.",
44660702 13919 "maxLength" : 64,
7aacca6f 13920 "minLength" : 2,
44660702 13921 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 13922 "type" : "string"
56122987 13923 },
7aacca6f 13924 "node" : {
7aacca6f 13925 "description" : "The cluster node name.",
44660702 13926 "format" : "pve-node",
56122987
DM
13927 "type" : "string"
13928 },
44660702
DM
13929 "nomatch" : {
13930 "optional" : 1,
13931 "type" : "boolean"
7aacca6f
DM
13932 },
13933 "vmid" : {
44660702 13934 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13935 "format" : "pve-vmid",
13936 "minimum" : 1,
7aacca6f 13937 "type" : "integer"
56122987 13938 }
44660702
DM
13939 }
13940 },
13941 "permissions" : {
13942 "check" : [
13943 "perm",
13944 "/vms/{vmid}",
13945 [
13946 "VM.Config.Network"
13947 ]
13948 ]
13949 },
13950 "protected" : 1,
13951 "returns" : {
13952 "type" : "null"
13953 }
13954 }
13955 },
13956 "leaf" : 0,
13957 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}",
13958 "text" : "{name}"
13959 }
13960 ],
13961 "info" : {
13962 "GET" : {
13963 "description" : "List IPSets",
13964 "method" : "GET",
13965 "name" : "ipset_index",
13966 "parameters" : {
13967 "additionalProperties" : 0,
13968 "properties" : {
13969 "node" : {
13970 "description" : "The cluster node name.",
13971 "format" : "pve-node",
13972 "type" : "string"
13973 },
13974 "vmid" : {
13975 "description" : "The (unique) ID of the VM.",
13976 "format" : "pve-vmid",
13977 "minimum" : 1,
13978 "type" : "integer"
13979 }
13980 }
13981 },
13982 "permissions" : {
13983 "check" : [
13984 "perm",
13985 "/vms/{vmid}",
13986 [
13987 "VM.Audit"
13988 ]
13989 ]
13990 },
13991 "returns" : {
13992 "items" : {
13993 "properties" : {
13994 "comment" : {
13995 "optional" : 1,
13996 "type" : "string"
13997 },
13998 "digest" : {
13999 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14000 "maxLength" : 40,
14001 "optional" : 0,
14002 "type" : "string"
7aacca6f 14003 },
44660702
DM
14004 "name" : {
14005 "description" : "IP set name.",
14006 "maxLength" : 64,
14007 "minLength" : 2,
14008 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14009 "type" : "string"
14010 }
14011 },
14012 "type" : "object"
14013 },
14014 "links" : [
14015 {
14016 "href" : "{name}",
14017 "rel" : "child"
14018 }
14019 ],
14020 "type" : "array"
14021 }
14022 },
14023 "POST" : {
14024 "description" : "Create new IPSet",
14025 "method" : "POST",
14026 "name" : "create_ipset",
14027 "parameters" : {
14028 "additionalProperties" : 0,
14029 "properties" : {
14030 "comment" : {
14031 "optional" : 1,
14032 "type" : "string"
14033 },
14034 "digest" : {
14035 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14036 "maxLength" : 40,
14037 "optional" : 1,
14038 "type" : "string"
56122987 14039 },
44660702
DM
14040 "name" : {
14041 "description" : "IP set name.",
14042 "maxLength" : 64,
14043 "minLength" : 2,
14044 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14045 "type" : "string"
14046 },
14047 "node" : {
14048 "description" : "The cluster node name.",
14049 "format" : "pve-node",
14050 "type" : "string"
7aacca6f 14051 },
44660702
DM
14052 "rename" : {
14053 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
14054 "maxLength" : 64,
14055 "minLength" : 2,
14056 "optional" : 1,
14057 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14058 "type" : "string"
14059 },
14060 "vmid" : {
14061 "description" : "The (unique) ID of the VM.",
14062 "format" : "pve-vmid",
14063 "minimum" : 1,
14064 "type" : "integer"
14065 }
56122987 14066 }
44660702
DM
14067 },
14068 "permissions" : {
14069 "check" : [
14070 "perm",
14071 "/vms/{vmid}",
14072 [
14073 "VM.Config.Network"
14074 ]
14075 ]
14076 },
14077 "protected" : 1,
14078 "returns" : {
14079 "type" : "null"
56122987
DM
14080 }
14081 }
44660702
DM
14082 },
14083 "leaf" : 0,
14084 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset",
14085 "text" : "ipset"
56122987
DM
14086 },
14087 {
56122987 14088 "info" : {
7aacca6f 14089 "GET" : {
44660702 14090 "description" : "Get VM firewall options.",
7aacca6f 14091 "method" : "GET",
44660702
DM
14092 "name" : "get_options",
14093 "parameters" : {
14094 "additionalProperties" : 0,
14095 "properties" : {
14096 "node" : {
14097 "description" : "The cluster node name.",
14098 "format" : "pve-node",
14099 "type" : "string"
14100 },
14101 "vmid" : {
14102 "description" : "The (unique) ID of the VM.",
14103 "format" : "pve-vmid",
14104 "minimum" : 1,
14105 "type" : "integer"
14106 }
14107 }
14108 },
14109 "permissions" : {
14110 "check" : [
14111 "perm",
14112 "/vms/{vmid}",
14113 [
14114 "VM.Audit"
14115 ]
14116 ]
14117 },
14118 "proxyto" : "node",
56122987 14119 "returns" : {
56122987 14120 "properties" : {
44660702
DM
14121 "dhcp" : {
14122 "description" : "Enable DHCP.",
14123 "optional" : 1,
14124 "type" : "boolean"
14125 },
14126 "enable" : {
14127 "description" : "Enable/disable firewall rules.",
14128 "optional" : 1,
14129 "type" : "boolean"
14130 },
14131 "ipfilter" : {
14132 "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 14133 "optional" : 1,
44660702
DM
14134 "type" : "boolean"
14135 },
14136 "log_level_in" : {
7aacca6f
DM
14137 "description" : "Log level for incoming traffic.",
14138 "enum" : [
14139 "emerg",
14140 "alert",
14141 "crit",
14142 "err",
14143 "warning",
14144 "notice",
14145 "info",
14146 "debug",
14147 "nolog"
44660702
DM
14148 ],
14149 "optional" : 1,
14150 "type" : "string"
56122987 14151 },
44660702
DM
14152 "log_level_out" : {
14153 "description" : "Log level for outgoing traffic.",
56122987 14154 "enum" : [
44660702
DM
14155 "emerg",
14156 "alert",
14157 "crit",
14158 "err",
14159 "warning",
14160 "notice",
14161 "info",
14162 "debug",
14163 "nolog"
7aacca6f 14164 ],
7aacca6f
DM
14165 "optional" : 1,
14166 "type" : "string"
56122987 14167 },
44660702
DM
14168 "macfilter" : {
14169 "description" : "Enable/disable MAC address filter.",
14170 "optional" : 1,
14171 "type" : "boolean"
7aacca6f 14172 },
44660702
DM
14173 "ndp" : {
14174 "description" : "Enable NDP.",
56122987 14175 "optional" : 1,
44660702 14176 "type" : "boolean"
56122987
DM
14177 },
14178 "policy_in" : {
7aacca6f 14179 "description" : "Input policy.",
56122987
DM
14180 "enum" : [
14181 "ACCEPT",
14182 "REJECT",
14183 "DROP"
14184 ],
7aacca6f 14185 "optional" : 1,
44660702 14186 "type" : "string"
56122987 14187 },
44660702
DM
14188 "policy_out" : {
14189 "description" : "Output policy.",
56122987 14190 "enum" : [
44660702
DM
14191 "ACCEPT",
14192 "REJECT",
14193 "DROP"
56122987 14194 ],
7aacca6f 14195 "optional" : 1,
56122987
DM
14196 "type" : "string"
14197 },
44660702
DM
14198 "radv" : {
14199 "description" : "Allow sending Router Advertisement.",
56122987 14200 "optional" : 1,
7aacca6f
DM
14201 "type" : "boolean"
14202 }
7aacca6f 14203 },
44660702
DM
14204 "type" : "object"
14205 }
7aacca6f
DM
14206 },
14207 "PUT" : {
44660702
DM
14208 "description" : "Set Firewall options.",
14209 "method" : "PUT",
7aacca6f
DM
14210 "name" : "set_options",
14211 "parameters" : {
44660702 14212 "additionalProperties" : 0,
7aacca6f 14213 "properties" : {
44660702
DM
14214 "delete" : {
14215 "description" : "A list of settings you want to delete.",
14216 "format" : "pve-configid-list",
14217 "optional" : 1,
14218 "type" : "string"
14219 },
14220 "dhcp" : {
14221 "description" : "Enable DHCP.",
14222 "optional" : 1,
14223 "type" : "boolean"
14224 },
14225 "digest" : {
14226 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14227 "maxLength" : 40,
14228 "optional" : 1,
14229 "type" : "string"
14230 },
7aacca6f
DM
14231 "enable" : {
14232 "description" : "Enable/disable firewall rules.",
56122987 14233 "optional" : 1,
7aacca6f 14234 "type" : "boolean"
56122987 14235 },
44660702
DM
14236 "ipfilter" : {
14237 "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.",
14238 "optional" : 1,
14239 "type" : "boolean"
14240 },
14241 "log_level_in" : {
14242 "description" : "Log level for incoming traffic.",
56122987
DM
14243 "enum" : [
14244 "emerg",
14245 "alert",
14246 "crit",
14247 "err",
14248 "warning",
14249 "notice",
14250 "info",
14251 "debug",
14252 "nolog"
14253 ],
56122987 14254 "optional" : 1,
44660702 14255 "type" : "string"
56122987 14256 },
44660702
DM
14257 "log_level_out" : {
14258 "description" : "Log level for outgoing traffic.",
56122987
DM
14259 "enum" : [
14260 "emerg",
14261 "alert",
14262 "crit",
14263 "err",
14264 "warning",
14265 "notice",
14266 "info",
14267 "debug",
14268 "nolog"
14269 ],
44660702
DM
14270 "optional" : 1,
14271 "type" : "string"
56122987 14272 },
44660702
DM
14273 "macfilter" : {
14274 "description" : "Enable/disable MAC address filter.",
14275 "optional" : 1,
14276 "type" : "boolean"
14277 },
14278 "ndp" : {
14279 "description" : "Enable NDP.",
56122987 14280 "optional" : 1,
56122987
DM
14281 "type" : "boolean"
14282 },
7aacca6f
DM
14283 "node" : {
14284 "description" : "The cluster node name.",
44660702
DM
14285 "format" : "pve-node",
14286 "type" : "string"
7aacca6f 14287 },
44660702
DM
14288 "policy_in" : {
14289 "description" : "Input policy.",
14290 "enum" : [
14291 "ACCEPT",
14292 "REJECT",
14293 "DROP"
14294 ],
7aacca6f 14295 "optional" : 1,
44660702 14296 "type" : "string"
7aacca6f 14297 },
44660702
DM
14298 "policy_out" : {
14299 "description" : "Output policy.",
56122987 14300 "enum" : [
7aacca6f
DM
14301 "ACCEPT",
14302 "REJECT",
14303 "DROP"
56122987
DM
14304 ],
14305 "optional" : 1,
56122987 14306 "type" : "string"
7aacca6f 14307 },
44660702
DM
14308 "radv" : {
14309 "description" : "Allow sending Router Advertisement.",
7aacca6f 14310 "optional" : 1,
44660702
DM
14311 "type" : "boolean"
14312 },
14313 "vmid" : {
14314 "description" : "The (unique) ID of the VM.",
14315 "format" : "pve-vmid",
14316 "minimum" : 1,
14317 "type" : "integer"
56122987 14318 }
44660702 14319 }
56122987 14320 },
7aacca6f
DM
14321 "permissions" : {
14322 "check" : [
14323 "perm",
14324 "/vms/{vmid}",
14325 [
14326 "VM.Config.Network"
14327 ]
14328 ]
14329 },
44660702
DM
14330 "protected" : 1,
14331 "proxyto" : "node",
7aacca6f
DM
14332 "returns" : {
14333 "type" : "null"
56122987
DM
14334 }
14335 }
14336 },
44660702 14337 "leaf" : 1,
7aacca6f 14338 "path" : "/nodes/{node}/lxc/{vmid}/firewall/options",
44660702 14339 "text" : "options"
56122987
DM
14340 },
14341 {
56122987
DM
14342 "info" : {
14343 "GET" : {
44660702 14344 "description" : "Read firewall log",
56122987 14345 "method" : "GET",
7aacca6f 14346 "name" : "log",
56122987
DM
14347 "parameters" : {
14348 "additionalProperties" : 0,
14349 "properties" : {
44660702
DM
14350 "limit" : {
14351 "minimum" : 0,
14352 "optional" : 1,
14353 "type" : "integer"
14354 },
56122987
DM
14355 "node" : {
14356 "description" : "The cluster node name.",
44660702
DM
14357 "format" : "pve-node",
14358 "type" : "string"
56122987 14359 },
44660702
DM
14360 "start" : {
14361 "minimum" : 0,
7aacca6f 14362 "optional" : 1,
44660702 14363 "type" : "integer"
56122987
DM
14364 },
14365 "vmid" : {
44660702 14366 "description" : "The (unique) ID of the VM.",
7aacca6f 14367 "format" : "pve-vmid",
56122987 14368 "minimum" : 1,
7aacca6f 14369 "type" : "integer"
56122987
DM
14370 }
14371 }
14372 },
44660702
DM
14373 "permissions" : {
14374 "check" : [
14375 "perm",
14376 "/vms/{vmid}",
14377 [
14378 "VM.Console"
14379 ]
14380 ]
14381 },
56122987 14382 "protected" : 1,
44660702 14383 "proxyto" : "node",
7aacca6f
DM
14384 "returns" : {
14385 "items" : {
14386 "properties" : {
7aacca6f
DM
14387 "n" : {
14388 "description" : "Line number",
14389 "type" : "integer"
44660702
DM
14390 },
14391 "t" : {
14392 "description" : "Line text",
14393 "type" : "string"
7aacca6f
DM
14394 }
14395 },
14396 "type" : "object"
14397 },
14398 "type" : "array"
44660702 14399 }
56122987
DM
14400 }
14401 },
7aacca6f 14402 "leaf" : 1,
44660702
DM
14403 "path" : "/nodes/{node}/lxc/{vmid}/firewall/log",
14404 "text" : "log"
56122987
DM
14405 },
14406 {
56122987
DM
14407 "info" : {
14408 "GET" : {
7aacca6f 14409 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
14410 "method" : "GET",
14411 "name" : "refs",
56122987 14412 "parameters" : {
7aacca6f 14413 "additionalProperties" : 0,
56122987 14414 "properties" : {
44660702
DM
14415 "node" : {
14416 "description" : "The cluster node name.",
14417 "format" : "pve-node",
14418 "type" : "string"
7aacca6f 14419 },
56122987 14420 "type" : {
44660702 14421 "description" : "Only list references of specified type.",
56122987
DM
14422 "enum" : [
14423 "alias",
14424 "ipset"
14425 ],
44660702
DM
14426 "optional" : 1,
14427 "type" : "string"
56122987 14428 },
44660702
DM
14429 "vmid" : {
14430 "description" : "The (unique) ID of the VM.",
14431 "format" : "pve-vmid",
14432 "minimum" : 1,
14433 "type" : "integer"
56122987 14434 }
7aacca6f 14435 }
56122987 14436 },
44660702
DM
14437 "permissions" : {
14438 "check" : [
14439 "perm",
14440 "/vms/{vmid}",
14441 [
14442 "VM.Audit"
14443 ]
14444 ]
14445 },
56122987 14446 "returns" : {
56122987 14447 "items" : {
56122987 14448 "properties" : {
44660702
DM
14449 "comment" : {
14450 "optional" : 1,
14451 "type" : "string"
14452 },
14453 "name" : {
14454 "type" : "string"
14455 },
56122987 14456 "type" : {
56122987
DM
14457 "enum" : [
14458 "alias",
14459 "ipset"
44660702 14460 ],
7aacca6f 14461 "type" : "string"
56122987 14462 }
44660702
DM
14463 },
14464 "type" : "object"
14465 },
14466 "type" : "array"
56122987
DM
14467 }
14468 }
14469 },
44660702 14470 "leaf" : 1,
7aacca6f 14471 "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs",
44660702 14472 "text" : "refs"
56122987
DM
14473 }
14474 ],
56122987
DM
14475 "info" : {
14476 "GET" : {
7aacca6f 14477 "description" : "Directory index.",
44660702
DM
14478 "method" : "GET",
14479 "name" : "index",
56122987 14480 "parameters" : {
44660702 14481 "additionalProperties" : 0,
56122987 14482 "properties" : {
56122987 14483 "node" : {
44660702 14484 "description" : "The cluster node name.",
56122987 14485 "format" : "pve-node",
44660702
DM
14486 "type" : "string"
14487 },
14488 "vmid" : {
14489 "description" : "The (unique) ID of the VM.",
14490 "format" : "pve-vmid",
14491 "minimum" : 1,
14492 "type" : "integer"
56122987 14493 }
44660702
DM
14494 }
14495 },
14496 "permissions" : {
14497 "user" : "all"
56122987
DM
14498 },
14499 "returns" : {
7aacca6f 14500 "items" : {
44660702
DM
14501 "properties" : {},
14502 "type" : "object"
7aacca6f 14503 },
56122987
DM
14504 "links" : [
14505 {
44660702
DM
14506 "href" : "{name}",
14507 "rel" : "child"
56122987 14508 }
44660702
DM
14509 ],
14510 "type" : "array"
56122987
DM
14511 }
14512 }
14513 },
44660702 14514 "leaf" : 0,
7aacca6f 14515 "path" : "/nodes/{node}/lxc/{vmid}/firewall",
44660702 14516 "text" : "firewall"
56122987
DM
14517 },
14518 {
56122987
DM
14519 "info" : {
14520 "GET" : {
56122987 14521 "description" : "Read VM RRD statistics (returns PNG)",
44660702 14522 "method" : "GET",
7aacca6f 14523 "name" : "rrd",
56122987 14524 "parameters" : {
7aacca6f 14525 "additionalProperties" : 0,
56122987 14526 "properties" : {
44660702
DM
14527 "cf" : {
14528 "description" : "The RRD consolidation function",
14529 "enum" : [
14530 "AVERAGE",
14531 "MAX"
14532 ],
14533 "optional" : 1,
14534 "type" : "string"
14535 },
14536 "ds" : {
14537 "description" : "The list of datasources you want to display.",
14538 "format" : "pve-configid-list",
14539 "type" : "string"
14540 },
7aacca6f
DM
14541 "node" : {
14542 "description" : "The cluster node name.",
44660702
DM
14543 "format" : "pve-node",
14544 "type" : "string"
56122987
DM
14545 },
14546 "timeframe" : {
14547 "description" : "Specify the time frame you are interested in.",
14548 "enum" : [
14549 "hour",
14550 "day",
14551 "week",
14552 "month",
14553 "year"
7aacca6f 14554 ],
44660702 14555 "type" : "string"
7aacca6f
DM
14556 },
14557 "vmid" : {
44660702 14558 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14559 "format" : "pve-vmid",
14560 "minimum" : 1,
7aacca6f 14561 "type" : "integer"
56122987 14562 }
7aacca6f
DM
14563 }
14564 },
14565 "permissions" : {
14566 "check" : [
14567 "perm",
14568 "/vms/{vmid}",
14569 [
14570 "VM.Audit"
14571 ]
14572 ]
56122987 14573 },
44660702 14574 "protected" : 1,
7aacca6f
DM
14575 "returns" : {
14576 "properties" : {
14577 "filename" : {
14578 "type" : "string"
14579 }
14580 },
14581 "type" : "object"
14582 }
56122987 14583 }
7aacca6f 14584 },
44660702 14585 "leaf" : 1,
7aacca6f 14586 "path" : "/nodes/{node}/lxc/{vmid}/rrd",
44660702 14587 "text" : "rrd"
56122987
DM
14588 },
14589 {
56122987
DM
14590 "info" : {
14591 "GET" : {
44660702
DM
14592 "description" : "Read VM RRD statistics",
14593 "method" : "GET",
14594 "name" : "rrddata",
56122987 14595 "parameters" : {
7aacca6f 14596 "additionalProperties" : 0,
56122987 14597 "properties" : {
44660702
DM
14598 "cf" : {
14599 "description" : "The RRD consolidation function",
14600 "enum" : [
14601 "AVERAGE",
14602 "MAX"
14603 ],
14604 "optional" : 1,
14605 "type" : "string"
14606 },
7aacca6f 14607 "node" : {
44660702 14608 "description" : "The cluster node name.",
7aacca6f 14609 "format" : "pve-node",
44660702 14610 "type" : "string"
7aacca6f 14611 },
56122987
DM
14612 "timeframe" : {
14613 "description" : "Specify the time frame you are interested in.",
14614 "enum" : [
14615 "hour",
14616 "day",
14617 "week",
14618 "month",
14619 "year"
44660702
DM
14620 ],
14621 "type" : "string"
7aacca6f
DM
14622 },
14623 "vmid" : {
14624 "description" : "The (unique) ID of the VM.",
44660702 14625 "format" : "pve-vmid",
7aacca6f 14626 "minimum" : 1,
44660702 14627 "type" : "integer"
56122987 14628 }
56122987
DM
14629 }
14630 },
56122987
DM
14631 "permissions" : {
14632 "check" : [
14633 "perm",
14634 "/vms/{vmid}",
14635 [
14636 "VM.Audit"
14637 ]
14638 ]
14639 },
7aacca6f
DM
14640 "protected" : 1,
14641 "returns" : {
7aacca6f
DM
14642 "items" : {
14643 "properties" : {},
14644 "type" : "object"
44660702
DM
14645 },
14646 "type" : "array"
14647 }
56122987
DM
14648 }
14649 },
44660702 14650 "leaf" : 1,
7aacca6f 14651 "path" : "/nodes/{node}/lxc/{vmid}/rrddata",
44660702 14652 "text" : "rrddata"
56122987
DM
14653 },
14654 {
14655 "info" : {
14656 "POST" : {
14657 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
14658 "method" : "POST",
14659 "name" : "vncproxy",
7aacca6f 14660 "parameters" : {
44660702 14661 "additionalProperties" : 0,
7aacca6f 14662 "properties" : {
44660702
DM
14663 "node" : {
14664 "description" : "The cluster node name.",
14665 "format" : "pve-node",
14666 "type" : "string"
14667 },
7aacca6f 14668 "vmid" : {
44660702 14669 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14670 "format" : "pve-vmid",
14671 "minimum" : 1,
7aacca6f
DM
14672 "type" : "integer"
14673 },
14674 "websocket" : {
44660702 14675 "description" : "use websocket instead of standard VNC.",
7aacca6f 14676 "optional" : 1,
44660702 14677 "type" : "boolean"
7aacca6f 14678 }
44660702 14679 }
7aacca6f 14680 },
56122987
DM
14681 "permissions" : {
14682 "check" : [
14683 "perm",
14684 "/vms/{vmid}",
14685 [
14686 "VM.Console"
14687 ]
14688 ]
14689 },
44660702 14690 "protected" : 1,
56122987 14691 "returns" : {
7aacca6f 14692 "additionalProperties" : 0,
56122987 14693 "properties" : {
7aacca6f 14694 "cert" : {
56122987
DM
14695 "type" : "string"
14696 },
44660702
DM
14697 "port" : {
14698 "type" : "integer"
56122987 14699 },
44660702 14700 "ticket" : {
56122987
DM
14701 "type" : "string"
14702 },
44660702 14703 "upid" : {
56122987
DM
14704 "type" : "string"
14705 },
44660702
DM
14706 "user" : {
14707 "type" : "string"
56122987 14708 }
7aacca6f 14709 }
56122987
DM
14710 }
14711 }
14712 },
44660702 14713 "leaf" : 1,
56122987 14714 "path" : "/nodes/{node}/lxc/{vmid}/vncproxy",
44660702 14715 "text" : "vncproxy"
56122987
DM
14716 },
14717 {
56122987
DM
14718 "info" : {
14719 "GET" : {
44660702
DM
14720 "description" : "Opens a weksocket for VNC traffic.",
14721 "method" : "GET",
14722 "name" : "vncwebsocket",
56122987 14723 "parameters" : {
44660702 14724 "additionalProperties" : 0,
56122987 14725 "properties" : {
56122987
DM
14726 "node" : {
14727 "description" : "The cluster node name.",
44660702 14728 "format" : "pve-node",
56122987 14729 "type" : "string"
7aacca6f 14730 },
44660702
DM
14731 "port" : {
14732 "description" : "Port number returned by previous vncproxy call.",
14733 "maximum" : 5999,
14734 "minimum" : 5900,
14735 "type" : "integer"
14736 },
7aacca6f
DM
14737 "vmid" : {
14738 "description" : "The (unique) ID of the VM.",
7aacca6f 14739 "format" : "pve-vmid",
44660702
DM
14740 "minimum" : 1,
14741 "type" : "integer"
14742 },
14743 "vncticket" : {
14744 "description" : "Ticket from previous call to vncproxy.",
14745 "maxLength" : 512,
14746 "type" : "string"
56122987 14747 }
44660702 14748 }
7aacca6f 14749 },
7aacca6f
DM
14750 "permissions" : {
14751 "check" : [
14752 "perm",
14753 "/vms/{vmid}",
14754 [
14755 "VM.Console"
14756 ]
14757 ],
14758 "description" : "You also need to pass a valid ticket (vncticket)."
56122987
DM
14759 },
14760 "returns" : {
56122987
DM
14761 "properties" : {
14762 "port" : {
14763 "type" : "string"
14764 }
44660702
DM
14765 },
14766 "type" : "object"
14767 }
56122987
DM
14768 }
14769 },
44660702 14770 "leaf" : 1,
7aacca6f 14771 "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket",
44660702 14772 "text" : "vncwebsocket"
56122987
DM
14773 },
14774 {
56122987
DM
14775 "info" : {
14776 "POST" : {
44660702
DM
14777 "description" : "Returns a SPICE configuration to connect to the CT.",
14778 "method" : "POST",
14779 "name" : "spiceproxy",
56122987
DM
14780 "parameters" : {
14781 "additionalProperties" : 0,
14782 "properties" : {
44660702
DM
14783 "node" : {
14784 "description" : "The cluster node name.",
14785 "format" : "pve-node",
14786 "type" : "string"
56122987
DM
14787 },
14788 "proxy" : {
7aacca6f 14789 "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
14790 "format" : "address",
14791 "optional" : 1,
7aacca6f 14792 "type" : "string"
44660702
DM
14793 },
14794 "vmid" : {
14795 "description" : "The (unique) ID of the VM.",
14796 "format" : "pve-vmid",
14797 "minimum" : 1,
14798 "type" : "integer"
56122987
DM
14799 }
14800 }
14801 },
56122987
DM
14802 "permissions" : {
14803 "check" : [
14804 "perm",
14805 "/vms/{vmid}",
14806 [
14807 "VM.Console"
14808 ]
14809 ]
14810 },
44660702
DM
14811 "protected" : 1,
14812 "proxyto" : "node",
56122987 14813 "returns" : {
7aacca6f 14814 "additionalProperties" : 1,
44660702 14815 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 14816 "properties" : {
44660702 14817 "host" : {
56122987
DM
14818 "type" : "string"
14819 },
44660702 14820 "password" : {
56122987
DM
14821 "type" : "string"
14822 },
14823 "proxy" : {
14824 "type" : "string"
14825 },
56122987
DM
14826 "tls-port" : {
14827 "type" : "integer"
7aacca6f 14828 },
44660702 14829 "type" : {
7aacca6f 14830 "type" : "string"
56122987 14831 }
7aacca6f
DM
14832 }
14833 }
56122987 14834 }
44660702
DM
14835 },
14836 "leaf" : 1,
14837 "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy",
14838 "text" : "spiceproxy"
56122987
DM
14839 },
14840 {
56122987
DM
14841 "info" : {
14842 "POST" : {
44660702 14843 "description" : "Migrate the container to another node. Creates a new migration task.",
7aacca6f 14844 "method" : "POST",
44660702 14845 "name" : "migrate_vm",
56122987 14846 "parameters" : {
44660702 14847 "additionalProperties" : 0,
56122987 14848 "properties" : {
44660702
DM
14849 "force" : {
14850 "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node.",
14851 "optional" : 1,
14852 "type" : "boolean"
14853 },
14854 "node" : {
14855 "description" : "The cluster node name.",
7aacca6f 14856 "format" : "pve-node",
7aacca6f
DM
14857 "type" : "string"
14858 },
56122987 14859 "online" : {
56122987 14860 "description" : "Use online/live migration.",
44660702
DM
14861 "optional" : 1,
14862 "type" : "boolean"
56122987 14863 },
44660702
DM
14864 "target" : {
14865 "description" : "Target node.",
56122987 14866 "format" : "pve-node",
44660702 14867 "type" : "string"
56122987 14868 },
44660702
DM
14869 "vmid" : {
14870 "description" : "The (unique) ID of the VM.",
14871 "format" : "pve-vmid",
14872 "minimum" : 1,
14873 "type" : "integer"
56122987 14874 }
44660702 14875 }
7aacca6f 14876 },
56122987
DM
14877 "permissions" : {
14878 "check" : [
14879 "perm",
14880 "/vms/{vmid}",
14881 [
14882 "VM.Migrate"
14883 ]
14884 ]
14885 },
44660702 14886 "protected" : 1,
7aacca6f 14887 "proxyto" : "node",
44660702
DM
14888 "returns" : {
14889 "description" : "the task ID.",
14890 "type" : "string"
14891 }
56122987
DM
14892 }
14893 },
44660702
DM
14894 "leaf" : 1,
14895 "path" : "/nodes/{node}/lxc/{vmid}/migrate",
7aacca6f 14896 "text" : "migrate"
56122987
DM
14897 },
14898 {
56122987
DM
14899 "info" : {
14900 "GET" : {
44660702
DM
14901 "description" : "Check if feature for virtual machine is available.",
14902 "method" : "GET",
56122987 14903 "name" : "vm_feature",
56122987 14904 "parameters" : {
7aacca6f 14905 "additionalProperties" : 0,
56122987 14906 "properties" : {
44660702
DM
14907 "feature" : {
14908 "description" : "Feature to check.",
14909 "enum" : [
14910 "snapshot"
14911 ],
14912 "type" : "string"
14913 },
7aacca6f 14914 "node" : {
44660702 14915 "description" : "The cluster node name.",
7aacca6f 14916 "format" : "pve-node",
44660702 14917 "type" : "string"
7aacca6f 14918 },
56122987 14919 "snapname" : {
7aacca6f
DM
14920 "description" : "The name of the snapshot.",
14921 "format" : "pve-configid",
44660702
DM
14922 "maxLength" : 40,
14923 "optional" : 1,
56122987
DM
14924 "type" : "string"
14925 },
14926 "vmid" : {
7aacca6f 14927 "description" : "The (unique) ID of the VM.",
44660702 14928 "format" : "pve-vmid",
7aacca6f 14929 "minimum" : 1,
44660702 14930 "type" : "integer"
56122987 14931 }
7aacca6f 14932 }
56122987
DM
14933 },
14934 "permissions" : {
14935 "check" : [
14936 "perm",
14937 "/vms/{vmid}",
14938 [
14939 "VM.Audit"
14940 ]
14941 ]
14942 },
44660702 14943 "protected" : 1,
7aacca6f 14944 "proxyto" : "node",
7aacca6f
DM
14945 "returns" : {
14946 "properties" : {
14947 "hasFeature" : {
14948 "type" : "boolean"
14949 }
14950 },
14951 "type" : "object"
14952 }
56122987
DM
14953 }
14954 },
7aacca6f 14955 "leaf" : 1,
44660702
DM
14956 "path" : "/nodes/{node}/lxc/{vmid}/feature",
14957 "text" : "feature"
56122987
DM
14958 },
14959 {
56122987
DM
14960 "info" : {
14961 "POST" : {
44660702
DM
14962 "description" : "Create a Template.",
14963 "method" : "POST",
56122987 14964 "name" : "template",
56122987
DM
14965 "parameters" : {
14966 "additionalProperties" : 0,
14967 "properties" : {
44660702
DM
14968 "experimental" : {
14969 "default" : 0,
14970 "description" : "The template feature is experimental, set this flag if you know what you are doing.",
14971 "type" : "boolean"
7aacca6f
DM
14972 },
14973 "node" : {
7aacca6f 14974 "description" : "The cluster node name.",
44660702 14975 "format" : "pve-node",
7aacca6f 14976 "type" : "string"
56122987 14977 },
44660702
DM
14978 "vmid" : {
14979 "description" : "The (unique) ID of the VM.",
14980 "format" : "pve-vmid",
14981 "minimum" : 1,
14982 "type" : "integer"
56122987
DM
14983 }
14984 }
14985 },
56122987 14986 "permissions" : {
56122987
DM
14987 "check" : [
14988 "perm",
14989 "/vms/{vmid}",
14990 [
14991 "VM.Allocate"
14992 ]
44660702
DM
14993 ],
14994 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
7aacca6f 14995 },
44660702 14996 "protected" : 1,
7aacca6f
DM
14997 "proxyto" : "node",
14998 "returns" : {
14999 "type" : "null"
56122987
DM
15000 }
15001 }
15002 },
44660702 15003 "leaf" : 1,
7aacca6f 15004 "path" : "/nodes/{node}/lxc/{vmid}/template",
44660702 15005 "text" : "template"
56122987
DM
15006 },
15007 {
56122987
DM
15008 "info" : {
15009 "POST" : {
44660702
DM
15010 "description" : "Create a container clone/copy",
15011 "method" : "POST",
56122987 15012 "name" : "clone_vm",
7aacca6f
DM
15013 "parameters" : {
15014 "additionalProperties" : 0,
15015 "properties" : {
44660702
DM
15016 "description" : {
15017 "description" : "Description for the new CT.",
7aacca6f 15018 "optional" : 1,
44660702 15019 "type" : "string"
7aacca6f
DM
15020 },
15021 "experimental" : {
7aacca6f 15022 "default" : 0,
44660702
DM
15023 "description" : "The clone feature is experimental, set this flag if you know what you are doing.",
15024 "type" : "boolean"
7aacca6f 15025 },
44660702
DM
15026 "full" : {
15027 "default" : 0,
15028 "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 15029 "optional" : 1,
44660702 15030 "type" : "boolean"
7aacca6f
DM
15031 },
15032 "hostname" : {
44660702 15033 "description" : "Set a hostname for the new CT.",
7aacca6f 15034 "format" : "dns-name",
7aacca6f 15035 "optional" : 1,
44660702 15036 "type" : "string"
7aacca6f 15037 },
44660702
DM
15038 "newid" : {
15039 "description" : "VMID for the clone.",
7aacca6f 15040 "format" : "pve-vmid",
44660702 15041 "minimum" : 1,
7aacca6f
DM
15042 "type" : "integer"
15043 },
15044 "node" : {
15045 "description" : "The cluster node name.",
44660702
DM
15046 "format" : "pve-node",
15047 "type" : "string"
15048 },
15049 "pool" : {
15050 "description" : "Add the new CT to the specified pool.",
15051 "format" : "pve-poolid",
15052 "optional" : 1,
15053 "type" : "string"
7aacca6f
DM
15054 },
15055 "snapname" : {
44660702 15056 "description" : "The name of the snapshot.",
7aacca6f
DM
15057 "format" : "pve-configid",
15058 "maxLength" : 40,
7aacca6f 15059 "optional" : 1,
44660702 15060 "type" : "string"
7aacca6f
DM
15061 },
15062 "storage" : {
44660702 15063 "description" : "Target storage for full clone.",
7aacca6f
DM
15064 "format" : "pve-storage-id",
15065 "optional" : 1,
7aacca6f 15066 "requires" : "full",
44660702
DM
15067 "type" : "string"
15068 },
15069 "vmid" : {
15070 "description" : "The (unique) ID of the VM.",
15071 "format" : "pve-vmid",
15072 "minimum" : 1,
15073 "type" : "integer"
7aacca6f
DM
15074 }
15075 }
56122987
DM
15076 },
15077 "permissions" : {
56122987
DM
15078 "check" : [
15079 "and",
15080 [
15081 "perm",
15082 "/vms/{vmid}",
15083 [
15084 "VM.Clone"
15085 ]
15086 ],
15087 [
15088 "or",
15089 [
15090 "perm",
15091 "/vms/{newid}",
15092 [
15093 "VM.Allocate"
15094 ]
15095 ],
15096 [
15097 "perm",
15098 "/pool/{pool}",
15099 [
15100 "VM.Allocate"
15101 ],
15102 "require_param",
15103 "pool"
15104 ]
15105 ]
7aacca6f
DM
15106 ],
15107 "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 15108 },
44660702 15109 "protected" : 1,
56122987 15110 "proxyto" : "node",
7aacca6f
DM
15111 "returns" : {
15112 "type" : "string"
56122987
DM
15113 }
15114 }
44660702
DM
15115 },
15116 "leaf" : 1,
15117 "path" : "/nodes/{node}/lxc/{vmid}/clone",
15118 "text" : "clone"
56122987
DM
15119 },
15120 {
56122987
DM
15121 "info" : {
15122 "PUT" : {
44660702
DM
15123 "description" : "Resize a container mountpoint.",
15124 "method" : "PUT",
15125 "name" : "resize_vm",
56122987 15126 "parameters" : {
44660702 15127 "additionalProperties" : 0,
56122987 15128 "properties" : {
44660702
DM
15129 "digest" : {
15130 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
15131 "maxLength" : 40,
15132 "optional" : 1,
15133 "type" : "string"
56122987
DM
15134 },
15135 "disk" : {
7aacca6f 15136 "description" : "The disk you want to resize.",
56122987
DM
15137 "enum" : [
15138 "rootfs",
15139 "mp0",
15140 "mp1",
15141 "mp2",
15142 "mp3",
15143 "mp4",
15144 "mp5",
15145 "mp6",
15146 "mp7",
15147 "mp8",
15148 "mp9"
15149 ],
7aacca6f
DM
15150 "type" : "string"
15151 },
44660702
DM
15152 "node" : {
15153 "description" : "The cluster node name.",
15154 "format" : "pve-node",
15155 "type" : "string"
15156 },
15157 "size" : {
15158 "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.",
15159 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
15160 "type" : "string"
15161 },
15162 "vmid" : {
15163 "description" : "The (unique) ID of the VM.",
15164 "format" : "pve-vmid",
15165 "minimum" : 1,
15166 "type" : "integer"
56122987 15167 }
44660702 15168 }
56122987 15169 },
7aacca6f
DM
15170 "permissions" : {
15171 "check" : [
15172 "perm",
15173 "/vms/{vmid}",
15174 [
15175 "VM.Config.Disk"
15176 ],
15177 "any",
15178 1
15179 ]
15180 },
44660702 15181 "protected" : 1,
7aacca6f
DM
15182 "proxyto" : "node",
15183 "returns" : {
15184 "description" : "the task ID.",
15185 "type" : "string"
15186 }
56122987
DM
15187 }
15188 },
44660702 15189 "leaf" : 1,
7aacca6f 15190 "path" : "/nodes/{node}/lxc/{vmid}/resize",
44660702 15191 "text" : "resize"
56122987
DM
15192 }
15193 ],
15194 "info" : {
15195 "DELETE" : {
7aacca6f 15196 "description" : "Destroy the container (also delete all uses files).",
44660702
DM
15197 "method" : "DELETE",
15198 "name" : "destroy_vm",
15199 "parameters" : {
15200 "additionalProperties" : 0,
15201 "properties" : {
15202 "node" : {
15203 "description" : "The cluster node name.",
15204 "format" : "pve-node",
15205 "type" : "string"
15206 },
15207 "vmid" : {
15208 "description" : "The (unique) ID of the VM.",
15209 "format" : "pve-vmid",
15210 "minimum" : 1,
15211 "type" : "integer"
15212 }
15213 }
15214 },
7aacca6f
DM
15215 "permissions" : {
15216 "check" : [
15217 "perm",
15218 "/vms/{vmid}",
15219 [
15220 "VM.Allocate"
15221 ]
15222 ]
15223 },
44660702
DM
15224 "protected" : 1,
15225 "proxyto" : "node",
56122987
DM
15226 "returns" : {
15227 "type" : "string"
44660702 15228 }
56122987
DM
15229 },
15230 "GET" : {
7aacca6f 15231 "description" : "Directory index",
44660702 15232 "method" : "GET",
7aacca6f 15233 "name" : "vmdiridx",
56122987 15234 "parameters" : {
7aacca6f 15235 "additionalProperties" : 0,
56122987
DM
15236 "properties" : {
15237 "node" : {
7aacca6f 15238 "description" : "The cluster node name.",
44660702
DM
15239 "format" : "pve-node",
15240 "type" : "string"
56122987
DM
15241 },
15242 "vmid" : {
15243 "description" : "The (unique) ID of the VM.",
56122987 15244 "format" : "pve-vmid",
44660702
DM
15245 "minimum" : 1,
15246 "type" : "integer"
56122987 15247 }
7aacca6f 15248 }
56122987 15249 },
56122987
DM
15250 "permissions" : {
15251 "user" : "all"
44660702
DM
15252 },
15253 "proxyto" : "node",
15254 "returns" : {
15255 "items" : {
15256 "properties" : {
15257 "subdir" : {
15258 "type" : "string"
15259 }
15260 },
15261 "type" : "object"
15262 },
15263 "links" : [
15264 {
15265 "href" : "{subdir}",
15266 "rel" : "child"
15267 }
15268 ],
15269 "type" : "array"
56122987
DM
15270 }
15271 }
44660702
DM
15272 },
15273 "leaf" : 0,
15274 "path" : "/nodes/{node}/lxc/{vmid}",
15275 "text" : "{vmid}"
56122987
DM
15276 }
15277 ],
56122987 15278 "info" : {
44660702
DM
15279 "GET" : {
15280 "description" : "LXC container index (per node).",
15281 "method" : "GET",
15282 "name" : "vmlist",
15283 "parameters" : {
15284 "additionalProperties" : 0,
15285 "properties" : {
15286 "node" : {
15287 "description" : "The cluster node name.",
15288 "format" : "pve-node",
15289 "type" : "string"
15290 }
15291 }
15292 },
15293 "permissions" : {
15294 "description" : "Only list CTs where you have VM.Audit permissons on /vms/<vmid>.",
15295 "user" : "all"
15296 },
15297 "protected" : 1,
15298 "proxyto" : "node",
15299 "returns" : {
15300 "items" : {
15301 "properties" : {},
15302 "type" : "object"
15303 },
15304 "links" : [
15305 {
15306 "href" : "{vmid}",
15307 "rel" : "child"
15308 }
15309 ],
15310 "type" : "array"
15311 }
15312 },
56122987 15313 "POST" : {
44660702 15314 "description" : "Create or restore a container.",
7aacca6f
DM
15315 "method" : "POST",
15316 "name" : "create_vm",
56122987 15317 "parameters" : {
7aacca6f 15318 "additionalProperties" : 0,
56122987 15319 "properties" : {
44660702
DM
15320 "arch" : {
15321 "default" : "amd64",
15322 "description" : "OS architecture type.",
15323 "enum" : [
15324 "amd64",
15325 "i386"
15326 ],
7aacca6f 15327 "optional" : 1,
44660702 15328 "type" : "string"
7aacca6f 15329 },
44660702
DM
15330 "cmode" : {
15331 "default" : "tty",
15332 "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).",
15333 "enum" : [
15334 "shell",
15335 "console",
15336 "tty"
15337 ],
7aacca6f 15338 "optional" : 1,
44660702 15339 "type" : "string"
7aacca6f
DM
15340 },
15341 "console" : {
7aacca6f 15342 "default" : 1,
44660702 15343 "description" : "Attach a console device (/dev/console) to the container.",
56122987 15344 "optional" : 1,
7aacca6f 15345 "type" : "boolean"
56122987 15346 },
44660702
DM
15347 "cpulimit" : {
15348 "default" : 0,
15349 "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.",
15350 "maximum" : 128,
15351 "minimum" : 0,
56122987 15352 "optional" : 1,
44660702 15353 "type" : "number"
56122987 15354 },
44660702
DM
15355 "cpuunits" : {
15356 "default" : 1024,
15357 "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.",
15358 "maximum" : 500000,
15359 "minimum" : 0,
56122987 15360 "optional" : 1,
44660702 15361 "type" : "integer"
7aacca6f
DM
15362 },
15363 "description" : {
44660702 15364 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 15365 "optional" : 1,
44660702 15366 "type" : "string"
7aacca6f 15367 },
44660702
DM
15368 "force" : {
15369 "description" : "Allow to overwrite existing container.",
7aacca6f 15370 "optional" : 1,
44660702
DM
15371 "type" : "boolean"
15372 },
15373 "hostname" : {
15374 "description" : "Set a host name for the container.",
15375 "format" : "dns-name",
15376 "maxLength" : 255,
15377 "optional" : 1,
15378 "type" : "string"
15379 },
15380 "ignore-unpack-errors" : {
15381 "description" : "Ignore errors when extracting the template.",
15382 "optional" : 1,
15383 "type" : "boolean"
15384 },
15385 "lock" : {
15386 "description" : "Lock/unlock the VM.",
7aacca6f
DM
15387 "enum" : [
15388 "migrate",
15389 "backup",
15390 "snapshot",
15391 "rollback"
15392 ],
44660702
DM
15393 "optional" : 1,
15394 "type" : "string"
7aacca6f 15395 },
44660702
DM
15396 "memory" : {
15397 "default" : 512,
15398 "description" : "Amount of RAM for the VM in MB.",
15399 "minimum" : 16,
7aacca6f 15400 "optional" : 1,
44660702
DM
15401 "type" : "integer"
15402 },
15403 "mp[n]" : {
15404 "description" : "Use volume as container mount point (experimental feature).",
56122987 15405 "format" : {
7aacca6f
DM
15406 "acl" : {
15407 "description" : "Explicitly enable or disable ACL support.",
15408 "optional" : 1,
44660702 15409 "type" : "boolean"
56122987
DM
15410 },
15411 "backup" : {
56122987 15412 "description" : "Whether to include the mountpoint in backups.",
44660702
DM
15413 "optional" : 1,
15414 "type" : "boolean"
15415 },
15416 "mp" : {
15417 "description" : "Path to the mountpoint as seen from inside the container.",
15418 "format" : "pve-lxc-mp-string",
15419 "format_description" : "Path",
15420 "type" : "string"
15421 },
15422 "quota" : {
15423 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15424 "optional" : 1,
44660702
DM
15425 "type" : "boolean"
15426 },
15427 "ro" : {
15428 "description" : "Read-only mountpoint (not supported with bind mounts)",
44660702
DM
15429 "optional" : 1,
15430 "type" : "boolean"
7aacca6f
DM
15431 },
15432 "size" : {
44660702 15433 "description" : "Volume size (read only value).",
7aacca6f
DM
15434 "format" : "disk-size",
15435 "format_description" : "DiskSize",
7aacca6f
DM
15436 "optional" : 1,
15437 "type" : "string"
56122987
DM
15438 },
15439 "volume" : {
7aacca6f 15440 "default_key" : 1,
44660702 15441 "description" : "Volume, device or directory to mount into the container.",
56122987 15442 "format" : "pve-lxc-mp-string",
56122987 15443 "format_description" : "volume",
44660702 15444 "type" : "string"
56122987 15445 }
44660702 15446 },
56122987 15447 "optional" : 1,
7aacca6f 15448 "type" : "string"
56122987 15449 },
44660702
DM
15450 "nameserver" : {
15451 "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.",
15452 "format" : "address-list",
56122987 15453 "optional" : 1,
44660702 15454 "type" : "string"
56122987 15455 },
44660702
DM
15456 "net[n]" : {
15457 "description" : "Specifies network interfaces for the container.",
7aacca6f 15458 "format" : {
44660702
DM
15459 "bridge" : {
15460 "description" : "Bridge to attach the network device to.",
f004f5b9 15461 "format_description" : "bridge",
7aacca6f 15462 "optional" : 1,
44660702
DM
15463 "pattern" : "[-_.\\w\\d]+",
15464 "type" : "string"
7aacca6f 15465 },
44660702
DM
15466 "firewall" : {
15467 "description" : "Controls whether this interface's firewall rules should be used.",
7aacca6f 15468 "optional" : 1,
44660702 15469 "type" : "boolean"
7aacca6f 15470 },
44660702
DM
15471 "gw" : {
15472 "description" : "Default gateway for IPv4 traffic.",
15473 "format" : "ipv4",
15474 "format_description" : "GatewayIPv4",
7aacca6f 15475 "optional" : 1,
44660702 15476 "type" : "string"
7aacca6f 15477 },
44660702
DM
15478 "gw6" : {
15479 "description" : "Default gateway for IPv6 traffic.",
15480 "format" : "ipv6",
15481 "format_description" : "GatewayIPv6",
15482 "optional" : 1,
15483 "type" : "string"
7aacca6f 15484 },
44660702 15485 "hwaddr" : {
f004f5b9
DM
15486 "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)",
15487 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
15488 "optional" : 1,
15489 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
7aacca6f
DM
15490 "type" : "string"
15491 },
44660702
DM
15492 "ip" : {
15493 "description" : "IPv4 address in CIDR format.",
15494 "format" : "pve-ipv4-config",
15495 "format_description" : "IPv4Format/CIDR",
7aacca6f 15496 "optional" : 1,
44660702 15497 "type" : "string"
7aacca6f 15498 },
44660702
DM
15499 "ip6" : {
15500 "description" : "IPv6 address in CIDR format.",
15501 "format" : "pve-ipv6-config",
15502 "format_description" : "IPv6Format/CIDR",
15503 "optional" : 1,
15504 "type" : "string"
15505 },
15506 "mtu" : {
15507 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702
DM
15508 "minimum" : 64,
15509 "optional" : 1,
15510 "type" : "integer"
15511 },
15512 "name" : {
15513 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 15514 "format_description" : "string",
44660702
DM
15515 "pattern" : "[-_.\\w\\d]+",
15516 "type" : "string"
15517 },
15518 "rate" : {
15519 "description" : "Apply rate limiting to the interface",
15520 "format_description" : "mbps",
15521 "optional" : 1,
15522 "type" : "number"
15523 },
15524 "tag" : {
15525 "description" : "VLAN tag for this interface.",
44660702
DM
15526 "maximum" : "4094",
15527 "minimum" : "2",
15528 "optional" : 1,
15529 "type" : "integer"
15530 },
15531 "trunks" : {
15532 "description" : "VLAN ids to pass through the interface",
15533 "format_description" : "vlanid[;vlanid...]",
15534 "optional" : 1,
15535 "pattern" : "(?^:\\d+(?:;\\d+)*)",
15536 "type" : "string"
15537 },
15538 "type" : {
15539 "description" : "Network interface type.",
15540 "enum" : [
15541 "veth"
15542 ],
15543 "optional" : 1,
15544 "type" : "string"
7aacca6f
DM
15545 }
15546 },
56122987 15547 "optional" : 1,
44660702 15548 "type" : "string"
56122987 15549 },
44660702
DM
15550 "node" : {
15551 "description" : "The cluster node name.",
15552 "format" : "pve-node",
15553 "type" : "string"
56122987 15554 },
44660702
DM
15555 "onboot" : {
15556 "default" : 0,
15557 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 15558 "optional" : 1,
44660702
DM
15559 "type" : "boolean"
15560 },
15561 "ostemplate" : {
15562 "description" : "The OS template or backup file.",
15563 "maxLength" : 255,
15564 "type" : "string"
56122987
DM
15565 },
15566 "ostype" : {
7aacca6f 15567 "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
15568 "enum" : [
15569 "debian",
15570 "ubuntu",
15571 "centos",
15572 "fedora",
15573 "opensuse",
15574 "archlinux",
15575 "alpine",
15576 "unmanaged"
44660702 15577 ],
56122987 15578 "optional" : 1,
7aacca6f 15579 "type" : "string"
56122987 15580 },
44660702
DM
15581 "password" : {
15582 "description" : "Sets root password inside container.",
15583 "minLength" : 5,
7aacca6f
DM
15584 "optional" : 1,
15585 "type" : "string"
15586 },
44660702
DM
15587 "pool" : {
15588 "description" : "Add the VM to the specified pool.",
15589 "format" : "pve-poolid",
7aacca6f 15590 "optional" : 1,
44660702 15591 "type" : "string"
7aacca6f 15592 },
44660702
DM
15593 "protection" : {
15594 "default" : 0,
15595 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
7aacca6f 15596 "optional" : 1,
44660702 15597 "type" : "boolean"
7aacca6f 15598 },
44660702
DM
15599 "restore" : {
15600 "description" : "Mark this as restore task.",
15601 "optional" : 1,
15602 "type" : "boolean"
7aacca6f 15603 },
44660702
DM
15604 "rootfs" : {
15605 "description" : "Use volume as container root.",
56122987 15606 "format" : {
44660702
DM
15607 "acl" : {
15608 "description" : "Explicitly enable or disable ACL support.",
56122987 15609 "optional" : 1,
44660702 15610 "type" : "boolean"
56122987 15611 },
44660702
DM
15612 "backup" : {
15613 "description" : "Whether to include the mountpoint in backups.",
56122987
DM
15614 "optional" : 1,
15615 "type" : "boolean"
15616 },
44660702
DM
15617 "quota" : {
15618 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15619 "optional" : 1,
44660702 15620 "type" : "boolean"
7aacca6f 15621 },
44660702
DM
15622 "ro" : {
15623 "description" : "Read-only mountpoint (not supported with bind mounts)",
7aacca6f 15624 "optional" : 1,
44660702 15625 "type" : "boolean"
7aacca6f 15626 },
44660702
DM
15627 "size" : {
15628 "description" : "Volume size (read only value).",
15629 "format" : "disk-size",
15630 "format_description" : "DiskSize",
7aacca6f
DM
15631 "optional" : 1,
15632 "type" : "string"
15633 },
44660702
DM
15634 "volume" : {
15635 "default_key" : 1,
15636 "description" : "Volume, device or directory to mount into the container.",
15637 "format" : "pve-lxc-mp-string",
15638 "format_description" : "volume",
15639 "type" : "string"
56122987 15640 }
7aacca6f 15641 },
7aacca6f
DM
15642 "optional" : 1,
15643 "type" : "string"
44660702
DM
15644 },
15645 "searchdomain" : {
15646 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
15647 "format" : "dns-name-list",
15648 "optional" : 1,
15649 "type" : "string"
15650 },
15651 "ssh-public-keys" : {
15652 "description" : "Setup public SSH keys (one key per line, OpenSSH format).",
15653 "optional" : 1,
15654 "type" : "string"
15655 },
15656 "startup" : {
15657 "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.",
15658 "format" : "pve-startup-order",
15659 "optional" : 1,
7aacca6f 15660 "type" : "string",
44660702 15661 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 15662 },
44660702
DM
15663 "storage" : {
15664 "default" : "local",
15665 "description" : "Default Storage.",
15666 "format" : "pve-storage-id",
15667 "optional" : 1,
7aacca6f 15668 "type" : "string"
7aacca6f 15669 },
44660702
DM
15670 "swap" : {
15671 "default" : 512,
15672 "description" : "Amount of SWAP for the VM in MB.",
15673 "minimum" : 0,
15674 "optional" : 1,
15675 "type" : "integer"
15676 },
15677 "template" : {
15678 "default" : 0,
15679 "description" : "Enable/disable Template.",
15680 "optional" : 1,
15681 "type" : "boolean"
7aacca6f 15682 },
44660702
DM
15683 "tty" : {
15684 "default" : 2,
15685 "description" : "Specify the number of tty available to the container",
15686 "maximum" : 6,
15687 "minimum" : 0,
15688 "optional" : 1,
15689 "type" : "integer"
7aacca6f 15690 },
44660702
DM
15691 "unprivileged" : {
15692 "default" : 0,
15693 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
15694 "optional" : 1,
15695 "type" : "boolean"
15696 },
15697 "unused[n]" : {
15698 "description" : "Reference to unused volumes.",
15699 "format" : "pve-volume-id",
15700 "optional" : 1,
15701 "type" : "string"
15702 },
15703 "vmid" : {
15704 "description" : "The (unique) ID of the VM.",
15705 "format" : "pve-vmid",
15706 "minimum" : 1,
15707 "type" : "integer"
15708 }
7aacca6f
DM
15709 }
15710 },
44660702
DM
15711 "permissions" : {
15712 "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.",
15713 "user" : "all"
15714 },
15715 "protected" : 1,
15716 "proxyto" : "node",
15717 "returns" : {
15718 "type" : "string"
15719 }
15720 }
15721 },
15722 "leaf" : 0,
15723 "path" : "/nodes/{node}/lxc",
15724 "text" : "lxc"
15725 },
15726 {
15727 "children" : [
15728 {
56122987
DM
15729 "children" : [
15730 {
7aacca6f
DM
15731 "children" : [
15732 {
7aacca6f
DM
15733 "info" : {
15734 "POST" : {
44660702
DM
15735 "description" : "ceph osd in",
15736 "method" : "POST",
15737 "name" : "in",
15738 "parameters" : {
15739 "additionalProperties" : 0,
15740 "properties" : {
15741 "node" : {
15742 "description" : "The cluster node name.",
15743 "format" : "pve-node",
15744 "type" : "string"
15745 },
15746 "osdid" : {
15747 "description" : "OSD ID",
15748 "type" : "integer"
15749 }
15750 }
15751 },
56122987
DM
15752 "permissions" : {
15753 "check" : [
15754 "perm",
15755 "/",
15756 [
15757 "Sys.Modify"
15758 ]
15759 ]
7aacca6f 15760 },
44660702 15761 "protected" : 1,
7aacca6f
DM
15762 "proxyto" : "node",
15763 "returns" : {
15764 "type" : "null"
44660702 15765 }
56122987
DM
15766 }
15767 },
44660702 15768 "leaf" : 1,
7aacca6f 15769 "path" : "/nodes/{node}/ceph/osd/{osdid}/in",
44660702 15770 "text" : "in"
56122987
DM
15771 },
15772 {
56122987
DM
15773 "info" : {
15774 "POST" : {
44660702
DM
15775 "description" : "ceph osd out",
15776 "method" : "POST",
15777 "name" : "out",
15778 "parameters" : {
15779 "additionalProperties" : 0,
15780 "properties" : {
15781 "node" : {
15782 "description" : "The cluster node name.",
15783 "format" : "pve-node",
15784 "type" : "string"
15785 },
15786 "osdid" : {
15787 "description" : "OSD ID",
15788 "type" : "integer"
15789 }
15790 }
15791 },
56122987
DM
15792 "permissions" : {
15793 "check" : [
15794 "perm",
15795 "/",
15796 [
15797 "Sys.Modify"
15798 ]
15799 ]
15800 },
44660702 15801 "protected" : 1,
56122987 15802 "proxyto" : "node",
7aacca6f
DM
15803 "returns" : {
15804 "type" : "null"
44660702
DM
15805 }
15806 }
15807 },
15808 "leaf" : 1,
15809 "path" : "/nodes/{node}/ceph/osd/{osdid}/out",
15810 "text" : "out"
15811 }
15812 ],
15813 "info" : {
15814 "DELETE" : {
15815 "description" : "Destroy OSD",
15816 "method" : "DELETE",
15817 "name" : "destroyosd",
15818 "parameters" : {
15819 "additionalProperties" : 0,
15820 "properties" : {
15821 "cleanup" : {
15822 "default" : 0,
15823 "description" : "If set, we remove partition table entries.",
15824 "optional" : 1,
15825 "type" : "boolean"
7aacca6f 15826 },
44660702
DM
15827 "node" : {
15828 "description" : "The cluster node name.",
15829 "format" : "pve-node",
15830 "type" : "string"
56122987 15831 },
44660702
DM
15832 "osdid" : {
15833 "description" : "OSD ID",
15834 "type" : "integer"
15835 }
56122987
DM
15836 }
15837 },
44660702
DM
15838 "protected" : 1,
15839 "proxyto" : "node",
15840 "returns" : {
15841 "type" : "string"
15842 }
15843 }
15844 },
15845 "leaf" : 0,
15846 "path" : "/nodes/{node}/ceph/osd/{osdid}",
15847 "text" : "{osdid}"
15848 }
15849 ],
15850 "info" : {
15851 "GET" : {
15852 "description" : "Get Ceph osd list/tree.",
15853 "method" : "GET",
15854 "name" : "index",
15855 "parameters" : {
15856 "additionalProperties" : 0,
15857 "properties" : {
15858 "node" : {
15859 "description" : "The cluster node name.",
15860 "format" : "pve-node",
15861 "type" : "string"
15862 }
15863 }
15864 },
15865 "permissions" : {
15866 "check" : [
15867 "perm",
15868 "/",
15869 [
15870 "Sys.Audit",
15871 "Datastore.Audit"
15872 ],
15873 "any",
15874 1
15875 ]
15876 },
15877 "protected" : 1,
15878 "proxyto" : "node",
15879 "returns" : {
15880 "type" : "object"
15881 }
15882 },
15883 "POST" : {
15884 "description" : "Create OSD",
15885 "method" : "POST",
15886 "name" : "createosd",
15887 "parameters" : {
15888 "additionalProperties" : 0,
15889 "properties" : {
15890 "dev" : {
15891 "description" : "Block device name.",
15892 "type" : "string"
15893 },
15894 "fstype" : {
15895 "default" : "xfs",
15896 "description" : "File system type.",
15897 "enum" : [
15898 "xfs",
15899 "ext4",
15900 "btrfs"
15901 ],
15902 "optional" : 1,
15903 "type" : "string"
15904 },
15905 "journal_dev" : {
15906 "description" : "Block device name for journal.",
15907 "optional" : 1,
15908 "type" : "string"
15909 },
15910 "node" : {
15911 "description" : "The cluster node name.",
15912 "format" : "pve-node",
15913 "type" : "string"
15914 }
56122987 15915 }
44660702
DM
15916 },
15917 "protected" : 1,
15918 "proxyto" : "node",
15919 "returns" : {
15920 "type" : "string"
15921 }
56122987 15922 }
44660702 15923 },
7aacca6f 15924 "leaf" : 0,
44660702
DM
15925 "path" : "/nodes/{node}/ceph/osd",
15926 "text" : "osd"
7aacca6f
DM
15927 },
15928 {
56122987
DM
15929 "info" : {
15930 "GET" : {
7aacca6f 15931 "description" : "List local disks.",
44660702
DM
15932 "method" : "GET",
15933 "name" : "disks",
15934 "parameters" : {
15935 "additionalProperties" : 0,
15936 "properties" : {
15937 "node" : {
15938 "description" : "The cluster node name.",
15939 "format" : "pve-node",
15940 "type" : "string"
15941 },
15942 "type" : {
15943 "description" : "Only list specific types of disks.",
15944 "enum" : [
15945 "unused",
15946 "journal_disks"
15947 ],
15948 "optional" : 1,
15949 "type" : "string"
15950 }
15951 }
15952 },
56122987
DM
15953 "permissions" : {
15954 "check" : [
15955 "perm",
15956 "/",
15957 [
15958 "Sys.Audit",
15959 "Datastore.Audit"
15960 ],
15961 "any",
15962 1
15963 ]
7aacca6f 15964 },
44660702
DM
15965 "protected" : 1,
15966 "proxyto" : "node",
56122987 15967 "returns" : {
7aacca6f
DM
15968 "items" : {
15969 "properties" : {
44660702
DM
15970 "dev" : {
15971 "type" : "string"
15972 },
15973 "gpt" : {
15974 "type" : "boolean"
15975 },
15976 "model" : {
15977 "optional" : 1,
15978 "type" : "string"
7aacca6f
DM
15979 },
15980 "osdid" : {
15981 "type" : "integer"
15982 },
15983 "serial" : {
7aacca6f
DM
15984 "optional" : 1,
15985 "type" : "string"
15986 },
15987 "size" : {
15988 "type" : "integer"
15989 },
44660702
DM
15990 "used" : {
15991 "optional" : 1,
7aacca6f
DM
15992 "type" : "string"
15993 },
44660702
DM
15994 "vendor" : {
15995 "optional" : 1,
15996 "type" : "string"
7aacca6f
DM
15997 }
15998 },
15999 "type" : "object"
44660702
DM
16000 },
16001 "type" : "array"
16002 }
56122987 16003 }
44660702
DM
16004 },
16005 "leaf" : 1,
16006 "path" : "/nodes/{node}/ceph/disks",
16007 "text" : "disks"
56122987
DM
16008 },
16009 {
56122987
DM
16010 "info" : {
16011 "GET" : {
7aacca6f 16012 "description" : "Get Ceph configuration.",
44660702
DM
16013 "method" : "GET",
16014 "name" : "config",
56122987 16015 "parameters" : {
7aacca6f 16016 "additionalProperties" : 0,
56122987 16017 "properties" : {
56122987 16018 "node" : {
7aacca6f 16019 "description" : "The cluster node name.",
44660702 16020 "format" : "pve-node",
56122987
DM
16021 "type" : "string"
16022 }
7aacca6f 16023 }
56122987 16024 },
56122987
DM
16025 "permissions" : {
16026 "check" : [
16027 "perm",
16028 "/",
16029 [
16030 "Sys.Audit",
16031 "Datastore.Audit"
16032 ],
16033 "any",
16034 1
16035 ]
44660702
DM
16036 },
16037 "returns" : {
16038 "type" : "string"
7aacca6f
DM
16039 }
16040 }
44660702
DM
16041 },
16042 "leaf" : 1,
16043 "path" : "/nodes/{node}/ceph/config",
16044 "text" : "config"
7aacca6f
DM
16045 },
16046 {
7aacca6f
DM
16047 "children" : [
16048 {
7aacca6f
DM
16049 "info" : {
16050 "DELETE" : {
7aacca6f 16051 "description" : "Destroy Ceph monitor.",
44660702
DM
16052 "method" : "DELETE",
16053 "name" : "destroymon",
16054 "parameters" : {
16055 "additionalProperties" : 0,
16056 "properties" : {
16057 "monid" : {
16058 "description" : "Monitor ID",
16059 "type" : "integer"
16060 },
16061 "node" : {
16062 "description" : "The cluster node name.",
16063 "format" : "pve-node",
16064 "type" : "string"
16065 }
16066 }
16067 },
7aacca6f
DM
16068 "permissions" : {
16069 "check" : [
16070 "perm",
16071 "/",
16072 [
16073 "Sys.Modify"
16074 ]
16075 ]
16076 },
44660702
DM
16077 "protected" : 1,
16078 "proxyto" : "node",
7aacca6f
DM
16079 "returns" : {
16080 "type" : "string"
44660702 16081 }
7aacca6f 16082 }
44660702
DM
16083 },
16084 "leaf" : 1,
16085 "path" : "/nodes/{node}/ceph/mon/{monid}",
16086 "text" : "{monid}"
7aacca6f
DM
16087 }
16088 ],
16089 "info" : {
16090 "GET" : {
44660702 16091 "description" : "Get Ceph monitor list.",
7aacca6f 16092 "method" : "GET",
44660702 16093 "name" : "listmon",
7aacca6f
DM
16094 "parameters" : {
16095 "additionalProperties" : 0,
16096 "properties" : {
16097 "node" : {
7aacca6f 16098 "description" : "The cluster node name.",
44660702
DM
16099 "format" : "pve-node",
16100 "type" : "string"
7aacca6f
DM
16101 }
16102 }
16103 },
44660702
DM
16104 "permissions" : {
16105 "check" : [
16106 "perm",
16107 "/",
16108 [
16109 "Sys.Audit",
16110 "Datastore.Audit"
16111 ],
16112 "any",
16113 1
16114 ]
16115 },
7aacca6f 16116 "protected" : 1,
44660702 16117 "proxyto" : "node",
7aacca6f
DM
16118 "returns" : {
16119 "items" : {
16120 "properties" : {
44660702 16121 "addr" : {
7aacca6f 16122 "type" : "string"
56122987 16123 },
44660702 16124 "name" : {
56122987
DM
16125 "type" : "string"
16126 }
7aacca6f
DM
16127 },
16128 "type" : "object"
56122987 16129 },
7aacca6f
DM
16130 "links" : [
16131 {
16132 "href" : "{name}",
16133 "rel" : "child"
16134 }
16135 ],
56122987 16136 "type" : "array"
44660702 16137 }
7aacca6f
DM
16138 },
16139 "POST" : {
44660702
DM
16140 "description" : "Create Ceph Monitor",
16141 "method" : "POST",
16142 "name" : "createmon",
16143 "parameters" : {
16144 "additionalProperties" : 0,
16145 "properties" : {
16146 "node" : {
16147 "description" : "The cluster node name.",
16148 "format" : "pve-node",
16149 "type" : "string"
16150 }
16151 }
16152 },
7aacca6f
DM
16153 "permissions" : {
16154 "check" : [
16155 "perm",
16156 "/",
16157 [
16158 "Sys.Modify"
16159 ]
16160 ]
16161 },
44660702 16162 "protected" : 1,
7aacca6f 16163 "proxyto" : "node",
56122987
DM
16164 "returns" : {
16165 "type" : "string"
44660702 16166 }
56122987 16167 }
44660702
DM
16168 },
16169 "leaf" : 0,
16170 "path" : "/nodes/{node}/ceph/mon",
16171 "text" : "mon"
56122987
DM
16172 },
16173 {
16174 "info" : {
16175 "POST" : {
44660702
DM
16176 "description" : "Create initial ceph default configuration and setup symlinks.",
16177 "method" : "POST",
16178 "name" : "init",
16179 "parameters" : {
16180 "additionalProperties" : 0,
16181 "properties" : {
16182 "network" : {
16183 "description" : "Use specific network for all ceph related traffic",
16184 "format" : "CIDR",
16185 "maxLength" : 128,
16186 "optional" : 1,
16187 "type" : "string"
16188 },
16189 "node" : {
16190 "description" : "The cluster node name.",
16191 "format" : "pve-node",
16192 "type" : "string"
16193 },
16194 "pg_bits" : {
16195 "default" : 6,
16196 "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.",
16197 "maximum" : 14,
16198 "minimum" : 6,
16199 "optional" : 1,
16200 "type" : "integer"
16201 },
16202 "size" : {
16203 "default" : 2,
16204 "description" : "Number of replicas per object",
16205 "maximum" : 3,
16206 "minimum" : 1,
16207 "optional" : 1,
16208 "type" : "integer"
16209 }
16210 }
7aacca6f 16211 },
56122987
DM
16212 "permissions" : {
16213 "check" : [
16214 "perm",
16215 "/",
16216 [
16217 "Sys.Modify"
16218 ]
16219 ]
16220 },
7aacca6f 16221 "protected" : 1,
44660702
DM
16222 "proxyto" : "node",
16223 "returns" : {
16224 "type" : "null"
7aacca6f
DM
16225 }
16226 }
16227 },
7aacca6f 16228 "leaf" : 1,
44660702
DM
16229 "path" : "/nodes/{node}/ceph/init",
16230 "text" : "init"
7aacca6f
DM
16231 },
16232 {
7aacca6f
DM
16233 "info" : {
16234 "POST" : {
44660702 16235 "description" : "Stop ceph services.",
7aacca6f
DM
16236 "method" : "POST",
16237 "name" : "stop",
16238 "parameters" : {
44660702 16239 "additionalProperties" : 0,
7aacca6f
DM
16240 "properties" : {
16241 "node" : {
7aacca6f 16242 "description" : "The cluster node name.",
44660702 16243 "format" : "pve-node",
56122987 16244 "type" : "string"
7aacca6f
DM
16245 },
16246 "service" : {
7aacca6f 16247 "description" : "Ceph service name.",
44660702
DM
16248 "optional" : 1,
16249 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
16250 "type" : "string"
56122987 16251 }
44660702 16252 }
7aacca6f
DM
16253 },
16254 "permissions" : {
16255 "check" : [
16256 "perm",
16257 "/",
16258 [
16259 "Sys.Modify"
16260 ]
16261 ]
16262 },
44660702
DM
16263 "protected" : 1,
16264 "proxyto" : "node",
16265 "returns" : {
16266 "type" : "string"
16267 }
7aacca6f 16268 }
44660702
DM
16269 },
16270 "leaf" : 1,
16271 "path" : "/nodes/{node}/ceph/stop",
16272 "text" : "stop"
7aacca6f
DM
16273 },
16274 {
7aacca6f
DM
16275 "info" : {
16276 "POST" : {
7aacca6f 16277 "description" : "Start ceph services.",
44660702 16278 "method" : "POST",
7aacca6f 16279 "name" : "start",
56122987
DM
16280 "parameters" : {
16281 "additionalProperties" : 0,
16282 "properties" : {
16283 "node" : {
7aacca6f 16284 "description" : "The cluster node name.",
44660702 16285 "format" : "pve-node",
7aacca6f
DM
16286 "type" : "string"
16287 },
16288 "service" : {
16289 "description" : "Ceph service name.",
44660702 16290 "optional" : 1,
7aacca6f 16291 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
44660702 16292 "type" : "string"
7aacca6f
DM
16293 }
16294 }
16295 },
44660702
DM
16296 "permissions" : {
16297 "check" : [
16298 "perm",
16299 "/",
16300 [
16301 "Sys.Modify"
16302 ]
16303 ]
16304 },
7aacca6f 16305 "protected" : 1,
44660702
DM
16306 "proxyto" : "node",
16307 "returns" : {
16308 "type" : "string"
16309 }
7aacca6f 16310 }
44660702
DM
16311 },
16312 "leaf" : 1,
16313 "path" : "/nodes/{node}/ceph/start",
16314 "text" : "start"
7aacca6f
DM
16315 },
16316 {
7aacca6f
DM
16317 "info" : {
16318 "GET" : {
44660702
DM
16319 "description" : "Get ceph status.",
16320 "method" : "GET",
16321 "name" : "status",
7aacca6f
DM
16322 "parameters" : {
16323 "additionalProperties" : 0,
16324 "properties" : {
16325 "node" : {
7aacca6f 16326 "description" : "The cluster node name.",
44660702 16327 "format" : "pve-node",
7aacca6f 16328 "type" : "string"
56122987
DM
16329 }
16330 }
16331 },
16332 "permissions" : {
16333 "check" : [
16334 "perm",
16335 "/",
16336 [
16337 "Sys.Audit",
16338 "Datastore.Audit"
16339 ],
16340 "any",
16341 1
16342 ]
16343 },
44660702
DM
16344 "protected" : 1,
16345 "proxyto" : "node",
56122987 16346 "returns" : {
7aacca6f
DM
16347 "type" : "object"
16348 }
16349 }
16350 },
44660702 16351 "leaf" : 1,
7aacca6f 16352 "path" : "/nodes/{node}/ceph/status",
44660702 16353 "text" : "status"
7aacca6f
DM
16354 },
16355 {
44660702
DM
16356 "children" : [
16357 {
16358 "info" : {
16359 "DELETE" : {
16360 "description" : "Destroy pool",
16361 "method" : "DELETE",
16362 "name" : "destroypool",
16363 "parameters" : {
16364 "additionalProperties" : 0,
16365 "properties" : {
16366 "name" : {
16367 "description" : "The name of the pool. It must be unique.",
16368 "type" : "string"
16369 },
16370 "node" : {
16371 "description" : "The cluster node name.",
16372 "format" : "pve-node",
16373 "type" : "string"
16374 }
16375 }
16376 },
16377 "permissions" : {
16378 "check" : [
16379 "perm",
16380 "/",
16381 [
16382 "Sys.Modify"
16383 ]
16384 ]
16385 },
16386 "protected" : 1,
16387 "proxyto" : "node",
16388 "returns" : {
16389 "type" : "null"
16390 }
16391 }
16392 },
16393 "leaf" : 1,
16394 "path" : "/nodes/{node}/ceph/pools/{name}",
16395 "text" : "{name}"
16396 }
16397 ],
7aacca6f
DM
16398 "info" : {
16399 "GET" : {
44660702
DM
16400 "description" : "List all pools.",
16401 "method" : "GET",
16402 "name" : "lspools",
7aacca6f
DM
16403 "parameters" : {
16404 "additionalProperties" : 0,
16405 "properties" : {
16406 "node" : {
7aacca6f 16407 "description" : "The cluster node name.",
44660702
DM
16408 "format" : "pve-node",
16409 "type" : "string"
7aacca6f
DM
16410 }
16411 }
16412 },
7aacca6f
DM
16413 "permissions" : {
16414 "check" : [
16415 "perm",
16416 "/",
16417 [
16418 "Sys.Audit",
16419 "Datastore.Audit"
16420 ],
16421 "any",
16422 1
16423 ]
16424 },
44660702
DM
16425 "protected" : 1,
16426 "proxyto" : "node",
7aacca6f 16427 "returns" : {
56122987 16428 "items" : {
56122987 16429 "properties" : {
7aacca6f
DM
16430 "pool" : {
16431 "type" : "integer"
16432 },
44660702
DM
16433 "pool_name" : {
16434 "type" : "string"
16435 },
7aacca6f
DM
16436 "size" : {
16437 "type" : "integer"
56122987 16438 }
44660702
DM
16439 },
16440 "type" : "object"
7aacca6f 16441 },
44660702
DM
16442 "links" : [
16443 {
16444 "href" : "{pool_name}",
16445 "rel" : "child"
16446 }
16447 ],
7aacca6f
DM
16448 "type" : "array"
16449 }
16450 },
16451 "POST" : {
7aacca6f 16452 "description" : "Create POOL",
7aacca6f 16453 "method" : "POST",
7aacca6f
DM
16454 "name" : "createpool",
16455 "parameters" : {
16456 "additionalProperties" : 0,
16457 "properties" : {
7aacca6f 16458 "crush_ruleset" : {
7aacca6f 16459 "default" : 0,
44660702 16460 "description" : "The ruleset to use for mapping object placement in the cluster.",
7aacca6f 16461 "maximum" : 32768,
44660702 16462 "minimum" : 0,
7aacca6f 16463 "optional" : 1,
44660702 16464 "type" : "integer"
56122987 16465 },
44660702
DM
16466 "min_size" : {
16467 "default" : 1,
16468 "description" : "Minimum number of replicas per object",
16469 "maximum" : 3,
16470 "minimum" : 1,
16471 "optional" : 1,
16472 "type" : "integer"
7aacca6f 16473 },
44660702
DM
16474 "name" : {
16475 "description" : "The name of the pool. It must be unique.",
16476 "type" : "string"
16477 },
16478 "node" : {
16479 "description" : "The cluster node name.",
16480 "format" : "pve-node",
16481 "type" : "string"
16482 },
16483 "pg_num" : {
16484 "default" : 64,
16485 "description" : "Number of placement groups.",
16486 "maximum" : 32768,
16487 "minimum" : 8,
16488 "optional" : 1,
16489 "type" : "integer"
16490 },
16491 "size" : {
16492 "default" : 2,
16493 "description" : "Number of replicas per object",
16494 "maximum" : 3,
16495 "minimum" : 1,
16496 "optional" : 1,
16497 "type" : "integer"
56122987
DM
16498 }
16499 }
44660702
DM
16500 },
16501 "permissions" : {
16502 "check" : [
16503 "perm",
16504 "/",
16505 [
16506 "Sys.Modify"
16507 ]
16508 ]
16509 },
16510 "protected" : 1,
16511 "proxyto" : "node",
16512 "returns" : {
16513 "type" : "null"
7aacca6f 16514 }
56122987 16515 }
44660702 16516 },
56122987 16517 "leaf" : 0,
44660702
DM
16518 "path" : "/nodes/{node}/ceph/pools",
16519 "text" : "pools"
56122987
DM
16520 },
16521 {
56122987 16522 "info" : {
7aacca6f 16523 "GET" : {
44660702
DM
16524 "description" : "Get OSD crush map",
16525 "method" : "GET",
16526 "name" : "crush",
16527 "parameters" : {
16528 "additionalProperties" : 0,
16529 "properties" : {
16530 "node" : {
16531 "description" : "The cluster node name.",
16532 "format" : "pve-node",
16533 "type" : "string"
16534 }
16535 }
16536 },
7aacca6f
DM
16537 "permissions" : {
16538 "check" : [
16539 "perm",
16540 "/",
16541 [
16542 "Sys.Audit",
16543 "Datastore.Audit"
16544 ],
16545 "any",
16546 1
16547 ]
16548 },
44660702 16549 "protected" : 1,
7aacca6f 16550 "proxyto" : "node",
56122987 16551 "returns" : {
7aacca6f 16552 "type" : "string"
44660702 16553 }
56122987
DM
16554 }
16555 },
44660702
DM
16556 "leaf" : 1,
16557 "path" : "/nodes/{node}/ceph/crush",
7aacca6f 16558 "text" : "crush"
56122987
DM
16559 },
16560 {
56122987 16561 "info" : {
7aacca6f 16562 "GET" : {
44660702
DM
16563 "description" : "Read ceph log",
16564 "method" : "GET",
16565 "name" : "log",
16566 "parameters" : {
16567 "additionalProperties" : 0,
16568 "properties" : {
16569 "limit" : {
16570 "minimum" : 0,
16571 "optional" : 1,
16572 "type" : "integer"
7aacca6f 16573 },
44660702
DM
16574 "node" : {
16575 "description" : "The cluster node name.",
16576 "format" : "pve-node",
16577 "type" : "string"
16578 },
16579 "start" : {
16580 "minimum" : 0,
16581 "optional" : 1,
16582 "type" : "integer"
16583 }
7aacca6f 16584 }
56122987 16585 },
56122987
DM
16586 "permissions" : {
16587 "check" : [
16588 "perm",
7aacca6f 16589 "/nodes/{node}",
56122987 16590 [
7aacca6f 16591 "Sys.Syslog"
56122987
DM
16592 ]
16593 ]
16594 },
7aacca6f 16595 "protected" : 1,
44660702
DM
16596 "proxyto" : "node",
16597 "returns" : {
16598 "items" : {
16599 "properties" : {
16600 "n" : {
16601 "description" : "Line number",
16602 "type" : "integer"
16603 },
16604 "t" : {
16605 "description" : "Line text",
16606 "type" : "string"
16607 }
56122987 16608 },
44660702 16609 "type" : "object"
56122987 16610 },
44660702 16611 "type" : "array"
7aacca6f 16612 }
56122987
DM
16613 }
16614 },
16615 "leaf" : 1,
44660702
DM
16616 "path" : "/nodes/{node}/ceph/log",
16617 "text" : "log"
7aacca6f
DM
16618 }
16619 ],
44660702
DM
16620 "info" : {
16621 "GET" : {
16622 "description" : "Directory index.",
16623 "method" : "GET",
16624 "name" : "index",
16625 "parameters" : {
16626 "additionalProperties" : 0,
16627 "properties" : {
16628 "node" : {
16629 "description" : "The cluster node name.",
16630 "format" : "pve-node",
16631 "type" : "string"
16632 }
16633 }
16634 },
16635 "permissions" : {
16636 "check" : [
16637 "perm",
16638 "/",
16639 [
16640 "Sys.Audit",
16641 "Datastore.Audit"
16642 ],
16643 "any",
16644 1
16645 ]
16646 },
16647 "returns" : {
16648 "items" : {
16649 "properties" : {},
16650 "type" : "object"
16651 },
16652 "links" : [
16653 {
16654 "href" : "{name}",
16655 "rel" : "child"
16656 }
16657 ],
16658 "type" : "array"
16659 }
16660 }
16661 },
7aacca6f 16662 "leaf" : 0,
44660702
DM
16663 "path" : "/nodes/{node}/ceph",
16664 "text" : "ceph"
7aacca6f
DM
16665 },
16666 {
7aacca6f
DM
16667 "info" : {
16668 "POST" : {
7aacca6f 16669 "description" : "Create backup.",
44660702 16670 "method" : "POST",
7aacca6f
DM
16671 "name" : "vzdump",
16672 "parameters" : {
44660702 16673 "additionalProperties" : 0,
7aacca6f 16674 "properties" : {
44660702
DM
16675 "all" : {
16676 "default" : 0,
16677 "description" : "Backup all known guest systems on this host.",
7aacca6f 16678 "optional" : 1,
44660702 16679 "type" : "boolean"
56122987 16680 },
44660702 16681 "bwlimit" : {
7aacca6f 16682 "default" : 0,
44660702
DM
16683 "description" : "Limit I/O bandwidth (KBytes per second).",
16684 "minimum" : 0,
7aacca6f 16685 "optional" : 1,
44660702 16686 "type" : "integer"
56122987 16687 },
44660702
DM
16688 "compress" : {
16689 "default" : "0",
16690 "description" : "Compress dump file.",
16691 "enum" : [
16692 "0",
16693 "1",
16694 "gzip",
16695 "lzo"
16696 ],
7aacca6f 16697 "optional" : 1,
44660702 16698 "type" : "string"
56122987 16699 },
44660702
DM
16700 "dumpdir" : {
16701 "description" : "Store resulting files to specified directory.",
7aacca6f 16702 "optional" : 1,
44660702 16703 "type" : "string"
7aacca6f 16704 },
44660702
DM
16705 "exclude" : {
16706 "description" : "Exclude specified guest systems (assumes --all)",
16707 "format" : "pve-vmid-list",
7aacca6f 16708 "optional" : 1,
44660702 16709 "type" : "string"
7aacca6f 16710 },
44660702
DM
16711 "exclude-path" : {
16712 "description" : "Exclude certain files/directories (shell globs).",
16713 "format" : "string-alist",
7aacca6f 16714 "optional" : 1,
44660702 16715 "type" : "string"
7aacca6f 16716 },
44660702
DM
16717 "ionice" : {
16718 "default" : 7,
16719 "description" : "Set CFQ ionice priority.",
16720 "maximum" : 8,
16721 "minimum" : 0,
16722 "optional" : 1,
16723 "type" : "integer"
7aacca6f 16724 },
44660702
DM
16725 "lockwait" : {
16726 "default" : 180,
16727 "description" : "Maximal time to wait for the global lock (minutes).",
16728 "minimum" : 0,
7aacca6f 16729 "optional" : 1,
44660702 16730 "type" : "integer"
7aacca6f
DM
16731 },
16732 "mailnotification" : {
44660702 16733 "default" : "always",
7aacca6f
DM
16734 "description" : "Specify when to send an email",
16735 "enum" : [
16736 "always",
16737 "failure"
16738 ],
7aacca6f 16739 "optional" : 1,
44660702 16740 "type" : "string"
7aacca6f
DM
16741 },
16742 "mailto" : {
7aacca6f 16743 "description" : "Comma-separated list of email addresses that should receive email notifications.",
44660702 16744 "format" : "string-list",
7aacca6f 16745 "optional" : 1,
44660702 16746 "type" : "string"
56122987 16747 },
44660702
DM
16748 "maxfiles" : {
16749 "default" : 1,
16750 "description" : "Maximal number of backup files per guest system.",
16751 "minimum" : 1,
7aacca6f 16752 "optional" : 1,
44660702 16753 "type" : "integer"
56122987 16754 },
7aacca6f 16755 "mode" : {
44660702 16756 "default" : "snapshot",
7aacca6f
DM
16757 "description" : "Backup mode.",
16758 "enum" : [
16759 "snapshot",
16760 "suspend",
16761 "stop"
16762 ],
44660702
DM
16763 "optional" : 1,
16764 "type" : "string"
7aacca6f 16765 },
44660702
DM
16766 "node" : {
16767 "description" : "Only run if executed on this node.",
16768 "format" : "pve-node",
16769 "optional" : 1,
16770 "type" : "string"
16771 },
16772 "pigz" : {
16773 "default" : 0,
16774 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
16775 "optional" : 1,
16776 "type" : "integer"
16777 },
16778 "quiet" : {
16779 "default" : 0,
16780 "description" : "Be quiet.",
16781 "optional" : 1,
16782 "type" : "boolean"
16783 },
16784 "remove" : {
7aacca6f 16785 "default" : 1,
44660702 16786 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
7aacca6f 16787 "optional" : 1,
44660702 16788 "type" : "boolean"
7aacca6f 16789 },
44660702
DM
16790 "script" : {
16791 "description" : "Use specified hook script.",
16792 "optional" : 1,
16793 "type" : "string"
16794 },
16795 "size" : {
16796 "default" : 1024,
16797 "description" : "Unused, will be removed in a future release.",
16798 "minimum" : 500,
16799 "optional" : 1,
16800 "type" : "integer"
16801 },
16802 "stdexcludes" : {
16803 "default" : 1,
16804 "description" : "Exclude temporary files and logs.",
16805 "optional" : 1,
16806 "type" : "boolean"
16807 },
16808 "stdout" : {
16809 "description" : "Write tar to stdout, not to a file.",
7aacca6f 16810 "optional" : 1,
44660702
DM
16811 "type" : "boolean"
16812 },
16813 "stop" : {
7aacca6f 16814 "default" : 0,
44660702
DM
16815 "description" : "Stop runnig backup jobs on this host.",
16816 "optional" : 1,
16817 "type" : "boolean"
7aacca6f 16818 },
44660702
DM
16819 "stopwait" : {
16820 "default" : 10,
16821 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
7aacca6f
DM
16822 "minimum" : 0,
16823 "optional" : 1,
44660702 16824 "type" : "integer"
7aacca6f 16825 },
44660702
DM
16826 "storage" : {
16827 "description" : "Store resulting file to this storage.",
16828 "format" : "pve-storage-id",
7aacca6f 16829 "optional" : 1,
44660702
DM
16830 "type" : "string"
16831 },
16832 "tmpdir" : {
16833 "description" : "Store temporary files to specified directory.",
16834 "optional" : 1,
16835 "type" : "string"
7aacca6f
DM
16836 },
16837 "vmid" : {
7aacca6f 16838 "description" : "The ID of the guest system you want to backup.",
44660702 16839 "format" : "pve-vmid-list",
7aacca6f
DM
16840 "optional" : 1,
16841 "type" : "string"
16842 }
7aacca6f
DM
16843 }
16844 },
7aacca6f 16845 "permissions" : {
44660702
DM
16846 "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.",
16847 "user" : "all"
7aacca6f 16848 },
44660702 16849 "protected" : 1,
7aacca6f 16850 "proxyto" : "node",
7aacca6f 16851 "returns" : {
44660702 16852 "type" : "string"
7aacca6f
DM
16853 }
16854 }
16855 },
44660702
DM
16856 "leaf" : 1,
16857 "path" : "/nodes/{node}/vzdump",
16858 "text" : "vzdump"
16859 },
16860 {
7aacca6f
DM
16861 "children" : [
16862 {
7aacca6f
DM
16863 "children" : [
16864 {
7aacca6f
DM
16865 "info" : {
16866 "GET" : {
7aacca6f
DM
16867 "description" : "Read service properties",
16868 "method" : "GET",
16869 "name" : "service_state",
16870 "parameters" : {
44660702 16871 "additionalProperties" : 0,
7aacca6f
DM
16872 "properties" : {
16873 "node" : {
7aacca6f 16874 "description" : "The cluster node name.",
44660702
DM
16875 "format" : "pve-node",
16876 "type" : "string"
7aacca6f
DM
16877 },
16878 "service" : {
44660702 16879 "description" : "Service ID",
7aacca6f
DM
16880 "enum" : [
16881 "pveproxy",
16882 "pvedaemon",
16883 "spiceproxy",
16884 "pvestatd",
16885 "pve-cluster",
16886 "corosync",
16887 "pve-firewall",
16888 "pvefw-logger",
16889 "pve-ha-crm",
16890 "pve-ha-lrm",
16891 "sshd",
16892 "syslog",
16893 "cron",
16894 "postfix",
16895 "ksmtuned",
16896 "systemd-timesyncd"
16897 ],
7aacca6f
DM
16898 "type" : "string"
16899 }
44660702 16900 }
56122987 16901 },
7aacca6f
DM
16902 "permissions" : {
16903 "check" : [
16904 "perm",
16905 "/nodes/{node}",
16906 [
44660702 16907 "Sys.Audit"
7aacca6f
DM
16908 ]
16909 ]
56122987 16910 },
44660702 16911 "protected" : 1,
7aacca6f 16912 "proxyto" : "node",
44660702
DM
16913 "returns" : {
16914 "properties" : {},
16915 "type" : "object"
16916 }
16917 }
16918 },
16919 "leaf" : 1,
16920 "path" : "/nodes/{node}/services/{service}/state",
16921 "text" : "state"
16922 },
16923 {
16924 "info" : {
16925 "POST" : {
16926 "description" : "Start service.",
7aacca6f
DM
16927 "method" : "POST",
16928 "name" : "service_start",
16929 "parameters" : {
44660702 16930 "additionalProperties" : 0,
7aacca6f 16931 "properties" : {
44660702
DM
16932 "node" : {
16933 "description" : "The cluster node name.",
16934 "format" : "pve-node",
16935 "type" : "string"
16936 },
7aacca6f 16937 "service" : {
44660702 16938 "description" : "Service ID",
7aacca6f
DM
16939 "enum" : [
16940 "pveproxy",
16941 "pvedaemon",
16942 "spiceproxy",
16943 "pvestatd",
16944 "pve-cluster",
16945 "corosync",
16946 "pve-firewall",
16947 "pvefw-logger",
16948 "pve-ha-crm",
16949 "pve-ha-lrm",
16950 "sshd",
16951 "syslog",
16952 "cron",
16953 "postfix",
16954 "ksmtuned",
16955 "systemd-timesyncd"
16956 ],
7aacca6f
DM
16957 "type" : "string"
16958 }
44660702 16959 }
56122987 16960 },
56122987
DM
16961 "permissions" : {
16962 "check" : [
16963 "perm",
16964 "/nodes/{node}",
16965 [
7aacca6f 16966 "Sys.Modify"
56122987
DM
16967 ]
16968 ]
7aacca6f 16969 },
7aacca6f 16970 "protected" : 1,
44660702
DM
16971 "proxyto" : "node",
16972 "returns" : {
16973 "type" : "string"
16974 }
16975 }
16976 },
16977 "leaf" : 1,
16978 "path" : "/nodes/{node}/services/{service}/start",
16979 "text" : "start"
16980 },
16981 {
16982 "info" : {
16983 "POST" : {
16984 "description" : "Stop service.",
16985 "method" : "POST",
7aacca6f 16986 "name" : "service_stop",
56122987 16987 "parameters" : {
7aacca6f 16988 "additionalProperties" : 0,
56122987
DM
16989 "properties" : {
16990 "node" : {
44660702 16991 "description" : "The cluster node name.",
56122987 16992 "format" : "pve-node",
44660702 16993 "type" : "string"
56122987
DM
16994 },
16995 "service" : {
44660702 16996 "description" : "Service ID",
56122987
DM
16997 "enum" : [
16998 "pveproxy",
16999 "pvedaemon",
17000 "spiceproxy",
17001 "pvestatd",
17002 "pve-cluster",
17003 "corosync",
17004 "pve-firewall",
17005 "pvefw-logger",
17006 "pve-ha-crm",
17007 "pve-ha-lrm",
17008 "sshd",
17009 "syslog",
17010 "cron",
17011 "postfix",
17012 "ksmtuned",
17013 "systemd-timesyncd"
17014 ],
56122987
DM
17015 "type" : "string"
17016 }
7aacca6f 17017 }
44660702 17018 },
56122987
DM
17019 "permissions" : {
17020 "check" : [
17021 "perm",
17022 "/nodes/{node}",
17023 [
17024 "Sys.Modify"
17025 ]
17026 ]
17027 },
44660702
DM
17028 "protected" : 1,
17029 "proxyto" : "node",
7aacca6f
DM
17030 "returns" : {
17031 "type" : "string"
44660702
DM
17032 }
17033 }
17034 },
17035 "leaf" : 1,
17036 "path" : "/nodes/{node}/services/{service}/stop",
17037 "text" : "stop"
17038 },
17039 {
17040 "info" : {
17041 "POST" : {
17042 "description" : "Restart service.",
17043 "method" : "POST",
17044 "name" : "service_restart",
56122987
DM
17045 "parameters" : {
17046 "additionalProperties" : 0,
17047 "properties" : {
7aacca6f
DM
17048 "node" : {
17049 "description" : "The cluster node name.",
44660702
DM
17050 "format" : "pve-node",
17051 "type" : "string"
7aacca6f
DM
17052 },
17053 "service" : {
44660702 17054 "description" : "Service ID",
56122987
DM
17055 "enum" : [
17056 "pveproxy",
17057 "pvedaemon",
17058 "spiceproxy",
17059 "pvestatd",
17060 "pve-cluster",
17061 "corosync",
17062 "pve-firewall",
17063 "pvefw-logger",
17064 "pve-ha-crm",
17065 "pve-ha-lrm",
17066 "sshd",
17067 "syslog",
17068 "cron",
17069 "postfix",
17070 "ksmtuned",
17071 "systemd-timesyncd"
7aacca6f 17072 ],
7aacca6f 17073 "type" : "string"
56122987
DM
17074 }
17075 }
17076 },
44660702
DM
17077 "permissions" : {
17078 "check" : [
17079 "perm",
17080 "/nodes/{node}",
17081 [
17082 "Sys.Modify"
17083 ]
17084 ]
17085 },
17086 "protected" : 1,
17087 "proxyto" : "node",
17088 "returns" : {
17089 "type" : "string"
17090 }
56122987 17091 }
44660702
DM
17092 },
17093 "leaf" : 1,
17094 "path" : "/nodes/{node}/services/{service}/restart",
17095 "text" : "restart"
56122987
DM
17096 },
17097 {
56122987
DM
17098 "info" : {
17099 "POST" : {
44660702
DM
17100 "description" : "Reload service.",
17101 "method" : "POST",
7aacca6f 17102 "name" : "service_reload",
56122987
DM
17103 "parameters" : {
17104 "additionalProperties" : 0,
17105 "properties" : {
44660702
DM
17106 "node" : {
17107 "description" : "The cluster node name.",
17108 "format" : "pve-node",
17109 "type" : "string"
17110 },
56122987 17111 "service" : {
56122987
DM
17112 "description" : "Service ID",
17113 "enum" : [
17114 "pveproxy",
17115 "pvedaemon",
17116 "spiceproxy",
17117 "pvestatd",
17118 "pve-cluster",
17119 "corosync",
17120 "pve-firewall",
17121 "pvefw-logger",
17122 "pve-ha-crm",
17123 "pve-ha-lrm",
17124 "sshd",
17125 "syslog",
17126 "cron",
17127 "postfix",
17128 "ksmtuned",
17129 "systemd-timesyncd"
44660702
DM
17130 ],
17131 "type" : "string"
56122987
DM
17132 }
17133 }
17134 },
56122987
DM
17135 "permissions" : {
17136 "check" : [
17137 "perm",
17138 "/nodes/{node}",
17139 [
17140 "Sys.Modify"
17141 ]
17142 ]
17143 },
44660702 17144 "protected" : 1,
56122987 17145 "proxyto" : "node",
7aacca6f
DM
17146 "returns" : {
17147 "type" : "string"
56122987
DM
17148 }
17149 }
44660702
DM
17150 },
17151 "leaf" : 1,
17152 "path" : "/nodes/{node}/services/{service}/reload",
17153 "text" : "reload"
17154 }
17155 ],
17156 "info" : {
17157 "GET" : {
17158 "description" : "Directory index",
17159 "method" : "GET",
17160 "name" : "srvcmdidx",
17161 "parameters" : {
17162 "additionalProperties" : 0,
17163 "properties" : {
17164 "node" : {
17165 "description" : "The cluster node name.",
17166 "format" : "pve-node",
17167 "type" : "string"
17168 },
17169 "service" : {
17170 "description" : "Service ID",
17171 "enum" : [
17172 "pveproxy",
17173 "pvedaemon",
17174 "spiceproxy",
17175 "pvestatd",
17176 "pve-cluster",
17177 "corosync",
17178 "pve-firewall",
17179 "pvefw-logger",
17180 "pve-ha-crm",
17181 "pve-ha-lrm",
17182 "sshd",
17183 "syslog",
17184 "cron",
17185 "postfix",
17186 "ksmtuned",
17187 "systemd-timesyncd"
17188 ],
17189 "type" : "string"
17190 }
17191 }
17192 },
17193 "permissions" : {
17194 "check" : [
17195 "perm",
17196 "/nodes/{node}",
17197 [
17198 "Sys.Audit"
17199 ]
17200 ]
17201 },
17202 "returns" : {
17203 "items" : {
17204 "properties" : {
17205 "subdir" : {
17206 "type" : "string"
17207 }
17208 },
17209 "type" : "object"
17210 },
17211 "links" : [
17212 {
17213 "href" : "{subdir}",
17214 "rel" : "child"
17215 }
17216 ],
17217 "type" : "array"
17218 }
17219 }
17220 },
17221 "leaf" : 0,
17222 "path" : "/nodes/{node}/services/{service}",
17223 "text" : "{service}"
17224 }
17225 ],
17226 "info" : {
17227 "GET" : {
17228 "description" : "Service list.",
17229 "method" : "GET",
17230 "name" : "index",
17231 "parameters" : {
17232 "additionalProperties" : 0,
17233 "properties" : {
17234 "node" : {
17235 "description" : "The cluster node name.",
17236 "format" : "pve-node",
17237 "type" : "string"
17238 }
17239 }
17240 },
17241 "permissions" : {
17242 "check" : [
17243 "perm",
17244 "/nodes/{node}",
17245 [
17246 "Sys.Audit"
17247 ]
17248 ]
17249 },
17250 "protected" : 1,
17251 "proxyto" : "node",
17252 "returns" : {
17253 "items" : {
17254 "properties" : {},
17255 "type" : "object"
17256 },
17257 "links" : [
17258 {
17259 "href" : "{service}",
17260 "rel" : "child"
56122987 17261 }
44660702
DM
17262 ],
17263 "type" : "array"
17264 }
7aacca6f 17265 }
44660702 17266 },
7aacca6f 17267 "leaf" : 0,
44660702
DM
17268 "path" : "/nodes/{node}/services",
17269 "text" : "services"
7aacca6f
DM
17270 },
17271 {
7aacca6f
DM
17272 "info" : {
17273 "GET" : {
44660702
DM
17274 "description" : "Read subscription info.",
17275 "method" : "GET",
17276 "name" : "get",
7aacca6f 17277 "parameters" : {
44660702 17278 "additionalProperties" : 0,
7aacca6f
DM
17279 "properties" : {
17280 "node" : {
17281 "description" : "The cluster node name.",
44660702
DM
17282 "format" : "pve-node",
17283 "type" : "string"
7aacca6f 17284 }
44660702
DM
17285 }
17286 },
17287 "permissions" : {
17288 "user" : "all"
7aacca6f 17289 },
7aacca6f
DM
17290 "proxyto" : "node",
17291 "returns" : {
17292 "type" : "object"
44660702 17293 }
7aacca6f 17294 },
44660702
DM
17295 "POST" : {
17296 "description" : "Update subscription info.",
17297 "method" : "POST",
17298 "name" : "update",
7aacca6f
DM
17299 "parameters" : {
17300 "additionalProperties" : 0,
17301 "properties" : {
44660702
DM
17302 "force" : {
17303 "default" : 0,
17304 "description" : "Always connect to server, even if we have up to date info inside local cache.",
17305 "optional" : 1,
17306 "type" : "boolean"
17307 },
7aacca6f 17308 "node" : {
7aacca6f 17309 "description" : "The cluster node name.",
44660702 17310 "format" : "pve-node",
7aacca6f
DM
17311 "type" : "string"
17312 }
17313 }
17314 },
7aacca6f 17315 "protected" : 1,
7aacca6f 17316 "proxyto" : "node",
44660702
DM
17317 "returns" : {
17318 "type" : "null"
17319 }
17320 },
17321 "PUT" : {
17322 "description" : "Set subscription key.",
17323 "method" : "PUT",
17324 "name" : "set",
7aacca6f
DM
17325 "parameters" : {
17326 "additionalProperties" : 0,
17327 "properties" : {
44660702
DM
17328 "key" : {
17329 "description" : "Proxmox VE subscription key",
17330 "type" : "string"
7aacca6f
DM
17331 },
17332 "node" : {
7aacca6f 17333 "description" : "The cluster node name.",
44660702
DM
17334 "format" : "pve-node",
17335 "type" : "string"
7aacca6f
DM
17336 }
17337 }
17338 },
44660702
DM
17339 "protected" : 1,
17340 "proxyto" : "node",
7aacca6f
DM
17341 "returns" : {
17342 "type" : "null"
44660702 17343 }
7aacca6f
DM
17344 }
17345 },
44660702 17346 "leaf" : 1,
7aacca6f 17347 "path" : "/nodes/{node}/subscription",
44660702 17348 "text" : "subscription"
7aacca6f
DM
17349 },
17350 {
7aacca6f
DM
17351 "children" : [
17352 {
56122987 17353 "info" : {
7aacca6f 17354 "DELETE" : {
44660702
DM
17355 "description" : "Delete network device configuration",
17356 "method" : "DELETE",
17357 "name" : "delete_network",
17358 "parameters" : {
17359 "additionalProperties" : 0,
17360 "properties" : {
17361 "iface" : {
17362 "description" : "Network interface name.",
17363 "format" : "pve-iface",
17364 "maxLength" : 20,
17365 "minLength" : 2,
17366 "type" : "string"
17367 },
17368 "node" : {
17369 "description" : "The cluster node name.",
17370 "format" : "pve-node",
17371 "type" : "string"
17372 }
17373 }
7aacca6f
DM
17374 },
17375 "permissions" : {
17376 "check" : [
17377 "perm",
17378 "/nodes/{node}",
17379 [
17380 "Sys.Modify"
17381 ]
17382 ]
17383 },
44660702 17384 "protected" : 1,
7aacca6f 17385 "proxyto" : "node",
44660702
DM
17386 "returns" : {
17387 "type" : "null"
17388 }
17389 },
17390 "GET" : {
17391 "description" : "Read network device configuration",
17392 "method" : "GET",
17393 "name" : "network_config",
56122987 17394 "parameters" : {
44660702 17395 "additionalProperties" : 0,
56122987 17396 "properties" : {
7aacca6f 17397 "iface" : {
7aacca6f 17398 "description" : "Network interface name.",
44660702
DM
17399 "format" : "pve-iface",
17400 "maxLength" : 20,
7aacca6f
DM
17401 "minLength" : 2,
17402 "type" : "string"
44660702
DM
17403 },
17404 "node" : {
17405 "description" : "The cluster node name.",
17406 "format" : "pve-node",
17407 "type" : "string"
56122987 17408 }
44660702 17409 }
7aacca6f
DM
17410 },
17411 "permissions" : {
17412 "check" : [
17413 "perm",
17414 "/nodes/{node}",
17415 [
44660702 17416 "Sys.Audit"
7aacca6f
DM
17417 ]
17418 ]
17419 },
17420 "proxyto" : "node",
44660702
DM
17421 "returns" : {
17422 "properties" : {
17423 "method" : {
17424 "type" : "string"
17425 },
17426 "type" : {
17427 "type" : "string"
17428 }
17429 },
17430 "type" : "object"
17431 }
17432 },
17433 "PUT" : {
7aacca6f
DM
17434 "description" : "Update network device configuration",
17435 "method" : "PUT",
17436 "name" : "update_network",
17437 "parameters" : {
17438 "additionalProperties" : 0,
17439 "properties" : {
7aacca6f 17440 "address" : {
44660702 17441 "description" : "IP address.",
7aacca6f 17442 "format" : "ipv4",
44660702 17443 "optional" : 1,
7aacca6f 17444 "requires" : "netmask",
44660702 17445 "type" : "string"
7aacca6f 17446 },
44660702
DM
17447 "address6" : {
17448 "description" : "IP address.",
17449 "format" : "ipv6",
17450 "optional" : 1,
17451 "requires" : "netmask6",
17452 "type" : "string"
7aacca6f
DM
17453 },
17454 "autostart" : {
44660702 17455 "description" : "Automatically start interface on boot.",
7aacca6f 17456 "optional" : 1,
44660702 17457 "type" : "boolean"
7aacca6f 17458 },
44660702
DM
17459 "bond_mode" : {
17460 "description" : "Bonding mode.",
7aacca6f 17461 "enum" : [
44660702
DM
17462 "balance-rr",
17463 "active-backup",
17464 "balance-xor",
17465 "broadcast",
17466 "802.3ad",
17467 "balance-tlb",
17468 "balance-alb",
17469 "balance-slb",
17470 "lacp-balance-slb",
17471 "lacp-balance-tcp"
17472 ],
7aacca6f 17473 "optional" : 1,
44660702 17474 "type" : "string"
7aacca6f 17475 },
44660702
DM
17476 "bond_xmit_hash_policy" : {
17477 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17478 "enum" : [
17479 "layer2",
17480 "layer2+3",
17481 "layer3+4"
17482 ],
7aacca6f 17483 "optional" : 1,
44660702 17484 "type" : "string"
7aacca6f 17485 },
44660702
DM
17486 "bridge_ports" : {
17487 "description" : "Specify the iterfaces you want to add to your bridge.",
17488 "format" : "pve-iface-list",
7aacca6f 17489 "optional" : 1,
44660702 17490 "type" : "string"
7aacca6f 17491 },
44660702
DM
17492 "bridge_vlan_aware" : {
17493 "description" : "Enable bridge vlan support.",
7aacca6f 17494 "optional" : 1,
44660702 17495 "type" : "boolean"
7aacca6f
DM
17496 },
17497 "comments" : {
44660702 17498 "description" : "Comments",
7aacca6f 17499 "optional" : 1,
44660702 17500 "type" : "string"
7aacca6f 17501 },
44660702
DM
17502 "comments6" : {
17503 "description" : "Comments",
7aacca6f 17504 "optional" : 1,
44660702 17505 "type" : "string"
7aacca6f 17506 },
44660702
DM
17507 "delete" : {
17508 "description" : "A list of settings you want to delete.",
17509 "format" : "pve-configid-list",
7aacca6f
DM
17510 "optional" : 1,
17511 "type" : "string"
17512 },
44660702
DM
17513 "gateway" : {
17514 "description" : "Default gateway address.",
17515 "format" : "ipv4",
7aacca6f
DM
17516 "optional" : 1,
17517 "type" : "string"
17518 },
44660702
DM
17519 "gateway6" : {
17520 "description" : "Default ipv6 gateway address.",
17521 "format" : "ipv6",
7aacca6f 17522 "optional" : 1,
44660702 17523 "type" : "string"
7aacca6f
DM
17524 },
17525 "iface" : {
44660702 17526 "description" : "Network interface name.",
7aacca6f
DM
17527 "format" : "pve-iface",
17528 "maxLength" : 20,
17529 "minLength" : 2,
7aacca6f
DM
17530 "type" : "string"
17531 },
44660702
DM
17532 "netmask" : {
17533 "description" : "Network mask.",
17534 "format" : "ipv4mask",
7aacca6f 17535 "optional" : 1,
44660702
DM
17536 "requires" : "address",
17537 "type" : "string"
7aacca6f
DM
17538 },
17539 "netmask6" : {
44660702 17540 "description" : "Network mask.",
7aacca6f 17541 "maximum" : 128,
44660702 17542 "minimum" : 0,
7aacca6f
DM
17543 "optional" : 1,
17544 "requires" : "address6",
44660702
DM
17545 "type" : "integer"
17546 },
7aacca6f 17547 "node" : {
44660702 17548 "description" : "The cluster node name.",
7aacca6f 17549 "format" : "pve-node",
44660702 17550 "type" : "string"
7aacca6f 17551 },
44660702
DM
17552 "ovs_bonds" : {
17553 "description" : "Specify the interfaces used by the bonding device.",
17554 "format" : "pve-iface-list",
17555 "optional" : 1,
17556 "type" : "string"
17557 },
17558 "ovs_bridge" : {
17559 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17560 "format" : "pve-iface",
17561 "optional" : 1,
17562 "type" : "string"
17563 },
17564 "ovs_options" : {
17565 "description" : "OVS interface options.",
17566 "maxLength" : 1024,
17567 "optional" : 1,
17568 "type" : "string"
17569 },
17570 "ovs_ports" : {
17571 "description" : "Specify the iterfaces you want to add to your bridge.",
17572 "format" : "pve-iface-list",
17573 "optional" : 1,
17574 "type" : "string"
17575 },
17576 "ovs_tag" : {
17577 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17578 "maximum" : 4094,
17579 "minimum" : 1,
17580 "optional" : 1,
17581 "type" : "integer"
17582 },
17583 "slaves" : {
17584 "description" : "Specify the interfaces used by the bonding device.",
17585 "format" : "pve-iface-list",
17586 "optional" : 1,
17587 "type" : "string"
17588 },
17589 "type" : {
17590 "description" : "Network interface type",
17591 "enum" : [
17592 "bridge",
17593 "bond",
17594 "eth",
17595 "alias",
17596 "vlan",
17597 "OVSBridge",
17598 "OVSBond",
17599 "OVSPort",
17600 "OVSIntPort",
17601 "unknown"
17602 ],
17603 "type" : "string"
7aacca6f
DM
17604 }
17605 }
17606 },
7aacca6f
DM
17607 "permissions" : {
17608 "check" : [
17609 "perm",
17610 "/nodes/{node}",
17611 [
44660702 17612 "Sys.Modify"
7aacca6f
DM
17613 ]
17614 ]
17615 },
44660702
DM
17616 "protected" : 1,
17617 "proxyto" : "node",
7aacca6f 17618 "returns" : {
44660702
DM
17619 "type" : "null"
17620 }
7aacca6f
DM
17621 }
17622 },
7aacca6f 17623 "leaf" : 1,
44660702
DM
17624 "path" : "/nodes/{node}/network/{iface}",
17625 "text" : "{iface}"
7aacca6f
DM
17626 }
17627 ],
7aacca6f 17628 "info" : {
44660702
DM
17629 "DELETE" : {
17630 "description" : "Revert network configuration changes.",
17631 "method" : "DELETE",
17632 "name" : "revert_network_changes",
7aacca6f
DM
17633 "parameters" : {
17634 "additionalProperties" : 0,
17635 "properties" : {
7aacca6f 17636 "node" : {
7aacca6f 17637 "description" : "The cluster node name.",
44660702 17638 "format" : "pve-node",
7aacca6f
DM
17639 "type" : "string"
17640 }
17641 }
44660702 17642 },
7aacca6f
DM
17643 "permissions" : {
17644 "check" : [
17645 "perm",
17646 "/nodes/{node}",
17647 [
17648 "Sys.Modify"
17649 ]
17650 ]
17651 },
44660702
DM
17652 "protected" : 1,
17653 "proxyto" : "node",
7aacca6f
DM
17654 "returns" : {
17655 "type" : "null"
44660702 17656 }
7aacca6f 17657 },
44660702
DM
17658 "GET" : {
17659 "description" : "List available networks",
17660 "method" : "GET",
17661 "name" : "index",
7aacca6f 17662 "parameters" : {
44660702 17663 "additionalProperties" : 0,
7aacca6f 17664 "properties" : {
7aacca6f 17665 "node" : {
44660702
DM
17666 "description" : "The cluster node name.",
17667 "format" : "pve-node",
17668 "type" : "string"
7aacca6f
DM
17669 },
17670 "type" : {
44660702 17671 "description" : "Only list specific interface types.",
7aacca6f
DM
17672 "enum" : [
17673 "bridge",
17674 "bond",
17675 "eth",
17676 "alias",
17677 "vlan",
17678 "OVSBridge",
17679 "OVSBond",
17680 "OVSPort",
17681 "OVSIntPort",
44660702 17682 "any_bridge"
7aacca6f 17683 ],
7aacca6f 17684 "optional" : 1,
44660702
DM
17685 "type" : "string"
17686 }
17687 }
17688 },
17689 "permissions" : {
17690 "user" : "all"
17691 },
17692 "proxyto" : "node",
17693 "returns" : {
17694 "items" : {
17695 "properties" : {},
17696 "type" : "object"
17697 },
17698 "links" : [
17699 {
17700 "href" : "{iface}",
17701 "rel" : "child"
17702 }
17703 ],
17704 "type" : "array"
17705 }
17706 },
17707 "POST" : {
17708 "description" : "Create network device configuration",
17709 "method" : "POST",
17710 "name" : "create_network",
17711 "parameters" : {
17712 "additionalProperties" : 0,
17713 "properties" : {
7aacca6f 17714 "address" : {
44660702
DM
17715 "description" : "IP address.",
17716 "format" : "ipv4",
17717 "optional" : 1,
7aacca6f 17718 "requires" : "netmask",
44660702
DM
17719 "type" : "string"
17720 },
17721 "address6" : {
7aacca6f 17722 "description" : "IP address.",
44660702
DM
17723 "format" : "ipv6",
17724 "optional" : 1,
17725 "requires" : "netmask6",
17726 "type" : "string"
17727 },
17728 "autostart" : {
17729 "description" : "Automatically start interface on boot.",
7aacca6f 17730 "optional" : 1,
44660702 17731 "type" : "boolean"
7aacca6f
DM
17732 },
17733 "bond_mode" : {
17734 "description" : "Bonding mode.",
17735 "enum" : [
17736 "balance-rr",
17737 "active-backup",
17738 "balance-xor",
17739 "broadcast",
17740 "802.3ad",
17741 "balance-tlb",
17742 "balance-alb",
17743 "balance-slb",
17744 "lacp-balance-slb",
17745 "lacp-balance-tcp"
17746 ],
17747 "optional" : 1,
17748 "type" : "string"
17749 },
44660702
DM
17750 "bond_xmit_hash_policy" : {
17751 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17752 "enum" : [
17753 "layer2",
17754 "layer2+3",
17755 "layer3+4"
17756 ],
17757 "optional" : 1,
17758 "type" : "string"
17759 },
17760 "bridge_ports" : {
17761 "description" : "Specify the iterfaces you want to add to your bridge.",
7aacca6f 17762 "format" : "pve-iface-list",
7aacca6f 17763 "optional" : 1,
44660702 17764 "type" : "string"
7aacca6f 17765 },
44660702
DM
17766 "bridge_vlan_aware" : {
17767 "description" : "Enable bridge vlan support.",
7aacca6f 17768 "optional" : 1,
44660702 17769 "type" : "boolean"
7aacca6f 17770 },
44660702
DM
17771 "comments" : {
17772 "description" : "Comments",
7aacca6f 17773 "optional" : 1,
44660702
DM
17774 "type" : "string"
17775 },
17776 "comments6" : {
17777 "description" : "Comments",
17778 "optional" : 1,
17779 "type" : "string"
17780 },
17781 "gateway" : {
17782 "description" : "Default gateway address.",
17783 "format" : "ipv4",
17784 "optional" : 1,
17785 "type" : "string"
17786 },
17787 "gateway6" : {
17788 "description" : "Default ipv6 gateway address.",
17789 "format" : "ipv6",
17790 "optional" : 1,
17791 "type" : "string"
56122987 17792 },
7aacca6f 17793 "iface" : {
44660702 17794 "description" : "Network interface name.",
7aacca6f
DM
17795 "format" : "pve-iface",
17796 "maxLength" : 20,
44660702
DM
17797 "minLength" : 2,
17798 "type" : "string"
56122987 17799 },
44660702
DM
17800 "netmask" : {
17801 "description" : "Network mask.",
17802 "format" : "ipv4mask",
7aacca6f 17803 "optional" : 1,
44660702
DM
17804 "requires" : "address",
17805 "type" : "string"
7aacca6f 17806 },
44660702
DM
17807 "netmask6" : {
17808 "description" : "Network mask.",
17809 "maximum" : 128,
17810 "minimum" : 0,
7aacca6f 17811 "optional" : 1,
44660702
DM
17812 "requires" : "address6",
17813 "type" : "integer"
7aacca6f 17814 },
44660702
DM
17815 "node" : {
17816 "description" : "The cluster node name.",
17817 "format" : "pve-node",
17818 "type" : "string"
17819 },
17820 "ovs_bonds" : {
17821 "description" : "Specify the interfaces used by the bonding device.",
17822 "format" : "pve-iface-list",
7aacca6f
DM
17823 "optional" : 1,
17824 "type" : "string"
17825 },
44660702
DM
17826 "ovs_bridge" : {
17827 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17828 "format" : "pve-iface",
17829 "optional" : 1,
17830 "type" : "string"
17831 },
17832 "ovs_options" : {
17833 "description" : "OVS interface options.",
17834 "maxLength" : 1024,
17835 "optional" : 1,
17836 "type" : "string"
17837 },
17838 "ovs_ports" : {
17839 "description" : "Specify the iterfaces you want to add to your bridge.",
17840 "format" : "pve-iface-list",
17841 "optional" : 1,
17842 "type" : "string"
17843 },
17844 "ovs_tag" : {
17845 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17846 "maximum" : 4094,
17847 "minimum" : 1,
17848 "optional" : 1,
17849 "type" : "integer"
17850 },
17851 "slaves" : {
17852 "description" : "Specify the interfaces used by the bonding device.",
17853 "format" : "pve-iface-list",
7aacca6f 17854 "optional" : 1,
44660702
DM
17855 "type" : "string"
17856 },
17857 "type" : {
17858 "description" : "Network interface type",
7aacca6f 17859 "enum" : [
44660702
DM
17860 "bridge",
17861 "bond",
17862 "eth",
17863 "alias",
17864 "vlan",
17865 "OVSBridge",
17866 "OVSBond",
17867 "OVSPort",
17868 "OVSIntPort",
17869 "unknown"
7aacca6f 17870 ],
44660702 17871 "type" : "string"
56122987 17872 }
44660702 17873 }
56122987 17874 },
56122987
DM
17875 "permissions" : {
17876 "check" : [
17877 "perm",
17878 "/nodes/{node}",
17879 [
7aacca6f 17880 "Sys.Modify"
44660702
DM
17881 ]
17882 ]
7aacca6f 17883 },
44660702
DM
17884 "protected" : 1,
17885 "proxyto" : "node",
17886 "returns" : {
17887 "type" : "null"
17888 }
17889 }
17890 },
17891 "leaf" : 0,
17892 "path" : "/nodes/{node}/network",
17893 "text" : "network"
17894 },
17895 {
17896 "children" : [
17897 {
7aacca6f
DM
17898 "children" : [
17899 {
17900 "info" : {
17901 "GET" : {
44660702 17902 "description" : "Read task log.",
7aacca6f
DM
17903 "method" : "GET",
17904 "name" : "read_task_log",
17905 "parameters" : {
44660702 17906 "additionalProperties" : 0,
7aacca6f 17907 "properties" : {
44660702
DM
17908 "limit" : {
17909 "minimum" : 0,
7aacca6f 17910 "optional" : 1,
44660702 17911 "type" : "integer"
7aacca6f
DM
17912 },
17913 "node" : {
17914 "description" : "The cluster node name.",
44660702
DM
17915 "format" : "pve-node",
17916 "type" : "string"
7aacca6f 17917 },
44660702
DM
17918 "start" : {
17919 "minimum" : 0,
7aacca6f 17920 "optional" : 1,
44660702
DM
17921 "type" : "integer"
17922 },
17923 "upid" : {
17924 "type" : "string"
7aacca6f 17925 }
44660702
DM
17926 }
17927 },
17928 "permissions" : {
17929 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
17930 "user" : "all"
7aacca6f
DM
17931 },
17932 "protected" : 1,
44660702 17933 "proxyto" : "node",
7aacca6f 17934 "returns" : {
7aacca6f 17935 "items" : {
7aacca6f
DM
17936 "properties" : {
17937 "n" : {
44660702
DM
17938 "description" : "Line number",
17939 "type" : "integer"
7aacca6f
DM
17940 },
17941 "t" : {
44660702
DM
17942 "description" : "Line text",
17943 "type" : "string"
7aacca6f 17944 }
44660702
DM
17945 },
17946 "type" : "object"
17947 },
17948 "type" : "array"
17949 }
7aacca6f 17950 }
56122987 17951 },
7aacca6f 17952 "leaf" : 1,
44660702
DM
17953 "path" : "/nodes/{node}/tasks/{upid}/log",
17954 "text" : "log"
7aacca6f
DM
17955 },
17956 {
7aacca6f
DM
17957 "info" : {
17958 "GET" : {
44660702
DM
17959 "description" : "Read task status.",
17960 "method" : "GET",
7aacca6f
DM
17961 "name" : "read_task_status",
17962 "parameters" : {
17963 "additionalProperties" : 0,
17964 "properties" : {
17965 "node" : {
7aacca6f 17966 "description" : "The cluster node name.",
44660702 17967 "format" : "pve-node",
7aacca6f
DM
17968 "type" : "string"
17969 },
17970 "upid" : {
17971 "type" : "string"
17972 }
17973 }
17974 },
7aacca6f
DM
17975 "permissions" : {
17976 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
17977 "user" : "all"
56122987 17978 },
44660702 17979 "protected" : 1,
7aacca6f 17980 "proxyto" : "node",
7aacca6f
DM
17981 "returns" : {
17982 "properties" : {
17983 "pid" : {
17984 "type" : "integer"
17985 },
17986 "status" : {
7aacca6f
DM
17987 "enum" : [
17988 "running",
17989 "stopped"
44660702
DM
17990 ],
17991 "type" : "string"
7aacca6f
DM
17992 }
17993 },
17994 "type" : "object"
56122987 17995 }
7aacca6f 17996 }
44660702
DM
17997 },
17998 "leaf" : 1,
17999 "path" : "/nodes/{node}/tasks/{upid}/status",
18000 "text" : "status"
56122987 18001 }
7aacca6f 18002 ],
44660702
DM
18003 "info" : {
18004 "DELETE" : {
18005 "description" : "Stop a task.",
18006 "method" : "DELETE",
18007 "name" : "stop_task",
18008 "parameters" : {
18009 "additionalProperties" : 0,
18010 "properties" : {
18011 "node" : {
18012 "description" : "The cluster node name.",
18013 "format" : "pve-node",
18014 "type" : "string"
18015 },
18016 "upid" : {
18017 "type" : "string"
18018 }
7aacca6f 18019 }
44660702
DM
18020 },
18021 "permissions" : {
18022 "description" : "The user needs 'Sys.Modify' permissions on '/nodes/<node>' if the task does not belong to him.",
18023 "user" : "all"
18024 },
18025 "protected" : 1,
18026 "proxyto" : "node",
18027 "returns" : {
18028 "type" : "null"
7aacca6f 18029 }
56122987 18030 },
44660702
DM
18031 "GET" : {
18032 "description" : "",
18033 "method" : "GET",
18034 "name" : "upid_index",
18035 "parameters" : {
18036 "additionalProperties" : 0,
18037 "properties" : {
18038 "node" : {
18039 "description" : "The cluster node name.",
18040 "format" : "pve-node",
18041 "type" : "string"
18042 },
18043 "upid" : {
18044 "type" : "string"
18045 }
18046 }
18047 },
18048 "permissions" : {
18049 "user" : "all"
18050 },
18051 "returns" : {
18052 "items" : {
18053 "properties" : {},
18054 "type" : "object"
18055 },
18056 "links" : [
18057 {
18058 "href" : "{name}",
18059 "rel" : "child"
18060 }
18061 ],
18062 "type" : "array"
56122987 18063 }
44660702 18064 }
56122987 18065 },
44660702
DM
18066 "leaf" : 0,
18067 "path" : "/nodes/{node}/tasks/{upid}",
18068 "text" : "{upid}"
18069 }
18070 ],
18071 "info" : {
18072 "GET" : {
7aacca6f 18073 "description" : "Read task list for one node (finished tasks).",
44660702
DM
18074 "method" : "GET",
18075 "name" : "node_tasks",
56122987 18076 "parameters" : {
7aacca6f 18077 "additionalProperties" : 0,
56122987 18078 "properties" : {
44660702 18079 "errors" : {
56122987 18080 "optional" : 1,
44660702 18081 "type" : "boolean"
56122987 18082 },
44660702 18083 "limit" : {
56122987 18084 "minimum" : 0,
56122987 18085 "optional" : 1,
7aacca6f 18086 "type" : "integer"
56122987 18087 },
56122987
DM
18088 "node" : {
18089 "description" : "The cluster node name.",
44660702
DM
18090 "format" : "pve-node",
18091 "type" : "string"
56122987 18092 },
44660702 18093 "start" : {
7aacca6f 18094 "minimum" : 0,
44660702
DM
18095 "optional" : 1,
18096 "type" : "integer"
56122987 18097 },
7aacca6f 18098 "userfilter" : {
44660702
DM
18099 "optional" : 1,
18100 "type" : "string"
18101 },
18102 "vmid" : {
18103 "description" : "Only list tasks for this VM.",
18104 "format" : "pve-vmid",
18105 "minimum" : 1,
18106 "optional" : 1,
18107 "type" : "integer"
56122987
DM
18108 }
18109 }
18110 },
7aacca6f 18111 "permissions" : {
44660702 18112 "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
18113 "user" : "all"
18114 },
44660702 18115 "proxyto" : "node",
56122987
DM
18116 "returns" : {
18117 "items" : {
18118 "properties" : {
44660702 18119 "upid" : {
56122987
DM
18120 "type" : "string"
18121 }
18122 },
18123 "type" : "object"
18124 },
56122987
DM
18125 "links" : [
18126 {
44660702
DM
18127 "href" : "{upid}",
18128 "rel" : "child"
56122987 18129 }
44660702
DM
18130 ],
18131 "type" : "array"
56122987
DM
18132 }
18133 }
18134 },
44660702
DM
18135 "leaf" : 0,
18136 "path" : "/nodes/{node}/tasks",
18137 "text" : "tasks"
18138 },
18139 {
56122987
DM
18140 "children" : [
18141 {
56122987
DM
18142 "info" : {
18143 "GET" : {
7aacca6f 18144 "description" : "Scan zfs pool list on local node.",
44660702
DM
18145 "method" : "GET",
18146 "name" : "zfsscan",
56122987 18147 "parameters" : {
44660702 18148 "additionalProperties" : 0,
56122987 18149 "properties" : {
56122987
DM
18150 "node" : {
18151 "description" : "The cluster node name.",
44660702
DM
18152 "format" : "pve-node",
18153 "type" : "string"
56122987 18154 }
44660702
DM
18155 }
18156 },
7aacca6f
DM
18157 "permissions" : {
18158 "check" : [
18159 "perm",
18160 "/storage",
18161 [
18162 "Datastore.Allocate"
18163 ]
18164 ]
18165 },
44660702
DM
18166 "protected" : 1,
18167 "proxyto" : "node",
56122987 18168 "returns" : {
56122987
DM
18169 "items" : {
18170 "properties" : {
44660702 18171 "pool" : {
56122987
DM
18172 "type" : "string"
18173 }
44660702
DM
18174 },
18175 "type" : "object"
18176 },
18177 "type" : "array"
18178 }
18179 }
18180 },
18181 "leaf" : 1,
18182 "path" : "/nodes/{node}/scan/zfs",
18183 "text" : "zfs"
18184 },
18185 {
18186 "info" : {
18187 "GET" : {
18188 "description" : "Scan remote NFS server.",
18189 "method" : "GET",
7aacca6f 18190 "name" : "nfsscan",
56122987 18191 "parameters" : {
44660702 18192 "additionalProperties" : 0,
56122987
DM
18193 "properties" : {
18194 "node" : {
7aacca6f 18195 "description" : "The cluster node name.",
44660702 18196 "format" : "pve-node",
7aacca6f
DM
18197 "type" : "string"
18198 },
18199 "server" : {
18200 "format" : "pve-storage-server",
18201 "type" : "string"
56122987 18202 }
44660702 18203 }
56122987 18204 },
56122987
DM
18205 "permissions" : {
18206 "check" : [
18207 "perm",
18208 "/storage",
18209 [
18210 "Datastore.Allocate"
18211 ]
18212 ]
18213 },
44660702 18214 "protected" : 1,
56122987 18215 "proxyto" : "node",
44660702
DM
18216 "returns" : {
18217 "items" : {
18218 "properties" : {
18219 "options" : {
18220 "type" : "string"
18221 },
18222 "path" : {
18223 "type" : "string"
18224 }
18225 },
18226 "type" : "object"
18227 },
18228 "type" : "array"
18229 }
18230 }
18231 },
18232 "leaf" : 1,
18233 "path" : "/nodes/{node}/scan/nfs",
18234 "text" : "nfs"
18235 },
18236 {
18237 "info" : {
18238 "GET" : {
18239 "description" : "Scan remote GlusterFS server.",
7aacca6f
DM
18240 "method" : "GET",
18241 "name" : "glusterfsscan",
56122987 18242 "parameters" : {
44660702 18243 "additionalProperties" : 0,
56122987 18244 "properties" : {
56122987 18245 "node" : {
44660702 18246 "description" : "The cluster node name.",
56122987 18247 "format" : "pve-node",
44660702 18248 "type" : "string"
7aacca6f
DM
18249 },
18250 "server" : {
18251 "format" : "pve-storage-server",
18252 "type" : "string"
56122987 18253 }
44660702
DM
18254 }
18255 },
18256 "permissions" : {
18257 "check" : [
18258 "perm",
18259 "/storage",
18260 [
18261 "Datastore.Allocate"
18262 ]
18263 ]
7aacca6f 18264 },
44660702
DM
18265 "protected" : 1,
18266 "proxyto" : "node",
18267 "returns" : {
18268 "items" : {
18269 "properties" : {
18270 "volname" : {
18271 "type" : "string"
18272 }
18273 },
18274 "type" : "object"
18275 },
18276 "type" : "array"
18277 }
56122987
DM
18278 }
18279 },
44660702
DM
18280 "leaf" : 1,
18281 "path" : "/nodes/{node}/scan/glusterfs",
7aacca6f 18282 "text" : "glusterfs"
56122987
DM
18283 },
18284 {
56122987
DM
18285 "info" : {
18286 "GET" : {
7aacca6f 18287 "description" : "Scan remote iSCSI server.",
44660702
DM
18288 "method" : "GET",
18289 "name" : "iscsiscan",
18290 "parameters" : {
18291 "additionalProperties" : 0,
18292 "properties" : {
18293 "node" : {
18294 "description" : "The cluster node name.",
18295 "format" : "pve-node",
18296 "type" : "string"
18297 },
18298 "portal" : {
18299 "format" : "pve-storage-portal-dns",
18300 "type" : "string"
18301 }
18302 }
18303 },
56122987
DM
18304 "permissions" : {
18305 "check" : [
18306 "perm",
18307 "/storage",
18308 [
18309 "Datastore.Allocate"
18310 ]
18311 ]
18312 },
44660702
DM
18313 "protected" : 1,
18314 "proxyto" : "node",
56122987 18315 "returns" : {
56122987
DM
18316 "items" : {
18317 "properties" : {
44660702 18318 "portal" : {
56122987
DM
18319 "type" : "string"
18320 },
44660702 18321 "target" : {
56122987
DM
18322 "type" : "string"
18323 }
18324 },
18325 "type" : "object"
56122987 18326 },
44660702
DM
18327 "type" : "array"
18328 }
56122987
DM
18329 }
18330 },
44660702 18331 "leaf" : 1,
7aacca6f 18332 "path" : "/nodes/{node}/scan/iscsi",
44660702 18333 "text" : "iscsi"
56122987
DM
18334 },
18335 {
56122987
DM
18336 "info" : {
18337 "GET" : {
44660702
DM
18338 "description" : "List local LVM volume groups.",
18339 "method" : "GET",
18340 "name" : "lvmscan",
18341 "parameters" : {
18342 "additionalProperties" : 0,
18343 "properties" : {
18344 "node" : {
18345 "description" : "The cluster node name.",
18346 "format" : "pve-node",
18347 "type" : "string"
56122987 18348 }
7aacca6f 18349 }
56122987 18350 },
56122987
DM
18351 "permissions" : {
18352 "check" : [
18353 "perm",
18354 "/storage",
18355 [
18356 "Datastore.Allocate"
18357 ]
18358 ]
18359 },
7aacca6f 18360 "protected" : 1,
44660702
DM
18361 "proxyto" : "node",
18362 "returns" : {
18363 "items" : {
18364 "properties" : {
18365 "vg" : {
18366 "type" : "string"
18367 }
18368 },
18369 "type" : "object"
18370 },
18371 "type" : "array"
7aacca6f 18372 }
56122987
DM
18373 }
18374 },
18375 "leaf" : 1,
44660702
DM
18376 "path" : "/nodes/{node}/scan/lvm",
18377 "text" : "lvm"
56122987
DM
18378 },
18379 {
56122987
DM
18380 "info" : {
18381 "GET" : {
44660702
DM
18382 "description" : "List local LVM Thin Pools.",
18383 "method" : "GET",
18384 "name" : "lvmthinscan",
56122987 18385 "parameters" : {
44660702 18386 "additionalProperties" : 0,
56122987
DM
18387 "properties" : {
18388 "node" : {
44660702 18389 "description" : "The cluster node name.",
56122987 18390 "format" : "pve-node",
44660702 18391 "type" : "string"
56122987
DM
18392 },
18393 "vg" : {
44660702 18394 "maxLength" : 100,
56122987 18395 "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+",
44660702 18396 "type" : "string"
56122987 18397 }
44660702 18398 }
56122987 18399 },
7aacca6f
DM
18400 "permissions" : {
18401 "check" : [
18402 "perm",
18403 "/storage",
18404 [
18405 "Datastore.Allocate"
18406 ]
18407 ]
18408 },
44660702 18409 "protected" : 1,
7aacca6f 18410 "proxyto" : "node",
56122987 18411 "returns" : {
56122987
DM
18412 "items" : {
18413 "properties" : {
18414 "lv" : {
18415 "type" : "string"
18416 }
18417 },
18418 "type" : "object"
44660702
DM
18419 },
18420 "type" : "array"
7aacca6f 18421 }
56122987
DM
18422 }
18423 },
7aacca6f 18424 "leaf" : 1,
44660702
DM
18425 "path" : "/nodes/{node}/scan/lvmthin",
18426 "text" : "lvmthin"
56122987
DM
18427 },
18428 {
56122987
DM
18429 "info" : {
18430 "GET" : {
44660702
DM
18431 "description" : "List local USB devices.",
18432 "method" : "GET",
18433 "name" : "usbscan",
18434 "parameters" : {
18435 "additionalProperties" : 0,
18436 "properties" : {
18437 "node" : {
18438 "description" : "The cluster node name.",
18439 "format" : "pve-node",
18440 "type" : "string"
18441 }
18442 }
18443 },
7aacca6f
DM
18444 "permissions" : {
18445 "check" : [
18446 "perm",
18447 "/",
18448 [
18449 "Sys.Modify"
18450 ]
18451 ]
18452 },
44660702 18453 "protected" : 1,
7aacca6f 18454 "proxyto" : "node",
56122987
DM
18455 "returns" : {
18456 "items" : {
18457 "properties" : {
44660702
DM
18458 "busnum" : {
18459 "type" : "integer"
56122987 18460 },
44660702
DM
18461 "class" : {
18462 "type" : "integer"
56122987 18463 },
7aacca6f 18464 "devnum" : {
56122987
DM
18465 "type" : "integer"
18466 },
44660702
DM
18467 "level" : {
18468 "type" : "integer"
18469 },
18470 "manufacturer" : {
18471 "optional" : 1,
7aacca6f
DM
18472 "type" : "string"
18473 },
44660702 18474 "port" : {
56122987
DM
18475 "type" : "integer"
18476 },
44660702
DM
18477 "prodid" : {
18478 "type" : "string"
56122987 18479 },
44660702
DM
18480 "product" : {
18481 "optional" : 1,
18482 "type" : "string"
18483 },
18484 "serial" : {
7aacca6f 18485 "optional" : 1,
56122987
DM
18486 "type" : "string"
18487 },
44660702 18488 "speed" : {
7aacca6f 18489 "type" : "string"
56122987 18490 },
44660702 18491 "usbpath" : {
56122987
DM
18492 "optional" : 1,
18493 "type" : "string"
18494 },
44660702
DM
18495 "vendid" : {
18496 "type" : "string"
56122987
DM
18497 }
18498 },
18499 "type" : "object"
7aacca6f
DM
18500 },
18501 "type" : "array"
44660702
DM
18502 }
18503 }
18504 },
18505 "leaf" : 1,
18506 "path" : "/nodes/{node}/scan/usb",
18507 "text" : "usb"
18508 }
18509 ],
18510 "info" : {
18511 "GET" : {
18512 "description" : "Index of available scan methods",
18513 "method" : "GET",
18514 "name" : "index",
18515 "parameters" : {
18516 "additionalProperties" : 0,
18517 "properties" : {
18518 "node" : {
18519 "description" : "The cluster node name.",
18520 "format" : "pve-node",
18521 "type" : "string"
18522 }
18523 }
18524 },
18525 "permissions" : {
18526 "user" : "all"
18527 },
18528 "returns" : {
18529 "items" : {
18530 "properties" : {
18531 "method" : {
18532 "type" : "string"
56122987
DM
18533 }
18534 },
44660702
DM
18535 "type" : "object"
18536 },
18537 "links" : [
18538 {
18539 "href" : "{method}",
18540 "rel" : "child"
18541 }
18542 ],
18543 "type" : "array"
56122987
DM
18544 }
18545 }
44660702
DM
18546 },
18547 "leaf" : 0,
18548 "path" : "/nodes/{node}/scan",
7aacca6f 18549 "text" : "scan"
56122987
DM
18550 },
18551 {
56122987
DM
18552 "children" : [
18553 {
56122987
DM
18554 "children" : [
18555 {
7aacca6f
DM
18556 "children" : [
18557 {
18558 "info" : {
44660702
DM
18559 "DELETE" : {
18560 "description" : "Delete volume",
18561 "method" : "DELETE",
18562 "name" : "delete",
7aacca6f
DM
18563 "parameters" : {
18564 "additionalProperties" : 0,
18565 "properties" : {
7aacca6f
DM
18566 "node" : {
18567 "description" : "The cluster node name.",
44660702
DM
18568 "format" : "pve-node",
18569 "type" : "string"
18570 },
18571 "storage" : {
18572 "description" : "The storage identifier.",
18573 "format" : "pve-storage-id",
18574 "optional" : 1,
18575 "type" : "string"
7aacca6f
DM
18576 },
18577 "volume" : {
18578 "description" : "Volume identifier",
18579 "type" : "string"
18580 }
18581 }
18582 },
44660702
DM
18583 "permissions" : {
18584 "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).",
18585 "user" : "all"
18586 },
18587 "protected" : 1,
18588 "proxyto" : "node",
18589 "returns" : {
18590 "type" : "null"
18591 }
7aacca6f 18592 },
44660702
DM
18593 "GET" : {
18594 "description" : "Get volume attributes",
18595 "method" : "GET",
18596 "name" : "info",
7aacca6f
DM
18597 "parameters" : {
18598 "additionalProperties" : 0,
18599 "properties" : {
7aacca6f
DM
18600 "node" : {
18601 "description" : "The cluster node name.",
44660702
DM
18602 "format" : "pve-node",
18603 "type" : "string"
7aacca6f
DM
18604 },
18605 "storage" : {
7aacca6f 18606 "description" : "The storage identifier.",
44660702 18607 "format" : "pve-storage-id",
7aacca6f
DM
18608 "optional" : 1,
18609 "type" : "string"
44660702
DM
18610 },
18611 "volume" : {
18612 "description" : "Volume identifier",
18613 "type" : "string"
7aacca6f
DM
18614 }
18615 }
18616 },
7aacca6f 18617 "permissions" : {
44660702 18618 "description" : "You need read access for the volume.",
7aacca6f
DM
18619 "user" : "all"
18620 },
44660702 18621 "protected" : 1,
7aacca6f 18622 "proxyto" : "node",
7aacca6f 18623 "returns" : {
44660702 18624 "type" : "object"
7aacca6f
DM
18625 }
18626 },
18627 "POST" : {
44660702
DM
18628 "description" : "Copy a volume. This is experimental code - do not use.",
18629 "method" : "POST",
18630 "name" : "copy",
7aacca6f
DM
18631 "parameters" : {
18632 "additionalProperties" : 0,
18633 "properties" : {
44660702
DM
18634 "node" : {
18635 "description" : "The cluster node name.",
18636 "format" : "pve-node",
18637 "type" : "string"
18638 },
18639 "storage" : {
18640 "description" : "The storage identifier.",
18641 "format" : "pve-storage-id",
18642 "optional" : 1,
18643 "type" : "string"
18644 },
7aacca6f 18645 "target" : {
44660702
DM
18646 "description" : "Target volume identifier",
18647 "type" : "string"
7aacca6f
DM
18648 },
18649 "target_node" : {
7aacca6f 18650 "description" : "Target node. Default is local node.",
44660702
DM
18651 "format" : "pve-node",
18652 "optional" : 1,
18653 "type" : "string"
7aacca6f
DM
18654 },
18655 "volume" : {
44660702
DM
18656 "description" : "Source volume identifier",
18657 "type" : "string"
7aacca6f
DM
18658 }
18659 }
18660 },
7aacca6f
DM
18661 "protected" : 1,
18662 "proxyto" : "node",
18663 "returns" : {
18664 "type" : "string"
44660702 18665 }
7aacca6f
DM
18666 }
18667 },
7aacca6f 18668 "leaf" : 1,
44660702
DM
18669 "path" : "/nodes/{node}/storage/{storage}/content/{volume}",
18670 "text" : "{volume}"
7aacca6f
DM
18671 }
18672 ],
56122987
DM
18673 "info" : {
18674 "GET" : {
44660702
DM
18675 "description" : "List storage content.",
18676 "method" : "GET",
18677 "name" : "index",
18678 "parameters" : {
18679 "additionalProperties" : 0,
18680 "properties" : {
18681 "content" : {
18682 "description" : "Only list content of this type.",
18683 "format" : "pve-storage-content",
18684 "optional" : 1,
18685 "type" : "string"
18686 },
18687 "node" : {
18688 "description" : "The cluster node name.",
18689 "format" : "pve-node",
18690 "type" : "string"
18691 },
18692 "storage" : {
18693 "description" : "The storage identifier.",
18694 "format" : "pve-storage-id",
18695 "type" : "string"
18696 },
18697 "vmid" : {
18698 "description" : "Only list images for this VM",
18699 "format" : "pve-vmid",
18700 "minimum" : 1,
18701 "optional" : 1,
18702 "type" : "integer"
18703 }
18704 }
18705 },
7aacca6f
DM
18706 "permissions" : {
18707 "check" : [
18708 "perm",
18709 "/storage/{storage}",
18710 [
18711 "Datastore.Audit",
18712 "Datastore.AllocateSpace"
18713 ],
18714 "any",
18715 1
18716 ]
18717 },
44660702 18718 "protected" : 1,
7aacca6f 18719 "proxyto" : "node",
56122987 18720 "returns" : {
44660702
DM
18721 "items" : {
18722 "properties" : {
18723 "volid" : {
18724 "type" : "string"
18725 }
18726 },
18727 "type" : "object"
18728 },
18729 "links" : [
18730 {
18731 "href" : "{volid}",
18732 "rel" : "child"
18733 }
18734 ],
18735 "type" : "array"
18736 }
18737 },
18738 "POST" : {
18739 "description" : "Allocate disk images.",
18740 "method" : "POST",
18741 "name" : "create",
56122987 18742 "parameters" : {
44660702 18743 "additionalProperties" : 0,
56122987 18744 "properties" : {
44660702
DM
18745 "filename" : {
18746 "description" : "The name of the file to create.",
18747 "type" : "string"
18748 },
18749 "format" : {
18750 "enum" : [
18751 "raw",
18752 "qcow2",
18753 "subvol"
18754 ],
18755 "optional" : 1,
18756 "requires" : "size",
18757 "type" : "string"
18758 },
18759 "node" : {
18760 "description" : "The cluster node name.",
18761 "format" : "pve-node",
18762 "type" : "string"
18763 },
18764 "size" : {
18765 "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)",
18766 "pattern" : "\\d+[MG]?",
18767 "type" : "string"
18768 },
56122987
DM
18769 "storage" : {
18770 "description" : "The storage identifier.",
44660702
DM
18771 "format" : "pve-storage-id",
18772 "type" : "string"
56122987 18773 },
44660702
DM
18774 "vmid" : {
18775 "description" : "Specify owner VM",
18776 "format" : "pve-vmid",
18777 "minimum" : 1,
18778 "type" : "integer"
18779 }
18780 }
18781 },
18782 "permissions" : {
18783 "check" : [
18784 "perm",
18785 "/storage/{storage}",
18786 [
18787 "Datastore.AllocateSpace"
18788 ]
18789 ]
18790 },
18791 "protected" : 1,
18792 "proxyto" : "node",
18793 "returns" : {
18794 "description" : "Volume identifier",
18795 "type" : "string"
18796 }
18797 }
18798 },
18799 "leaf" : 0,
18800 "path" : "/nodes/{node}/storage/{storage}/content",
18801 "text" : "content"
18802 },
18803 {
18804 "info" : {
18805 "GET" : {
18806 "description" : "Read storage status.",
18807 "method" : "GET",
18808 "name" : "read_status",
18809 "parameters" : {
18810 "additionalProperties" : 0,
18811 "properties" : {
56122987
DM
18812 "node" : {
18813 "description" : "The cluster node name.",
44660702
DM
18814 "format" : "pve-node",
18815 "type" : "string"
18816 },
18817 "storage" : {
18818 "description" : "The storage identifier.",
18819 "format" : "pve-storage-id",
18820 "type" : "string"
56122987 18821 }
44660702
DM
18822 }
18823 },
18824 "permissions" : {
18825 "check" : [
18826 "perm",
18827 "/storage/{storage}",
18828 [
18829 "Datastore.Audit",
18830 "Datastore.AllocateSpace"
18831 ],
18832 "any",
18833 1
18834 ]
56122987
DM
18835 },
18836 "protected" : 1,
44660702
DM
18837 "proxyto" : "node",
18838 "returns" : {
18839 "properties" : {},
18840 "type" : "object"
18841 }
56122987
DM
18842 }
18843 },
44660702
DM
18844 "leaf" : 1,
18845 "path" : "/nodes/{node}/storage/{storage}/status",
7aacca6f 18846 "text" : "status"
56122987
DM
18847 },
18848 {
56122987
DM
18849 "info" : {
18850 "GET" : {
44660702
DM
18851 "description" : "Read storage RRD statistics (returns PNG).",
18852 "method" : "GET",
18853 "name" : "rrd",
56122987 18854 "parameters" : {
44660702 18855 "additionalProperties" : 0,
56122987 18856 "properties" : {
44660702
DM
18857 "cf" : {
18858 "description" : "The RRD consolidation function",
18859 "enum" : [
18860 "AVERAGE",
18861 "MAX"
18862 ],
18863 "optional" : 1,
18864 "type" : "string"
18865 },
7aacca6f 18866 "ds" : {
7aacca6f 18867 "description" : "The list of datasources you want to display.",
44660702
DM
18868 "format" : "pve-configid-list",
18869 "type" : "string"
56122987 18870 },
7aacca6f
DM
18871 "node" : {
18872 "description" : "The cluster node name.",
44660702
DM
18873 "format" : "pve-node",
18874 "type" : "string"
56122987 18875 },
7aacca6f 18876 "storage" : {
7aacca6f 18877 "description" : "The storage identifier.",
44660702
DM
18878 "format" : "pve-storage-id",
18879 "type" : "string"
18880 },
18881 "timeframe" : {
18882 "description" : "Specify the time frame you are interested in.",
7aacca6f 18883 "enum" : [
44660702
DM
18884 "hour",
18885 "day",
18886 "week",
18887 "month",
18888 "year"
7aacca6f 18889 ],
44660702 18890 "type" : "string"
56122987 18891 }
44660702 18892 }
56122987
DM
18893 },
18894 "permissions" : {
18895 "check" : [
18896 "perm",
18897 "/storage/{storage}",
18898 [
18899 "Datastore.Audit",
18900 "Datastore.AllocateSpace"
18901 ],
18902 "any",
18903 1
18904 ]
18905 },
44660702
DM
18906 "protected" : 1,
18907 "proxyto" : "node",
7aacca6f
DM
18908 "returns" : {
18909 "properties" : {
18910 "filename" : {
18911 "type" : "string"
18912 }
18913 },
18914 "type" : "object"
18915 }
56122987
DM
18916 }
18917 },
18918 "leaf" : 1,
44660702
DM
18919 "path" : "/nodes/{node}/storage/{storage}/rrd",
18920 "text" : "rrd"
56122987
DM
18921 },
18922 {
56122987
DM
18923 "info" : {
18924 "GET" : {
44660702
DM
18925 "description" : "Read storage RRD statistics.",
18926 "method" : "GET",
18927 "name" : "rrddata",
56122987 18928 "parameters" : {
44660702 18929 "additionalProperties" : 0,
56122987 18930 "properties" : {
44660702
DM
18931 "cf" : {
18932 "description" : "The RRD consolidation function",
18933 "enum" : [
18934 "AVERAGE",
18935 "MAX"
18936 ],
18937 "optional" : 1,
18938 "type" : "string"
18939 },
7aacca6f 18940 "node" : {
7aacca6f 18941 "description" : "The cluster node name.",
44660702
DM
18942 "format" : "pve-node",
18943 "type" : "string"
18944 },
18945 "storage" : {
18946 "description" : "The storage identifier.",
18947 "format" : "pve-storage-id",
7aacca6f
DM
18948 "type" : "string"
18949 },
56122987 18950 "timeframe" : {
7aacca6f 18951 "description" : "Specify the time frame you are interested in.",
56122987
DM
18952 "enum" : [
18953 "hour",
18954 "day",
18955 "week",
18956 "month",
18957 "year"
56122987 18958 ],
44660702 18959 "type" : "string"
56122987 18960 }
44660702 18961 }
7aacca6f 18962 },
7aacca6f
DM
18963 "permissions" : {
18964 "check" : [
18965 "perm",
18966 "/storage/{storage}",
18967 [
18968 "Datastore.Audit",
18969 "Datastore.AllocateSpace"
18970 ],
18971 "any",
18972 1
18973 ]
18974 },
44660702
DM
18975 "protected" : 1,
18976 "proxyto" : "node",
7aacca6f
DM
18977 "returns" : {
18978 "items" : {
44660702
DM
18979 "properties" : {},
18980 "type" : "object"
7aacca6f
DM
18981 },
18982 "type" : "array"
56122987
DM
18983 }
18984 }
7aacca6f 18985 },
7aacca6f 18986 "leaf" : 1,
44660702
DM
18987 "path" : "/nodes/{node}/storage/{storage}/rrddata",
18988 "text" : "rrddata"
56122987
DM
18989 },
18990 {
56122987
DM
18991 "info" : {
18992 "POST" : {
7aacca6f 18993 "description" : "Upload templates and ISO images.",
44660702
DM
18994 "method" : "POST",
18995 "name" : "upload",
56122987 18996 "parameters" : {
7aacca6f 18997 "additionalProperties" : 0,
56122987 18998 "properties" : {
56122987 18999 "content" : {
7aacca6f 19000 "description" : "Content type.",
44660702
DM
19001 "format" : "pve-storage-content",
19002 "type" : "string"
56122987
DM
19003 },
19004 "filename" : {
44660702
DM
19005 "description" : "The name of the file to create.",
19006 "type" : "string"
56122987
DM
19007 },
19008 "node" : {
19009 "description" : "The cluster node name.",
44660702
DM
19010 "format" : "pve-node",
19011 "type" : "string"
19012 },
19013 "storage" : {
19014 "description" : "The storage identifier.",
19015 "format" : "pve-storage-id",
19016 "type" : "string"
19017 },
19018 "tmpfilename" : {
19019 "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.",
19020 "optional" : 1,
19021 "type" : "string"
56122987 19022 }
7aacca6f 19023 }
56122987 19024 },
56122987
DM
19025 "permissions" : {
19026 "check" : [
19027 "perm",
19028 "/storage/{storage}",
19029 [
19030 "Datastore.AllocateTemplate"
19031 ]
19032 ]
44660702
DM
19033 },
19034 "protected" : 1,
19035 "returns" : {
19036 "type" : "string"
19037 }
19038 }
19039 },
19040 "leaf" : 1,
19041 "path" : "/nodes/{node}/storage/{storage}/upload",
19042 "text" : "upload"
19043 }
19044 ],
19045 "info" : {
19046 "GET" : {
19047 "description" : "",
19048 "method" : "GET",
19049 "name" : "diridx",
19050 "parameters" : {
19051 "additionalProperties" : 0,
19052 "properties" : {
19053 "node" : {
19054 "description" : "The cluster node name.",
19055 "format" : "pve-node",
19056 "type" : "string"
19057 },
19058 "storage" : {
19059 "description" : "The storage identifier.",
19060 "format" : "pve-storage-id",
19061 "type" : "string"
56122987
DM
19062 }
19063 }
44660702
DM
19064 },
19065 "permissions" : {
19066 "check" : [
19067 "perm",
19068 "/storage/{storage}",
19069 [
19070 "Datastore.Audit",
19071 "Datastore.AllocateSpace"
19072 ],
19073 "any",
19074 1
19075 ]
19076 },
19077 "returns" : {
19078 "items" : {
19079 "properties" : {
19080 "subdir" : {
19081 "type" : "string"
19082 }
19083 },
19084 "type" : "object"
19085 },
19086 "links" : [
19087 {
19088 "href" : "{subdir}",
19089 "rel" : "child"
19090 }
19091 ],
19092 "type" : "array"
56122987
DM
19093 }
19094 }
44660702
DM
19095 },
19096 "leaf" : 0,
19097 "path" : "/nodes/{node}/storage/{storage}",
19098 "text" : "{storage}"
56122987
DM
19099 }
19100 ],
56122987
DM
19101 "info" : {
19102 "GET" : {
44660702
DM
19103 "description" : "Get status for all datastores.",
19104 "method" : "GET",
19105 "name" : "index",
19106 "parameters" : {
19107 "additionalProperties" : 0,
19108 "properties" : {
19109 "content" : {
19110 "description" : "Only list stores which support this content type.",
19111 "format" : "pve-storage-content-list",
19112 "optional" : 1,
19113 "type" : "string"
19114 },
19115 "enabled" : {
19116 "default" : 0,
19117 "description" : "Only list stores which are enabled (not disabled in config).",
19118 "optional" : 1,
19119 "type" : "boolean"
19120 },
19121 "node" : {
19122 "description" : "The cluster node name.",
19123 "format" : "pve-node",
19124 "type" : "string"
19125 },
19126 "storage" : {
19127 "description" : "Only list status for specified storage",
19128 "format" : "pve-storage-id",
19129 "optional" : 1,
19130 "type" : "string"
19131 },
19132 "target" : {
19133 "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.",
19134 "format" : "pve-node",
19135 "optional" : 1,
19136 "type" : "string"
19137 }
19138 }
19139 },
7aacca6f
DM
19140 "permissions" : {
19141 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
19142 "user" : "all"
19143 },
44660702 19144 "protected" : 1,
7aacca6f 19145 "proxyto" : "node",
56122987
DM
19146 "returns" : {
19147 "items" : {
56122987
DM
19148 "properties" : {
19149 "storage" : {
19150 "type" : "string"
19151 }
44660702
DM
19152 },
19153 "type" : "object"
56122987 19154 },
56122987
DM
19155 "links" : [
19156 {
7aacca6f
DM
19157 "href" : "{storage}",
19158 "rel" : "child"
56122987 19159 }
44660702
DM
19160 ],
19161 "type" : "array"
19162 }
56122987 19163 }
44660702
DM
19164 },
19165 "leaf" : 0,
19166 "path" : "/nodes/{node}/storage",
19167 "text" : "storage"
56122987
DM
19168 },
19169 {
56122987
DM
19170 "children" : [
19171 {
19172 "info" : {
44660702
DM
19173 "GET" : {
19174 "description" : "List available updates.",
19175 "method" : "GET",
19176 "name" : "list_updates",
19177 "parameters" : {
19178 "additionalProperties" : 0,
19179 "properties" : {
19180 "node" : {
19181 "description" : "The cluster node name.",
19182 "format" : "pve-node",
19183 "type" : "string"
19184 }
19185 }
7aacca6f
DM
19186 },
19187 "permissions" : {
19188 "check" : [
19189 "perm",
19190 "/nodes/{node}",
19191 [
19192 "Sys.Modify"
19193 ]
19194 ]
19195 },
44660702 19196 "protected" : 1,
56122987 19197 "proxyto" : "node",
44660702
DM
19198 "returns" : {
19199 "items" : {
19200 "properties" : {},
19201 "type" : "object"
19202 },
19203 "type" : "array"
19204 }
19205 },
19206 "POST" : {
19207 "description" : "This is used to resynchronize the package index files from their sources (apt-get update).",
7aacca6f
DM
19208 "method" : "POST",
19209 "name" : "update_database",
56122987
DM
19210 "parameters" : {
19211 "additionalProperties" : 0,
19212 "properties" : {
44660702
DM
19213 "node" : {
19214 "description" : "The cluster node name.",
19215 "format" : "pve-node",
19216 "type" : "string"
19217 },
56122987 19218 "notify" : {
56122987 19219 "default" : 0,
44660702
DM
19220 "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').",
19221 "optional" : 1,
19222 "type" : "boolean"
56122987
DM
19223 },
19224 "quiet" : {
56122987 19225 "default" : 0,
44660702 19226 "description" : "Only produces output suitable for logging, omitting progress indicators.",
56122987 19227 "optional" : 1,
44660702 19228 "type" : "boolean"
56122987 19229 }
7aacca6f
DM
19230 }
19231 },
19232 "permissions" : {
19233 "check" : [
19234 "perm",
19235 "/nodes/{node}",
19236 [
19237 "Sys.Modify"
19238 ]
19239 ]
19240 },
44660702
DM
19241 "protected" : 1,
19242 "proxyto" : "node",
19243 "returns" : {
19244 "type" : "string"
19245 }
56122987
DM
19246 }
19247 },
7aacca6f 19248 "leaf" : 1,
44660702
DM
19249 "path" : "/nodes/{node}/apt/update",
19250 "text" : "update"
56122987
DM
19251 },
19252 {
56122987
DM
19253 "info" : {
19254 "GET" : {
44660702 19255 "description" : "Get package changelogs.",
56122987 19256 "method" : "GET",
7aacca6f 19257 "name" : "changelog",
56122987 19258 "parameters" : {
44660702 19259 "additionalProperties" : 0,
56122987
DM
19260 "properties" : {
19261 "name" : {
19262 "description" : "Package name.",
19263 "type" : "string"
19264 },
44660702
DM
19265 "node" : {
19266 "description" : "The cluster node name.",
19267 "format" : "pve-node",
19268 "type" : "string"
19269 },
56122987 19270 "version" : {
7aacca6f 19271 "description" : "Package version.",
44660702
DM
19272 "optional" : 1,
19273 "type" : "string"
56122987 19274 }
44660702 19275 }
56122987 19276 },
44660702
DM
19277 "permissions" : {
19278 "check" : [
19279 "perm",
19280 "/nodes/{node}",
19281 [
19282 "Sys.Modify"
19283 ]
19284 ]
19285 },
19286 "proxyto" : "node",
19287 "returns" : {
19288 "type" : "string"
19289 }
56122987
DM
19290 }
19291 },
44660702
DM
19292 "leaf" : 1,
19293 "path" : "/nodes/{node}/apt/changelog",
7aacca6f 19294 "text" : "changelog"
56122987
DM
19295 },
19296 {
56122987
DM
19297 "info" : {
19298 "GET" : {
44660702
DM
19299 "description" : "Get package information for important Proxmox packages.",
19300 "method" : "GET",
7aacca6f
DM
19301 "name" : "versions",
19302 "parameters" : {
44660702 19303 "additionalProperties" : 0,
7aacca6f
DM
19304 "properties" : {
19305 "node" : {
44660702 19306 "description" : "The cluster node name.",
7aacca6f 19307 "format" : "pve-node",
44660702 19308 "type" : "string"
7aacca6f 19309 }
44660702 19310 }
7aacca6f 19311 },
56122987
DM
19312 "permissions" : {
19313 "check" : [
19314 "perm",
19315 "/nodes/{node}",
19316 [
19317 "Sys.Audit"
19318 ]
19319 ]
19320 },
7aacca6f 19321 "proxyto" : "node",
56122987
DM
19322 "returns" : {
19323 "items" : {
7aacca6f
DM
19324 "properties" : {},
19325 "type" : "object"
44660702
DM
19326 },
19327 "type" : "array"
56122987
DM
19328 }
19329 }
19330 },
44660702 19331 "leaf" : 1,
7aacca6f 19332 "path" : "/nodes/{node}/apt/versions",
44660702 19333 "text" : "versions"
56122987
DM
19334 }
19335 ],
56122987
DM
19336 "info" : {
19337 "GET" : {
44660702 19338 "description" : "Directory index for apt (Advanced Package Tool).",
7aacca6f 19339 "method" : "GET",
44660702 19340 "name" : "index",
7aacca6f
DM
19341 "parameters" : {
19342 "additionalProperties" : 0,
19343 "properties" : {
19344 "node" : {
44660702 19345 "description" : "The cluster node name.",
7aacca6f 19346 "format" : "pve-node",
44660702 19347 "type" : "string"
7aacca6f
DM
19348 }
19349 }
19350 },
7aacca6f
DM
19351 "permissions" : {
19352 "user" : "all"
19353 },
44660702
DM
19354 "returns" : {
19355 "items" : {
19356 "properties" : {
19357 "id" : {
19358 "type" : "string"
19359 }
19360 },
19361 "type" : "object"
19362 },
19363 "links" : [
19364 {
19365 "href" : "{id}",
19366 "rel" : "child"
19367 }
19368 ],
19369 "type" : "array"
19370 }
56122987 19371 }
7aacca6f 19372 },
44660702 19373 "leaf" : 0,
7aacca6f 19374 "path" : "/nodes/{node}/apt",
44660702 19375 "text" : "apt"
56122987
DM
19376 },
19377 {
56122987
DM
19378 "children" : [
19379 {
19380 "children" : [
19381 {
56122987
DM
19382 "info" : {
19383 "DELETE" : {
44660702 19384 "description" : "Delete rule.",
7aacca6f 19385 "method" : "DELETE",
44660702 19386 "name" : "delete_rule",
56122987
DM
19387 "parameters" : {
19388 "additionalProperties" : 0,
19389 "properties" : {
56122987
DM
19390 "digest" : {
19391 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 19392 "maxLength" : 40,
56122987 19393 "optional" : 1,
56122987
DM
19394 "type" : "string"
19395 },
44660702
DM
19396 "node" : {
19397 "description" : "The cluster node name.",
19398 "format" : "pve-node",
19399 "type" : "string"
19400 },
7aacca6f 19401 "pos" : {
7aacca6f 19402 "description" : "Update rule at position <pos>.",
44660702
DM
19403 "minimum" : 0,
19404 "optional" : 1,
19405 "type" : "integer"
56122987
DM
19406 }
19407 }
19408 },
44660702
DM
19409 "permissions" : {
19410 "check" : [
19411 "perm",
19412 "/nodes/{node}",
19413 [
19414 "Sys.Modify"
19415 ]
19416 ]
19417 },
19418 "protected" : 1,
19419 "proxyto" : "node",
56122987
DM
19420 "returns" : {
19421 "type" : "null"
44660702
DM
19422 }
19423 },
19424 "GET" : {
19425 "description" : "Get single rule data.",
19426 "method" : "GET",
19427 "name" : "get_rule",
19428 "parameters" : {
19429 "additionalProperties" : 0,
19430 "properties" : {
19431 "node" : {
19432 "description" : "The cluster node name.",
19433 "format" : "pve-node",
19434 "type" : "string"
19435 },
19436 "pos" : {
19437 "description" : "Update rule at position <pos>.",
19438 "minimum" : 0,
19439 "optional" : 1,
19440 "type" : "integer"
19441 }
19442 }
56122987 19443 },
56122987
DM
19444 "permissions" : {
19445 "check" : [
19446 "perm",
19447 "/nodes/{node}",
19448 [
44660702 19449 "Sys.Audit"
56122987
DM
19450 ]
19451 ]
44660702
DM
19452 },
19453 "proxyto" : "node",
19454 "returns" : {
19455 "properties" : {
19456 "pos" : {
19457 "type" : "integer"
19458 }
19459 },
19460 "type" : "object"
7aacca6f 19461 }
56122987
DM
19462 },
19463 "PUT" : {
44660702
DM
19464 "description" : "Modify rule data.",
19465 "method" : "PUT",
56122987 19466 "name" : "update_rule",
56122987 19467 "parameters" : {
44660702 19468 "additionalProperties" : 0,
56122987 19469 "properties" : {
44660702
DM
19470 "action" : {
19471 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
19472 "maxLength" : 20,
19473 "minLength" : 2,
56122987 19474 "optional" : 1,
44660702
DM
19475 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19476 "type" : "string"
56122987 19477 },
7aacca6f 19478 "comment" : {
56122987 19479 "optional" : 1,
56122987
DM
19480 "type" : "string"
19481 },
44660702
DM
19482 "delete" : {
19483 "description" : "A list of settings you want to delete.",
19484 "format" : "pve-configid-list",
56122987 19485 "optional" : 1,
44660702 19486 "type" : "string"
56122987 19487 },
44660702
DM
19488 "dest" : {
19489 "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.",
19490 "format" : "pve-fw-addr-spec",
56122987 19491 "optional" : 1,
44660702 19492 "type" : "string"
56122987 19493 },
44660702
DM
19494 "digest" : {
19495 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19496 "maxLength" : 40,
56122987 19497 "optional" : 1,
44660702 19498 "type" : "string"
56122987 19499 },
7aacca6f 19500 "dport" : {
7aacca6f 19501 "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
19502 "format" : "pve-fw-dport-spec",
19503 "optional" : 1,
19504 "type" : "string"
7aacca6f 19505 },
44660702
DM
19506 "enable" : {
19507 "minimum" : 0,
56122987 19508 "optional" : 1,
44660702 19509 "type" : "integer"
56122987 19510 },
7aacca6f 19511 "iface" : {
44660702 19512 "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 19513 "format" : "pve-iface",
44660702 19514 "maxLength" : 20,
56122987 19515 "minLength" : 2,
44660702
DM
19516 "optional" : 1,
19517 "type" : "string"
56122987 19518 },
44660702
DM
19519 "macro" : {
19520 "maxLength" : 128,
19521 "optional" : 1,
19522 "type" : "string"
19523 },
19524 "moveto" : {
19525 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
19526 "minimum" : 0,
7aacca6f 19527 "optional" : 1,
44660702
DM
19528 "type" : "integer"
19529 },
19530 "node" : {
19531 "description" : "The cluster node name.",
19532 "format" : "pve-node",
19533 "type" : "string"
56122987
DM
19534 },
19535 "pos" : {
44660702 19536 "description" : "Update rule at position <pos>.",
7aacca6f 19537 "minimum" : 0,
7aacca6f 19538 "optional" : 1,
44660702 19539 "type" : "integer"
7aacca6f 19540 },
44660702
DM
19541 "proto" : {
19542 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19543 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
19544 "optional" : 1,
19545 "type" : "string"
19546 },
44660702
DM
19547 "source" : {
19548 "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.",
19549 "format" : "pve-fw-addr-spec",
56122987 19550 "optional" : 1,
44660702 19551 "type" : "string"
7aacca6f 19552 },
44660702
DM
19553 "sport" : {
19554 "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.",
19555 "format" : "pve-fw-sport-spec",
19556 "optional" : 1,
19557 "type" : "string"
19558 },
19559 "type" : {
19560 "enum" : [
19561 "in",
19562 "out",
19563 "group"
19564 ],
19565 "optional" : 1,
19566 "type" : "string"
56122987 19567 }
44660702 19568 }
56122987 19569 },
56122987
DM
19570 "permissions" : {
19571 "check" : [
19572 "perm",
19573 "/nodes/{node}",
19574 [
19575 "Sys.Modify"
19576 ]
19577 ]
7aacca6f 19578 },
44660702 19579 "protected" : 1,
7aacca6f 19580 "proxyto" : "node",
7aacca6f
DM
19581 "returns" : {
19582 "type" : "null"
56122987
DM
19583 }
19584 }
7aacca6f 19585 },
44660702 19586 "leaf" : 1,
7aacca6f 19587 "path" : "/nodes/{node}/firewall/rules/{pos}",
44660702 19588 "text" : "{pos}"
56122987
DM
19589 }
19590 ],
56122987
DM
19591 "info" : {
19592 "GET" : {
44660702
DM
19593 "description" : "List rules.",
19594 "method" : "GET",
19595 "name" : "get_rules",
19596 "parameters" : {
19597 "additionalProperties" : 0,
19598 "properties" : {
19599 "node" : {
19600 "description" : "The cluster node name.",
19601 "format" : "pve-node",
19602 "type" : "string"
19603 }
19604 }
19605 },
19606 "permissions" : {
19607 "check" : [
19608 "perm",
19609 "/nodes/{node}",
19610 [
19611 "Sys.Audit"
19612 ]
19613 ]
19614 },
19615 "proxyto" : "node",
56122987 19616 "returns" : {
56122987
DM
19617 "items" : {
19618 "properties" : {
19619 "pos" : {
19620 "type" : "integer"
19621 }
44660702
DM
19622 },
19623 "type" : "object"
56122987 19624 },
7aacca6f
DM
19625 "links" : [
19626 {
19627 "href" : "{pos}",
19628 "rel" : "child"
19629 }
19630 ],
19631 "type" : "array"
44660702 19632 }
56122987
DM
19633 },
19634 "POST" : {
44660702 19635 "description" : "Create new rule.",
7aacca6f
DM
19636 "method" : "POST",
19637 "name" : "create_rule",
56122987 19638 "parameters" : {
44660702 19639 "additionalProperties" : 0,
56122987 19640 "properties" : {
7aacca6f 19641 "action" : {
7aacca6f 19642 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
44660702 19643 "maxLength" : 20,
7aacca6f
DM
19644 "minLength" : 2,
19645 "optional" : 0,
44660702
DM
19646 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19647 "type" : "string"
56122987 19648 },
44660702 19649 "comment" : {
56122987 19650 "optional" : 1,
44660702 19651 "type" : "string"
56122987 19652 },
44660702
DM
19653 "dest" : {
19654 "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.",
19655 "format" : "pve-fw-addr-spec",
7aacca6f 19656 "optional" : 1,
44660702 19657 "type" : "string"
56122987 19658 },
44660702
DM
19659 "digest" : {
19660 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19661 "maxLength" : 40,
19662 "optional" : 1,
19663 "type" : "string"
56122987 19664 },
44660702
DM
19665 "dport" : {
19666 "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.",
19667 "format" : "pve-fw-dport-spec",
7aacca6f
DM
19668 "optional" : 1,
19669 "type" : "string"
56122987 19670 },
44660702
DM
19671 "enable" : {
19672 "minimum" : 0,
19673 "optional" : 1,
19674 "type" : "integer"
19675 },
7aacca6f 19676 "iface" : {
44660702 19677 "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 19678 "format" : "pve-iface",
56122987 19679 "maxLength" : 20,
7aacca6f 19680 "minLength" : 2,
7aacca6f 19681 "optional" : 1,
56122987
DM
19682 "type" : "string"
19683 },
44660702
DM
19684 "macro" : {
19685 "maxLength" : 128,
7aacca6f
DM
19686 "optional" : 1,
19687 "type" : "string"
56122987 19688 },
44660702
DM
19689 "node" : {
19690 "description" : "The cluster node name.",
19691 "format" : "pve-node",
19692 "type" : "string"
19693 },
19694 "pos" : {
19695 "description" : "Update rule at position <pos>.",
19696 "minimum" : 0,
19697 "optional" : 1,
19698 "type" : "integer"
19699 },
19700 "proto" : {
19701 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19702 "format" : "pve-fw-protocol-spec",
56122987 19703 "optional" : 1,
44660702 19704 "type" : "string"
56122987 19705 },
7aacca6f 19706 "source" : {
7aacca6f 19707 "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
19708 "format" : "pve-fw-addr-spec",
19709 "optional" : 1,
19710 "type" : "string"
7aacca6f 19711 },
44660702
DM
19712 "sport" : {
19713 "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.",
19714 "format" : "pve-fw-sport-spec",
7aacca6f 19715 "optional" : 1,
44660702
DM
19716 "type" : "string"
19717 },
19718 "type" : {
19719 "enum" : [
19720 "in",
19721 "out",
19722 "group"
19723 ],
19724 "optional" : 0,
19725 "type" : "string"
56122987 19726 }
44660702 19727 }
7aacca6f 19728 },
56122987
DM
19729 "permissions" : {
19730 "check" : [
19731 "perm",
19732 "/nodes/{node}",
19733 [
19734 "Sys.Modify"
19735 ]
19736 ]
19737 },
44660702
DM
19738 "protected" : 1,
19739 "proxyto" : "node",
19740 "returns" : {
19741 "type" : "null"
19742 }
56122987
DM
19743 }
19744 },
44660702 19745 "leaf" : 0,
7aacca6f 19746 "path" : "/nodes/{node}/firewall/rules",
44660702 19747 "text" : "rules"
56122987
DM
19748 },
19749 {
56122987 19750 "info" : {
44660702
DM
19751 "GET" : {
19752 "description" : "Get host firewall options.",
19753 "method" : "GET",
19754 "name" : "get_options",
56122987 19755 "parameters" : {
7aacca6f 19756 "additionalProperties" : 0,
56122987 19757 "properties" : {
44660702
DM
19758 "node" : {
19759 "description" : "The cluster node name.",
19760 "format" : "pve-node",
19761 "type" : "string"
19762 }
19763 }
19764 },
19765 "permissions" : {
19766 "check" : [
19767 "perm",
19768 "/nodes/{node}",
19769 [
19770 "Sys.Audit"
19771 ]
19772 ]
19773 },
19774 "proxyto" : "node",
19775 "returns" : {
19776 "properties" : {
19777 "enable" : {
19778 "description" : "Enable host firewall rules.",
7aacca6f 19779 "optional" : 1,
44660702 19780 "type" : "boolean"
7aacca6f 19781 },
44660702
DM
19782 "log_level_in" : {
19783 "description" : "Log level for incoming traffic.",
56122987
DM
19784 "enum" : [
19785 "emerg",
19786 "alert",
19787 "crit",
19788 "err",
19789 "warning",
19790 "notice",
19791 "info",
19792 "debug",
19793 "nolog"
19794 ],
56122987 19795 "optional" : 1,
44660702
DM
19796 "type" : "string"
19797 },
19798 "log_level_out" : {
19799 "description" : "Log level for outgoing traffic.",
56122987
DM
19800 "enum" : [
19801 "emerg",
19802 "alert",
19803 "crit",
19804 "err",
19805 "warning",
19806 "notice",
19807 "info",
19808 "debug",
19809 "nolog"
19810 ],
44660702
DM
19811 "optional" : 1,
19812 "type" : "string"
19813 },
19814 "ndp" : {
19815 "description" : "Enable NDP.",
19816 "optional" : 1,
19817 "type" : "boolean"
19818 },
19819 "nf_conntrack_max" : {
19820 "description" : "Maximum number of tracked connections.",
19821 "minimum" : 32768,
19822 "optional" : 1,
19823 "type" : "integer"
19824 },
19825 "nf_conntrack_tcp_timeout_established" : {
19826 "description" : "Conntrack established timeout.",
19827 "minimum" : 7875,
19828 "optional" : 1,
19829 "type" : "integer"
19830 },
19831 "nosmurfs" : {
19832 "description" : "Enable SMURFS filter.",
19833 "optional" : 1,
19834 "type" : "boolean"
56122987 19835 },
7aacca6f 19836 "smurf_log_level" : {
44660702 19837 "description" : "Log level for SMURFS filter.",
56122987
DM
19838 "enum" : [
19839 "emerg",
19840 "alert",
19841 "crit",
19842 "err",
19843 "warning",
19844 "notice",
19845 "info",
19846 "debug",
19847 "nolog"
7aacca6f 19848 ],
7aacca6f
DM
19849 "optional" : 1,
19850 "type" : "string"
56122987 19851 },
44660702
DM
19852 "tcp_flags_log_level" : {
19853 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
19854 "enum" : [
19855 "emerg",
19856 "alert",
19857 "crit",
19858 "err",
19859 "warning",
19860 "notice",
19861 "info",
19862 "debug",
19863 "nolog"
19864 ],
44660702
DM
19865 "optional" : 1,
19866 "type" : "string"
7aacca6f 19867 },
44660702
DM
19868 "tcpflags" : {
19869 "description" : "Filter illegal combinations of TCP flags.",
56122987 19870 "optional" : 1,
44660702 19871 "type" : "boolean"
56122987 19872 }
44660702
DM
19873 },
19874 "type" : "object"
7aacca6f 19875 }
56122987 19876 },
44660702
DM
19877 "PUT" : {
19878 "description" : "Set Firewall options.",
19879 "method" : "PUT",
19880 "name" : "set_options",
7aacca6f 19881 "parameters" : {
44660702 19882 "additionalProperties" : 0,
7aacca6f 19883 "properties" : {
44660702
DM
19884 "delete" : {
19885 "description" : "A list of settings you want to delete.",
19886 "format" : "pve-configid-list",
7aacca6f 19887 "optional" : 1,
44660702 19888 "type" : "string"
56122987 19889 },
44660702
DM
19890 "digest" : {
19891 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19892 "maxLength" : 40,
19893 "optional" : 1,
19894 "type" : "string"
56122987 19895 },
44660702
DM
19896 "enable" : {
19897 "description" : "Enable host firewall rules.",
7aacca6f 19898 "optional" : 1,
44660702
DM
19899 "type" : "boolean"
19900 },
19901 "log_level_in" : {
19902 "description" : "Log level for incoming traffic.",
56122987
DM
19903 "enum" : [
19904 "emerg",
19905 "alert",
19906 "crit",
19907 "err",
19908 "warning",
19909 "notice",
19910 "info",
19911 "debug",
19912 "nolog"
44660702 19913 ],
7aacca6f 19914 "optional" : 1,
44660702 19915 "type" : "string"
7aacca6f 19916 },
44660702
DM
19917 "log_level_out" : {
19918 "description" : "Log level for outgoing traffic.",
56122987
DM
19919 "enum" : [
19920 "emerg",
19921 "alert",
19922 "crit",
19923 "err",
19924 "warning",
19925 "notice",
19926 "info",
19927 "debug",
19928 "nolog"
19929 ],
19930 "optional" : 1,
7aacca6f 19931 "type" : "string"
56122987 19932 },
44660702
DM
19933 "ndp" : {
19934 "description" : "Enable NDP.",
7aacca6f 19935 "optional" : 1,
44660702
DM
19936 "type" : "boolean"
19937 },
19938 "nf_conntrack_max" : {
19939 "description" : "Maximum number of tracked connections.",
19940 "minimum" : 32768,
19941 "optional" : 1,
19942 "type" : "integer"
19943 },
19944 "nf_conntrack_tcp_timeout_established" : {
19945 "description" : "Conntrack established timeout.",
19946 "minimum" : 7875,
19947 "optional" : 1,
19948 "type" : "integer"
19949 },
19950 "node" : {
19951 "description" : "The cluster node name.",
19952 "format" : "pve-node",
19953 "type" : "string"
19954 },
19955 "nosmurfs" : {
19956 "description" : "Enable SMURFS filter.",
19957 "optional" : 1,
19958 "type" : "boolean"
19959 },
19960 "smurf_log_level" : {
19961 "description" : "Log level for SMURFS filter.",
56122987
DM
19962 "enum" : [
19963 "emerg",
19964 "alert",
19965 "crit",
19966 "err",
19967 "warning",
19968 "notice",
19969 "info",
19970 "debug",
19971 "nolog"
44660702
DM
19972 ],
19973 "optional" : 1,
19974 "type" : "string"
56122987 19975 },
44660702
DM
19976 "tcp_flags_log_level" : {
19977 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
19978 "enum" : [
19979 "emerg",
19980 "alert",
19981 "crit",
19982 "err",
19983 "warning",
19984 "notice",
19985 "info",
19986 "debug",
19987 "nolog"
19988 ],
44660702
DM
19989 "optional" : 1,
19990 "type" : "string"
7aacca6f 19991 },
44660702
DM
19992 "tcpflags" : {
19993 "description" : "Filter illegal combinations of TCP flags.",
56122987 19994 "optional" : 1,
7aacca6f 19995 "type" : "boolean"
56122987 19996 }
7aacca6f 19997 }
56122987 19998 },
44660702
DM
19999 "permissions" : {
20000 "check" : [
20001 "perm",
20002 "/nodes/{node}",
20003 [
20004 "Sys.Modify"
20005 ]
20006 ]
20007 },
20008 "protected" : 1,
20009 "proxyto" : "node",
20010 "returns" : {
20011 "type" : "null"
20012 }
7aacca6f
DM
20013 }
20014 },
44660702
DM
20015 "leaf" : 1,
20016 "path" : "/nodes/{node}/firewall/options",
7aacca6f
DM
20017 "text" : "options"
20018 },
20019 {
7aacca6f
DM
20020 "info" : {
20021 "GET" : {
44660702
DM
20022 "description" : "Read firewall log",
20023 "method" : "GET",
7aacca6f 20024 "name" : "log",
56122987 20025 "parameters" : {
44660702 20026 "additionalProperties" : 0,
56122987 20027 "properties" : {
7aacca6f 20028 "limit" : {
44660702 20029 "minimum" : 0,
7aacca6f 20030 "optional" : 1,
44660702 20031 "type" : "integer"
7aacca6f 20032 },
56122987 20033 "node" : {
7aacca6f 20034 "description" : "The cluster node name.",
44660702 20035 "format" : "pve-node",
7aacca6f 20036 "type" : "string"
44660702
DM
20037 },
20038 "start" : {
20039 "minimum" : 0,
20040 "optional" : 1,
20041 "type" : "integer"
56122987 20042 }
44660702 20043 }
7aacca6f 20044 },
56122987
DM
20045 "permissions" : {
20046 "check" : [
20047 "perm",
20048 "/nodes/{node}",
20049 [
20050 "Sys.Syslog"
20051 ]
20052 ]
20053 },
44660702
DM
20054 "protected" : 1,
20055 "proxyto" : "node",
56122987
DM
20056 "returns" : {
20057 "items" : {
56122987 20058 "properties" : {
56122987 20059 "n" : {
44660702
DM
20060 "description" : "Line number",
20061 "type" : "integer"
7aacca6f
DM
20062 },
20063 "t" : {
44660702
DM
20064 "description" : "Line text",
20065 "type" : "string"
56122987 20066 }
44660702
DM
20067 },
20068 "type" : "object"
56122987
DM
20069 },
20070 "type" : "array"
7aacca6f 20071 }
56122987
DM
20072 }
20073 },
44660702
DM
20074 "leaf" : 1,
20075 "path" : "/nodes/{node}/firewall/log",
7aacca6f 20076 "text" : "log"
56122987
DM
20077 }
20078 ],
20079 "info" : {
20080 "GET" : {
44660702
DM
20081 "description" : "Directory index.",
20082 "method" : "GET",
20083 "name" : "index",
56122987 20084 "parameters" : {
44660702 20085 "additionalProperties" : 0,
56122987
DM
20086 "properties" : {
20087 "node" : {
20088 "description" : "The cluster node name.",
44660702
DM
20089 "format" : "pve-node",
20090 "type" : "string"
56122987 20091 }
44660702 20092 }
56122987 20093 },
7aacca6f
DM
20094 "permissions" : {
20095 "user" : "all"
20096 },
56122987
DM
20097 "returns" : {
20098 "items" : {
20099 "properties" : {},
20100 "type" : "object"
20101 },
56122987
DM
20102 "links" : [
20103 {
44660702
DM
20104 "href" : "{name}",
20105 "rel" : "child"
56122987 20106 }
44660702
DM
20107 ],
20108 "type" : "array"
20109 }
56122987 20110 }
7aacca6f 20111 },
44660702 20112 "leaf" : 0,
7aacca6f 20113 "path" : "/nodes/{node}/firewall",
44660702 20114 "text" : "firewall"
56122987
DM
20115 },
20116 {
56122987
DM
20117 "info" : {
20118 "GET" : {
44660702
DM
20119 "description" : "API version details",
20120 "method" : "GET",
20121 "name" : "version",
56122987 20122 "parameters" : {
44660702 20123 "additionalProperties" : 0,
56122987
DM
20124 "properties" : {
20125 "node" : {
56122987 20126 "description" : "The cluster node name.",
44660702 20127 "format" : "pve-node",
7aacca6f 20128 "type" : "string"
56122987 20129 }
44660702 20130 }
56122987 20131 },
56122987 20132 "permissions" : {
7aacca6f 20133 "user" : "all"
56122987 20134 },
56122987 20135 "proxyto" : "node",
56122987 20136 "returns" : {
56122987 20137 "properties" : {
44660702 20138 "release" : {
56122987
DM
20139 "type" : "string"
20140 },
44660702 20141 "repoid" : {
7aacca6f
DM
20142 "type" : "string"
20143 },
20144 "version" : {
20145 "type" : "string"
20146 }
44660702
DM
20147 },
20148 "type" : "object"
7aacca6f 20149 }
56122987
DM
20150 }
20151 },
56122987 20152 "leaf" : 1,
44660702
DM
20153 "path" : "/nodes/{node}/version",
20154 "text" : "version"
56122987
DM
20155 },
20156 {
56122987
DM
20157 "info" : {
20158 "GET" : {
7aacca6f 20159 "description" : "Read node status",
44660702 20160 "method" : "GET",
7aacca6f 20161 "name" : "status",
56122987 20162 "parameters" : {
44660702 20163 "additionalProperties" : 0,
56122987
DM
20164 "properties" : {
20165 "node" : {
7aacca6f 20166 "description" : "The cluster node name.",
44660702
DM
20167 "format" : "pve-node",
20168 "type" : "string"
56122987 20169 }
44660702 20170 }
56122987 20171 },
56122987
DM
20172 "permissions" : {
20173 "check" : [
20174 "perm",
20175 "/nodes/{node}",
20176 [
20177 "Sys.Audit"
20178 ]
20179 ]
44660702
DM
20180 },
20181 "proxyto" : "node",
20182 "returns" : {
20183 "properties" : {},
20184 "type" : "object"
7aacca6f
DM
20185 }
20186 },
20187 "POST" : {
44660702
DM
20188 "description" : "Reboot or shutdown a node.",
20189 "method" : "POST",
7aacca6f 20190 "name" : "node_cmd",
56122987 20191 "parameters" : {
44660702 20192 "additionalProperties" : 0,
56122987 20193 "properties" : {
7aacca6f
DM
20194 "command" : {
20195 "description" : "Specify the command.",
56122987 20196 "enum" : [
7aacca6f
DM
20197 "reboot",
20198 "shutdown"
56122987
DM
20199 ],
20200 "type" : "string"
44660702
DM
20201 },
20202 "node" : {
20203 "description" : "The cluster node name.",
20204 "format" : "pve-node",
20205 "type" : "string"
56122987 20206 }
44660702 20207 }
7aacca6f 20208 },
7aacca6f
DM
20209 "permissions" : {
20210 "check" : [
20211 "perm",
20212 "/nodes/{node}",
20213 [
20214 "Sys.PowerMgmt"
20215 ]
20216 ]
20217 },
44660702 20218 "protected" : 1,
7aacca6f 20219 "proxyto" : "node",
7aacca6f
DM
20220 "returns" : {
20221 "type" : "null"
56122987
DM
20222 }
20223 }
20224 },
7aacca6f 20225 "leaf" : 1,
44660702
DM
20226 "path" : "/nodes/{node}/status",
20227 "text" : "status"
56122987
DM
20228 },
20229 {
56122987
DM
20230 "info" : {
20231 "GET" : {
44660702
DM
20232 "description" : "Read tap/vm network device interface counters",
20233 "method" : "GET",
20234 "name" : "netstat",
20235 "parameters" : {
20236 "additionalProperties" : 0,
20237 "properties" : {
20238 "node" : {
20239 "description" : "The cluster node name.",
20240 "format" : "pve-node",
20241 "type" : "string"
20242 }
56122987
DM
20243 }
20244 },
20245 "permissions" : {
20246 "check" : [
20247 "perm",
20248 "/nodes/{node}",
20249 [
7aacca6f 20250 "Sys.Audit"
56122987
DM
20251 ]
20252 ]
20253 },
7aacca6f 20254 "proxyto" : "node",
44660702
DM
20255 "returns" : {
20256 "items" : {
20257 "properties" : {},
20258 "type" : "object"
20259 },
20260 "type" : "array"
20261 }
7aacca6f
DM
20262 }
20263 },
44660702
DM
20264 "leaf" : 1,
20265 "path" : "/nodes/{node}/netstat",
7aacca6f
DM
20266 "text" : "netstat"
20267 },
20268 {
20269 "info" : {
20270 "POST" : {
7aacca6f 20271 "description" : "Execute multiple commands in order.",
7aacca6f 20272 "method" : "POST",
7aacca6f 20273 "name" : "execute",
56122987
DM
20274 "parameters" : {
20275 "additionalProperties" : 0,
20276 "properties" : {
7aacca6f
DM
20277 "commands" : {
20278 "description" : "JSON encoded array of commands.",
56122987
DM
20279 "type" : "string"
20280 },
20281 "node" : {
44660702 20282 "description" : "The cluster node name.",
56122987 20283 "format" : "pve-node",
44660702 20284 "type" : "string"
56122987
DM
20285 }
20286 }
44660702
DM
20287 },
20288 "permissions" : {
20289 "check" : [
20290 "perm",
20291 "/nodes/{node}",
20292 [
20293 "Sys.Audit"
20294 ]
20295 ]
20296 },
20297 "protected" : 1,
20298 "proxyto" : "node",
20299 "returns" : {
20300 "properties" : {},
20301 "type" : "array"
56122987
DM
20302 }
20303 }
20304 },
56122987 20305 "leaf" : 1,
44660702
DM
20306 "path" : "/nodes/{node}/execute",
20307 "text" : "execute"
56122987
DM
20308 },
20309 {
20310 "info" : {
7aacca6f 20311 "GET" : {
44660702
DM
20312 "description" : "Read node RRD statistics (returns PNG)",
20313 "method" : "GET",
7aacca6f 20314 "name" : "rrd",
56122987 20315 "parameters" : {
7aacca6f 20316 "additionalProperties" : 0,
56122987 20317 "properties" : {
44660702
DM
20318 "cf" : {
20319 "description" : "The RRD consolidation function",
20320 "enum" : [
20321 "AVERAGE",
20322 "MAX"
20323 ],
20324 "optional" : 1,
20325 "type" : "string"
20326 },
7aacca6f 20327 "ds" : {
7aacca6f 20328 "description" : "The list of datasources you want to display.",
44660702
DM
20329 "format" : "pve-configid-list",
20330 "type" : "string"
20331 },
20332 "node" : {
20333 "description" : "The cluster node name.",
20334 "format" : "pve-node",
20335 "type" : "string"
7aacca6f
DM
20336 },
20337 "timeframe" : {
20338 "description" : "Specify the time frame you are interested in.",
20339 "enum" : [
20340 "hour",
20341 "day",
20342 "week",
20343 "month",
20344 "year"
20345 ],
20346 "type" : "string"
56122987 20347 }
7aacca6f 20348 }
56122987 20349 },
56122987 20350 "permissions" : {
56122987
DM
20351 "check" : [
20352 "perm",
20353 "/nodes/{node}",
20354 [
7aacca6f 20355 "Sys.Audit"
56122987
DM
20356 ]
20357 ]
20358 },
7aacca6f 20359 "protected" : 1,
56122987 20360 "returns" : {
56122987 20361 "properties" : {
7aacca6f 20362 "filename" : {
56122987
DM
20363 "type" : "string"
20364 }
44660702
DM
20365 },
20366 "type" : "object"
20367 }
56122987
DM
20368 }
20369 },
44660702 20370 "leaf" : 1,
7aacca6f 20371 "path" : "/nodes/{node}/rrd",
44660702 20372 "text" : "rrd"
56122987
DM
20373 },
20374 {
20375 "info" : {
7aacca6f 20376 "GET" : {
44660702
DM
20377 "description" : "Read node RRD statistics",
20378 "method" : "GET",
7aacca6f 20379 "name" : "rrddata",
56122987 20380 "parameters" : {
44660702 20381 "additionalProperties" : 0,
56122987 20382 "properties" : {
7aacca6f 20383 "cf" : {
7aacca6f
DM
20384 "description" : "The RRD consolidation function",
20385 "enum" : [
20386 "AVERAGE",
20387 "MAX"
44660702
DM
20388 ],
20389 "optional" : 1,
20390 "type" : "string"
56122987
DM
20391 },
20392 "node" : {
44660702 20393 "description" : "The cluster node name.",
56122987 20394 "format" : "pve-node",
44660702 20395 "type" : "string"
56122987 20396 },
7aacca6f 20397 "timeframe" : {
7aacca6f
DM
20398 "description" : "Specify the time frame you are interested in.",
20399 "enum" : [
20400 "hour",
20401 "day",
20402 "week",
20403 "month",
20404 "year"
44660702
DM
20405 ],
20406 "type" : "string"
56122987 20407 }
56122987
DM
20408 }
20409 },
56122987
DM
20410 "permissions" : {
20411 "check" : [
20412 "perm",
20413 "/nodes/{node}",
20414 [
44660702 20415 "Sys.Audit"
56122987
DM
20416 ]
20417 ]
7aacca6f 20418 },
44660702 20419 "protected" : 1,
56122987 20420 "returns" : {
7aacca6f 20421 "items" : {
44660702 20422 "properties" : {},
7aacca6f
DM
20423 "type" : "object"
20424 },
20425 "type" : "array"
44660702
DM
20426 }
20427 }
20428 },
20429 "leaf" : 1,
20430 "path" : "/nodes/{node}/rrddata",
20431 "text" : "rrddata"
20432 },
20433 {
20434 "info" : {
20435 "GET" : {
20436 "description" : "Read system log",
20437 "method" : "GET",
20438 "name" : "syslog",
56122987 20439 "parameters" : {
44660702 20440 "additionalProperties" : 0,
56122987 20441 "properties" : {
44660702
DM
20442 "limit" : {
20443 "minimum" : 0,
7aacca6f 20444 "optional" : 1,
44660702 20445 "type" : "integer"
7aacca6f 20446 },
56122987 20447 "node" : {
7aacca6f 20448 "description" : "The cluster node name.",
44660702
DM
20449 "format" : "pve-node",
20450 "type" : "string"
56122987 20451 },
44660702
DM
20452 "since" : {
20453 "description" : "Display all log since this date-time string.",
20454 "optional" : 1,
20455 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
20456 "type" : "string"
20457 },
20458 "start" : {
7aacca6f
DM
20459 "minimum" : 0,
20460 "optional" : 1,
20461 "type" : "integer"
20462 },
20463 "until" : {
20464 "description" : "Display all log until this date-time string.",
7aacca6f 20465 "optional" : 1,
44660702 20466 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
56122987
DM
20467 "type" : "string"
20468 }
44660702 20469 }
56122987 20470 },
44660702
DM
20471 "permissions" : {
20472 "check" : [
20473 "perm",
20474 "/nodes/{node}",
20475 [
20476 "Sys.Syslog"
20477 ]
20478 ]
20479 },
20480 "protected" : 1,
20481 "proxyto" : "node",
20482 "returns" : {
20483 "items" : {
20484 "properties" : {
20485 "n" : {
20486 "description" : "Line number",
20487 "type" : "integer"
20488 },
20489 "t" : {
20490 "description" : "Line text",
20491 "type" : "string"
20492 }
20493 },
20494 "type" : "object"
20495 },
20496 "type" : "array"
20497 }
56122987
DM
20498 }
20499 },
44660702
DM
20500 "leaf" : 1,
20501 "path" : "/nodes/{node}/syslog",
7aacca6f 20502 "text" : "syslog"
56122987
DM
20503 },
20504 {
56122987
DM
20505 "info" : {
20506 "POST" : {
44660702
DM
20507 "description" : "Creates a VNC Shell proxy.",
20508 "method" : "POST",
20509 "name" : "vncshell",
20510 "parameters" : {
20511 "additionalProperties" : 0,
56122987 20512 "properties" : {
44660702
DM
20513 "node" : {
20514 "description" : "The cluster node name.",
20515 "format" : "pve-node",
7aacca6f
DM
20516 "type" : "string"
20517 },
44660702
DM
20518 "upgrade" : {
20519 "default" : 0,
20520 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20521 "optional" : 1,
20522 "type" : "boolean"
7aacca6f 20523 },
44660702
DM
20524 "websocket" : {
20525 "description" : "use websocket instead of standard vnc.",
20526 "optional" : 1,
20527 "type" : "boolean"
56122987 20528 }
44660702 20529 }
56122987 20530 },
56122987
DM
20531 "permissions" : {
20532 "check" : [
20533 "perm",
7aacca6f 20534 "/nodes/{node}",
56122987 20535 [
7aacca6f 20536 "Sys.Console"
56122987 20537 ]
44660702
DM
20538 ],
20539 "description" : "Restricted to users on realm 'pam'"
56122987 20540 },
44660702
DM
20541 "protected" : 1,
20542 "returns" : {
20543 "additionalProperties" : 0,
56122987 20544 "properties" : {
44660702
DM
20545 "cert" : {
20546 "type" : "string"
7aacca6f 20547 },
44660702
DM
20548 "port" : {
20549 "type" : "integer"
7aacca6f 20550 },
44660702
DM
20551 "ticket" : {
20552 "type" : "string"
20553 },
20554 "upid" : {
20555 "type" : "string"
20556 },
20557 "user" : {
20558 "type" : "string"
56122987 20559 }
44660702
DM
20560 }
20561 }
56122987
DM
20562 }
20563 },
7aacca6f 20564 "leaf" : 1,
44660702
DM
20565 "path" : "/nodes/{node}/vncshell",
20566 "text" : "vncshell"
56122987
DM
20567 },
20568 {
20569 "info" : {
20570 "GET" : {
7aacca6f 20571 "description" : "Opens a weksocket for VNC traffic.",
44660702
DM
20572 "method" : "GET",
20573 "name" : "vncwebsocket",
56122987 20574 "parameters" : {
44660702 20575 "additionalProperties" : 0,
56122987
DM
20576 "properties" : {
20577 "node" : {
20578 "description" : "The cluster node name.",
44660702 20579 "format" : "pve-node",
7aacca6f
DM
20580 "type" : "string"
20581 },
20582 "port" : {
7aacca6f
DM
20583 "description" : "Port number returned by previous vncproxy call.",
20584 "maximum" : 5999,
44660702 20585 "minimum" : 5900,
7aacca6f 20586 "type" : "integer"
44660702
DM
20587 },
20588 "vncticket" : {
20589 "description" : "Ticket from previous call to vncproxy.",
20590 "maxLength" : 512,
20591 "type" : "string"
56122987 20592 }
44660702 20593 }
56122987 20594 },
56122987
DM
20595 "permissions" : {
20596 "check" : [
20597 "perm",
20598 "/nodes/{node}",
20599 [
7aacca6f 20600 "Sys.Console"
56122987 20601 ]
44660702
DM
20602 ],
20603 "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket)."
20604 },
20605 "returns" : {
20606 "properties" : {
20607 "port" : {
20608 "type" : "string"
20609 }
20610 },
20611 "type" : "object"
7aacca6f 20612 }
56122987
DM
20613 }
20614 },
44660702 20615 "leaf" : 1,
7aacca6f 20616 "path" : "/nodes/{node}/vncwebsocket",
44660702 20617 "text" : "vncwebsocket"
56122987
DM
20618 },
20619 {
20620 "info" : {
20621 "POST" : {
44660702 20622 "description" : "Creates a SPICE shell.",
7aacca6f 20623 "method" : "POST",
44660702 20624 "name" : "spiceshell",
56122987 20625 "parameters" : {
7aacca6f 20626 "additionalProperties" : 0,
56122987 20627 "properties" : {
7aacca6f 20628 "node" : {
44660702 20629 "description" : "The cluster node name.",
56122987 20630 "format" : "pve-node",
7aacca6f
DM
20631 "type" : "string"
20632 },
44660702
DM
20633 "proxy" : {
20634 "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).",
20635 "format" : "address",
20636 "optional" : 1,
7aacca6f
DM
20637 "type" : "string"
20638 },
44660702
DM
20639 "upgrade" : {
20640 "default" : 0,
20641 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20642 "optional" : 1,
20643 "type" : "boolean"
56122987 20644 }
7aacca6f 20645 }
56122987 20646 },
56122987
DM
20647 "permissions" : {
20648 "check" : [
20649 "perm",
7aacca6f 20650 "/nodes/{node}",
56122987 20651 [
7aacca6f 20652 "Sys.Console"
56122987 20653 ]
7aacca6f
DM
20654 ],
20655 "description" : "Restricted to users on realm 'pam'"
44660702
DM
20656 },
20657 "protected" : 1,
20658 "proxyto" : "node",
20659 "returns" : {
20660 "additionalProperties" : 1,
20661 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
20662 "properties" : {
20663 "host" : {
20664 "type" : "string"
20665 },
20666 "password" : {
20667 "type" : "string"
20668 },
20669 "proxy" : {
20670 "type" : "string"
20671 },
20672 "tls-port" : {
20673 "type" : "integer"
20674 },
20675 "type" : {
20676 "type" : "string"
20677 }
20678 }
7aacca6f 20679 }
56122987
DM
20680 }
20681 },
56122987 20682 "leaf" : 1,
44660702
DM
20683 "path" : "/nodes/{node}/spiceshell",
20684 "text" : "spiceshell"
56122987
DM
20685 },
20686 {
56122987 20687 "info" : {
7aacca6f 20688 "GET" : {
44660702 20689 "description" : "Read DNS settings.",
7aacca6f 20690 "method" : "GET",
44660702
DM
20691 "name" : "dns",
20692 "parameters" : {
7aacca6f
DM
20693 "additionalProperties" : 0,
20694 "properties" : {
44660702
DM
20695 "node" : {
20696 "description" : "The cluster node name.",
20697 "format" : "pve-node",
20698 "type" : "string"
7aacca6f
DM
20699 }
20700 }
20701 },
7aacca6f
DM
20702 "permissions" : {
20703 "check" : [
20704 "perm",
20705 "/nodes/{node}",
20706 [
20707 "Sys.Audit"
20708 ]
20709 ]
20710 },
44660702
DM
20711 "proxyto" : "node",
20712 "returns" : {
56122987
DM
20713 "additionalProperties" : 0,
20714 "properties" : {
44660702
DM
20715 "dns1" : {
20716 "description" : "First name server IP address.",
20717 "optional" : 1,
20718 "type" : "string"
20719 },
20720 "dns2" : {
20721 "description" : "Second name server IP address.",
20722 "optional" : 1,
20723 "type" : "string"
20724 },
20725 "dns3" : {
20726 "description" : "Third name server IP address.",
20727 "optional" : 1,
20728 "type" : "string"
20729 },
20730 "search" : {
20731 "description" : "Search domain for host-name lookup.",
20732 "optional" : 1,
20733 "type" : "string"
7aacca6f 20734 }
44660702
DM
20735 },
20736 "type" : "object"
20737 }
7aacca6f
DM
20738 },
20739 "PUT" : {
44660702
DM
20740 "description" : "Write DNS settings.",
20741 "method" : "PUT",
7aacca6f
DM
20742 "name" : "update_dns",
20743 "parameters" : {
20744 "additionalProperties" : 0,
20745 "properties" : {
44660702
DM
20746 "dns1" : {
20747 "description" : "First name server IP address.",
20748 "format" : "ip",
20749 "optional" : 1,
7aacca6f
DM
20750 "type" : "string"
20751 },
44660702
DM
20752 "dns2" : {
20753 "description" : "Second name server IP address.",
20754 "format" : "ip",
7aacca6f 20755 "optional" : 1,
44660702 20756 "type" : "string"
7aacca6f 20757 },
44660702
DM
20758 "dns3" : {
20759 "description" : "Third name server IP address.",
20760 "format" : "ip",
7aacca6f 20761 "optional" : 1,
44660702 20762 "type" : "string"
7aacca6f
DM
20763 },
20764 "node" : {
44660702 20765 "description" : "The cluster node name.",
56122987 20766 "format" : "pve-node",
44660702 20767 "type" : "string"
7aacca6f 20768 },
44660702
DM
20769 "search" : {
20770 "description" : "Search domain for host-name lookup.",
20771 "type" : "string"
56122987
DM
20772 }
20773 }
20774 },
20775 "permissions" : {
20776 "check" : [
20777 "perm",
7aacca6f 20778 "/nodes/{node}",
56122987 20779 [
7aacca6f 20780 "Sys.Modify"
56122987
DM
20781 ]
20782 ]
20783 },
44660702 20784 "protected" : 1,
7aacca6f 20785 "proxyto" : "node",
56122987 20786 "returns" : {
7aacca6f
DM
20787 "type" : "null"
20788 }
56122987 20789 }
44660702
DM
20790 },
20791 "leaf" : 1,
20792 "path" : "/nodes/{node}/dns",
20793 "text" : "dns"
56122987
DM
20794 },
20795 {
20796 "info" : {
7aacca6f 20797 "GET" : {
7aacca6f 20798 "description" : "Read server time and time zone settings.",
44660702
DM
20799 "method" : "GET",
20800 "name" : "time",
56122987 20801 "parameters" : {
44660702 20802 "additionalProperties" : 0,
56122987
DM
20803 "properties" : {
20804 "node" : {
44660702 20805 "description" : "The cluster node name.",
56122987 20806 "format" : "pve-node",
44660702 20807 "type" : "string"
56122987 20808 }
44660702 20809 }
56122987
DM
20810 },
20811 "permissions" : {
20812 "check" : [
20813 "perm",
7aacca6f 20814 "/nodes/{node}",
56122987 20815 [
7aacca6f 20816 "Sys.Audit"
56122987
DM
20817 ]
20818 ]
44660702
DM
20819 },
20820 "proxyto" : "node",
20821 "returns" : {
20822 "additionalProperties" : 0,
20823 "properties" : {
20824 "localtime" : {
20825 "description" : "Seconds since 1970-01-01 00:00:00 (local time)",
20826 "minimum" : 1297163644,
20827 "type" : "integer"
20828 },
20829 "time" : {
20830 "description" : "Seconds since 1970-01-01 00:00:00 UTC.",
20831 "minimum" : 1297163644,
20832 "type" : "integer"
20833 },
20834 "timezone" : {
20835 "description" : "Time zone",
20836 "type" : "string"
20837 }
20838 },
20839 "type" : "object"
7aacca6f
DM
20840 }
20841 },
20842 "PUT" : {
7aacca6f 20843 "description" : "Set time zone.",
44660702
DM
20844 "method" : "PUT",
20845 "name" : "set_timezone",
20846 "parameters" : {
20847 "additionalProperties" : 0,
20848 "properties" : {
20849 "node" : {
20850 "description" : "The cluster node name.",
20851 "format" : "pve-node",
20852 "type" : "string"
20853 },
20854 "timezone" : {
20855 "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.",
20856 "type" : "string"
20857 }
20858 }
20859 },
7aacca6f
DM
20860 "permissions" : {
20861 "check" : [
20862 "perm",
20863 "/nodes/{node}",
20864 [
20865 "Sys.Modify"
20866 ]
20867 ]
56122987 20868 },
7aacca6f 20869 "protected" : 1,
44660702
DM
20870 "proxyto" : "node",
20871 "returns" : {
20872 "type" : "null"
20873 }
7aacca6f
DM
20874 }
20875 },
7aacca6f 20876 "leaf" : 1,
44660702
DM
20877 "path" : "/nodes/{node}/time",
20878 "text" : "time"
7aacca6f
DM
20879 },
20880 {
20881 "info" : {
44660702
DM
20882 "GET" : {
20883 "description" : "Get list of appliances.",
20884 "method" : "GET",
20885 "name" : "aplinfo",
7aacca6f
DM
20886 "parameters" : {
20887 "additionalProperties" : 0,
20888 "properties" : {
7aacca6f 20889 "node" : {
44660702 20890 "description" : "The cluster node name.",
7aacca6f 20891 "format" : "pve-node",
44660702 20892 "type" : "string"
7aacca6f
DM
20893 }
20894 }
56122987 20895 },
7aacca6f 20896 "permissions" : {
44660702 20897 "user" : "all"
56122987 20898 },
44660702 20899 "proxyto" : "node",
7aacca6f
DM
20900 "returns" : {
20901 "items" : {
44660702
DM
20902 "properties" : {},
20903 "type" : "object"
7aacca6f
DM
20904 },
20905 "type" : "array"
44660702
DM
20906 }
20907 },
20908 "POST" : {
20909 "description" : "Download appliance templates.",
20910 "method" : "POST",
20911 "name" : "apl_download",
7aacca6f
DM
20912 "parameters" : {
20913 "additionalProperties" : 0,
20914 "properties" : {
20915 "node" : {
7aacca6f 20916 "description" : "The cluster node name.",
44660702
DM
20917 "format" : "pve-node",
20918 "type" : "string"
20919 },
20920 "storage" : {
20921 "description" : "Only list status for specified storage",
20922 "format" : "pve-storage-id",
20923 "type" : "string"
20924 },
20925 "template" : {
20926 "description" : "The template wich will downloaded",
20927 "maxLength" : 255,
7aacca6f
DM
20928 "type" : "string"
20929 }
20930 }
56122987 20931 },
7aacca6f 20932 "permissions" : {
44660702
DM
20933 "check" : [
20934 "perm",
20935 "/storage/{storage}",
20936 [
20937 "Datastore.AllocateTemplate"
20938 ]
20939 ]
20940 },
20941 "protected" : 1,
20942 "proxyto" : "node",
20943 "returns" : {
20944 "type" : "string"
7aacca6f
DM
20945 }
20946 }
20947 },
7aacca6f 20948 "leaf" : 1,
44660702
DM
20949 "path" : "/nodes/{node}/aplinfo",
20950 "text" : "aplinfo"
7aacca6f
DM
20951 },
20952 {
20953 "info" : {
20954 "GET" : {
44660702
DM
20955 "description" : "Gather various systems information about a node",
20956 "method" : "GET",
20957 "name" : "report",
7aacca6f 20958 "parameters" : {
44660702 20959 "additionalProperties" : 0,
7aacca6f
DM
20960 "properties" : {
20961 "node" : {
7aacca6f 20962 "description" : "The cluster node name.",
44660702 20963 "format" : "pve-node",
7aacca6f
DM
20964 "type" : "string"
20965 }
44660702 20966 }
56122987 20967 },
7aacca6f
DM
20968 "permissions" : {
20969 "check" : [
20970 "perm",
20971 "/nodes/{node}",
20972 [
20973 "Sys.Audit"
20974 ]
20975 ]
56122987 20976 },
44660702 20977 "protected" : 1,
7aacca6f
DM
20978 "proxyto" : "node",
20979 "returns" : {
56122987 20980 "type" : "string"
7aacca6f
DM
20981 }
20982 }
20983 },
7aacca6f 20984 "leaf" : 1,
44660702
DM
20985 "path" : "/nodes/{node}/report",
20986 "text" : "report"
7aacca6f
DM
20987 },
20988 {
7aacca6f
DM
20989 "info" : {
20990 "POST" : {
44660702 20991 "description" : "Start all VMs and containers (when onboot=1).",
7aacca6f 20992 "method" : "POST",
44660702 20993 "name" : "startall",
7aacca6f 20994 "parameters" : {
44660702 20995 "additionalProperties" : 0,
7aacca6f
DM
20996 "properties" : {
20997 "force" : {
44660702 20998 "description" : "force if onboot=0.",
7aacca6f 20999 "optional" : 1,
44660702 21000 "type" : "boolean"
7aacca6f
DM
21001 },
21002 "node" : {
7aacca6f 21003 "description" : "The cluster node name.",
44660702
DM
21004 "format" : "pve-node",
21005 "type" : "string"
7aacca6f 21006 }
44660702 21007 }
56122987 21008 },
7aacca6f
DM
21009 "permissions" : {
21010 "check" : [
21011 "perm",
21012 "/",
21013 [
21014 "VM.PowerMgmt"
21015 ]
21016 ]
44660702
DM
21017 },
21018 "protected" : 1,
21019 "proxyto" : "node",
21020 "returns" : {
21021 "type" : "string"
7aacca6f
DM
21022 }
21023 }
21024 },
44660702 21025 "leaf" : 1,
7aacca6f 21026 "path" : "/nodes/{node}/startall",
44660702 21027 "text" : "startall"
7aacca6f
DM
21028 },
21029 {
7aacca6f
DM
21030 "info" : {
21031 "POST" : {
21032 "description" : "Stop all VMs and Containers.",
44660702
DM
21033 "method" : "POST",
21034 "name" : "stopall",
7aacca6f 21035 "parameters" : {
44660702 21036 "additionalProperties" : 0,
7aacca6f
DM
21037 "properties" : {
21038 "node" : {
44660702 21039 "description" : "The cluster node name.",
7aacca6f 21040 "format" : "pve-node",
44660702 21041 "type" : "string"
7aacca6f 21042 }
44660702 21043 }
56122987 21044 },
7aacca6f
DM
21045 "permissions" : {
21046 "check" : [
21047 "perm",
21048 "/",
21049 [
44660702 21050 "VM.PowerMgmt"
7aacca6f
DM
21051 ]
21052 ]
56122987 21053 },
44660702 21054 "protected" : 1,
7aacca6f 21055 "proxyto" : "node",
44660702
DM
21056 "returns" : {
21057 "type" : "string"
21058 }
21059 }
56122987 21060 },
44660702
DM
21061 "leaf" : 1,
21062 "path" : "/nodes/{node}/stopall",
21063 "text" : "stopall"
21064 },
21065 {
21066 "info" : {
21067 "POST" : {
21068 "description" : "Migrate all VMs and Containers.",
21069 "method" : "POST",
21070 "name" : "migrateall",
21071 "parameters" : {
21072 "additionalProperties" : 0,
21073 "properties" : {
21074 "maxworkers" : {
21075 "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!",
21076 "minimum" : 1,
21077 "optional" : 1,
21078 "type" : "integer"
21079 },
21080 "node" : {
21081 "description" : "The cluster node name.",
21082 "format" : "pve-node",
21083 "type" : "string"
21084 },
21085 "target" : {
21086 "description" : "Target node.",
21087 "format" : "pve-node",
21088 "type" : "string"
21089 }
21090 }
21091 },
21092 "permissions" : {
21093 "check" : [
21094 "perm",
21095 "/",
21096 [
21097 "VM.Migrate"
21098 ]
21099 ]
21100 },
21101 "protected" : 1,
21102 "proxyto" : "node",
21103 "returns" : {
21104 "type" : "string"
21105 }
21106 }
56122987 21107 },
44660702
DM
21108 "leaf" : 1,
21109 "path" : "/nodes/{node}/migrateall",
21110 "text" : "migrateall"
21111 }
21112 ],
21113 "info" : {
21114 "GET" : {
21115 "description" : "Node index.",
21116 "method" : "GET",
21117 "name" : "index",
21118 "parameters" : {
21119 "additionalProperties" : 0,
21120 "properties" : {
21121 "node" : {
21122 "description" : "The cluster node name.",
21123 "format" : "pve-node",
21124 "type" : "string"
21125 }
21126 }
56122987 21127 },
44660702
DM
21128 "permissions" : {
21129 "user" : "all"
56122987 21130 },
44660702
DM
21131 "returns" : {
21132 "items" : {
21133 "properties" : {},
21134 "type" : "object"
21135 },
21136 "links" : [
21137 {
21138 "href" : "{name}",
21139 "rel" : "child"
21140 }
56122987 21141 ],
44660702 21142 "type" : "array"
7aacca6f
DM
21143 }
21144 }
21145 },
44660702
DM
21146 "leaf" : 0,
21147 "path" : "/nodes/{node}",
21148 "text" : "{node}"
21149 }
21150 ],
21151 "info" : {
7aacca6f 21152 "GET" : {
44660702 21153 "description" : "Cluster node index.",
7aacca6f 21154 "method" : "GET",
44660702 21155 "name" : "index",
7aacca6f 21156 "parameters" : {
7aacca6f
DM
21157 "additionalProperties" : 0
21158 },
21159 "permissions" : {
7aacca6f
DM
21160 "user" : "all"
21161 },
44660702
DM
21162 "returns" : {
21163 "items" : {
21164 "properties" : {},
21165 "type" : "object"
21166 },
21167 "links" : [
21168 {
21169 "href" : "{node}",
21170 "rel" : "child"
21171 }
21172 ],
21173 "type" : "array"
21174 }
7aacca6f
DM
21175 }
21176 },
44660702
DM
21177 "leaf" : 0,
21178 "path" : "/nodes",
21179 "text" : "nodes"
21180 },
21181 {
7aacca6f
DM
21182 "children" : [
21183 {
7aacca6f 21184 "info" : {
44660702
DM
21185 "DELETE" : {
21186 "description" : "Delete storage configuration.",
21187 "method" : "DELETE",
21188 "name" : "delete",
7aacca6f
DM
21189 "parameters" : {
21190 "additionalProperties" : 0,
21191 "properties" : {
21192 "storage" : {
7aacca6f 21193 "description" : "The storage identifier.",
44660702 21194 "format" : "pve-storage-id",
7aacca6f
DM
21195 "type" : "string"
21196 }
21197 }
56122987 21198 },
7aacca6f
DM
21199 "permissions" : {
21200 "check" : [
21201 "perm",
21202 "/storage",
21203 [
21204 "Datastore.Allocate"
21205 ]
21206 ]
56122987 21207 },
44660702
DM
21208 "protected" : 1,
21209 "returns" : {
21210 "type" : "null"
21211 }
21212 },
21213 "GET" : {
21214 "description" : "Read storage configuration.",
21215 "method" : "GET",
21216 "name" : "read",
7aacca6f
DM
21217 "parameters" : {
21218 "additionalProperties" : 0,
21219 "properties" : {
21220 "storage" : {
44660702 21221 "description" : "The storage identifier.",
7aacca6f 21222 "format" : "pve-storage-id",
44660702 21223 "type" : "string"
7aacca6f
DM
21224 }
21225 }
21226 },
44660702
DM
21227 "permissions" : {
21228 "check" : [
21229 "perm",
21230 "/storage/{storage}",
21231 [
21232 "Datastore.Allocate"
21233 ]
21234 ]
21235 },
21236 "returns" : {}
7aacca6f
DM
21237 },
21238 "PUT" : {
44660702
DM
21239 "description" : "Update storage configuration.",
21240 "method" : "PUT",
21241 "name" : "update",
21242 "parameters" : {
21243 "additionalProperties" : 0,
21244 "properties" : {
21245 "blocksize" : {
21246 "description" : "block size",
7aacca6f 21247 "optional" : 1,
44660702 21248 "type" : "string"
7aacca6f 21249 },
44660702
DM
21250 "comstar_hg" : {
21251 "description" : "host group for comstar views",
21252 "optional" : 1,
21253 "type" : "string"
7aacca6f 21254 },
44660702
DM
21255 "comstar_tg" : {
21256 "description" : "target group for comstar views",
7aacca6f 21257 "optional" : 1,
44660702 21258 "type" : "string"
7aacca6f 21259 },
44660702
DM
21260 "content" : {
21261 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21262 "format" : "pve-storage-content-list",
7aacca6f 21263 "optional" : 1,
44660702 21264 "type" : "string"
7aacca6f 21265 },
44660702
DM
21266 "delete" : {
21267 "description" : "A list of settings you want to delete.",
21268 "format" : "pve-configid-list",
21269 "maxLength" : 4096,
7aacca6f 21270 "optional" : 1,
44660702 21271 "type" : "string"
7aacca6f
DM
21272 },
21273 "digest" : {
44660702 21274 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 21275 "maxLength" : 40,
7aacca6f 21276 "optional" : 1,
7aacca6f
DM
21277 "type" : "string"
21278 },
44660702
DM
21279 "disable" : {
21280 "description" : "Flag to disable the storage.",
21281 "optional" : 1,
21282 "type" : "boolean"
7aacca6f
DM
21283 },
21284 "format" : {
21285 "description" : "Default image format.",
44660702 21286 "format" : "pve-storage-format",
7aacca6f 21287 "optional" : 1,
44660702 21288 "type" : "string"
7aacca6f 21289 },
44660702
DM
21290 "krbd" : {
21291 "description" : "Access rbd through krbd kernel module.",
7aacca6f 21292 "optional" : 1,
44660702 21293 "type" : "boolean"
7aacca6f 21294 },
44660702
DM
21295 "maxfiles" : {
21296 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21297 "minimum" : 0,
21298 "optional" : 1,
21299 "type" : "integer"
7aacca6f
DM
21300 },
21301 "nodes" : {
44660702 21302 "description" : "List of cluster node names.",
7aacca6f
DM
21303 "format" : "pve-node-list",
21304 "optional" : 1,
44660702 21305 "type" : "string"
7aacca6f 21306 },
44660702
DM
21307 "nowritecache" : {
21308 "description" : "disable write caching on the target",
7aacca6f 21309 "optional" : 1,
44660702 21310 "type" : "boolean"
7aacca6f
DM
21311 },
21312 "options" : {
7aacca6f 21313 "description" : "NFS mount options (see 'man nfs')",
44660702
DM
21314 "format" : "pve-storage-options",
21315 "optional" : 1,
21316 "type" : "string"
21317 },
21318 "pool" : {
21319 "description" : "Pool.",
21320 "optional" : 1,
21321 "type" : "string"
21322 },
21323 "redundancy" : {
21324 "default" : 2,
21325 "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.",
21326 "maximum" : 16,
21327 "minimum" : 1,
21328 "optional" : 1,
21329 "type" : "integer"
21330 },
21331 "saferemove" : {
21332 "description" : "Zero-out data when removing LVs.",
21333 "optional" : 1,
21334 "type" : "boolean"
7aacca6f
DM
21335 },
21336 "saferemove_throughput" : {
44660702 21337 "description" : "Wipe throughput (cstream -t parameter value).",
7aacca6f 21338 "optional" : 1,
44660702 21339 "type" : "string"
7aacca6f 21340 },
44660702
DM
21341 "server" : {
21342 "description" : "Server IP or DNS name.",
21343 "format" : "pve-storage-server",
7aacca6f 21344 "optional" : 1,
44660702 21345 "type" : "string"
7aacca6f 21346 },
44660702
DM
21347 "server2" : {
21348 "description" : "Backup volfile server IP or DNS name.",
21349 "format" : "pve-storage-server",
7aacca6f 21350 "optional" : 1,
44660702
DM
21351 "requires" : "server",
21352 "type" : "string"
21353 },
21354 "shared" : {
21355 "description" : "Mark storage as shared.",
21356 "optional" : 1,
21357 "type" : "boolean"
21358 },
21359 "sparse" : {
21360 "description" : "use sparse volumes",
21361 "optional" : 1,
21362 "type" : "boolean"
21363 },
21364 "storage" : {
21365 "description" : "The storage identifier.",
21366 "format" : "pve-storage-id",
21367 "type" : "string"
21368 },
21369 "transport" : {
21370 "description" : "Gluster transport: tcp or rdma",
21371 "enum" : [
21372 "tcp",
21373 "rdma",
21374 "unix"
21375 ],
21376 "optional" : 1,
21377 "type" : "string"
7aacca6f
DM
21378 },
21379 "username" : {
21380 "description" : "RBD Id.",
44660702
DM
21381 "optional" : 1,
21382 "type" : "string"
7aacca6f 21383 }
44660702
DM
21384 },
21385 "type" : "object"
21386 },
21387 "permissions" : {
21388 "check" : [
21389 "perm",
21390 "/storage",
21391 [
21392 "Datastore.Allocate"
21393 ]
21394 ]
21395 },
21396 "protected" : 1,
21397 "returns" : {
21398 "type" : "null"
21399 }
21400 }
21401 },
21402 "leaf" : 1,
21403 "path" : "/storage/{storage}",
21404 "text" : "{storage}"
21405 }
21406 ],
21407 "info" : {
21408 "GET" : {
21409 "description" : "Storage index.",
21410 "method" : "GET",
21411 "name" : "index",
21412 "parameters" : {
21413 "additionalProperties" : 0,
21414 "properties" : {
21415 "type" : {
21416 "description" : "Only list storage of specific type",
21417 "enum" : [
21418 "dir",
21419 "drbd",
21420 "glusterfs",
21421 "iscsi",
21422 "iscsidirect",
21423 "lvm",
21424 "lvmthin",
21425 "nfs",
21426 "rbd",
21427 "sheepdog",
21428 "zfs",
21429 "zfspool"
21430 ],
21431 "optional" : 1,
21432 "type" : "string"
21433 }
21434 }
21435 },
21436 "permissions" : {
21437 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
21438 "user" : "all"
21439 },
21440 "returns" : {
21441 "items" : {
21442 "properties" : {
21443 "storage" : {
21444 "type" : "string"
7aacca6f 21445 }
56122987 21446 },
44660702
DM
21447 "type" : "object"
21448 },
21449 "links" : [
21450 {
21451 "href" : "{storage}",
21452 "rel" : "child"
21453 }
21454 ],
21455 "type" : "array"
21456 }
21457 },
21458 "POST" : {
21459 "description" : "Create a new storage.",
21460 "method" : "POST",
21461 "name" : "create",
21462 "parameters" : {
21463 "additionalProperties" : 0,
21464 "properties" : {
21465 "authsupported" : {
21466 "description" : "Authsupported.",
21467 "optional" : 1,
21468 "type" : "string"
21469 },
21470 "base" : {
21471 "description" : "Base volume. This volume is automatically activated.",
21472 "format" : "pve-volume-id",
21473 "optional" : 1,
21474 "type" : "string"
21475 },
21476 "blocksize" : {
21477 "description" : "block size",
21478 "optional" : 1,
21479 "type" : "string"
21480 },
21481 "comstar_hg" : {
21482 "description" : "host group for comstar views",
21483 "optional" : 1,
21484 "type" : "string"
21485 },
21486 "comstar_tg" : {
21487 "description" : "target group for comstar views",
21488 "optional" : 1,
21489 "type" : "string"
21490 },
21491 "content" : {
21492 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21493 "format" : "pve-storage-content-list",
21494 "optional" : 1,
21495 "type" : "string"
21496 },
21497 "disable" : {
21498 "description" : "Flag to disable the storage.",
21499 "optional" : 1,
21500 "type" : "boolean"
21501 },
21502 "export" : {
21503 "description" : "NFS export path.",
21504 "format" : "pve-storage-path",
21505 "optional" : 1,
21506 "type" : "string"
21507 },
21508 "format" : {
21509 "description" : "Default image format.",
21510 "format" : "pve-storage-format",
21511 "optional" : 1,
21512 "type" : "string"
21513 },
21514 "iscsiprovider" : {
21515 "description" : "iscsi provider",
21516 "optional" : 1,
21517 "type" : "string"
21518 },
21519 "krbd" : {
21520 "description" : "Access rbd through krbd kernel module.",
21521 "optional" : 1,
21522 "type" : "boolean"
56122987 21523 },
44660702
DM
21524 "maxfiles" : {
21525 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21526 "minimum" : 0,
21527 "optional" : 1,
21528 "type" : "integer"
7aacca6f 21529 },
44660702
DM
21530 "monhost" : {
21531 "description" : "Monitors daemon ips.",
21532 "optional" : 1,
21533 "type" : "string"
7aacca6f 21534 },
44660702
DM
21535 "nodes" : {
21536 "description" : "List of cluster node names.",
21537 "format" : "pve-node-list",
21538 "optional" : 1,
21539 "type" : "string"
7aacca6f 21540 },
44660702
DM
21541 "nowritecache" : {
21542 "description" : "disable write caching on the target",
21543 "optional" : 1,
21544 "type" : "boolean"
21545 },
21546 "options" : {
21547 "description" : "NFS mount options (see 'man nfs')",
21548 "format" : "pve-storage-options",
21549 "optional" : 1,
21550 "type" : "string"
21551 },
21552 "path" : {
21553 "description" : "File system path.",
21554 "format" : "pve-storage-path",
21555 "optional" : 1,
21556 "type" : "string"
21557 },
21558 "pool" : {
21559 "description" : "Pool.",
21560 "optional" : 1,
21561 "type" : "string"
21562 },
21563 "portal" : {
21564 "description" : "iSCSI portal (IP or DNS name with optional port).",
21565 "format" : "pve-storage-portal-dns",
21566 "optional" : 1,
21567 "type" : "string"
21568 },
21569 "redundancy" : {
21570 "default" : 2,
21571 "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.",
21572 "maximum" : 16,
21573 "minimum" : 1,
21574 "optional" : 1,
21575 "type" : "integer"
21576 },
21577 "saferemove" : {
21578 "description" : "Zero-out data when removing LVs.",
21579 "optional" : 1,
21580 "type" : "boolean"
21581 },
21582 "saferemove_throughput" : {
21583 "description" : "Wipe throughput (cstream -t parameter value).",
21584 "optional" : 1,
21585 "type" : "string"
21586 },
21587 "server" : {
21588 "description" : "Server IP or DNS name.",
21589 "format" : "pve-storage-server",
21590 "optional" : 1,
21591 "type" : "string"
21592 },
21593 "server2" : {
21594 "description" : "Backup volfile server IP or DNS name.",
21595 "format" : "pve-storage-server",
21596 "optional" : 1,
21597 "requires" : "server",
21598 "type" : "string"
21599 },
21600 "shared" : {
21601 "description" : "Mark storage as shared.",
21602 "optional" : 1,
21603 "type" : "boolean"
21604 },
21605 "sparse" : {
21606 "description" : "use sparse volumes",
21607 "optional" : 1,
21608 "type" : "boolean"
21609 },
21610 "storage" : {
21611 "description" : "The storage identifier.",
21612 "format" : "pve-storage-id",
21613 "type" : "string"
21614 },
21615 "target" : {
21616 "description" : "iSCSI target.",
21617 "optional" : 1,
21618 "type" : "string"
21619 },
21620 "thinpool" : {
21621 "description" : "LVM thin pool LV name.",
21622 "format" : "pve-storage-vgname",
21623 "optional" : 1,
21624 "type" : "string"
21625 },
21626 "transport" : {
21627 "description" : "Gluster transport: tcp or rdma",
21628 "enum" : [
21629 "tcp",
21630 "rdma",
21631 "unix"
7aacca6f 21632 ],
44660702
DM
21633 "optional" : 1,
21634 "type" : "string"
56122987 21635 },
44660702
DM
21636 "type" : {
21637 "description" : "Storage type.",
21638 "enum" : [
21639 "dir",
21640 "drbd",
21641 "glusterfs",
21642 "iscsi",
21643 "iscsidirect",
21644 "lvm",
21645 "lvmthin",
21646 "nfs",
21647 "rbd",
21648 "sheepdog",
21649 "zfs",
21650 "zfspool"
21651 ],
21652 "type" : "string"
56122987 21653 },
44660702
DM
21654 "username" : {
21655 "description" : "RBD Id.",
21656 "optional" : 1,
21657 "type" : "string"
7aacca6f 21658 },
44660702
DM
21659 "vgname" : {
21660 "description" : "Volume group name.",
21661 "format" : "pve-storage-vgname",
21662 "optional" : 1,
21663 "type" : "string"
21664 },
21665 "volume" : {
21666 "description" : "Glusterfs Volume.",
21667 "optional" : 1,
21668 "type" : "string"
21669 }
21670 },
21671 "type" : "object"
21672 },
21673 "permissions" : {
21674 "check" : [
21675 "perm",
21676 "/storage",
21677 [
21678 "Datastore.Allocate"
21679 ]
21680 ]
56122987 21681 },
44660702
DM
21682 "protected" : 1,
21683 "returns" : {
21684 "type" : "null"
21685 }
21686 }
21687 },
21688 "leaf" : 0,
21689 "path" : "/storage",
21690 "text" : "storage"
21691 },
21692 {
21693 "children" : [
21694 {
56122987
DM
21695 "children" : [
21696 {
56122987 21697 "info" : {
44660702
DM
21698 "DELETE" : {
21699 "description" : "Delete user.",
21700 "method" : "DELETE",
21701 "name" : "delete_user",
56122987 21702 "parameters" : {
7aacca6f 21703 "additionalProperties" : 0,
56122987 21704 "properties" : {
56122987 21705 "userid" : {
56122987
DM
21706 "description" : "User ID",
21707 "format" : "pve-userid",
44660702 21708 "maxLength" : 64,
56122987
DM
21709 "type" : "string"
21710 }
7aacca6f 21711 }
56122987 21712 },
56122987
DM
21713 "permissions" : {
21714 "check" : [
44660702 21715 "and",
56122987 21716 [
44660702
DM
21717 "userid-param",
21718 "Realm.AllocateUser"
56122987 21719 ],
44660702
DM
21720 [
21721 "userid-group",
21722 [
21723 "User.Modify"
21724 ]
21725 ]
56122987 21726 ]
7aacca6f 21727 },
44660702 21728 "protected" : 1,
56122987
DM
21729 "returns" : {
21730 "type" : "null"
44660702 21731 }
7aacca6f 21732 },
44660702
DM
21733 "GET" : {
21734 "description" : "Get user configuration.",
21735 "method" : "GET",
21736 "name" : "read_user",
56122987
DM
21737 "parameters" : {
21738 "additionalProperties" : 0,
21739 "properties" : {
21740 "userid" : {
44660702 21741 "description" : "User ID",
56122987 21742 "format" : "pve-userid",
44660702
DM
21743 "maxLength" : 64,
21744 "type" : "string"
56122987
DM
21745 }
21746 }
21747 },
56122987
DM
21748 "permissions" : {
21749 "check" : [
44660702 21750 "userid-group",
56122987 21751 [
44660702
DM
21752 "User.Modify",
21753 "Sys.Audit"
56122987
DM
21754 ]
21755 ]
21756 },
56122987 21757 "returns" : {
7aacca6f 21758 "additionalProperties" : 0,
56122987 21759 "properties" : {
44660702
DM
21760 "comment" : {
21761 "optional" : 1,
21762 "type" : "string"
56122987 21763 },
44660702
DM
21764 "email" : {
21765 "optional" : 1,
21766 "type" : "string"
7aacca6f
DM
21767 },
21768 "enable" : {
21769 "type" : "boolean"
21770 },
44660702
DM
21771 "expire" : {
21772 "optional" : 1,
21773 "type" : "integer"
21774 },
21775 "firstname" : {
56122987
DM
21776 "optional" : 1,
21777 "type" : "string"
21778 },
44660702
DM
21779 "groups" : {
21780 "type" : "array"
56122987 21781 },
44660702
DM
21782 "keys" : {
21783 "optional" : 1,
21784 "type" : "string"
7aacca6f 21785 },
44660702
DM
21786 "lastname" : {
21787 "optional" : 1,
21788 "type" : "string"
56122987 21789 }
7aacca6f 21790 }
44660702
DM
21791 }
21792 },
21793 "PUT" : {
21794 "description" : "Update user configuration.",
21795 "method" : "PUT",
21796 "name" : "update_user",
56122987 21797 "parameters" : {
44660702 21798 "additionalProperties" : 0,
56122987 21799 "properties" : {
44660702
DM
21800 "append" : {
21801 "optional" : 1,
21802 "requires" : "groups",
21803 "type" : "boolean"
21804 },
21805 "comment" : {
21806 "optional" : 1,
21807 "type" : "string"
21808 },
21809 "email" : {
21810 "format" : "email-opt",
21811 "optional" : 1,
21812 "type" : "string"
21813 },
21814 "enable" : {
21815 "description" : "Enable/disable the account.",
21816 "optional" : 1,
21817 "type" : "boolean"
21818 },
21819 "expire" : {
21820 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
21821 "minimum" : 0,
21822 "optional" : 1,
21823 "type" : "integer"
21824 },
21825 "firstname" : {
21826 "optional" : 1,
21827 "type" : "string"
21828 },
21829 "groups" : {
21830 "format" : "pve-groupid-list",
21831 "optional" : 1,
21832 "type" : "string"
21833 },
21834 "keys" : {
21835 "description" : "Keys for two factor auth (yubico).",
21836 "optional" : 1,
21837 "type" : "string"
21838 },
21839 "lastname" : {
21840 "optional" : 1,
21841 "type" : "string"
21842 },
56122987 21843 "userid" : {
56122987
DM
21844 "description" : "User ID",
21845 "format" : "pve-userid",
44660702
DM
21846 "maxLength" : 64,
21847 "type" : "string"
56122987 21848 }
44660702 21849 }
56122987 21850 },
56122987
DM
21851 "permissions" : {
21852 "check" : [
21853 "userid-group",
21854 [
44660702
DM
21855 "User.Modify"
21856 ],
21857 "groups_param",
21858 1
56122987
DM
21859 ]
21860 },
44660702
DM
21861 "protected" : 1,
21862 "returns" : {
21863 "type" : "null"
21864 }
56122987
DM
21865 }
21866 },
44660702
DM
21867 "leaf" : 1,
21868 "path" : "/access/users/{userid}",
7aacca6f 21869 "text" : "{userid}"
56122987 21870 }
7aacca6f 21871 ],
56122987 21872 "info" : {
7aacca6f 21873 "GET" : {
44660702
DM
21874 "description" : "User index.",
21875 "method" : "GET",
7aacca6f 21876 "name" : "index",
56122987 21877 "parameters" : {
44660702
DM
21878 "additionalProperties" : 0,
21879 "properties" : {
21880 "enabled" : {
21881 "description" : "Optional filter for enable property.",
21882 "optional" : 1,
21883 "type" : "boolean"
21884 }
21885 }
21886 },
21887 "permissions" : {
21888 "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.",
21889 "user" : "all"
56122987 21890 },
7aacca6f 21891 "returns" : {
7aacca6f
DM
21892 "items" : {
21893 "properties" : {
44660702 21894 "userid" : {
7aacca6f
DM
21895 "type" : "string"
21896 }
21897 },
21898 "type" : "object"
21899 },
44660702
DM
21900 "links" : [
21901 {
21902 "href" : "{userid}",
21903 "rel" : "child"
21904 }
21905 ],
7aacca6f
DM
21906 "type" : "array"
21907 }
21908 },
21909 "POST" : {
44660702 21910 "description" : "Create new user.",
7aacca6f 21911 "method" : "POST",
44660702 21912 "name" : "create_user",
56122987 21913 "parameters" : {
7aacca6f
DM
21914 "additionalProperties" : 0,
21915 "properties" : {
44660702
DM
21916 "comment" : {
21917 "optional" : 1,
7aacca6f
DM
21918 "type" : "string"
21919 },
44660702
DM
21920 "email" : {
21921 "format" : "email-opt",
21922 "optional" : 1,
21923 "type" : "string"
21924 },
21925 "enable" : {
21926 "default" : 1,
21927 "description" : "Enable the account (default). You can set this to '0' to disable the accout",
21928 "optional" : 1,
21929 "type" : "boolean"
21930 },
21931 "expire" : {
21932 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
21933 "minimum" : 0,
21934 "optional" : 1,
21935 "type" : "integer"
21936 },
21937 "firstname" : {
21938 "optional" : 1,
21939 "type" : "string"
21940 },
21941 "groups" : {
21942 "format" : "pve-groupid-list",
21943 "optional" : 1,
21944 "type" : "string"
21945 },
21946 "keys" : {
21947 "description" : "Keys for two factor auth (yubico).",
21948 "optional" : 1,
21949 "type" : "string"
21950 },
21951 "lastname" : {
7aacca6f
DM
21952 "optional" : 1,
21953 "type" : "string"
44660702
DM
21954 },
21955 "password" : {
21956 "description" : "Initial password.",
21957 "maxLength" : 64,
21958 "minLength" : 5,
21959 "optional" : 1,
21960 "type" : "string"
21961 },
21962 "userid" : {
21963 "description" : "User ID",
21964 "format" : "pve-userid",
21965 "maxLength" : 64,
21966 "type" : "string"
56122987 21967 }
7aacca6f 21968 }
56122987 21969 },
44660702
DM
21970 "permissions" : {
21971 "check" : [
21972 "and",
21973 [
21974 "userid-param",
21975 "Realm.AllocateUser"
21976 ],
21977 [
21978 "userid-group",
21979 [
21980 "User.Modify"
21981 ],
21982 "groups_param",
21983 1
21984 ]
21985 ],
21986 "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."
21987 },
21988 "protected" : 1,
21989 "returns" : {
21990 "type" : "null"
21991 }
56122987
DM
21992 }
21993 },
44660702
DM
21994 "leaf" : 0,
21995 "path" : "/access/users",
21996 "text" : "users"
21997 },
21998 {
56122987
DM
21999 "children" : [
22000 {
56122987
DM
22001 "info" : {
22002 "DELETE" : {
44660702
DM
22003 "description" : "Delete group.",
22004 "method" : "DELETE",
22005 "name" : "delete_group",
22006 "parameters" : {
22007 "additionalProperties" : 0,
22008 "properties" : {
22009 "groupid" : {
22010 "format" : "pve-groupid",
22011 "type" : "string"
22012 }
22013 }
22014 },
7aacca6f
DM
22015 "permissions" : {
22016 "check" : [
22017 "perm",
22018 "/access/groups",
22019 [
22020 "Group.Allocate"
22021 ]
22022 ]
22023 },
7aacca6f 22024 "protected" : 1,
7aacca6f
DM
22025 "returns" : {
22026 "type" : "null"
44660702 22027 }
7aacca6f 22028 },
44660702
DM
22029 "GET" : {
22030 "description" : "Get group configuration.",
22031 "method" : "GET",
22032 "name" : "read_group",
22033 "parameters" : {
22034 "additionalProperties" : 0,
22035 "properties" : {
22036 "groupid" : {
22037 "format" : "pve-groupid",
22038 "type" : "string"
22039 }
22040 }
56122987 22041 },
7aacca6f
DM
22042 "permissions" : {
22043 "check" : [
22044 "perm",
22045 "/access/groups",
22046 [
44660702 22047 "Sys.Audit",
7aacca6f 22048 "Group.Allocate"
44660702
DM
22049 ],
22050 "any",
22051 1
7aacca6f
DM
22052 ]
22053 },
7aacca6f 22054 "returns" : {
44660702 22055 "additionalProperties" : 0,
7aacca6f
DM
22056 "properties" : {
22057 "comment" : {
44660702
DM
22058 "optional" : 1,
22059 "type" : "string"
7aacca6f
DM
22060 },
22061 "members" : {
22062 "items" : {
22063 "type" : "string"
22064 },
22065 "type" : "array"
22066 }
22067 },
44660702
DM
22068 "type" : "object"
22069 }
22070 },
22071 "PUT" : {
22072 "description" : "Update group data.",
22073 "method" : "PUT",
22074 "name" : "update_group",
56122987 22075 "parameters" : {
44660702 22076 "additionalProperties" : 0,
56122987 22077 "properties" : {
44660702
DM
22078 "comment" : {
22079 "optional" : 1,
22080 "type" : "string"
22081 },
56122987
DM
22082 "groupid" : {
22083 "format" : "pve-groupid",
22084 "type" : "string"
22085 }
44660702 22086 }
56122987 22087 },
56122987
DM
22088 "permissions" : {
22089 "check" : [
22090 "perm",
22091 "/access/groups",
22092 [
22093 "Group.Allocate"
44660702 22094 ]
56122987
DM
22095 ]
22096 },
44660702
DM
22097 "protected" : 1,
22098 "returns" : {
22099 "type" : "null"
22100 }
7aacca6f
DM
22101 }
22102 },
7aacca6f 22103 "leaf" : 1,
44660702
DM
22104 "path" : "/access/groups/{groupid}",
22105 "text" : "{groupid}"
22106 }
22107 ],
22108 "info" : {
22109 "GET" : {
22110 "description" : "Group index.",
22111 "method" : "GET",
22112 "name" : "index",
22113 "parameters" : {
22114 "additionalProperties" : 0
22115 },
22116 "permissions" : {
22117 "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/<group>.",
22118 "user" : "all"
22119 },
22120 "returns" : {
22121 "items" : {
22122 "properties" : {
22123 "groupid" : {
22124 "type" : "string"
22125 }
22126 },
22127 "type" : "object"
22128 },
22129 "links" : [
22130 {
22131 "href" : "{groupid}",
22132 "rel" : "child"
22133 }
22134 ],
22135 "type" : "array"
22136 }
22137 },
22138 "POST" : {
22139 "description" : "Create new group.",
22140 "method" : "POST",
22141 "name" : "create_group",
22142 "parameters" : {
22143 "additionalProperties" : 0,
22144 "properties" : {
22145 "comment" : {
22146 "optional" : 1,
22147 "type" : "string"
22148 },
22149 "groupid" : {
22150 "format" : "pve-groupid",
22151 "type" : "string"
22152 }
22153 }
22154 },
22155 "permissions" : {
22156 "check" : [
22157 "perm",
22158 "/access/groups",
22159 [
22160 "Group.Allocate"
22161 ]
22162 ]
22163 },
22164 "protected" : 1,
22165 "returns" : {
22166 "type" : "null"
22167 }
7aacca6f 22168 }
44660702 22169 },
7aacca6f 22170 "leaf" : 0,
44660702
DM
22171 "path" : "/access/groups",
22172 "text" : "groups"
7aacca6f
DM
22173 },
22174 {
22175 "children" : [
22176 {
7aacca6f 22177 "info" : {
7aacca6f 22178 "DELETE" : {
7aacca6f 22179 "description" : "Delete role.",
44660702 22180 "method" : "DELETE",
7aacca6f 22181 "name" : "delete_role",
56122987
DM
22182 "parameters" : {
22183 "additionalProperties" : 0,
22184 "properties" : {
7aacca6f
DM
22185 "roleid" : {
22186 "format" : "pve-roleid",
22187 "type" : "string"
56122987
DM
22188 }
22189 }
22190 },
56122987
DM
22191 "permissions" : {
22192 "check" : [
22193 "perm",
7aacca6f 22194 "/access",
56122987 22195 [
7aacca6f
DM
22196 "Sys.Modify"
22197 ]
56122987 22198 ]
44660702
DM
22199 },
22200 "protected" : 1,
22201 "returns" : {
22202 "type" : "null"
56122987
DM
22203 }
22204 },
44660702
DM
22205 "GET" : {
22206 "description" : "Get role configuration.",
22207 "method" : "GET",
22208 "name" : "read_role",
22209 "parameters" : {
22210 "additionalProperties" : 0,
22211 "properties" : {
22212 "roleid" : {
22213 "format" : "pve-roleid",
22214 "type" : "string"
22215 }
22216 }
22217 },
7aacca6f 22218 "permissions" : {
44660702 22219 "user" : "all"
56122987 22220 },
44660702
DM
22221 "returns" : {}
22222 },
22223 "PUT" : {
22224 "description" : "Create new role.",
22225 "method" : "PUT",
22226 "name" : "update_role",
56122987
DM
22227 "parameters" : {
22228 "additionalProperties" : 0,
22229 "properties" : {
7aacca6f 22230 "append" : {
44660702 22231 "optional" : 1,
7aacca6f 22232 "requires" : "privs",
44660702 22233 "type" : "boolean"
7aacca6f
DM
22234 },
22235 "privs" : {
22236 "format" : "pve-priv-list",
56122987 22237 "type" : "string"
44660702
DM
22238 },
22239 "roleid" : {
22240 "format" : "pve-roleid",
22241 "type" : "string"
56122987
DM
22242 }
22243 }
22244 },
44660702
DM
22245 "permissions" : {
22246 "check" : [
22247 "perm",
22248 "/access",
22249 [
22250 "Sys.Modify"
22251 ]
22252 ]
22253 },
56122987 22254 "protected" : 1,
7aacca6f
DM
22255 "returns" : {
22256 "type" : "null"
56122987
DM
22257 }
22258 }
22259 },
44660702 22260 "leaf" : 1,
7aacca6f 22261 "path" : "/access/roles/{roleid}",
44660702 22262 "text" : "{roleid}"
56122987
DM
22263 }
22264 ],
56122987 22265 "info" : {
7aacca6f
DM
22266 "GET" : {
22267 "description" : "Role index.",
44660702 22268 "method" : "GET",
7aacca6f 22269 "name" : "index",
56122987 22270 "parameters" : {
56122987
DM
22271 "additionalProperties" : 0
22272 },
7aacca6f
DM
22273 "permissions" : {
22274 "user" : "all"
22275 },
56122987 22276 "returns" : {
7aacca6f 22277 "items" : {
7aacca6f
DM
22278 "properties" : {
22279 "roleid" : {
22280 "type" : "string"
22281 }
44660702
DM
22282 },
22283 "type" : "object"
22284 },
22285 "links" : [
22286 {
22287 "href" : "{roleid}",
22288 "rel" : "child"
7aacca6f 22289 }
44660702
DM
22290 ],
22291 "type" : "array"
22292 }
7aacca6f
DM
22293 },
22294 "POST" : {
22295 "description" : "Create new role.",
44660702
DM
22296 "method" : "POST",
22297 "name" : "create_role",
7aacca6f
DM
22298 "parameters" : {
22299 "additionalProperties" : 0,
22300 "properties" : {
7aacca6f
DM
22301 "privs" : {
22302 "format" : "pve-priv-list",
22303 "optional" : 1,
22304 "type" : "string"
44660702
DM
22305 },
22306 "roleid" : {
22307 "format" : "pve-roleid",
22308 "type" : "string"
7aacca6f
DM
22309 }
22310 }
22311 },
44660702
DM
22312 "permissions" : {
22313 "check" : [
22314 "perm",
22315 "/access",
22316 [
22317 "Sys.Modify"
22318 ]
22319 ]
22320 },
22321 "protected" : 1,
7aacca6f
DM
22322 "returns" : {
22323 "type" : "null"
22324 }
22325 }
22326 },
44660702 22327 "leaf" : 0,
7aacca6f 22328 "path" : "/access/roles",
44660702 22329 "text" : "roles"
7aacca6f
DM
22330 },
22331 {
22332 "info" : {
56122987 22333 "GET" : {
44660702
DM
22334 "description" : "Get Access Control List (ACLs).",
22335 "method" : "GET",
22336 "name" : "read_acl",
7aacca6f
DM
22337 "parameters" : {
22338 "additionalProperties" : 0
22339 },
44660702
DM
22340 "permissions" : {
22341 "description" : "The returned list is restricted to objects where you have rights to modify permissions.",
22342 "user" : "all"
22343 },
56122987 22344 "returns" : {
56122987 22345 "items" : {
44660702 22346 "additionalProperties" : 0,
56122987 22347 "properties" : {
7aacca6f
DM
22348 "path" : {
22349 "type" : "string"
22350 },
44660702
DM
22351 "propagate" : {
22352 "type" : "boolean"
22353 },
22354 "roleid" : {
22355 "type" : "string"
22356 },
7aacca6f
DM
22357 "type" : {
22358 "enum" : [
22359 "user",
22360 "group"
22361 ],
22362 "type" : "string"
22363 },
7aacca6f
DM
22364 "ugid" : {
22365 "type" : "string"
56122987 22366 }
7aacca6f 22367 },
44660702 22368 "type" : "object"
7aacca6f
DM
22369 },
22370 "type" : "array"
44660702 22371 }
7aacca6f
DM
22372 },
22373 "PUT" : {
44660702
DM
22374 "description" : "Update Access Control List (add or remove permissions).",
22375 "method" : "PUT",
7aacca6f
DM
22376 "name" : "update_acl",
22377 "parameters" : {
22378 "additionalProperties" : 0,
22379 "properties" : {
22380 "delete" : {
44660702 22381 "description" : "Remove permissions (instead of adding it).",
7aacca6f 22382 "optional" : 1,
44660702 22383 "type" : "boolean"
7aacca6f 22384 },
44660702
DM
22385 "groups" : {
22386 "description" : "List of groups.",
22387 "format" : "pve-groupid-list",
7aacca6f 22388 "optional" : 1,
44660702 22389 "type" : "string"
7aacca6f
DM
22390 },
22391 "path" : {
22392 "description" : "Access control path",
22393 "type" : "string"
22394 },
7aacca6f 22395 "propagate" : {
44660702 22396 "default" : 1,
7aacca6f 22397 "description" : "Allow to propagate (inherit) permissions.",
7aacca6f 22398 "optional" : 1,
44660702 22399 "type" : "boolean"
7aacca6f 22400 },
44660702
DM
22401 "roles" : {
22402 "description" : "List of roles.",
22403 "format" : "pve-roleid-list",
22404 "type" : "string"
22405 },
22406 "users" : {
22407 "description" : "List of users.",
22408 "format" : "pve-userid-list",
7aacca6f 22409 "optional" : 1,
44660702 22410 "type" : "string"
56122987
DM
22411 }
22412 }
22413 },
56122987 22414 "permissions" : {
7aacca6f
DM
22415 "check" : [
22416 "perm-modify",
22417 "{path}"
22418 ]
22419 },
7aacca6f
DM
22420 "protected" : 1,
22421 "returns" : {
22422 "type" : "null"
44660702 22423 }
56122987
DM
22424 }
22425 },
7aacca6f 22426 "leaf" : 1,
44660702
DM
22427 "path" : "/access/acl",
22428 "text" : "acl"
7aacca6f
DM
22429 },
22430 {
56122987
DM
22431 "children" : [
22432 {
56122987 22433 "info" : {
44660702
DM
22434 "DELETE" : {
22435 "description" : "Delete an authentication server.",
22436 "method" : "DELETE",
22437 "name" : "delete",
22438 "parameters" : {
22439 "additionalProperties" : 0,
22440 "properties" : {
22441 "realm" : {
22442 "description" : "Authentication domain ID",
22443 "format" : "pve-realm",
22444 "maxLength" : 32,
22445 "type" : "string"
56122987 22446 }
44660702 22447 }
56122987 22448 },
56122987
DM
22449 "permissions" : {
22450 "check" : [
22451 "perm",
7aacca6f 22452 "/access/realm",
56122987 22453 [
7aacca6f 22454 "Realm.Allocate"
56122987
DM
22455 ]
22456 ]
22457 },
7aacca6f 22458 "protected" : 1,
7aacca6f
DM
22459 "returns" : {
22460 "type" : "null"
44660702 22461 }
7aacca6f 22462 },
44660702
DM
22463 "GET" : {
22464 "description" : "Get auth server configuration.",
22465 "method" : "GET",
22466 "name" : "read",
56122987 22467 "parameters" : {
44660702 22468 "additionalProperties" : 0,
56122987 22469 "properties" : {
7aacca6f 22470 "realm" : {
44660702 22471 "description" : "Authentication domain ID",
7aacca6f
DM
22472 "format" : "pve-realm",
22473 "maxLength" : 32,
44660702 22474 "type" : "string"
56122987 22475 }
44660702 22476 }
7aacca6f 22477 },
7aacca6f
DM
22478 "permissions" : {
22479 "check" : [
22480 "perm",
22481 "/access/realm",
22482 [
44660702
DM
22483 "Realm.Allocate",
22484 "Sys.Audit"
22485 ],
22486 "any",
22487 1
7aacca6f 22488 ]
44660702
DM
22489 },
22490 "returns" : {}
7aacca6f 22491 },
44660702
DM
22492 "PUT" : {
22493 "description" : "Update authentication server settings.",
22494 "method" : "PUT",
22495 "name" : "update",
7aacca6f 22496 "parameters" : {
44660702 22497 "additionalProperties" : 0,
7aacca6f 22498 "properties" : {
44660702
DM
22499 "base_dn" : {
22500 "description" : "LDAP base domain name",
22501 "maxLength" : 256,
22502 "optional" : 1,
22503 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
22504 "type" : "string"
22505 },
22506 "comment" : {
22507 "description" : "Description.",
22508 "maxLength" : 4096,
22509 "optional" : 1,
22510 "type" : "string"
22511 },
22512 "default" : {
22513 "description" : "Use this as default realm",
22514 "optional" : 1,
22515 "type" : "boolean"
22516 },
22517 "delete" : {
22518 "description" : "A list of settings you want to delete.",
22519 "format" : "pve-configid-list",
22520 "maxLength" : 4096,
22521 "optional" : 1,
22522 "type" : "string"
22523 },
22524 "digest" : {
22525 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
22526 "maxLength" : 40,
22527 "optional" : 1,
22528 "type" : "string"
22529 },
22530 "domain" : {
22531 "description" : "AD domain name",
22532 "maxLength" : 256,
22533 "optional" : 1,
22534 "pattern" : "\\S+",
22535 "type" : "string"
22536 },
22537 "port" : {
22538 "description" : "Server port.",
22539 "maximum" : 65535,
22540 "minimum" : 1,
22541 "optional" : 1,
22542 "type" : "integer"
22543 },
7aacca6f 22544 "realm" : {
7aacca6f
DM
22545 "description" : "Authentication domain ID",
22546 "format" : "pve-realm",
44660702
DM
22547 "maxLength" : 32,
22548 "type" : "string"
22549 },
22550 "secure" : {
22551 "description" : "Use secure LDAPS protocol.",
22552 "optional" : 1,
22553 "type" : "boolean"
22554 },
22555 "server1" : {
22556 "description" : "Server IP address (or DNS name)",
22557 "format" : "address",
22558 "maxLength" : 256,
22559 "optional" : 1,
22560 "type" : "string"
22561 },
22562 "server2" : {
22563 "description" : "Fallback Server IP address (or DNS name)",
22564 "format" : "address",
22565 "maxLength" : 256,
22566 "optional" : 1,
22567 "type" : "string"
22568 },
22569 "tfa" : {
22570 "description" : "Use Two-factor authentication.",
22571 "format" : "pve-tfa-config",
22572 "maxLength" : 128,
22573 "optional" : 1,
22574 "type" : "string"
22575 },
22576 "user_attr" : {
22577 "description" : "LDAP user attribute name",
22578 "maxLength" : 256,
22579 "optional" : 1,
22580 "pattern" : "\\S{2,}",
22581 "type" : "string"
7aacca6f 22582 }
56122987 22583 },
44660702 22584 "type" : "object"
56122987 22585 },
7aacca6f
DM
22586 "permissions" : {
22587 "check" : [
22588 "perm",
22589 "/access/realm",
22590 [
44660702
DM
22591 "Realm.Allocate"
22592 ]
7aacca6f
DM
22593 ]
22594 },
44660702
DM
22595 "protected" : 1,
22596 "returns" : {
22597 "type" : "null"
22598 }
56122987 22599 }
44660702
DM
22600 },
22601 "leaf" : 1,
22602 "path" : "/access/domains/{realm}",
22603 "text" : "{realm}"
56122987 22604 }
7aacca6f 22605 ],
56122987
DM
22606 "info" : {
22607 "GET" : {
44660702
DM
22608 "description" : "Authentication domain index.",
22609 "method" : "GET",
22610 "name" : "index",
22611 "parameters" : {
22612 "additionalProperties" : 0
22613 },
22614 "permissions" : {
22615 "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated).",
22616 "user" : "world"
22617 },
56122987 22618 "returns" : {
56122987
DM
22619 "items" : {
22620 "properties" : {
7aacca6f
DM
22621 "comment" : {
22622 "optional" : 1,
22623 "type" : "string"
22624 },
56122987
DM
22625 "realm" : {
22626 "type" : "string"
22627 },
22628 "tfa" : {
7aacca6f 22629 "description" : "Two-factor authentication provider.",
56122987
DM
22630 "enum" : [
22631 "yubico",
22632 "oath"
22633 ],
44660702
DM
22634 "optional" : 1,
22635 "type" : "string"
56122987
DM
22636 }
22637 },
22638 "type" : "object"
44660702
DM
22639 },
22640 "links" : [
22641 {
22642 "href" : "{realm}",
22643 "rel" : "child"
22644 }
22645 ],
22646 "type" : "array"
22647 }
56122987
DM
22648 },
22649 "POST" : {
7aacca6f 22650 "description" : "Add an authentication server.",
44660702 22651 "method" : "POST",
7aacca6f 22652 "name" : "create",
56122987 22653 "parameters" : {
44660702 22654 "additionalProperties" : 0,
56122987 22655 "properties" : {
44660702
DM
22656 "base_dn" : {
22657 "description" : "LDAP base domain name",
56122987 22658 "maxLength" : 256,
44660702
DM
22659 "optional" : 1,
22660 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
7aacca6f 22661 "type" : "string"
56122987 22662 },
44660702
DM
22663 "comment" : {
22664 "description" : "Description.",
22665 "maxLength" : 4096,
56122987 22666 "optional" : 1,
44660702 22667 "type" : "string"
56122987 22668 },
44660702
DM
22669 "default" : {
22670 "description" : "Use this as default realm",
7aacca6f 22671 "optional" : 1,
44660702 22672 "type" : "boolean"
56122987 22673 },
44660702
DM
22674 "domain" : {
22675 "description" : "AD domain name",
22676 "maxLength" : 256,
7aacca6f 22677 "optional" : 1,
44660702
DM
22678 "pattern" : "\\S+",
22679 "type" : "string"
56122987 22680 },
7aacca6f 22681 "port" : {
44660702 22682 "description" : "Server port.",
7aacca6f 22683 "maximum" : 65535,
44660702 22684 "minimum" : 1,
7aacca6f 22685 "optional" : 1,
44660702 22686 "type" : "integer"
56122987 22687 },
44660702
DM
22688 "realm" : {
22689 "description" : "Authentication domain ID",
22690 "format" : "pve-realm",
22691 "maxLength" : 32,
22692 "type" : "string"
22693 },
22694 "secure" : {
22695 "description" : "Use secure LDAPS protocol.",
7aacca6f 22696 "optional" : 1,
44660702 22697 "type" : "boolean"
56122987 22698 },
44660702
DM
22699 "server1" : {
22700 "description" : "Server IP address (or DNS name)",
22701 "format" : "address",
22702 "maxLength" : 256,
22703 "optional" : 1,
22704 "type" : "string"
56122987 22705 },
44660702
DM
22706 "server2" : {
22707 "description" : "Fallback Server IP address (or DNS name)",
22708 "format" : "address",
7aacca6f 22709 "maxLength" : 256,
7aacca6f 22710 "optional" : 1,
44660702 22711 "type" : "string"
7aacca6f 22712 },
44660702
DM
22713 "tfa" : {
22714 "description" : "Use Two-factor authentication.",
22715 "format" : "pve-tfa-config",
22716 "maxLength" : 128,
22717 "optional" : 1,
22718 "type" : "string"
22719 },
22720 "type" : {
22721 "description" : "Realm type.",
22722 "enum" : [
22723 "ad",
22724 "ldap",
22725 "pam",
22726 "pve"
22727 ],
22728 "type" : "string"
22729 },
22730 "user_attr" : {
22731 "description" : "LDAP user attribute name",
7aacca6f 22732 "maxLength" : 256,
7aacca6f 22733 "optional" : 1,
44660702
DM
22734 "pattern" : "\\S{2,}",
22735 "type" : "string"
7aacca6f
DM
22736 }
22737 },
7aacca6f 22738 "type" : "object"
56122987 22739 },
7aacca6f
DM
22740 "permissions" : {
22741 "check" : [
22742 "perm",
22743 "/access/realm",
22744 [
22745 "Realm.Allocate"
22746 ]
22747 ]
44660702
DM
22748 },
22749 "protected" : 1,
22750 "returns" : {
22751 "type" : "null"
7aacca6f 22752 }
56122987 22753 }
7aacca6f 22754 },
44660702 22755 "leaf" : 0,
56122987 22756 "path" : "/access/domains",
44660702 22757 "text" : "domains"
56122987
DM
22758 },
22759 {
56122987 22760 "info" : {
44660702
DM
22761 "GET" : {
22762 "description" : "Dummy. Useful for formaters which want to priovde a login page.",
22763 "method" : "GET",
22764 "name" : "get_ticket",
22765 "parameters" : {
22766 "additionalProperties" : 0
22767 },
22768 "permissions" : {
22769 "user" : "world"
22770 },
22771 "returns" : {
22772 "type" : "null"
22773 }
22774 },
56122987 22775 "POST" : {
44660702 22776 "description" : "Create or verify authentication ticket.",
56122987 22777 "method" : "POST",
44660702
DM
22778 "name" : "create_ticket",
22779 "parameters" : {
22780 "additionalProperties" : 0,
56122987 22781 "properties" : {
44660702
DM
22782 "otp" : {
22783 "description" : "One-time password for Two-factor authentication.",
7aacca6f
DM
22784 "optional" : 1,
22785 "type" : "string"
56122987 22786 },
7aacca6f
DM
22787 "password" : {
22788 "description" : "The secret password. This can also be a valid ticket.",
22789 "type" : "string"
22790 },
44660702
DM
22791 "path" : {
22792 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
7aacca6f 22793 "maxLength" : 64,
56122987 22794 "optional" : 1,
56122987 22795 "requires" : "privs",
44660702
DM
22796 "type" : "string"
22797 },
22798 "privs" : {
7aacca6f 22799 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
44660702
DM
22800 "format" : "pve-priv-list",
22801 "maxLength" : 64,
56122987 22802 "optional" : 1,
44660702
DM
22803 "requires" : "path",
22804 "type" : "string"
56122987
DM
22805 },
22806 "realm" : {
56122987 22807 "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<relam>.",
44660702 22808 "format" : "pve-realm",
7aacca6f 22809 "maxLength" : 32,
44660702
DM
22810 "optional" : 1,
22811 "type" : "string"
56122987
DM
22812 },
22813 "username" : {
22814 "description" : "User name",
44660702
DM
22815 "maxLength" : 64,
22816 "type" : "string"
56122987 22817 }
44660702 22818 }
7aacca6f 22819 },
56122987 22820 "permissions" : {
44660702 22821 "description" : "You need to pass valid credientials.",
56122987
DM
22822 "user" : "world"
22823 },
44660702 22824 "protected" : 1,
7aacca6f 22825 "returns" : {
56122987 22826 "properties" : {
44660702
DM
22827 "CSRFPreventionToken" : {
22828 "optional" : 1,
22829 "type" : "string"
56122987 22830 },
44660702
DM
22831 "ticket" : {
22832 "optional" : 1,
22833 "type" : "string"
22834 },
22835 "username" : {
56122987
DM
22836 "type" : "string"
22837 }
22838 },
44660702 22839 "type" : "object"
7aacca6f 22840 }
7aacca6f
DM
22841 }
22842 },
44660702
DM
22843 "leaf" : 1,
22844 "path" : "/access/ticket",
22845 "text" : "ticket"
7aacca6f 22846 },
56122987 22847 {
56122987 22848 "info" : {
7aacca6f 22849 "PUT" : {
44660702 22850 "description" : "Change user password.",
7aacca6f 22851 "method" : "PUT",
44660702 22852 "name" : "change_passsword",
56122987
DM
22853 "parameters" : {
22854 "additionalProperties" : 0,
22855 "properties" : {
44660702
DM
22856 "password" : {
22857 "description" : "The new password.",
22858 "maxLength" : 64,
22859 "minLength" : 5,
22860 "type" : "string"
7aacca6f 22861 },
44660702
DM
22862 "userid" : {
22863 "description" : "User ID",
22864 "format" : "pve-userid",
22865 "maxLength" : 64,
7aacca6f 22866 "type" : "string"
56122987 22867 }
7aacca6f 22868 }
56122987
DM
22869 },
22870 "permissions" : {
22871 "check" : [
44660702 22872 "or",
56122987 22873 [
44660702
DM
22874 "userid-param",
22875 "self"
22876 ],
22877 [
22878 "and",
22879 [
22880 "userid-param",
22881 "Realm.AllocateUser"
22882 ],
22883 [
22884 "userid-group",
22885 [
22886 "User.Modify"
22887 ]
22888 ]
56122987 22889 ]
7aacca6f 22890 ],
44660702 22891 "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 22892 },
44660702 22893 "protected" : 1,
7aacca6f
DM
22894 "returns" : {
22895 "type" : "null"
44660702
DM
22896 }
22897 }
22898 },
22899 "leaf" : 1,
22900 "path" : "/access/password",
22901 "text" : "password"
22902 }
22903 ],
22904 "info" : {
22905 "GET" : {
22906 "description" : "Directory index.",
22907 "method" : "GET",
22908 "name" : "index",
22909 "parameters" : {
22910 "additionalProperties" : 0
22911 },
22912 "permissions" : {
22913 "user" : "all"
22914 },
22915 "returns" : {
22916 "items" : {
22917 "properties" : {
22918 "subdir" : {
22919 "type" : "string"
22920 }
7aacca6f 22921 },
44660702
DM
22922 "type" : "object"
22923 },
22924 "links" : [
22925 {
22926 "href" : "{subdir}",
22927 "rel" : "child"
22928 }
22929 ],
22930 "type" : "array"
22931 }
22932 }
22933 },
22934 "leaf" : 0,
22935 "path" : "/access",
22936 "text" : "access"
22937 },
22938 {
22939 "children" : [
22940 {
22941 "info" : {
22942 "DELETE" : {
7aacca6f 22943 "description" : "Delete pool.",
44660702
DM
22944 "method" : "DELETE",
22945 "name" : "delete_pool",
7aacca6f
DM
22946 "parameters" : {
22947 "additionalProperties" : 0,
22948 "properties" : {
22949 "poolid" : {
22950 "format" : "pve-poolid",
22951 "type" : "string"
22952 }
22953 }
22954 },
56122987
DM
22955 "permissions" : {
22956 "check" : [
22957 "perm",
22958 "/pool/{poolid}",
22959 [
22960 "Pool.Allocate"
22961 ]
44660702
DM
22962 ],
22963 "description" : "You can only delete empty pools (no members)."
22964 },
22965 "protected" : 1,
22966 "returns" : {
22967 "type" : "null"
7aacca6f
DM
22968 }
22969 },
22970 "GET" : {
22971 "description" : "Get pool configuration.",
44660702 22972 "method" : "GET",
7aacca6f 22973 "name" : "read_pool",
56122987 22974 "parameters" : {
44660702 22975 "additionalProperties" : 0,
56122987
DM
22976 "properties" : {
22977 "poolid" : {
44660702
DM
22978 "format" : "pve-poolid",
22979 "type" : "string"
56122987 22980 }
44660702 22981 }
56122987 22982 },
56122987 22983 "permissions" : {
56122987
DM
22984 "check" : [
22985 "perm",
22986 "/pool/{poolid}",
22987 [
22988 "Pool.Allocate"
22989 ]
22990 ]
22991 },
7aacca6f 22992 "returns" : {
44660702 22993 "additionalProperties" : 0,
56122987 22994 "properties" : {
44660702
DM
22995 "comment" : {
22996 "optional" : 1,
22997 "type" : "string"
22998 },
7aacca6f 22999 "members" : {
7aacca6f
DM
23000 "items" : {
23001 "additionalProperties" : 1,
7aacca6f 23002 "properties" : {
7aacca6f
DM
23003 "id" : {
23004 "type" : "string"
23005 },
23006 "node" : {
23007 "type" : "string"
23008 },
44660702
DM
23009 "storage" : {
23010 "optional" : 1,
23011 "type" : "string"
23012 },
7aacca6f 23013 "type" : {
7aacca6f
DM
23014 "enum" : [
23015 "qemu",
23016 "lxc",
23017 "openvz",
23018 "storage"
44660702
DM
23019 ],
23020 "type" : "string"
23021 },
23022 "vmid" : {
23023 "optional" : 1,
23024 "type" : "integer"
7aacca6f 23025 }
44660702
DM
23026 },
23027 "type" : "object"
23028 },
23029 "type" : "array"
23030 }
23031 },
23032 "type" : "object"
23033 }
23034 },
23035 "PUT" : {
23036 "description" : "Update pool data.",
23037 "method" : "PUT",
23038 "name" : "update_pool",
23039 "parameters" : {
23040 "additionalProperties" : 0,
23041 "properties" : {
56122987
DM
23042 "comment" : {
23043 "optional" : 1,
23044 "type" : "string"
44660702
DM
23045 },
23046 "delete" : {
23047 "description" : "Remove vms/storage (instead of adding it).",
23048 "optional" : 1,
23049 "type" : "boolean"
23050 },
23051 "poolid" : {
23052 "format" : "pve-poolid",
23053 "type" : "string"
23054 },
23055 "storage" : {
23056 "description" : "List of storage IDs.",
23057 "format" : "pve-storage-id-list",
23058 "optional" : 1,
23059 "type" : "string"
23060 },
23061 "vms" : {
23062 "description" : "List of virtual machines.",
23063 "format" : "pve-vmid-list",
23064 "optional" : 1,
23065 "type" : "string"
56122987 23066 }
44660702
DM
23067 }
23068 },
23069 "permissions" : {
23070 "check" : [
23071 "perm",
23072 "/pool/{poolid}",
23073 [
23074 "Pool.Allocate"
23075 ]
23076 ],
23077 "description" : "You also need the right to modify permissions on any object you add/delete."
23078 },
23079 "protected" : 1,
23080 "returns" : {
23081 "type" : "null"
56122987
DM
23082 }
23083 }
23084 },
44660702
DM
23085 "leaf" : 1,
23086 "path" : "/pools/{poolid}",
7aacca6f 23087 "text" : "{poolid}"
56122987 23088 }
7aacca6f 23089 ],
56122987
DM
23090 "info" : {
23091 "GET" : {
44660702
DM
23092 "description" : "Pool index.",
23093 "method" : "GET",
23094 "name" : "index",
23095 "parameters" : {
23096 "additionalProperties" : 0
23097 },
23098 "permissions" : {
23099 "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/<pool>.",
23100 "user" : "all"
23101 },
56122987 23102 "returns" : {
44660702
DM
23103 "items" : {
23104 "properties" : {
23105 "poolid" : {
23106 "type" : "string"
23107 }
56122987 23108 },
44660702
DM
23109 "type" : "object"
23110 },
23111 "links" : [
23112 {
23113 "href" : "{poolid}",
23114 "rel" : "child"
23115 }
23116 ],
23117 "type" : "array"
23118 }
23119 },
23120 "POST" : {
23121 "description" : "Create new pool.",
23122 "method" : "POST",
23123 "name" : "create_pool",
23124 "parameters" : {
23125 "additionalProperties" : 0,
23126 "properties" : {
23127 "comment" : {
23128 "optional" : 1,
56122987 23129 "type" : "string"
7aacca6f 23130 },
44660702
DM
23131 "poolid" : {
23132 "format" : "pve-poolid",
7aacca6f 23133 "type" : "string"
56122987
DM
23134 }
23135 }
23136 },
56122987 23137 "permissions" : {
44660702
DM
23138 "check" : [
23139 "perm",
23140 "/pool/{poolid}",
23141 [
23142 "Pool.Allocate"
23143 ]
23144 ]
56122987 23145 },
44660702
DM
23146 "protected" : 1,
23147 "returns" : {
23148 "type" : "null"
23149 }
23150 }
23151 },
23152 "leaf" : 0,
23153 "path" : "/pools",
23154 "text" : "pools"
23155 },
23156 {
23157 "info" : {
23158 "GET" : {
23159 "description" : "API version details. The result also includes the global datacenter confguration.",
23160 "method" : "GET",
23161 "name" : "version",
7aacca6f
DM
23162 "parameters" : {
23163 "additionalProperties" : 0
23164 },
44660702
DM
23165 "permissions" : {
23166 "user" : "all"
23167 },
23168 "returns" : {
23169 "properties" : {
23170 "release" : {
23171 "type" : "string"
23172 },
23173 "repoid" : {
23174 "type" : "string"
23175 },
23176 "version" : {
23177 "type" : "string"
23178 }
23179 },
23180 "type" : "object"
23181 }
56122987
DM
23182 }
23183 },
44660702
DM
23184 "leaf" : 1,
23185 "path" : "/version",
56122987
DM
23186 "text" : "version"
23187 }
23188]
23189;
23190