improve update target, update all auto-generated files
[pve-docs.git] / api-viewer / apidata.js
1 var pveapi = [
2    {
3       "leaf" : 0,
4       "path" : "/cluster",
5       "info" : {
6          "GET" : {
7             "method" : "GET",
8             "returns" : {
9                "links" : [
10                   {
11                      "rel" : "child",
12                      "href" : "{name}"
13                   }
14                ],
15                "items" : {
16                   "type" : "object",
17                   "properties" : {}
18                },
19                "type" : "array"
20             },
21             "permissions" : {
22                "user" : "all"
23             },
24             "parameters" : {
25                "additionalProperties" : 0
26             },
27             "name" : "index",
28             "description" : "Cluster index."
29          }
30       },
31       "children" : [
32          {
33             "info" : {
34                "GET" : {
35                   "method" : "GET",
36                   "returns" : {
37                      "type" : "array",
38                      "items" : {
39                         "type" : "object",
40                         "properties" : {}
41                      },
42                      "links" : [
43                         {
44                            "rel" : "child",
45                            "href" : "{name}"
46                         }
47                      ]
48                   },
49                   "description" : "Directory index.",
50                   "permissions" : {
51                      "user" : "all"
52                   },
53                   "parameters" : {
54                      "additionalProperties" : 0
55                   },
56                   "name" : "index"
57                }
58             },
59             "text" : "firewall",
60             "children" : [
61                {
62                   "info" : {
63                      "GET" : {
64                         "method" : "GET",
65                         "returns" : {
66                            "type" : "array",
67                            "links" : [
68                               {
69                                  "href" : "{group}",
70                                  "rel" : "child"
71                               }
72                            ],
73                            "items" : {
74                               "properties" : {
75                                  "group" : {
76                                     "maxLength" : 20,
77                                     "minLength" : 2,
78                                     "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
79                                     "description" : "Security Group name.",
80                                     "type" : "string"
81                                  },
82                                  "digest" : {
83                                     "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
84                                     "optional" : 0,
85                                     "type" : "string",
86                                     "maxLength" : 40
87                                  },
88                                  "comment" : {
89                                     "type" : "string",
90                                     "optional" : 1
91                                  }
92                               },
93                               "type" : "object"
94                            }
95                         },
96                         "description" : "List security groups.",
97                         "permissions" : {
98                            "user" : "all"
99                         },
100                         "parameters" : {
101                            "additionalProperties" : 0
102                         },
103                         "name" : "list_security_groups"
104                      },
105                      "POST" : {
106                         "returns" : {
107                            "type" : "null"
108                         },
109                         "method" : "POST",
110                         "parameters" : {
111                            "additionalProperties" : 0,
112                            "properties" : {
113                               "group" : {
114                                  "maxLength" : 20,
115                                  "description" : "Security Group name.",
116                                  "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
117                                  "minLength" : 2,
118                                  "type" : "string"
119                               },
120                               "digest" : {
121                                  "maxLength" : 40,
122                                  "optional" : 1,
123                                  "type" : "string",
124                                  "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications."
125                               },
126                               "rename" : {
127                                  "maxLength" : 20,
128                                  "optional" : 1,
129                                  "type" : "string",
130                                  "minLength" : 2,
131                                  "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.",
132                                  "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+"
133                               },
134                               "comment" : {
135                                  "type" : "string",
136                                  "optional" : 1
137                               }
138                            }
139                         },
140                         "permissions" : {
141                            "check" : [
142                               "perm",
143                               "/",
144                               [
145                                  "Sys.Modify"
146                               ]
147                            ]
148                         },
149                         "name" : "create_security_group",
150                         "description" : "Create new security group.",
151                         "protected" : 1
152                      }
153                   },
154                   "text" : "groups",
155                   "children" : [
156                      {
157                         "leaf" : 0,
158                         "path" : "/cluster/firewall/groups/{group}",
159                         "info" : {
160                            "GET" : {
161                               "proxyto" : null,
162                               "description" : "List rules.",
163                               "permissions" : {
164                                  "check" : [
165                                     "perm",
166                                     "/",
167                                     [
168                                        "Sys.Audit"
169                                     ]
170                                  ]
171                               },
172                               "parameters" : {
173                                  "properties" : {
174                                     "group" : {
175                                        "minLength" : 2,
176                                        "description" : "Security Group name.",
177                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
178                                        "type" : "string",
179                                        "maxLength" : 20
180                                     }
181                                  },
182                                  "additionalProperties" : 0
183                               },
184                               "name" : "get_rules",
185                               "method" : "GET",
186                               "returns" : {
187                                  "items" : {
188                                     "properties" : {
189                                        "pos" : {
190                                           "type" : "integer"
191                                        }
192                                     },
193                                     "type" : "object"
194                                  },
195                                  "links" : [
196                                     {
197                                        "href" : "{pos}",
198                                        "rel" : "child"
199                                     }
200                                  ],
201                                  "type" : "array"
202                               }
203                            },
204                            "DELETE" : {
205                               "name" : "delete_security_group",
206                               "parameters" : {
207                                  "additionalProperties" : 0,
208                                  "properties" : {
209                                     "group" : {
210                                        "maxLength" : 20,
211                                        "minLength" : 2,
212                                        "description" : "Security Group name.",
213                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
214                                        "type" : "string"
215                                     }
216                                  }
217                               },
218                               "permissions" : {
219                                  "check" : [
220                                     "perm",
221                                     "/",
222                                     [
223                                        "Sys.Modify"
224                                     ]
225                                  ]
226                               },
227                               "protected" : 1,
228                               "description" : "Delete security group.",
229                               "returns" : {
230                                  "type" : "null"
231                               },
232                               "method" : "DELETE"
233                            },
234                            "POST" : {
235                               "method" : "POST",
236                               "parameters" : {
237                                  "additionalProperties" : 0,
238                                  "properties" : {
239                                     "iface" : {
240                                        "maxLength" : 20,
241                                        "format" : "pve-iface",
242                                        "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.",
243                                        "minLength" : 2,
244                                        "optional" : 1,
245                                        "type" : "string"
246                                     },
247                                     "comment" : {
248                                        "type" : "string",
249                                        "optional" : 1
250                                     },
251                                     "digest" : {
252                                        "maxLength" : 40,
253                                        "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
254                                        "optional" : 1,
255                                        "type" : "string"
256                                     },
257                                     "source" : {
258                                        "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.",
259                                        "optional" : 1,
260                                        "type" : "string",
261                                        "format" : "pve-fw-addr-spec"
262                                     },
263                                     "sport" : {
264                                        "format" : "pve-fw-sport-spec",
265                                        "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.",
266                                        "optional" : 1,
267                                        "type" : "string"
268                                     },
269                                     "dest" : {
270                                        "optional" : 1,
271                                        "type" : "string",
272                                        "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.",
273                                        "format" : "pve-fw-addr-spec"
274                                     },
275                                     "action" : {
276                                        "maxLength" : 20,
277                                        "type" : "string",
278                                        "optional" : 0,
279                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
280                                        "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
281                                        "minLength" : 2
282                                     },
283                                     "enable" : {
284                                        "minimum" : 0,
285                                        "type" : "integer",
286                                        "optional" : 1
287                                     },
288                                     "dport" : {
289                                        "format" : "pve-fw-dport-spec",
290                                        "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.",
291                                        "type" : "string",
292                                        "optional" : 1
293                                     },
294                                     "type" : {
295                                        "enum" : [
296                                           "in",
297                                           "out",
298                                           "group"
299                                        ],
300                                        "optional" : 0,
301                                        "type" : "string"
302                                     },
303                                     "macro" : {
304                                        "type" : "string",
305                                        "optional" : 1,
306                                        "maxLength" : 128
307                                     },
308                                     "group" : {
309                                        "type" : "string",
310                                        "description" : "Security Group name.",
311                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
312                                        "minLength" : 2,
313                                        "maxLength" : 20
314                                     },
315                                     "proto" : {
316                                        "optional" : 1,
317                                        "type" : "string",
318                                        "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
319                                        "format" : "pve-fw-protocol-spec"
320                                     },
321                                     "pos" : {
322                                        "minimum" : 0,
323                                        "description" : "Update rule at position <pos>.",
324                                        "type" : "integer",
325                                        "optional" : 1
326                                     }
327                                  }
328                               },
329                               "name" : "create_rule",
330                               "protected" : 1,
331                               "returns" : {
332                                  "type" : "null"
333                               },
334                               "permissions" : {
335                                  "check" : [
336                                     "perm",
337                                     "/",
338                                     [
339                                        "Sys.Modify"
340                                     ]
341                                  ]
342                               },
343                               "description" : "Create new rule.",
344                               "proxyto" : null
345                            }
346                         },
347                         "children" : [
348                            {
349                               "text" : "{pos}",
350                               "info" : {
351                                  "PUT" : {
352                                     "parameters" : {
353                                        "additionalProperties" : 0,
354                                        "properties" : {
355                                           "sport" : {
356                                              "format" : "pve-fw-sport-spec",
357                                              "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.",
358                                              "type" : "string",
359                                              "optional" : 1
360                                           },
361                                           "iface" : {
362                                              "minLength" : 2,
363                                              "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.",
364                                              "type" : "string",
365                                              "optional" : 1,
366                                              "maxLength" : 20,
367                                              "format" : "pve-iface"
368                                           },
369                                           "macro" : {
370                                              "maxLength" : 128,
371                                              "optional" : 1,
372                                              "type" : "string"
373                                           },
374                                           "proto" : {
375                                              "format" : "pve-fw-protocol-spec",
376                                              "type" : "string",
377                                              "optional" : 1,
378                                              "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'."
379                                           },
380                                           "pos" : {
381                                              "description" : "Update rule at position <pos>.",
382                                              "type" : "integer",
383                                              "optional" : 1,
384                                              "minimum" : 0
385                                           },
386                                           "action" : {
387                                              "optional" : 1,
388                                              "type" : "string",
389                                              "minLength" : 2,
390                                              "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
391                                              "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
392                                              "maxLength" : 20
393                                           },
394                                           "enable" : {
395                                              "optional" : 1,
396                                              "type" : "integer",
397                                              "minimum" : 0
398                                           },
399                                           "digest" : {
400                                              "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
401                                              "optional" : 1,
402                                              "type" : "string",
403                                              "maxLength" : 40
404                                           },
405                                           "source" : {
406                                              "optional" : 1,
407                                              "type" : "string",
408                                              "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.",
409                                              "format" : "pve-fw-addr-spec"
410                                           },
411                                           "dest" : {
412                                              "format" : "pve-fw-addr-spec",
413                                              "optional" : 1,
414                                              "type" : "string",
415                                              "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."
416                                           },
417                                           "delete" : {
418                                              "description" : "A list of settings you want to delete.",
419                                              "type" : "string",
420                                              "optional" : 1,
421                                              "format" : "pve-configid-list"
422                                           },
423                                           "comment" : {
424                                              "type" : "string",
425                                              "optional" : 1
426                                           },
427                                           "moveto" : {
428                                              "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
429                                              "type" : "integer",
430                                              "optional" : 1,
431                                              "minimum" : 0
432                                           },
433                                           "group" : {
434                                              "maxLength" : 20,
435                                              "type" : "string",
436                                              "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
437                                              "description" : "Security Group name.",
438                                              "minLength" : 2
439                                           },
440                                           "dport" : {
441                                              "type" : "string",
442                                              "optional" : 1,
443                                              "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.",
444                                              "format" : "pve-fw-dport-spec"
445                                           },
446                                           "type" : {
447                                              "enum" : [
448                                                 "in",
449                                                 "out",
450                                                 "group"
451                                              ],
452                                              "optional" : 1,
453                                              "type" : "string"
454                                           }
455                                        }
456                                     },
457                                     "name" : "update_rule",
458                                     "protected" : 1,
459                                     "method" : "PUT",
460                                     "permissions" : {
461                                        "check" : [
462                                           "perm",
463                                           "/",
464                                           [
465                                              "Sys.Modify"
466                                           ]
467                                        ]
468                                     },
469                                     "description" : "Modify rule data.",
470                                     "proxyto" : null,
471                                     "returns" : {
472                                        "type" : "null"
473                                     }
474                                  },
475                                  "DELETE" : {
476                                     "returns" : {
477                                        "type" : "null"
478                                     },
479                                     "description" : "Delete rule.",
480                                     "proxyto" : null,
481                                     "permissions" : {
482                                        "check" : [
483                                           "perm",
484                                           "/",
485                                           [
486                                              "Sys.Modify"
487                                           ]
488                                        ]
489                                     },
490                                     "method" : "DELETE",
491                                     "protected" : 1,
492                                     "name" : "delete_rule",
493                                     "parameters" : {
494                                        "properties" : {
495                                           "pos" : {
496                                              "type" : "integer",
497                                              "optional" : 1,
498                                              "description" : "Update rule at position <pos>.",
499                                              "minimum" : 0
500                                           },
501                                           "group" : {
502                                              "maxLength" : 20,
503                                              "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
504                                              "description" : "Security Group name.",
505                                              "minLength" : 2,
506                                              "type" : "string"
507                                           },
508                                           "digest" : {
509                                              "type" : "string",
510                                              "optional" : 1,
511                                              "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
512                                              "maxLength" : 40
513                                           }
514                                        },
515                                        "additionalProperties" : 0
516                                     }
517                                  },
518                                  "GET" : {
519                                     "name" : "get_rule",
520                                     "permissions" : {
521                                        "check" : [
522                                           "perm",
523                                           "/",
524                                           [
525                                              "Sys.Audit"
526                                           ]
527                                        ]
528                                     },
529                                     "parameters" : {
530                                        "properties" : {
531                                           "pos" : {
532                                              "description" : "Update rule at position <pos>.",
533                                              "type" : "integer",
534                                              "optional" : 1,
535                                              "minimum" : 0
536                                           },
537                                           "group" : {
538                                              "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
539                                              "description" : "Security Group name.",
540                                              "minLength" : 2,
541                                              "type" : "string",
542                                              "maxLength" : 20
543                                           }
544                                        },
545                                        "additionalProperties" : 0
546                                     },
547                                     "proxyto" : null,
548                                     "description" : "Get single rule data.",
549                                     "returns" : {
550                                        "properties" : {
551                                           "pos" : {
552                                              "type" : "integer"
553                                           }
554                                        },
555                                        "type" : "object"
556                                     },
557                                     "method" : "GET"
558                                  }
559                               },
560                               "path" : "/cluster/firewall/groups/{group}/{pos}",
561                               "leaf" : 1
562                            }
563                         ],
564                         "text" : "{group}"
565                      }
566                   ],
567                   "leaf" : 0,
568                   "path" : "/cluster/firewall/groups"
569                },
570                {
571                   "info" : {
572                      "GET" : {
573                         "method" : "GET",
574                         "returns" : {
575                            "type" : "array",
576                            "links" : [
577                               {
578                                  "rel" : "child",
579                                  "href" : "{pos}"
580                               }
581                            ],
582                            "items" : {
583                               "properties" : {
584                                  "pos" : {
585                                     "type" : "integer"
586                                  }
587                               },
588                               "type" : "object"
589                            }
590                         },
591                         "name" : "get_rules",
592                         "parameters" : {
593                            "additionalProperties" : 0
594                         },
595                         "permissions" : {
596                            "check" : [
597                               "perm",
598                               "/",
599                               [
600                                  "Sys.Audit"
601                               ]
602                            ]
603                         },
604                         "description" : "List rules.",
605                         "proxyto" : null
606                      },
607                      "POST" : {
608                         "method" : "POST",
609                         "protected" : 1,
610                         "name" : "create_rule",
611                         "parameters" : {
612                            "properties" : {
613                               "dport" : {
614                                  "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.",
615                                  "optional" : 1,
616                                  "type" : "string",
617                                  "format" : "pve-fw-dport-spec"
618                               },
619                               "type" : {
620                                  "type" : "string",
621                                  "optional" : 0,
622                                  "enum" : [
623                                     "in",
624                                     "out",
625                                     "group"
626                                  ]
627                               },
628                               "enable" : {
629                                  "type" : "integer",
630                                  "optional" : 1,
631                                  "minimum" : 0
632                               },
633                               "action" : {
634                                  "type" : "string",
635                                  "optional" : 0,
636                                  "minLength" : 2,
637                                  "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
638                                  "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
639                                  "maxLength" : 20
640                               },
641                               "macro" : {
642                                  "optional" : 1,
643                                  "type" : "string",
644                                  "maxLength" : 128
645                               },
646                               "pos" : {
647                                  "description" : "Update rule at position <pos>.",
648                                  "type" : "integer",
649                                  "optional" : 1,
650                                  "minimum" : 0
651                               },
652                               "proto" : {
653                                  "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
654                                  "type" : "string",
655                                  "optional" : 1,
656                                  "format" : "pve-fw-protocol-spec"
657                               },
658                               "iface" : {
659                                  "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.",
660                                  "minLength" : 2,
661                                  "type" : "string",
662                                  "optional" : 1,
663                                  "maxLength" : 20,
664                                  "format" : "pve-iface"
665                               },
666                               "comment" : {
667                                  "type" : "string",
668                                  "optional" : 1
669                               },
670                               "source" : {
671                                  "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.",
672                                  "optional" : 1,
673                                  "type" : "string",
674                                  "format" : "pve-fw-addr-spec"
675                               },
676                               "digest" : {
677                                  "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
678                                  "type" : "string",
679                                  "optional" : 1,
680                                  "maxLength" : 40
681                               },
682                               "dest" : {
683                                  "format" : "pve-fw-addr-spec",
684                                  "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.",
685                                  "optional" : 1,
686                                  "type" : "string"
687                               },
688                               "sport" : {
689                                  "format" : "pve-fw-sport-spec",
690                                  "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.",
691                                  "optional" : 1,
692                                  "type" : "string"
693                               }
694                            },
695                            "additionalProperties" : 0
696                         },
697                         "returns" : {
698                            "type" : "null"
699                         },
700                         "proxyto" : null,
701                         "description" : "Create new rule.",
702                         "permissions" : {
703                            "check" : [
704                               "perm",
705                               "/",
706                               [
707                                  "Sys.Modify"
708                               ]
709                            ]
710                         }
711                      }
712                   },
713                   "children" : [
714                      {
715                         "text" : "{pos}",
716                         "info" : {
717                            "GET" : {
718                               "method" : "GET",
719                               "returns" : {
720                                  "properties" : {
721                                     "pos" : {
722                                        "type" : "integer"
723                                     }
724                                  },
725                                  "type" : "object"
726                               },
727                               "permissions" : {
728                                  "check" : [
729                                     "perm",
730                                     "/",
731                                     [
732                                        "Sys.Audit"
733                                     ]
734                                  ]
735                               },
736                               "parameters" : {
737                                  "additionalProperties" : 0,
738                                  "properties" : {
739                                     "pos" : {
740                                        "description" : "Update rule at position <pos>.",
741                                        "optional" : 1,
742                                        "type" : "integer",
743                                        "minimum" : 0
744                                     }
745                                  }
746                               },
747                               "name" : "get_rule",
748                               "description" : "Get single rule data.",
749                               "proxyto" : null
750                            },
751                            "PUT" : {
752                               "protected" : 1,
753                               "name" : "update_rule",
754                               "parameters" : {
755                                  "properties" : {
756                                     "delete" : {
757                                        "description" : "A list of settings you want to delete.",
758                                        "optional" : 1,
759                                        "type" : "string",
760                                        "format" : "pve-configid-list"
761                                     },
762                                     "iface" : {
763                                        "minLength" : 2,
764                                        "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.",
765                                        "type" : "string",
766                                        "optional" : 1,
767                                        "format" : "pve-iface",
768                                        "maxLength" : 20
769                                     },
770                                     "moveto" : {
771                                        "minimum" : 0,
772                                        "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
773                                        "type" : "integer",
774                                        "optional" : 1
775                                     },
776                                     "comment" : {
777                                        "optional" : 1,
778                                        "type" : "string"
779                                     },
780                                     "digest" : {
781                                        "maxLength" : 40,
782                                        "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
783                                        "optional" : 1,
784                                        "type" : "string"
785                                     },
786                                     "source" : {
787                                        "format" : "pve-fw-addr-spec",
788                                        "type" : "string",
789                                        "optional" : 1,
790                                        "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."
791                                     },
792                                     "sport" : {
793                                        "optional" : 1,
794                                        "type" : "string",
795                                        "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.",
796                                        "format" : "pve-fw-sport-spec"
797                                     },
798                                     "dest" : {
799                                        "type" : "string",
800                                        "optional" : 1,
801                                        "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.",
802                                        "format" : "pve-fw-addr-spec"
803                                     },
804                                     "enable" : {
805                                        "optional" : 1,
806                                        "type" : "integer",
807                                        "minimum" : 0
808                                     },
809                                     "dport" : {
810                                        "optional" : 1,
811                                        "type" : "string",
812                                        "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.",
813                                        "format" : "pve-fw-dport-spec"
814                                     },
815                                     "type" : {
816                                        "enum" : [
817                                           "in",
818                                           "out",
819                                           "group"
820                                        ],
821                                        "type" : "string",
822                                        "optional" : 1
823                                     },
824                                     "action" : {
825                                        "type" : "string",
826                                        "optional" : 1,
827                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
828                                        "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
829                                        "minLength" : 2,
830                                        "maxLength" : 20
831                                     },
832                                     "macro" : {
833                                        "optional" : 1,
834                                        "type" : "string",
835                                        "maxLength" : 128
836                                     },
837                                     "pos" : {
838                                        "description" : "Update rule at position <pos>.",
839                                        "optional" : 1,
840                                        "type" : "integer",
841                                        "minimum" : 0
842                                     },
843                                     "proto" : {
844                                        "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
845                                        "optional" : 1,
846                                        "type" : "string",
847                                        "format" : "pve-fw-protocol-spec"
848                                     }
849                                  },
850                                  "additionalProperties" : 0
851                               },
852                               "method" : "PUT",
853                               "proxyto" : null,
854                               "description" : "Modify rule data.",
855                               "permissions" : {
856                                  "check" : [
857                                     "perm",
858                                     "/",
859                                     [
860                                        "Sys.Modify"
861                                     ]
862                                  ]
863                               },
864                               "returns" : {
865                                  "type" : "null"
866                               }
867                            },
868                            "DELETE" : {
869                               "permissions" : {
870                                  "check" : [
871                                     "perm",
872                                     "/",
873                                     [
874                                        "Sys.Modify"
875                                     ]
876                                  ]
877                               },
878                               "proxyto" : null,
879                               "description" : "Delete rule.",
880                               "returns" : {
881                                  "type" : "null"
882                               },
883                               "parameters" : {
884                                  "additionalProperties" : 0,
885                                  "properties" : {
886                                     "pos" : {
887                                        "optional" : 1,
888                                        "type" : "integer",
889                                        "description" : "Update rule at position <pos>.",
890                                        "minimum" : 0
891                                     },
892                                     "digest" : {
893                                        "maxLength" : 40,
894                                        "optional" : 1,
895                                        "type" : "string",
896                                        "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications."
897                                     }
898                                  }
899                               },
900                               "name" : "delete_rule",
901                               "protected" : 1,
902                               "method" : "DELETE"
903                            }
904                         },
905                         "path" : "/cluster/firewall/rules/{pos}",
906                         "leaf" : 1
907                      }
908                   ],
909                   "text" : "rules",
910                   "leaf" : 0,
911                   "path" : "/cluster/firewall/rules"
912                },
913                {
914                   "path" : "/cluster/firewall/ipset",
915                   "leaf" : 0,
916                   "children" : [
917                      {
918                         "leaf" : 0,
919                         "path" : "/cluster/firewall/ipset/{name}",
920                         "info" : {
921                            "DELETE" : {
922                               "protected" : 1,
923                               "description" : "Delete IPSet",
924                               "permissions" : {
925                                  "check" : [
926                                     "perm",
927                                     "/",
928                                     [
929                                        "Sys.Modify"
930                                     ]
931                                  ]
932                               },
933                               "parameters" : {
934                                  "additionalProperties" : 0,
935                                  "properties" : {
936                                     "name" : {
937                                        "description" : "IP set name.",
938                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
939                                        "minLength" : 2,
940                                        "type" : "string",
941                                        "maxLength" : 64
942                                     }
943                                  }
944                               },
945                               "name" : "delete_ipset",
946                               "returns" : {
947                                  "type" : "null"
948                               },
949                               "method" : "DELETE"
950                            },
951                            "GET" : {
952                               "returns" : {
953                                  "items" : {
954                                     "type" : "object",
955                                     "properties" : {
956                                        "comment" : {
957                                           "type" : "string",
958                                           "optional" : 1
959                                        },
960                                        "nomatch" : {
961                                           "type" : "boolean",
962                                           "optional" : 1
963                                        },
964                                        "cidr" : {
965                                           "type" : "string"
966                                        },
967                                        "digest" : {
968                                           "maxLength" : 40,
969                                           "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
970                                           "type" : "string",
971                                           "optional" : 0
972                                        }
973                                     }
974                                  },
975                                  "links" : [
976                                     {
977                                        "href" : "{cidr}",
978                                        "rel" : "child"
979                                     }
980                                  ],
981                                  "type" : "array"
982                               },
983                               "method" : "GET",
984                               "permissions" : {
985                                  "check" : [
986                                     "perm",
987                                     "/",
988                                     [
989                                        "Sys.Audit"
990                                     ]
991                                  ]
992                               },
993                               "name" : "get_ipset",
994                               "parameters" : {
995                                  "additionalProperties" : 0,
996                                  "properties" : {
997                                     "name" : {
998                                        "description" : "IP set name.",
999                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1000                                        "minLength" : 2,
1001                                        "type" : "string",
1002                                        "maxLength" : 64
1003                                     }
1004                                  }
1005                               },
1006                               "description" : "List IPSet content"
1007                            },
1008                            "POST" : {
1009                               "returns" : {
1010                                  "type" : "null"
1011                               },
1012                               "method" : "POST",
1013                               "name" : "create_ip",
1014                               "parameters" : {
1015                                  "additionalProperties" : 0,
1016                                  "properties" : {
1017                                     "cidr" : {
1018                                        "format" : "IPorCIDRorAlias",
1019                                        "type" : "string",
1020                                        "description" : "Network/IP specification in CIDR format."
1021                                     },
1022                                     "nomatch" : {
1023                                        "type" : "boolean",
1024                                        "optional" : 1
1025                                     },
1026                                     "name" : {
1027                                        "type" : "string",
1028                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1029                                        "description" : "IP set name.",
1030                                        "minLength" : 2,
1031                                        "maxLength" : 64
1032                                     },
1033                                     "comment" : {
1034                                        "type" : "string",
1035                                        "optional" : 1
1036                                     }
1037                                  }
1038                               },
1039                               "permissions" : {
1040                                  "check" : [
1041                                     "perm",
1042                                     "/",
1043                                     [
1044                                        "Sys.Modify"
1045                                     ]
1046                                  ]
1047                               },
1048                               "description" : "Add IP or Network to IPSet.",
1049                               "protected" : 1
1050                            }
1051                         },
1052                         "text" : "{name}",
1053                         "children" : [
1054                            {
1055                               "text" : "{cidr}",
1056                               "info" : {
1057                                  "GET" : {
1058                                     "returns" : {
1059                                        "type" : "object"
1060                                     },
1061                                     "method" : "GET",
1062                                     "description" : "Read IP or Network settings from IPSet.",
1063                                     "protected" : 1,
1064                                     "permissions" : {
1065                                        "check" : [
1066                                           "perm",
1067                                           "/",
1068                                           [
1069                                              "Sys.Audit"
1070                                           ]
1071                                        ]
1072                                     },
1073                                     "parameters" : {
1074                                        "additionalProperties" : 0,
1075                                        "properties" : {
1076                                           "cidr" : {
1077                                              "description" : "Network/IP specification in CIDR format.",
1078                                              "type" : "string",
1079                                              "format" : "IPorCIDRorAlias"
1080                                           },
1081                                           "name" : {
1082                                              "maxLength" : 64,
1083                                              "type" : "string",
1084                                              "minLength" : 2,
1085                                              "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1086                                              "description" : "IP set name."
1087                                           }
1088                                        }
1089                                     },
1090                                     "name" : "read_ip"
1091                                  },
1092                                  "PUT" : {
1093                                     "method" : "PUT",
1094                                     "returns" : {
1095                                        "type" : "null"
1096                                     },
1097                                     "parameters" : {
1098                                        "additionalProperties" : 0,
1099                                        "properties" : {
1100                                           "nomatch" : {
1101                                              "optional" : 1,
1102                                              "type" : "boolean"
1103                                           },
1104                                           "name" : {
1105                                              "maxLength" : 64,
1106                                              "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1107                                              "description" : "IP set name.",
1108                                              "minLength" : 2,
1109                                              "type" : "string"
1110                                           },
1111                                           "comment" : {
1112                                              "type" : "string",
1113                                              "optional" : 1
1114                                           },
1115                                           "cidr" : {
1116                                              "format" : "IPorCIDRorAlias",
1117                                              "description" : "Network/IP specification in CIDR format.",
1118                                              "type" : "string"
1119                                           },
1120                                           "digest" : {
1121                                              "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1122                                              "optional" : 1,
1123                                              "type" : "string",
1124                                              "maxLength" : 40
1125                                           }
1126                                        }
1127                                     },
1128                                     "name" : "update_ip",
1129                                     "permissions" : {
1130                                        "check" : [
1131                                           "perm",
1132                                           "/",
1133                                           [
1134                                              "Sys.Modify"
1135                                           ]
1136                                        ]
1137                                     },
1138                                     "description" : "Update IP or Network settings",
1139                                     "protected" : 1
1140                                  },
1141                                  "DELETE" : {
1142                                     "method" : "DELETE",
1143                                     "returns" : {
1144                                        "type" : "null"
1145                                     },
1146                                     "description" : "Remove IP or Network from IPSet.",
1147                                     "protected" : 1,
1148                                     "permissions" : {
1149                                        "check" : [
1150                                           "perm",
1151                                           "/",
1152                                           [
1153                                              "Sys.Modify"
1154                                           ]
1155                                        ]
1156                                     },
1157                                     "parameters" : {
1158                                        "properties" : {
1159                                           "digest" : {
1160                                              "maxLength" : 40,
1161                                              "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1162                                              "optional" : 1,
1163                                              "type" : "string"
1164                                           },
1165                                           "cidr" : {
1166                                              "description" : "Network/IP specification in CIDR format.",
1167                                              "type" : "string",
1168                                              "format" : "IPorCIDRorAlias"
1169                                           },
1170                                           "name" : {
1171                                              "minLength" : 2,
1172                                              "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1173                                              "description" : "IP set name.",
1174                                              "type" : "string",
1175                                              "maxLength" : 64
1176                                           }
1177                                        },
1178                                        "additionalProperties" : 0
1179                                     },
1180                                     "name" : "remove_ip"
1181                                  }
1182                               },
1183                               "path" : "/cluster/firewall/ipset/{name}/{cidr}",
1184                               "leaf" : 1
1185                            }
1186                         ]
1187                      }
1188                   ],
1189                   "text" : "ipset",
1190                   "info" : {
1191                      "POST" : {
1192                         "returns" : {
1193                            "type" : "null"
1194                         },
1195                         "method" : "POST",
1196                         "protected" : 1,
1197                         "description" : "Create new IPSet",
1198                         "parameters" : {
1199                            "additionalProperties" : 0,
1200                            "properties" : {
1201                               "comment" : {
1202                                  "type" : "string",
1203                                  "optional" : 1
1204                               },
1205                               "name" : {
1206                                  "description" : "IP set name.",
1207                                  "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1208                                  "minLength" : 2,
1209                                  "type" : "string",
1210                                  "maxLength" : 64
1211                               },
1212                               "rename" : {
1213                                  "type" : "string",
1214                                  "optional" : 1,
1215                                  "minLength" : 2,
1216                                  "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
1217                                  "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1218                                  "maxLength" : 64
1219                               },
1220                               "digest" : {
1221                                  "maxLength" : 40,
1222                                  "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1223                                  "type" : "string",
1224                                  "optional" : 1
1225                               }
1226                            }
1227                         },
1228                         "permissions" : {
1229                            "check" : [
1230                               "perm",
1231                               "/",
1232                               [
1233                                  "Sys.Modify"
1234                               ]
1235                            ]
1236                         },
1237                         "name" : "create_ipset"
1238                      },
1239                      "GET" : {
1240                         "returns" : {
1241                            "type" : "array",
1242                            "items" : {
1243                               "properties" : {
1244                                  "comment" : {
1245                                     "type" : "string",
1246                                     "optional" : 1
1247                                  },
1248                                  "name" : {
1249                                     "maxLength" : 64,
1250                                     "type" : "string",
1251                                     "minLength" : 2,
1252                                     "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1253                                     "description" : "IP set name."
1254                                  },
1255                                  "digest" : {
1256                                     "maxLength" : 40,
1257                                     "type" : "string",
1258                                     "optional" : 0,
1259                                     "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications."
1260                                  }
1261                               },
1262                               "type" : "object"
1263                            },
1264                            "links" : [
1265                               {
1266                                  "href" : "{name}",
1267                                  "rel" : "child"
1268                               }
1269                            ]
1270                         },
1271                         "method" : "GET",
1272                         "description" : "List IPSets",
1273                         "name" : "ipset_index",
1274                         "parameters" : {
1275                            "additionalProperties" : 0
1276                         },
1277                         "permissions" : {
1278                            "check" : [
1279                               "perm",
1280                               "/",
1281                               [
1282                                  "Sys.Audit"
1283                               ]
1284                            ]
1285                         }
1286                      }
1287                   }
1288                },
1289                {
1290                   "info" : {
1291                      "POST" : {
1292                         "method" : "POST",
1293                         "returns" : {
1294                            "type" : "null"
1295                         },
1296                         "protected" : 1,
1297                         "description" : "Create IP or Network Alias.",
1298                         "parameters" : {
1299                            "additionalProperties" : 0,
1300                            "properties" : {
1301                               "cidr" : {
1302                                  "description" : "Network/IP specification in CIDR format.",
1303                                  "type" : "string",
1304                                  "format" : "IPorCIDR"
1305                               },
1306                               "name" : {
1307                                  "maxLength" : 64,
1308                                  "type" : "string",
1309                                  "minLength" : 2,
1310                                  "description" : "Alias name.",
1311                                  "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+"
1312                               },
1313                               "comment" : {
1314                                  "optional" : 1,
1315                                  "type" : "string"
1316                               }
1317                            }
1318                         },
1319                         "permissions" : {
1320                            "check" : [
1321                               "perm",
1322                               "/",
1323                               [
1324                                  "Sys.Modify"
1325                               ]
1326                            ]
1327                         },
1328                         "name" : "create_alias"
1329                      },
1330                      "GET" : {
1331                         "method" : "GET",
1332                         "returns" : {
1333                            "type" : "array",
1334                            "links" : [
1335                               {
1336                                  "rel" : "child",
1337                                  "href" : "{name}"
1338                               }
1339                            ],
1340                            "items" : {
1341                               "properties" : {
1342                                  "digest" : {
1343                                     "optional" : 0,
1344                                     "type" : "string",
1345                                     "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1346                                     "maxLength" : 40
1347                                  },
1348                                  "cidr" : {
1349                                     "type" : "string"
1350                                  },
1351                                  "comment" : {
1352                                     "optional" : 1,
1353                                     "type" : "string"
1354                                  },
1355                                  "name" : {
1356                                     "type" : "string"
1357                                  }
1358                               },
1359                               "type" : "object"
1360                            }
1361                         },
1362                         "description" : "List aliases",
1363                         "parameters" : {
1364                            "additionalProperties" : 0
1365                         },
1366                         "permissions" : {
1367                            "check" : [
1368                               "perm",
1369                               "/",
1370                               [
1371                                  "Sys.Audit"
1372                               ]
1373                            ]
1374                         },
1375                         "name" : "get_aliases"
1376                      }
1377                   },
1378                   "text" : "aliases",
1379                   "children" : [
1380                      {
1381                         "info" : {
1382                            "DELETE" : {
1383                               "parameters" : {
1384                                  "properties" : {
1385                                     "digest" : {
1386                                        "type" : "string",
1387                                        "optional" : 1,
1388                                        "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1389                                        "maxLength" : 40
1390                                     },
1391                                     "name" : {
1392                                        "maxLength" : 64,
1393                                        "type" : "string",
1394                                        "description" : "Alias name.",
1395                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1396                                        "minLength" : 2
1397                                     }
1398                                  },
1399                                  "additionalProperties" : 0
1400                               },
1401                               "name" : "remove_alias",
1402                               "permissions" : {
1403                                  "check" : [
1404                                     "perm",
1405                                     "/",
1406                                     [
1407                                        "Sys.Modify"
1408                                     ]
1409                                  ]
1410                               },
1411                               "description" : "Remove IP or Network alias.",
1412                               "protected" : 1,
1413                               "returns" : {
1414                                  "type" : "null"
1415                               },
1416                               "method" : "DELETE"
1417                            },
1418                            "PUT" : {
1419                               "method" : "PUT",
1420                               "returns" : {
1421                                  "type" : "null"
1422                               },
1423                               "description" : "Update IP or Network alias.",
1424                               "protected" : 1,
1425                               "parameters" : {
1426                                  "additionalProperties" : 0,
1427                                  "properties" : {
1428                                     "rename" : {
1429                                        "maxLength" : 64,
1430                                        "minLength" : 2,
1431                                        "description" : "Rename an existing alias.",
1432                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1433                                        "optional" : 1,
1434                                        "type" : "string"
1435                                     },
1436                                     "name" : {
1437                                        "maxLength" : 64,
1438                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1439                                        "description" : "Alias name.",
1440                                        "minLength" : 2,
1441                                        "type" : "string"
1442                                     },
1443                                     "comment" : {
1444                                        "type" : "string",
1445                                        "optional" : 1
1446                                     },
1447                                     "cidr" : {
1448                                        "description" : "Network/IP specification in CIDR format.",
1449                                        "type" : "string",
1450                                        "format" : "IPorCIDR"
1451                                     },
1452                                     "digest" : {
1453                                        "maxLength" : 40,
1454                                        "type" : "string",
1455                                        "optional" : 1,
1456                                        "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications."
1457                                     }
1458                                  }
1459                               },
1460                               "name" : "update_alias",
1461                               "permissions" : {
1462                                  "check" : [
1463                                     "perm",
1464                                     "/",
1465                                     [
1466                                        "Sys.Modify"
1467                                     ]
1468                                  ]
1469                               }
1470                            },
1471                            "GET" : {
1472                               "parameters" : {
1473                                  "additionalProperties" : 0,
1474                                  "properties" : {
1475                                     "name" : {
1476                                        "maxLength" : 64,
1477                                        "type" : "string",
1478                                        "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1479                                        "description" : "Alias name.",
1480                                        "minLength" : 2
1481                                     }
1482                                  }
1483                               },
1484                               "permissions" : {
1485                                  "check" : [
1486                                     "perm",
1487                                     "/",
1488                                     [
1489                                        "Sys.Audit"
1490                                     ]
1491                                  ]
1492                               },
1493                               "name" : "read_alias",
1494                               "description" : "Read alias.",
1495                               "returns" : {
1496                                  "type" : "object"
1497                               },
1498                               "method" : "GET"
1499                            }
1500                         },
1501                         "text" : "{name}",
1502                         "leaf" : 1,
1503                         "path" : "/cluster/firewall/aliases/{name}"
1504                      }
1505                   ],
1506                   "leaf" : 0,
1507                   "path" : "/cluster/firewall/aliases"
1508                },
1509                {
1510                   "info" : {
1511                      "PUT" : {
1512                         "description" : "Set Firewall options.",
1513                         "protected" : 1,
1514                         "parameters" : {
1515                            "properties" : {
1516                               "policy_out" : {
1517                                  "type" : "string",
1518                                  "optional" : 1,
1519                                  "description" : "Output policy.",
1520                                  "enum" : [
1521                                     "ACCEPT",
1522                                     "REJECT",
1523                                     "DROP"
1524                                  ]
1525                               },
1526                               "delete" : {
1527                                  "optional" : 1,
1528                                  "type" : "string",
1529                                  "description" : "A list of settings you want to delete.",
1530                                  "format" : "pve-configid-list"
1531                               },
1532                               "enable" : {
1533                                  "type" : "integer",
1534                                  "optional" : 1,
1535                                  "description" : "Enable or disable the firewall cluster wide.",
1536                                  "minimum" : 0
1537                               },
1538                               "digest" : {
1539                                  "maxLength" : 40,
1540                                  "optional" : 1,
1541                                  "type" : "string",
1542                                  "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications."
1543                               },
1544                               "policy_in" : {
1545                                  "optional" : 1,
1546                                  "type" : "string",
1547                                  "description" : "Input policy.",
1548                                  "enum" : [
1549                                     "ACCEPT",
1550                                     "REJECT",
1551                                     "DROP"
1552                                  ]
1553                               }
1554                            },
1555                            "additionalProperties" : 0
1556                         },
1557                         "name" : "set_options",
1558                         "permissions" : {
1559                            "check" : [
1560                               "perm",
1561                               "/",
1562                               [
1563                                  "Sys.Modify"
1564                               ]
1565                            ]
1566                         },
1567                         "method" : "PUT",
1568                         "returns" : {
1569                            "type" : "null"
1570                         }
1571                      },
1572                      "GET" : {
1573                         "permissions" : {
1574                            "check" : [
1575                               "perm",
1576                               "/",
1577                               [
1578                                  "Sys.Audit"
1579                               ]
1580                            ]
1581                         },
1582                         "parameters" : {
1583                            "additionalProperties" : 0
1584                         },
1585                         "name" : "get_options",
1586                         "description" : "Get Firewall options.",
1587                         "method" : "GET",
1588                         "returns" : {
1589                            "type" : "object",
1590                            "properties" : {
1591                               "policy_in" : {
1592                                  "optional" : 1,
1593                                  "type" : "string",
1594                                  "description" : "Input policy.",
1595                                  "enum" : [
1596                                     "ACCEPT",
1597                                     "REJECT",
1598                                     "DROP"
1599                                  ]
1600                               },
1601                               "enable" : {
1602                                  "description" : "Enable or disable the firewall cluster wide.",
1603                                  "optional" : 1,
1604                                  "type" : "integer",
1605                                  "minimum" : 0
1606                               },
1607                               "policy_out" : {
1608                                  "optional" : 1,
1609                                  "type" : "string",
1610                                  "description" : "Output policy.",
1611                                  "enum" : [
1612                                     "ACCEPT",
1613                                     "REJECT",
1614                                     "DROP"
1615                                  ]
1616                               }
1617                            }
1618                         }
1619                      }
1620                   },
1621                   "text" : "options",
1622                   "leaf" : 1,
1623                   "path" : "/cluster/firewall/options"
1624                },
1625                {
1626                   "info" : {
1627                      "GET" : {
1628                         "description" : "List available macros",
1629                         "name" : "get_macros",
1630                         "permissions" : {
1631                            "user" : "all"
1632                         },
1633                         "parameters" : {
1634                            "additionalProperties" : 0
1635                         },
1636                         "method" : "GET",
1637                         "returns" : {
1638                            "type" : "array",
1639                            "items" : {
1640                               "properties" : {
1641                                  "descr" : {
1642                                     "type" : "string",
1643                                     "description" : "More verbose description (if available)."
1644                                  },
1645                                  "macro" : {
1646                                     "description" : "Macro name.",
1647                                     "type" : "string"
1648                                  }
1649                               },
1650                               "type" : "object"
1651                            }
1652                         }
1653                      }
1654                   },
1655                   "text" : "macros",
1656                   "leaf" : 1,
1657                   "path" : "/cluster/firewall/macros"
1658                },
1659                {
1660                   "leaf" : 1,
1661                   "path" : "/cluster/firewall/refs",
1662                   "info" : {
1663                      "GET" : {
1664                         "parameters" : {
1665                            "additionalProperties" : 0,
1666                            "properties" : {
1667                               "type" : {
1668                                  "description" : "Only list references of specified type.",
1669                                  "enum" : [
1670                                     "alias",
1671                                     "ipset"
1672                                  ],
1673                                  "type" : "string",
1674                                  "optional" : 1
1675                               }
1676                            }
1677                         },
1678                         "permissions" : {
1679                            "check" : [
1680                               "perm",
1681                               "/",
1682                               [
1683                                  "Sys.Audit"
1684                               ]
1685                            ]
1686                         },
1687                         "name" : "refs",
1688                         "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
1689                         "returns" : {
1690                            "items" : {
1691                               "properties" : {
1692                                  "name" : {
1693                                     "type" : "string"
1694                                  },
1695                                  "type" : {
1696                                     "type" : "string",
1697                                     "enum" : [
1698                                        "alias",
1699                                        "ipset"
1700                                     ]
1701                                  },
1702                                  "ref" : {
1703                                     "type" : "string"
1704                                  },
1705                                  "comment" : {
1706                                     "type" : "string",
1707                                     "optional" : 1
1708                                  }
1709                               },
1710                               "type" : "object"
1711                            },
1712                            "type" : "array"
1713                         },
1714                         "method" : "GET"
1715                      }
1716                   },
1717                   "text" : "refs"
1718                }
1719             ],
1720             "leaf" : 0,
1721             "path" : "/cluster/firewall"
1722          },
1723          {
1724             "children" : [
1725                {
1726                   "info" : {
1727                      "DELETE" : {
1728                         "protected" : 1,
1729                         "description" : "Delete vzdump backup job definition.",
1730                         "name" : "delete_job",
1731                         "parameters" : {
1732                            "additionalProperties" : 0,
1733                            "properties" : {
1734                               "id" : {
1735                                  "type" : "string",
1736                                  "description" : "The job ID.",
1737                                  "maxLength" : 50
1738                               }
1739                            }
1740                         },
1741                         "permissions" : {
1742                            "check" : [
1743                               "perm",
1744                               "/",
1745                               [
1746                                  "Sys.Modify"
1747                               ]
1748                            ]
1749                         },
1750                         "method" : "DELETE",
1751                         "returns" : {
1752                            "type" : "null"
1753                         }
1754                      },
1755                      "PUT" : {
1756                         "method" : "PUT",
1757                         "returns" : {
1758                            "type" : "null"
1759                         },
1760                         "name" : "update_job",
1761                         "permissions" : {
1762                            "check" : [
1763                               "perm",
1764                               "/",
1765                               [
1766                                  "Sys.Modify"
1767                               ]
1768                            ]
1769                         },
1770                         "parameters" : {
1771                            "properties" : {
1772                               "size" : {
1773                                  "minimum" : 500,
1774                                  "description" : "Unused, will be removed in a future release.",
1775                                  "default" : 1024,
1776                                  "optional" : 1,
1777                                  "type" : "integer"
1778                               },
1779                               "node" : {
1780                                  "type" : "string",
1781                                  "optional" : 1,
1782                                  "description" : "Only run if executed on this node.",
1783                                  "format" : "pve-node"
1784                               },
1785                               "exclude" : {
1786                                  "optional" : 1,
1787                                  "type" : "string",
1788                                  "description" : "Exclude specified guest systems (assumes --all)",
1789                                  "format" : "pve-vmid-list"
1790                               },
1791                               "delete" : {
1792                                  "format" : "pve-configid-list",
1793                                  "optional" : 1,
1794                                  "type" : "string",
1795                                  "description" : "A list of settings you want to delete."
1796                               },
1797                               "stdexcludes" : {
1798                                  "description" : "Exclude temporary files and logs.",
1799                                  "default" : 1,
1800                                  "optional" : 1,
1801                                  "type" : "boolean"
1802                               },
1803                               "exclude-path" : {
1804                                  "format" : "string-alist",
1805                                  "type" : "string",
1806                                  "optional" : 1,
1807                                  "description" : "Exclude certain files/directories (shell globs)."
1808                               },
1809                               "enabled" : {
1810                                  "description" : "Enable or disable the job.",
1811                                  "type" : "boolean",
1812                                  "optional" : 1,
1813                                  "default" : "1"
1814                               },
1815                               "storage" : {
1816                                  "format" : "pve-storage-id",
1817                                  "optional" : 1,
1818                                  "type" : "string",
1819                                  "description" : "Store resulting file to this storage."
1820                               },
1821                               "pigz" : {
1822                                  "default" : 0,
1823                                  "optional" : 1,
1824                                  "type" : "integer",
1825                                  "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count."
1826                               },
1827                               "stopwait" : {
1828                                  "minimum" : 0,
1829                                  "description" : "Maximal time to wait until a guest system is stopped (minutes).",
1830                                  "type" : "integer",
1831                                  "optional" : 1,
1832                                  "default" : 10
1833                               },
1834                               "quiet" : {
1835                                  "description" : "Be quiet.",
1836                                  "default" : 0,
1837                                  "optional" : 1,
1838                                  "type" : "boolean"
1839                               },
1840                               "mailnotification" : {
1841                                  "enum" : [
1842                                     "always",
1843                                     "failure"
1844                                  ],
1845                                  "description" : "Specify when to send an email",
1846                                  "type" : "string",
1847                                  "optional" : 1,
1848                                  "default" : "always"
1849                               },
1850                               "all" : {
1851                                  "type" : "boolean",
1852                                  "optional" : 1,
1853                                  "default" : 0,
1854                                  "description" : "Backup all known guest systems on this host."
1855                               },
1856                               "id" : {
1857                                  "description" : "The job ID.",
1858                                  "type" : "string",
1859                                  "maxLength" : 50
1860                               },
1861                               "remove" : {
1862                                  "default" : 1,
1863                                  "optional" : 1,
1864                                  "type" : "boolean",
1865                                  "description" : "Remove old backup files if there are more than 'maxfiles' backup files."
1866                               },
1867                               "script" : {
1868                                  "optional" : 1,
1869                                  "type" : "string",
1870                                  "description" : "Use specified hook script."
1871                               },
1872                               "lockwait" : {
1873                                  "minimum" : 0,
1874                                  "default" : 180,
1875                                  "optional" : 1,
1876                                  "type" : "integer",
1877                                  "description" : "Maximal time to wait for the global lock (minutes)."
1878                               },
1879                               "mailto" : {
1880                                  "type" : "string",
1881                                  "optional" : 1,
1882                                  "description" : "Comma-separated list of email addresses that should receive email notifications.",
1883                                  "format" : "string-list"
1884                               },
1885                               "dumpdir" : {
1886                                  "description" : "Store resulting files to specified directory.",
1887                                  "type" : "string",
1888                                  "optional" : 1
1889                               },
1890                               "starttime" : {
1891                                  "pattern" : "\\d{1,2}:\\d{1,2}",
1892                                  "description" : "Job Start time.",
1893                                  "type" : "string",
1894                                  "typetext" : "HH:MM"
1895                               },
1896                               "bwlimit" : {
1897                                  "minimum" : 0,
1898                                  "description" : "Limit I/O bandwidth (KBytes per second).",
1899                                  "default" : 0,
1900                                  "optional" : 1,
1901                                  "type" : "integer"
1902                               },
1903                               "ionice" : {
1904                                  "minimum" : 0,
1905                                  "description" : "Set CFQ ionice priority.",
1906                                  "optional" : 1,
1907                                  "type" : "integer",
1908                                  "default" : 7,
1909                                  "maximum" : 8
1910                               },
1911                               "stop" : {
1912                                  "default" : 0,
1913                                  "optional" : 1,
1914                                  "type" : "boolean",
1915                                  "description" : "Stop runnig backup jobs on this host."
1916                               },
1917                               "maxfiles" : {
1918                                  "description" : "Maximal number of backup files per guest system.",
1919                                  "default" : 1,
1920                                  "optional" : 1,
1921                                  "type" : "integer",
1922                                  "minimum" : 1
1923                               },
1924                               "mode" : {
1925                                  "description" : "Backup mode.",
1926                                  "enum" : [
1927                                     "snapshot",
1928                                     "suspend",
1929                                     "stop"
1930                                  ],
1931                                  "default" : "snapshot",
1932                                  "type" : "string",
1933                                  "optional" : 1
1934                               },
1935                               "compress" : {
1936                                  "default" : "0",
1937                                  "optional" : 1,
1938                                  "type" : "string",
1939                                  "description" : "Compress dump file.",
1940                                  "enum" : [
1941                                     "0",
1942                                     "1",
1943                                     "gzip",
1944                                     "lzo"
1945                                  ]
1946                               },
1947                               "tmpdir" : {
1948                                  "optional" : 1,
1949                                  "type" : "string",
1950                                  "description" : "Store temporary files to specified directory."
1951                               },
1952                               "vmid" : {
1953                                  "format" : "pve-vmid-list",
1954                                  "type" : "string",
1955                                  "optional" : 1,
1956                                  "description" : "The ID of the guest system you want to backup."
1957                               },
1958                               "dow" : {
1959                                  "description" : "Day of week selection.",
1960                                  "optional" : 1,
1961                                  "type" : "string",
1962                                  "format" : "pve-day-of-week-list"
1963                               }
1964                            },
1965                            "additionalProperties" : 0
1966                         },
1967                         "protected" : 1,
1968                         "description" : "Update vzdump backup job definition."
1969                      },
1970                      "GET" : {
1971                         "method" : "GET",
1972                         "returns" : {
1973                            "type" : "object"
1974                         },
1975                         "parameters" : {
1976                            "properties" : {
1977                               "id" : {
1978                                  "description" : "The job ID.",
1979                                  "type" : "string",
1980                                  "maxLength" : 50
1981                               }
1982                            },
1983                            "additionalProperties" : 0
1984                         },
1985                         "permissions" : {
1986                            "check" : [
1987                               "perm",
1988                               "/",
1989                               [
1990                                  "Sys.Audit"
1991                               ]
1992                            ]
1993                         },
1994                         "name" : "read_job",
1995                         "description" : "Read vzdump backup job definition."
1996                      }
1997                   },
1998                   "text" : "{id}",
1999                   "leaf" : 1,
2000                   "path" : "/cluster/backup/{id}"
2001                }
2002             ],
2003             "text" : "backup",
2004             "info" : {
2005                "POST" : {
2006                   "description" : "Create new vzdump backup job.",
2007                   "protected" : 1,
2008                   "name" : "create_job",
2009                   "permissions" : {
2010                      "check" : [
2011                         "perm",
2012                         "/",
2013                         [
2014                            "Sys.Modify"
2015                         ]
2016                      ]
2017                   },
2018                   "parameters" : {
2019                      "properties" : {
2020                         "stopwait" : {
2021                            "default" : 10,
2022                            "optional" : 1,
2023                            "type" : "integer",
2024                            "description" : "Maximal time to wait until a guest system is stopped (minutes).",
2025                            "minimum" : 0
2026                         },
2027                         "quiet" : {
2028                            "description" : "Be quiet.",
2029                            "default" : 0,
2030                            "type" : "boolean",
2031                            "optional" : 1
2032                         },
2033                         "remove" : {
2034                            "default" : 1,
2035                            "type" : "boolean",
2036                            "optional" : 1,
2037                            "description" : "Remove old backup files if there are more than 'maxfiles' backup files."
2038                         },
2039                         "mailnotification" : {
2040                            "description" : "Specify when to send an email",
2041                            "enum" : [
2042                               "always",
2043                               "failure"
2044                            ],
2045                            "default" : "always",
2046                            "type" : "string",
2047                            "optional" : 1
2048                         },
2049                         "all" : {
2050                            "description" : "Backup all known guest systems on this host.",
2051                            "optional" : 1,
2052                            "type" : "boolean",
2053                            "default" : 0
2054                         },
2055                         "exclude" : {
2056                            "description" : "Exclude specified guest systems (assumes --all)",
2057                            "type" : "string",
2058                            "optional" : 1,
2059                            "format" : "pve-vmid-list"
2060                         },
2061                         "size" : {
2062                            "description" : "Unused, will be removed in a future release.",
2063                            "default" : 1024,
2064                            "type" : "integer",
2065                            "optional" : 1,
2066                            "minimum" : 500
2067                         },
2068                         "node" : {
2069                            "optional" : 1,
2070                            "type" : "string",
2071                            "description" : "Only run if executed on this node.",
2072                            "format" : "pve-node"
2073                         },
2074                         "pigz" : {
2075                            "default" : 0,
2076                            "type" : "integer",
2077                            "optional" : 1,
2078                            "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count."
2079                         },
2080                         "stdexcludes" : {
2081                            "description" : "Exclude temporary files and logs.",
2082                            "default" : 1,
2083                            "type" : "boolean",
2084                            "optional" : 1
2085                         },
2086                         "exclude-path" : {
2087                            "type" : "string",
2088                            "optional" : 1,
2089                            "description" : "Exclude certain files/directories (shell globs).",
2090                            "format" : "string-alist"
2091                         },
2092                         "storage" : {
2093                            "optional" : 1,
2094                            "type" : "string",
2095                            "description" : "Store resulting file to this storage.",
2096                            "format" : "pve-storage-id"
2097                         },
2098                         "enabled" : {
2099                            "description" : "Enable or disable the job.",
2100                            "default" : "1",
2101                            "optional" : 1,
2102                            "type" : "boolean"
2103                         },
2104                         "maxfiles" : {
2105                            "minimum" : 1,
2106                            "default" : 1,
2107                            "optional" : 1,
2108                            "type" : "integer",
2109                            "description" : "Maximal number of backup files per guest system."
2110                         },
2111                         "stop" : {
2112                            "type" : "boolean",
2113                            "optional" : 1,
2114                            "default" : 0,
2115                            "description" : "Stop runnig backup jobs on this host."
2116                         },
2117                         "tmpdir" : {
2118                            "optional" : 1,
2119                            "type" : "string",
2120                            "description" : "Store temporary files to specified directory."
2121                         },
2122                         "compress" : {
2123                            "optional" : 1,
2124                            "type" : "string",
2125                            "default" : "0",
2126                            "enum" : [
2127                               "0",
2128                               "1",
2129                               "gzip",
2130                               "lzo"
2131                            ],
2132                            "description" : "Compress dump file."
2133                         },
2134                         "mode" : {
2135                            "type" : "string",
2136                            "optional" : 1,
2137                            "default" : "snapshot",
2138                            "enum" : [
2139                               "snapshot",
2140                               "suspend",
2141                               "stop"
2142                            ],
2143                            "description" : "Backup mode."
2144                         },
2145                         "bwlimit" : {
2146                            "description" : "Limit I/O bandwidth (KBytes per second).",
2147                            "default" : 0,
2148                            "optional" : 1,
2149                            "type" : "integer",
2150                            "minimum" : 0
2151                         },
2152                         "ionice" : {
2153                            "minimum" : 0,
2154                            "default" : 7,
2155                            "maximum" : 8,
2156                            "type" : "integer",
2157                            "optional" : 1,
2158                            "description" : "Set CFQ ionice priority."
2159                         },
2160                         "dow" : {
2161                            "format" : "pve-day-of-week-list",
2162                            "default" : "mon,tue,wed,thu,fri,sat,sun",
2163                            "optional" : 1,
2164                            "type" : "string",
2165                            "description" : "Day of week selection."
2166                         },
2167                         "vmid" : {
2168                            "description" : "The ID of the guest system you want to backup.",
2169                            "type" : "string",
2170                            "optional" : 1,
2171                            "format" : "pve-vmid-list"
2172                         },
2173                         "lockwait" : {
2174                            "minimum" : 0,
2175                            "description" : "Maximal time to wait for the global lock (minutes).",
2176                            "type" : "integer",
2177                            "optional" : 1,
2178                            "default" : 180
2179                         },
2180                         "script" : {
2181                            "type" : "string",
2182                            "optional" : 1,
2183                            "description" : "Use specified hook script."
2184                         },
2185                         "mailto" : {
2186                            "description" : "Comma-separated list of email addresses that should receive email notifications.",
2187                            "optional" : 1,
2188                            "type" : "string",
2189                            "format" : "string-list"
2190                         },
2191                         "dumpdir" : {
2192                            "description" : "Store resulting files to specified directory.",
2193                            "type" : "string",
2194                            "optional" : 1
2195                         },
2196                         "starttime" : {
2197                            "typetext" : "HH:MM",
2198                            "description" : "Job Start time.",
2199                            "pattern" : "\\d{1,2}:\\d{1,2}",
2200                            "type" : "string"
2201                         }
2202                      },
2203                      "additionalProperties" : 0
2204                   },
2205                   "method" : "POST",
2206                   "returns" : {
2207                      "type" : "null"
2208                   }
2209                },
2210                "GET" : {
2211                   "method" : "GET",
2212                   "returns" : {
2213                      "links" : [
2214                         {
2215                            "rel" : "child",
2216                            "href" : "{id}"
2217                         }
2218                      ],
2219                      "items" : {
2220                         "type" : "object",
2221                         "properties" : {
2222                            "id" : {
2223                               "type" : "string"
2224                            }
2225                         }
2226                      },
2227                      "type" : "array"
2228                   },
2229                   "description" : "List vzdump backup schedule.",
2230                   "permissions" : {
2231                      "check" : [
2232                         "perm",
2233                         "/",
2234                         [
2235                            "Sys.Audit"
2236                         ]
2237                      ]
2238                   },
2239                   "name" : "index",
2240                   "parameters" : {
2241                      "additionalProperties" : 0
2242                   }
2243                }
2244             },
2245             "path" : "/cluster/backup",
2246             "leaf" : 0
2247          },
2248          {
2249             "path" : "/cluster/ha",
2250             "leaf" : 0,
2251             "text" : "ha",
2252             "children" : [
2253                {
2254                   "info" : {
2255                      "POST" : {
2256                         "method" : "POST",
2257                         "returns" : {
2258                            "type" : "null"
2259                         },
2260                         "name" : "create",
2261                         "permissions" : {
2262                            "check" : [
2263                               "perm",
2264                               "/",
2265                               [
2266                                  "Sys.Console"
2267                               ]
2268                            ]
2269                         },
2270                         "parameters" : {
2271                            "properties" : {
2272                               "max_restart" : {
2273                                  "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2274                                  "default" : 1,
2275                                  "type" : "integer",
2276                                  "optional" : 1,
2277                                  "minimum" : 0
2278                               },
2279                               "state" : {
2280                                  "type" : "string",
2281                                  "optional" : 1,
2282                                  "default" : "enabled",
2283                                  "enum" : [
2284                                     "enabled",
2285                                     "disabled"
2286                                  ],
2287                                  "description" : "Resource state."
2288                               },
2289                               "max_relocate" : {
2290                                  "default" : 1,
2291                                  "optional" : 1,
2292                                  "type" : "integer",
2293                                  "description" : "Maximal number of service relocate tries when a service failes to start.",
2294                                  "minimum" : 0
2295                               },
2296                               "group" : {
2297                                  "type" : "string",
2298                                  "optional" : 1,
2299                                  "description" : "The HA group identifier.",
2300                                  "format" : "pve-configid"
2301                               },
2302                               "comment" : {
2303                                  "optional" : 1,
2304                                  "type" : "string",
2305                                  "description" : "Description.",
2306                                  "maxLength" : 4096
2307                               },
2308                               "type" : {
2309                                  "enum" : [
2310                                     "vm",
2311                                     "ct"
2312                                  ],
2313                                  "description" : "Resource type.",
2314                                  "type" : "string",
2315                                  "optional" : 1
2316                               },
2317                               "sid" : {
2318                                  "format" : "pve-ha-resource-or-vm-id",
2319                                  "typetext" : "<type>:<name>",
2320                                  "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).",
2321                                  "type" : "string"
2322                               }
2323                            },
2324                            "additionalProperties" : 0,
2325                            "type" : "object"
2326                         },
2327                         "protected" : 1,
2328                         "description" : "Create a new HA resource."
2329                      },
2330                      "GET" : {
2331                         "returns" : {
2332                            "items" : {
2333                               "properties" : {
2334                                  "sid" : {
2335                                     "type" : "string"
2336                                  }
2337                               },
2338                               "type" : "object"
2339                            },
2340                            "links" : [
2341                               {
2342                                  "href" : "{sid}",
2343                                  "rel" : "child"
2344                               }
2345                            ],
2346                            "type" : "array"
2347                         },
2348                         "method" : "GET",
2349                         "description" : "List HA resources.",
2350                         "name" : "index",
2351                         "permissions" : {
2352                            "check" : [
2353                               "perm",
2354                               "/",
2355                               [
2356                                  "Sys.Audit"
2357                               ]
2358                            ]
2359                         },
2360                         "parameters" : {
2361                            "additionalProperties" : 0,
2362                            "properties" : {
2363                               "type" : {
2364                                  "type" : "string",
2365                                  "optional" : 1,
2366                                  "enum" : [
2367                                     "vm",
2368                                     "ct"
2369                                  ],
2370                                  "description" : "Only list resources of specific type"
2371                               }
2372                            }
2373                         }
2374                      }
2375                   },
2376                   "text" : "resources",
2377                   "children" : [
2378                      {
2379                         "text" : "{sid}",
2380                         "children" : [
2381                            {
2382                               "path" : "/cluster/ha/resources/{sid}/migrate",
2383                               "leaf" : 1,
2384                               "text" : "migrate",
2385                               "info" : {
2386                                  "POST" : {
2387                                     "name" : "migrate",
2388                                     "parameters" : {
2389                                        "properties" : {
2390                                           "sid" : {
2391                                              "typetext" : "<type>:<name>",
2392                                              "format" : "pve-ha-resource-or-vm-id",
2393                                              "type" : "string",
2394                                              "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)."
2395                                           },
2396                                           "node" : {
2397                                              "format" : "pve-node",
2398                                              "description" : "The cluster node name.",
2399                                              "type" : "string"
2400                                           }
2401                                        },
2402                                        "additionalProperties" : 0
2403                                     },
2404                                     "permissions" : {
2405                                        "check" : [
2406                                           "perm",
2407                                           "/",
2408                                           [
2409                                              "Sys.Console"
2410                                           ]
2411                                        ]
2412                                     },
2413                                     "protected" : 1,
2414                                     "description" : "Request resource migration (online) to another node.",
2415                                     "returns" : {
2416                                        "type" : "null"
2417                                     },
2418                                     "method" : "POST"
2419                                  }
2420                               }
2421                            },
2422                            {
2423                               "path" : "/cluster/ha/resources/{sid}/relocate",
2424                               "leaf" : 1,
2425                               "text" : "relocate",
2426                               "info" : {
2427                                  "POST" : {
2428                                     "name" : "relocate",
2429                                     "parameters" : {
2430                                        "additionalProperties" : 0,
2431                                        "properties" : {
2432                                           "node" : {
2433                                              "format" : "pve-node",
2434                                              "description" : "The cluster node name.",
2435                                              "type" : "string"
2436                                           },
2437                                           "sid" : {
2438                                              "typetext" : "<type>:<name>",
2439                                              "format" : "pve-ha-resource-or-vm-id",
2440                                              "type" : "string",
2441                                              "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)."
2442                                           }
2443                                        }
2444                                     },
2445                                     "permissions" : {
2446                                        "check" : [
2447                                           "perm",
2448                                           "/",
2449                                           [
2450                                              "Sys.Console"
2451                                           ]
2452                                        ]
2453                                     },
2454                                     "protected" : 1,
2455                                     "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.",
2456                                     "returns" : {
2457                                        "type" : "null"
2458                                     },
2459                                     "method" : "POST"
2460                                  }
2461                               }
2462                            }
2463                         ],
2464                         "info" : {
2465                            "GET" : {
2466                               "returns" : {},
2467                               "method" : "GET",
2468                               "parameters" : {
2469                                  "properties" : {
2470                                     "sid" : {
2471                                        "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).",
2472                                        "type" : "string",
2473                                        "format" : "pve-ha-resource-or-vm-id",
2474                                        "typetext" : "<type>:<name>"
2475                                     }
2476                                  },
2477                                  "additionalProperties" : 0
2478                               },
2479                               "permissions" : {
2480                                  "check" : [
2481                                     "perm",
2482                                     "/",
2483                                     [
2484                                        "Sys.Audit"
2485                                     ]
2486                                  ]
2487                               },
2488                               "name" : "read",
2489                               "description" : "Read resource configuration."
2490                            },
2491                            "PUT" : {
2492                               "returns" : {
2493                                  "type" : "null"
2494                               },
2495                               "method" : "PUT",
2496                               "parameters" : {
2497                                  "additionalProperties" : 0,
2498                                  "type" : "object",
2499                                  "properties" : {
2500                                     "group" : {
2501                                        "format" : "pve-configid",
2502                                        "optional" : 1,
2503                                        "type" : "string",
2504                                        "description" : "The HA group identifier."
2505                                     },
2506                                     "max_restart" : {
2507                                        "minimum" : 0,
2508                                        "optional" : 1,
2509                                        "type" : "integer",
2510                                        "default" : 1,
2511                                        "description" : "Maximal number of tries to restart the service on a node after its start failed."
2512                                     },
2513                                     "delete" : {
2514                                        "description" : "A list of settings you want to delete.",
2515                                        "optional" : 1,
2516                                        "type" : "string",
2517                                        "format" : "pve-configid-list",
2518                                        "maxLength" : 4096
2519                                     },
2520                                     "sid" : {
2521                                        "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).",
2522                                        "type" : "string",
2523                                        "format" : "pve-ha-resource-or-vm-id",
2524                                        "typetext" : "<type>:<name>"
2525                                     },
2526                                     "comment" : {
2527                                        "description" : "Description.",
2528                                        "optional" : 1,
2529                                        "type" : "string",
2530                                        "maxLength" : 4096
2531                                     },
2532                                     "max_relocate" : {
2533                                        "optional" : 1,
2534                                        "type" : "integer",
2535                                        "default" : 1,
2536                                        "description" : "Maximal number of service relocate tries when a service failes to start.",
2537                                        "minimum" : 0
2538                                     },
2539                                     "digest" : {
2540                                        "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2541                                        "type" : "string",
2542                                        "optional" : 1,
2543                                        "maxLength" : 40
2544                                     },
2545                                     "state" : {
2546                                        "enum" : [
2547                                           "enabled",
2548                                           "disabled"
2549                                        ],
2550                                        "description" : "Resource state.",
2551                                        "type" : "string",
2552                                        "optional" : 1,
2553                                        "default" : "enabled"
2554                                     }
2555                                  }
2556                               },
2557                               "name" : "update",
2558                               "permissions" : {
2559                                  "check" : [
2560                                     "perm",
2561                                     "/",
2562                                     [
2563                                        "Sys.Console"
2564                                     ]
2565                                  ]
2566                               },
2567                               "description" : "Update resource configuration.",
2568                               "protected" : 1
2569                            },
2570                            "DELETE" : {
2571                               "protected" : 1,
2572                               "description" : "Delete resource configuration.",
2573                               "name" : "delete",
2574                               "permissions" : {
2575                                  "check" : [
2576                                     "perm",
2577                                     "/",
2578                                     [
2579                                        "Sys.Console"
2580                                     ]
2581                                  ]
2582                               },
2583                               "parameters" : {
2584                                  "properties" : {
2585                                     "sid" : {
2586                                        "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).",
2587                                        "type" : "string",
2588                                        "format" : "pve-ha-resource-or-vm-id",
2589                                        "typetext" : "<type>:<name>"
2590                                     }
2591                                  },
2592                                  "additionalProperties" : 0
2593                               },
2594                               "method" : "DELETE",
2595                               "returns" : {
2596                                  "type" : "null"
2597                               }
2598                            }
2599                         },
2600                         "path" : "/cluster/ha/resources/{sid}",
2601                         "leaf" : 0
2602                      }
2603                   ],
2604                   "leaf" : 0,
2605                   "path" : "/cluster/ha/resources"
2606                },
2607                {
2608                   "leaf" : 0,
2609                   "path" : "/cluster/ha/groups",
2610                   "info" : {
2611                      "GET" : {
2612                         "parameters" : {
2613                            "additionalProperties" : 0
2614                         },
2615                         "name" : "index",
2616                         "permissions" : {
2617                            "check" : [
2618                               "perm",
2619                               "/",
2620                               [
2621                                  "Sys.Audit"
2622                               ]
2623                            ]
2624                         },
2625                         "description" : "Get HA groups.",
2626                         "method" : "GET",
2627                         "returns" : {
2628                            "type" : "array",
2629                            "items" : {
2630                               "type" : "object",
2631                               "properties" : {
2632                                  "group" : {
2633                                     "type" : "string"
2634                                  }
2635                               }
2636                            },
2637                            "links" : [
2638