]>
git.proxmox.com Git - pmg-api.git/blob - src/PMG/API2.pm
9 use PMG
::API2
::AccessControl
;
11 use PMG
::API2
::Config
;
12 use PMG
::API2
::Quarantine
;
13 use PMG
::API2
::Statistics
;
16 use base
qw(PVE::RESTHandler);
18 __PACKAGE__-
>register_method ({
19 subclass
=> "PMG::API2::Config",
23 __PACKAGE__-
>register_method ({
24 subclass
=> "PMG::API2::Nodes",
28 __PACKAGE__-
>register_method ({
29 subclass
=> "PMG::API2::AccessControl",
33 __PACKAGE__-
>register_method ({
34 subclass
=> "PMG::API2::Quarantine",
38 __PACKAGE__-
>register_method ({
39 subclass
=> "PMG::API2::Statistics",
43 __PACKAGE__-
>register_method ({
47 permissions
=> { user
=> 'all' },
48 description
=> "Directory index.",
50 additionalProperties
=> 0,
58 subdir
=> { type
=> 'string' },
61 links
=> [ { rel
=> 'child', href
=> "{subdir}" } ],
64 my ($resp, $param) = @_;
67 { subdir
=> 'access' },
68 { subdir
=> 'config' },
69 { subdir
=> 'nodes' },
70 { subdir
=> 'version' },
71 { subdir
=> 'quarantine' },
72 { subdir
=> 'statistics' },
79 __PACKAGE__-
>register_method ({
83 permissions
=> { user
=> 'all' },
84 description
=> "API version details.",
86 additionalProperties
=> 0,
94 description
=> 'The current installed pmg-api package version',
98 description
=> 'The current installed Proxmox Mailgateway Release',
102 description
=> 'The short git commit hash ID from which this version was build',
109 return PMG
::pmgcfg
::version_info
();