API Clients available?

tuxis

Famous Member
Jan 3, 2014
244
213
108
Ede, NL
www.tuxis.nl
Hi,

Are there any (python) API Clients available? I want to gather some data through the API, but cannot find clear documentation on how to use the API.

Am I looking in the wrong place?
 
Update: Sorry, missed which subforum we're in...

There is a perl client that is maintained by us. Additionally, there are community-maintained clients for various languages. You can find a list in our wiki.

According to their GitHub, pmxc and proxmoxer seem to be more active Python clients. The former is a CLI tool written in Python, the latter is a module that you can import into your Python script.

There is also a viewer with all possible API paths https://pve.proxmox.com/pve-docs/api-viewer/index.html
 
Last edited:
I'm sorry, I missed that I'm in the PBS subforum...
 
It looks like authentication is handled differently in PBS. PVE sends a Authorization-header, which includes all the data. But I don't seem to find that in PBS, correct @Dominic / @dcsapak ?
 
A lot basic client parts are quite similar when comparing Proxmox VE and Proxmox Backup Server.

For example, we use the perl pve-apiclient library for checking if all options when adding a PBS storage are correct and we can connect, authenticate and find the configured datastore - it required a few slight adaptions, but works out quite well now.
https://git.proxmox.com/?p=pve-stor...a8e00d1a5db62fbc37084202462ef6a99410b160#l602
 
It looks like authentication is handled differently in PBS. PVE sends a Authorization-header, which includes all the data. But I don't seem to find that in PBS, correct @Dominic / @dcsapak ?
That's handled the same way for both, the Authorization header is used for API Tokens, else we use a cookie (also just a header) with the ticket we initially create.