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