Quick Overview of Proxmox VE REST API
i12bretro
#Promox #API #Hypervisor
Full steps can be found at https://i12bretro.github.io/tutorials/0572.html
Creating An API User 01. Log into the Proxmox VE web UI 02. Select Datacenter from the left navigation menu 03. Select Users from the left sub-navigation menu 04. Click the Add button at the top of the main content area 05. Enter the Username API, set the Realm to Proxmox VE authentication server and set and confirm a password ≫ Click Add 06. Select API Tokens from the left sub-navigation menu 07. Select API@pve for the username 08. Enter a secret key into the Token ID field ≫ Click Add TIP: Use a random string generator to create a unique Token ID https://www.random.org/passwords/?num=1&len=24&format=plain&rnd=new 09. Copy the displayed Token ID and Secret to a text document for use later 10. Close the dialog 11. Select Roles from the left sub-navigation menu 12. Click the Create button at the top of the main content area 13. Name the new role APIAdmin and select all available Privileges ≫ Click Create NOTE: These permissions can be fine-tuned later INFO: More information on each privilege can be found https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pveum_permission_management 14. Select Permissions from the left sub-navigation menu 15. Select the Add ≫ User permission at the top of the main content area 16. Set the Path to /, select the API@pve user and set the Role to APIAdmin ≫ Click Add
Downloading Postman Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster. - https://postman.com 01. Download Postman https://github.com/portapps/postman-portable/releases 02. Extract or install Postman 03. Launch Postman 04. Click the Skip and go to app link at the bottom left of the splash screen 05. Select File ≫ Settings from the top menu bar 06. Disable SSL Certificate Verification and Send anonymous usage data to Postman ≫ Close the Settings dialog window
Proxmox API Authentication
01. In Postman, click the + next to the Overview tab to create a new HTTP request tab
02. Complete the HTTP Request form as follows:
- Method: POST
- URL: https://DNSorIP:8006/api2/json/access/ticket
- Body: x-www-form-urlencoded username: API@pve password: API@pve Password≫
08. Click the Send button
09. From the response, copy the ticket value and CSRFPreventionToken values to a text document for use later
Proxmox Version API Call 01. In Postman, click the + next to the Overview tab to create a new HTTP request tab 02. Click the Cookies link bel ... https://www.youtube.com/watch?v=Iuyd2TXe8SA
28313434 Bytes