1 package PMG
::API2
::When
;
8 use PVE
::Tools
qw(extract_param);
9 use HTTP
::Status
qw(:constants);
10 use PVE
::JSONSchema
qw(get_standard_option);
16 use PMG
::RuleDB
::TimeFrame
;
19 use base
qw(PVE::RESTHandler);
21 __PACKAGE__-
>register_method ({
25 description
=> "Directory index.",
26 permissions
=> { check
=> [ 'admin', 'audit' ] },
28 additionalProperties
=> 0,
31 description
=> "Object Group ID.",
41 subdir
=> { type
=> 'string'},
44 links
=> [ { rel
=> 'child', href
=> "{subdir}" } ],
50 { subdir
=> 'config' },
51 { subdir
=> 'objects' },
52 { subdir
=> 'timeframe' },
57 PMG
::API2
::ObjectGroupHelpers
::register_delete_object_group_api
(__PACKAGE__
, 'when', '');
58 PMG
::API2
::ObjectGroupHelpers
::register_object_group_config_api
(__PACKAGE__
, 'when', 'config');
59 PMG
::API2
::ObjectGroupHelpers
::register_objects_api
(__PACKAGE__
, 'when', 'objects');
61 PMG
::RuleDB
::TimeFrame-
>register_api(__PACKAGE__
, 'timeframe');