CrownPanel's API allows you to manage your VPS programmatically - including actions like power control, hostname changes, snapshot management, and more.
POST method to https://api.crownpanel.comYou can use the API with:
curlIdeal for automation, integration into management panels, or performing bulk operations across multiple VPS instances.
Use this API call to retrieve the task history (e.g., boot, shutdown, reboot, etc.) for a specific VPS instance.
This helps track recent actions performed on your VPS.
| Key | Variable | Description | Required |
|---|---|---|---|
API_KEY |
YOUR_API_KEY |
Replace YOUR_API_KEY with your actual API key provided in "Account Settings", under the API section. |
โ Yes |
QUERY |
task_log |
Fixed value: must be "task_log". |
โ Yes |
VMID |
YOUR_VMID |
The VMID of your VPS. Retrieve it from the List All VPSes API Call. | โ Yes |
If your API_KEY is valid, you would get the following output,
'[{"task_id":"1021627","task":"Shutdown","task_added_on":"2022-04-18 03:38:08","task_status":"1"},{"task_id":"1021626","task":"Reboot","task_added_on":"2022-04-18 03:31:36","task_status":"1"}]'
If your API_KEY is invalid, you would get the following output,
'{"query_status":"Error","query":"verify","query_result":""}'
If you prefer to use another language or environment, here are examples for PHP, Python and Node.js:
โ๏ธ Install (only once): Required to install necessary libraries before running the code.
โ๏ธ Install (only once): Required to install necessary libraries before running the code.
Need help? Visit our Support Portal or use our live chat.