[SOLVED] [REQUEST] Proxmox API /version also retrieves client node name.

ShotgunPayDay

Member
May 12, 2021
6
3
8
36
My apologies if this is not the correct place to post an API request.

The the Proxmox API makes it a little difficult to get the connected client node name. I know it can be retrieved by using GET /cluster/status then local is returned for the responding node, but means giving the user Sys.Audit permission and then looping through returned information.

The benefits of allowing node name to be part of GET /version.
  • Nice sanity test for making sure that Host address is corresponding to the right node.
  • Simple apps that need to only write to one node requires less user configuration.
  • Complex apps that use multiple clients - 1 per node - would make it easier to determine which client/node connection is in use or failing.
I'd also like /nodes/{node}/lxc/{vmid}/exec functionality, but I'm certain that's already mentioned and more complex.

Thank you for your time.
 
Hi,
you should be able to use /nodes/localhost/... to issue requests to the local node.

Feature requests are tracked here: https://bugzilla.proxmox.com/ (please check if a duplicate exists first and open a separate request for the LXC endpoint, each request should cover one thing).

I'm not sure the /version endpoint would be the correct place, because the node name is not related to the version in any way.
 
  • Like
Reactions: ShotgunPayDay
Hi,
you should be able to use /nodes/localhost/... to issue requests to the local node.

That's awesome. I was not aware of that. It would still be nice to retrieve the node name with any authenticated user. I'll check through the API since there might be a way with /nodes/localhost/...

Feature requests are tracked here: https://bugzilla.proxmox.com/ (please check if a duplicate exists first and open a separate request for the LXC endpoint, each request should cover one thing).

I'm not sure the /version endpoint would be the correct place, because the node name is not related to the version in any way.

Thanks I'll look through the bugzilla also.

I'll mark this as solved as this doesn't really belong here.
 

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!