Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
gpu_baremetal_cluster_server_v1_list = client.cloud.gpu_baremetal.clusters.reboot_all_servers(
cluster_id="cluster_id",
project_id=0,
region_id=0,
)
print(gpu_baremetal_cluster_server_v1_list.count)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cloud"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
gpuBaremetalClusterServerV1List, err := client.Cloud.GPUBaremetal.Clusters.RebootAllServers(
context.TODO(),
"cluster_id",
cloud.GPUBaremetalClusterRebootAllServersParams{
ProjectID: gcore.Int(0),
RegionID: gcore.Int(0),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", gpuBaremetalClusterServerV1List.Count)
}curl --request POST \
--url https://api.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_id}/reboot \
--header 'Authorization: <api-key>'const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_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.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_id}/reboot")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_id}/reboot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"results": [
{
"addresses": {},
"blackhole_ports": [
{
"AlarmEnd": "2025-02-05 12:04:30",
"AlarmStart": "2025-02-05 12:04:11",
"AlertDuration": "2 hours",
"DestinationIP": "80.240.114.116",
"ID": 123
}
],
"created_at": "2023-11-29T10:56:49Z",
"creator_task_id": "<string>",
"ddos_profile": {
"fields": [
{
"base_field": 10,
"default": null,
"description": "ARK server ports. Valid port values are in range 1000-65535",
"field_type": null,
"field_value": "<unknown>",
"id": 11,
"name": "ARK Ports",
"required": true,
"validation_schema": "<unknown>"
}
],
"id": 0,
"options": {
"active": true,
"bgp": true
},
"profile_template": {
"description": "description",
"fields": [
{
"default": null,
"description": "ARK server ports. Valid port values are in range 1000-65535",
"field_type": null,
"id": 11,
"name": "ARK Ports",
"required": true,
"validation_schema": "<unknown>"
}
],
"id": 123,
"name": "ICMP port"
},
"profile_template_description": "ARK server ports. Valid port values are in range 1000-65535",
"protocols": [
{
"port": "80",
"protocols": [
"TCP",
"HTTP"
]
},
{
"port": "53",
"protocols": [
"UDP"
]
}
],
"site": "ED",
"status": {
"error_description": "",
"status": "Updated"
}
},
"fixed_ip_assignments": [
{
"external": true,
"ip_address": "123.123.123.1",
"subnet_id": "eaafdc3c-f48b-4eb4-826f-057dfc7d6476"
}
],
"flavor": {
"architecture": "x86_64",
"flavor_id": "g2-standard-32-64",
"flavor_name": "g2-standard-32-64",
"hardware_description": {
"cpu": "1x Intel Xeon 4C/8T 3.7 GHz",
"disk": "2x 250GiB SSD",
"gpu": "NVIDIA h100-8GPU (80GB)",
"license": "",
"network": "1x 500Mbps",
"ram": "32 GiB"
},
"os_type": "linux",
"ram": 2048,
"resource_class": "bm2-hf-medium",
"vcpus": 1
},
"id": "6c6aa80f-7836-4dc2-a2ae-125e248be476",
"instance_description": "Instance description",
"instance_isolation": {
"reason": "Suspicious activities"
},
"name": "my-server-1",
"project_id": 111,
"region": "Luxembourg",
"region_id": 4,
"security_groups": [
{
"name": "some_name"
}
],
"ssh_key_name": "my-ssh-key",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": null,
"task_state": "<string>"
}
]
}GPU Bare Metal
Reboot all bare metal GPU cluster servers
deprecated
Please use the /v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/action instead.
POST
/
cloud
/
v2
/
ai
/
clusters
/
{project_id}
/
{region_id}
/
{cluster_id}
/
reboot
Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
gpu_baremetal_cluster_server_v1_list = client.cloud.gpu_baremetal.clusters.reboot_all_servers(
cluster_id="cluster_id",
project_id=0,
region_id=0,
)
print(gpu_baremetal_cluster_server_v1_list.count)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cloud"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
gpuBaremetalClusterServerV1List, err := client.Cloud.GPUBaremetal.Clusters.RebootAllServers(
context.TODO(),
"cluster_id",
cloud.GPUBaremetalClusterRebootAllServersParams{
ProjectID: gcore.Int(0),
RegionID: gcore.Int(0),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", gpuBaremetalClusterServerV1List.Count)
}curl --request POST \
--url https://api.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_id}/reboot \
--header 'Authorization: <api-key>'const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_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.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_id}/reboot")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v2/ai/clusters/{project_id}/{region_id}/{cluster_id}/reboot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"results": [
{
"addresses": {},
"blackhole_ports": [
{
"AlarmEnd": "2025-02-05 12:04:30",
"AlarmStart": "2025-02-05 12:04:11",
"AlertDuration": "2 hours",
"DestinationIP": "80.240.114.116",
"ID": 123
}
],
"created_at": "2023-11-29T10:56:49Z",
"creator_task_id": "<string>",
"ddos_profile": {
"fields": [
{
"base_field": 10,
"default": null,
"description": "ARK server ports. Valid port values are in range 1000-65535",
"field_type": null,
"field_value": "<unknown>",
"id": 11,
"name": "ARK Ports",
"required": true,
"validation_schema": "<unknown>"
}
],
"id": 0,
"options": {
"active": true,
"bgp": true
},
"profile_template": {
"description": "description",
"fields": [
{
"default": null,
"description": "ARK server ports. Valid port values are in range 1000-65535",
"field_type": null,
"id": 11,
"name": "ARK Ports",
"required": true,
"validation_schema": "<unknown>"
}
],
"id": 123,
"name": "ICMP port"
},
"profile_template_description": "ARK server ports. Valid port values are in range 1000-65535",
"protocols": [
{
"port": "80",
"protocols": [
"TCP",
"HTTP"
]
},
{
"port": "53",
"protocols": [
"UDP"
]
}
],
"site": "ED",
"status": {
"error_description": "",
"status": "Updated"
}
},
"fixed_ip_assignments": [
{
"external": true,
"ip_address": "123.123.123.1",
"subnet_id": "eaafdc3c-f48b-4eb4-826f-057dfc7d6476"
}
],
"flavor": {
"architecture": "x86_64",
"flavor_id": "g2-standard-32-64",
"flavor_name": "g2-standard-32-64",
"hardware_description": {
"cpu": "1x Intel Xeon 4C/8T 3.7 GHz",
"disk": "2x 250GiB SSD",
"gpu": "NVIDIA h100-8GPU (80GB)",
"license": "",
"network": "1x 500Mbps",
"ram": "32 GiB"
},
"os_type": "linux",
"ram": 2048,
"resource_class": "bm2-hf-medium",
"vcpus": 1
},
"id": "6c6aa80f-7836-4dc2-a2ae-125e248be476",
"instance_description": "Instance description",
"instance_isolation": {
"reason": "Suspicious activities"
},
"name": "my-server-1",
"project_id": 111,
"region": "Luxembourg",
"region_id": 4,
"security_groups": [
{
"name": "some_name"
}
],
"ssh_key_name": "my-ssh-key",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": null,
"task_state": "<string>"
}
]
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Path Parameters
Project ID
Region ID
GPU cluster ID
Was this page helpful?
⌘I