]>
git.proxmox.com Git - pve-manager.git/blob - PVE/API2.pm
6 use Apache2
::Const
qw(:http);
9 use base
qw(PVE::RESTHandler);
12 use PVE
::API2
::Cluster
;
14 use PVE
::API2
::AccessControl
;
15 use PVE
::API2
::Storage
::Config
;
17 __PACKAGE__-
>register_method ({
18 subclass
=> "PVE::API2::Cluster",
22 __PACKAGE__-
>register_method ({
23 subclass
=> "PVE::API2::Nodes",
27 __PACKAGE__-
>register_method ({
28 subclass
=> "PVE::API2::Storage::Config",
32 __PACKAGE__-
>register_method ({
33 subclass
=> "PVE::API2::AccessControl",
37 __PACKAGE__-
>register_method ({
41 permissions
=> { user
=> 'all' },
42 description
=> "Directory index.",
44 additionalProperties
=> 0,
52 subdir
=> { type
=> 'string' },
55 links
=> [ { rel
=> 'child', href
=> "{subdir}" } ],
58 my ($resp, $param) = @_;
62 my $ma = PVE
::API2-
>method_attributes();
64 foreach my $info (@$ma) {
65 next if !$info->{subclass
};
67 my $subpath = $info->{match_re
}->[0];
69 push @$res, { subdir
=> $subpath };