import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.gpu_virtual.clusters.servers.list(
cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
project_id=1,
region_id=7,
)
page = page.results[0]
print(page.id)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"),
)
page, err := client.Cloud.GPUVirtual.Clusters.Servers.List(
context.TODO(),
"1aaaab48-10d0-46d9-80cc-85209284ceb4",
cloud.GPUVirtualClusterServerListParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers', 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/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.get("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"results": [
{
"applied_servers_settings": {
"image_id": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"servers_settings": {
"credentials": {
"ssh_key_name": "my-key"
}
}
},
"created_at": "2025-03-17T13:22:23Z",
"flavor": "g3-ai-64-384-3000-l40s-48-2",
"has_pending_changes": false,
"id": "b6e58490-58d3-451c-bb77-4178157c98b2",
"image_id": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"ip_addresses": [
"192.168.1.1"
],
"name": "my-server-e2241889",
"security_groups": [
{
"id": "ae74714c-c380-48b4-87f8-758d656cdad6",
"name": "default"
}
],
"ssh_key_name": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"status": "ACTIVE",
"tags": [
{
"key": "task_id",
"read_only": true,
"value": "d74c2bb9-cea7-4b23-a009-2f13518ae66d"
}
],
"task_id": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"updated_at": "2025-03-17T13:22:23Z",
"user_data_applied": true
}
]
}List virtual GPU cluster servers
List all servers in a virtual GPU cluster.
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.gpu_virtual.clusters.servers.list(
cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
project_id=1,
region_id=7,
)
page = page.results[0]
print(page.id)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"),
)
page, err := client.Cloud.GPUVirtual.Clusters.Servers.List(
context.TODO(),
"1aaaab48-10d0-46d9-80cc-85209284ceb4",
cloud.GPUVirtualClusterServerListParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers', 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/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.get("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/servers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"results": [
{
"applied_servers_settings": {
"image_id": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"servers_settings": {
"credentials": {
"ssh_key_name": "my-key"
}
}
},
"created_at": "2025-03-17T13:22:23Z",
"flavor": "g3-ai-64-384-3000-l40s-48-2",
"has_pending_changes": false,
"id": "b6e58490-58d3-451c-bb77-4178157c98b2",
"image_id": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"ip_addresses": [
"192.168.1.1"
],
"name": "my-server-e2241889",
"security_groups": [
{
"id": "ae74714c-c380-48b4-87f8-758d656cdad6",
"name": "default"
}
],
"ssh_key_name": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"status": "ACTIVE",
"tags": [
{
"key": "task_id",
"read_only": true,
"value": "d74c2bb9-cea7-4b23-a009-2f13518ae66d"
}
],
"task_id": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"updated_at": "2025-03-17T13:22:23Z",
"user_data_applied": true
}
]
}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
1
Region ID
7
Cluster unique identifier
"1aaaab48-10d0-46d9-80cc-85209284ceb4"
Query Parameters
Filters the results to include only servers whose last change timestamp is less than the specified datetime. Format: ISO 8601.
"2025-10-01T12:00:00Z"
Filters the results to include only servers whose last change timestamp is greater than or equal to the specified datetime. Format: ISO 8601.
"2025-10-01T12:00:00Z"
Filter servers by ip address.
"237.84.2.178"
Limit of items on a single page
x <= 100010
Filter servers by name. You can provide a full or partial name, servers with matching names will be returned. For example, entering 'test' will return all servers that contain 'test' in their name.
Offset in results list
x >= 00
Order field
created_at.asc, created_at.desc, status.asc, status.desc Filters servers by status.
ACTIVE, BUILD, ERROR, HARD_REBOOT, MIGRATING, PAUSED, REBOOT, REBUILD, RESIZE, REVERT_RESIZE, SHELVED, SHELVED_OFFLOADED, SHUTOFF, SOFT_DELETED, SUSPENDED, VERIFY_RESIZE "ACTIVE"
Filter servers by uuid.
"d74c2bb9-cea7-4b23-a009-2f13518ae66d"
Was this page helpful?