]>
git.proxmox.com Git - pve-apiclient.git/blob - src/examples/example3.pl
3 # NOTE: you need to set the API token and PVE host below for this to work
8 use PVE
::APIClient
::LWP
;
12 my $apitoken = 'PVEAPIToken=USER@REALM!TOKENID=TOKENVALUE';
13 my $hostname = "127.0.0.1";
15 my $conn = PVE
::APIClient
::LWP-
>new(
16 apitoken
=> $apitoken,
18 # allow manual fingerprint verification
19 manual_verification
=> 1,
22 my $res = $conn->get("/access/permissions", {});
24 print to_json
($res, { pretty
=> 1, canonical
=> 1});