Computes
Reboot Compute Instance
Reboots the specified compute instance.
POST
/
computes
/
{id}
/
reboot
Reboot a compute instance
curl --request POST \
--url https://api.strettch.cloud/api/v1/computes/{id}/reboot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.strettch.cloud/api/v1/computes/{id}/reboot"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.strettch.cloud/api/v1/computes/{id}/reboot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.strettch.cloud/api/v1/computes/{id}/reboot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.strettch.cloud/api/v1/computes/{id}/reboot"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.strettch.cloud/api/v1/computes/{id}/reboot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strettch.cloud/api/v1/computes/{id}/reboot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Operation successful",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": true,
"timestamp": "2024-01-15T10:00:00Z",
"data": {
"id": "325",
"hostName": "my-server-01",
"state": "RUNNING",
"image": "UBUNTU-24.04",
"specification": "S-1C-1G",
"region": "KGL-1",
"ipv4": "195.15.0.73",
"privateIpv4": "10.0.0.5",
"tags": [
"production",
"web"
],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:05:00Z"
}
}{
"code": "ERROR_CODE",
"message": "Error message description",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": false,
"timestamp": "2024-01-15T10:00:00Z"
}{
"code": "ERROR_CODE",
"message": "Error message description",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": false,
"timestamp": "2024-01-15T10:00:00Z"
}{
"code": "ERROR_CODE",
"message": "Error message description",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": false,
"timestamp": "2024-01-15T10:00:00Z"
}{
"code": "ERROR_CODE",
"message": "Error message description",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": false,
"timestamp": "2024-01-15T10:00:00Z"
}Response Error Codes
If the request fails, thecode field in the error response will contain one of the following.
- Standard
- Billing & Team
| Code | Status | Description |
|---|---|---|
BAD_REQUEST | 400 | The request was invalid or malformed. |
UNAUTHORIZED | 401 | Authentication failed or was not provided. |
FORBIDDEN | 403 | You do not have permission to perform this action. |
RESOURCE_NOT_FOUND | 404 | The specified compute instance was not found. |
CONFLICT | 409 | A conflict with the current server state occurred. |
TOO_MANY_REQUESTS | 429 | You have exceeded the rate limit. |
INTERNAL_SERVER_ERROR | 500 | An unexpected error occurred on our end. |
These errors block all resource operations. Resolve your team’s billing status before retrying.
| Code | Status | Description |
|---|---|---|
INSUFFICIENT_BALANCE | 403 | Team balance is too low to perform this action. |
TEAM_SUSPENDED | 403 | Team is suspended due to an outstanding payment. |
TEAM_PAST_DUE | 403 | Team has an outstanding balance that must be settled first. |
TEAM_TERMINATED | 403 | Team has been terminated and can no longer access resources. |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Compute ID
Was this page helpful?
⌘I
Reboot a compute instance
curl --request POST \
--url https://api.strettch.cloud/api/v1/computes/{id}/reboot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.strettch.cloud/api/v1/computes/{id}/reboot"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.strettch.cloud/api/v1/computes/{id}/reboot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.strettch.cloud/api/v1/computes/{id}/reboot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.strettch.cloud/api/v1/computes/{id}/reboot"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.strettch.cloud/api/v1/computes/{id}/reboot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strettch.cloud/api/v1/computes/{id}/reboot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Operation successful",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": true,
"timestamp": "2024-01-15T10:00:00Z",
"data": {
"id": "325",
"hostName": "my-server-01",
"state": "RUNNING",
"image": "UBUNTU-24.04",
"specification": "S-1C-1G",
"region": "KGL-1",
"ipv4": "195.15.0.73",
"privateIpv4": "10.0.0.5",
"tags": [
"production",
"web"
],
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:05:00Z"
}
}{
"code": "ERROR_CODE",
"message": "Error message description",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": false,
"timestamp": "2024-01-15T10:00:00Z"
}{
"code": "ERROR_CODE",
"message": "Error message description",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": false,
"timestamp": "2024-01-15T10:00:00Z"
}{
"code": "ERROR_CODE",
"message": "Error message description",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": false,
"timestamp": "2024-01-15T10:00:00Z"
}{
"code": "ERROR_CODE",
"message": "Error message description",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"success": false,
"timestamp": "2024-01-15T10:00:00Z"
}