Actions
Start, stop, restart and reinstall a server, reset its root password and read its login details.
Power actions and reinstalls are asynchronous. Each call checks the current status, queues the work and returns the instance in a transitional status. Poll GET /vps/:id until it settles. None of these actions cost money.
| Action | Allowed from | Status right after the call | Status when done |
|---|---|---|---|
| Start | stopped | provisioning | running |
| Stop | running | stopping | stopped |
| Restart | running | restarting | running |
| Reinstall | running, stopped, error | provisioning | running |
| Reset password | running | unchanged | unchanged |
If a start, stop or restart fails, the server goes back to the status it had before the call, lastJobStatus becomes error and lastJobError says why. A failed reinstall also goes back to the previous status (or running). Jobs that are not power actions, such as a password reset or a firewall change, never change the power status: a stopped server stays stopped. A server in error cannot be started; reinstall or terminate it.
Every action here answers 409 VPS_BUSY while the server is busy, and 400 REQUEST_ERROR when the server is in a status the action does not accept (the error text names the status).
Start
/vps/:id/startcurl -X POST https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/start \
-H "Authorization: Bearer hel_your_key"{
"success": true,
"data": {
"id": "1f757fd5-98d1-490a-81a0-58b5798a5815",
"name": "web-1",
"status": "provisioning",
"lastJobType": "vps:start",
"lastJobStatus": "pending"
}
}waitForVps is the polling helper from Instances. The response is the full instance object, shortened here.
Stop
/vps/:id/stopcurl -X POST https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/stop \
-H "Authorization: Bearer hel_your_key"{
"success": true,
"data": {
"id": "1f757fd5-98d1-490a-81a0-58b5798a5815",
"status": "stopping",
"lastJobType": "vps:stop",
"lastJobStatus": "pending"
}
}A stopped server is still billed: the paid period keeps running.
Restart
/vps/:id/restartcurl -X POST https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/restart \
-H "Authorization: Bearer hel_your_key"{
"success": true,
"data": {
"id": "1f757fd5-98d1-490a-81a0-58b5798a5815",
"status": "restarting",
"lastJobType": "vps:restart",
"lastJobStatus": "pending"
}
}Reinstall the operating system
/vps/:id/reinstallProp
Type
curl -X POST https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/reinstall \
-H "Authorization: Bearer hel_your_key" \
-H "Content-Type: application/json" \
-d '{ "osType": "debian", "osVersion": "12", "rootPassword": "N3w!Passw0rd" }'{
"success": true,
"data": {
"id": "1f757fd5-98d1-490a-81a0-58b5798a5815",
"status": "provisioning",
"osType": "debian",
"osVersion": "12",
"lastJobType": "vps:reinstall",
"lastJobStatus": "pending"
}
}The password and the operating system are checked before anything changes: a password shorter than 12 or longer than 30 characters answers 422 VALIDATION, a password that breaks the password rules or an unknown osType/osVersion answers 400 REQUEST_ERROR, and the server is left as it was.
The new password is stored only when the reinstall succeeds; until then GET /vps/:id/credentials keeps returning the old one. If the reinstall fails, the server goes back to its previous status and operating system, and the old password stays valid.
Reset the root password
/vps/:id/reset-passwordProp
Type
curl -X POST https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/reset-password \
-H "Authorization: Bearer hel_your_key" \
-H "Content-Type: application/json" \
-d '{ "rootPassword": "N3w!Passw0rd" }'{
"success": true,
"data": { "success": true, "message": "Password reset job queued" }
}The server must be running. The status does not change; the new password applies within a short while. The new password is stored only when the reset succeeds, so GET /vps/:id/credentials returns it from then on. If the reset fails, the server stays as it is, the old password stays valid and lastJobStatus becomes error.
Get login details
/vps/:id/credentialscurl https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/credentials \
-H "Authorization: Bearer hel_your_key"{
"success": true,
"data": {
"host": "203.0.113.24",
"port": 22,
"protocol": "ssh",
"user": "root",
"password": "N3w!Passw0rd",
"command": "ssh [email protected]"
}
}A Windows server is reached over Remote Desktop instead:
{
"success": true,
"data": {
"host": "203.0.113.25",
"port": 3389,
"protocol": "rdp",
"user": "Administrator",
"password": "N3w!Passw0rd",
"command": "mstsc /v:203.0.113.25:3389"
}
}| Field | Linux | Windows |
|---|---|---|
protocol | "ssh" | "rdp" |
port | 22 | 3389 |
user | root | Administrator |
The password is the last one set through create, or through a reinstall or reset that succeeded. host is "pending" while the server is still being created. Treat this response as a secret.