2 use proxmox
::api
::{api, ApiMethod, Permission, Router, RpcEnvironment}
;
3 use serde_json
::{json, Value}
;
5 use crate::api2
::types
::*;
6 use crate::config
::acl
::PRIV_SYS_AUDIT
;
7 use crate::server
::generate_report
;
19 description
: "Returns report of the node"
22 permission
: &Permission
::Privilege(&["system", "status"], PRIV_SYS_AUDIT
, false),
29 _rpcenv
: &mut dyn RpcEnvironment
,
30 ) -> Result
<Value
, Error
> {
31 Ok(json
!(generate_report()))
34 pub const ROUTER
: Router
= Router
::new()
35 .get(&API_METHOD_GET_REPORT
);