Using Proxmox Backup Server API's Backup and Restore endpoints

rakeshn

New Member
May 11, 2024
2
0
1
Hello,
I was reviewing the PBS API documentation here: https://pbs.proxmox.com/docs/api-viewer/index.html. While I am able to use the API for Management API endpoints like ping or version e.g. "https://my-pbs-server/api2/json/version to return {"data":{"release":"2","repoid":"blanked-out","version":"3.2"}}, I don't know how to get to the backup or restore API endpoints. I must be missing something basic or obvious. Thanks in advance for any pointers folks may have who have used these APIs.

Thanks,
Rakesh
 
Thanks Dominik. So to be clear to call the speedtest endpoint under Backup and Restore APIs, I would use the following endpoints respectively:

curl -H 'Authorization: PBSAPIToken=<username>@pam!<tokenname>:<token-secret-value>' "https://<dnsname>/backup/api2/json/speedtest"
curl -H 'Authorization: PBSAPIToken=<username>@pam!<tokenname>:<token-secret-value>' "https://<dnsname>/restore/api2/json/speedtest"

If not, please explain how I would call these endpoints.
 
no, i don't think you can do what you want with curl

you first have to establish a http2 connection via the upgrade header: https://en.wikipedia.org/wiki/HTTP/2
and then you have to make another (http2) api call to the speedtest api

but if you want to do just that, you can use the proxmox-backup-client (that has a 'benchmark' command builtin)
 

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!