Frequently Asked Question

Proxmox API - Status
Last Updated 1 days ago

To obtain cluster status information from your Proxmox VE node (pve91-lab1.gen) using an API token, you must construct a curl command that authenticates via the Authorization header and targets the correct API endpoint.

Please follow these steps:

  1. Identify your API Token: Ensure you have the full API token string (e.g., root@pam!token-name=uuid...). If you only have a username and password, you must first generate a token via the Proxmox Web UI under Datacenter -> Permissions -> API Tokens.
  2. Construct the Command: Use the following structure. Replace YOURAPITOKEN with your actual token string.
curl -k -H "Authorization: PVEAPIToken=root@pam!token-name=uuid..." https://pve91-lab1.gen:8006/api2/json/cluster/status

Key Details:

  • -k: This flag allows curl to proceed with insecure connections (ignoring SSL certificate verification). This is often necessary for lab environments or if using self-signed certificates, which are common in Proxmox setups. If your certificate is trusted, you can remove -k.
  • -H "Authorization: PVEAPIToken=...": This header provides the authentication credentials. The format is PVEAPIToken=<user>@<realm>!<token-name>=<uuid>.
  • https://pve91-lab1.gen:8006/api2/json/cluster/status: This is the specific endpoint for retrieving cluster status.

Expected Output: The command will return a JSON response containing the current health status, node information, and any warnings or errors within the cluster. If successful, the response will include a data object with status details (e.g., status: "OK").

Troubleshooting:

  • 401 Unauthorized: Verify that the API token is correct and has not expired. Ensure the token has the necessary privileges (usually Datacenter.Alarm or Sysmod for cluster status).
  • Connection Refused: Check that the Proxmox node is online and that port 8006 is accessible from your machine.
  • SSL Errors: If you do not use -k and receive certificate errors, ensure your system trusts the Proxmox node's SSL certificate or use the IP address if the hostname does not resolve correctly in your DNS.
This FAQ was generated and/or edited by GAIN, GENs Artificial Intelligence Network and should not be considered 100% accurate. Always check facts and do your research, things change all the time. If you are unsure about any information provided, please raise a support ticket for clarification.
This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...