Changes in Node API? (6.1-3 to 6.2-4)

thadoteu

Member
Jun 26, 2020
5
0
21
28
Hi,

I'm running two Proxmox servers (first one on 6.1- 3 and the second one on 6.2-4). Until the upgrade to 6.2-4 I was able to use the /nodes/ as well as the /status/ API endpoints to request some futher information about the host. Before the upgrade I received information like the CPU model from /nodes/{node}/status.

For example: /nodes/{nodeName}/
Code:
[
    "data" => [
        [
            "maxdisk" => 5217320960,
            "uptime" => 6125565,
            "level" => "",
            "maxmem" => 135086149632,
            "maxcpu" => 48,
            "ssl_fingerprint" => "...",
            "cpu" => 0.059231695302433,
            "id" => "node/vnode01",
            "node" => "vnode01",
            "type" => "node",
            "status" => "online",
            "disk" => 2353868800,
            "mem" => 81699344384,
        ],
    ],
]

But after the update there are a few information missing:
Code:
[
    "data" => [
        [
            "level" => "",
            "ssl_fingerprint" => "...",
            "id" => "node/pve",
            "status" => "online",
            "node" => "pve",
             "type" => "node",
        ],
    ],
]

Was anything changed in the API? The /nodes/{nodeName}/status/ endpoint also delivers no more information; it's just an empty result. I've read that API tokens were introduced in 6.2, could this have changed anything and I have to use those tokens now in order to get the information I require?

Thanks for your help in advance!
 
How do you make these API calls? Please provide a complete API call for both versions and its output.
 
Hi mira,

I did so in the first post. It's just a simple GET-Call to /nodes/{nodeName}/.
Fortunately I was able to "fix" the issue by executing the API calls on the updated system using the root user. This is of course no long-term solution due to a high security risk, but it seems as there have been changes in the permission-system with the introduction of the token authentication system.
 
When doing a GET call to /nodes/<nodename> you get the index containing all subpaths.
Please provide the complete API calls so I can reproduce it here and take a closer look.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!