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_virtual_cluster_volume_list = client.cloud.gpu_virtual.clusters.volumes.list(
cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
project_id=1,
region_id=7,
)
print(gpu_virtual_cluster_volume_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"),
)
gpuVirtualClusterVolumeList, err := client.Cloud.GPUVirtual.Clusters.Volumes.List(
context.TODO(),
"1aaaab48-10d0-46d9-80cc-85209284ceb4",
cloud.GPUVirtualClusterVolumeListParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", gpuVirtualClusterVolumeList.Count)
}curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/volumes \
--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}/volumes', 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}/volumes",
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}/volumes")
.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}/volumes")
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": [
{
"bootable": false,
"created_at": "2025-03-17T13:22:23Z",
"id": "b6e58490-58d3-451c-bb77-4178157c98b2",
"name": "my-volume",
"root_fs": false,
"server_id": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"size": 100,
"tags": [
{
"key": "task_id",
"read_only": true,
"value": "d74c2bb9-cea7-4b23-a009-2f13518ae66d"
}
],
"type": "standard"
}
]
}GPU Virtual
List virtual GPU cluster volumes
List all volumes attached to servers in a virtual GPU cluster.
GET
/
cloud
/
v3
/
gpu
/
virtual
/
{project_id}
/
{region_id}
/
clusters
/
{cluster_id}
/
volumes
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_virtual_cluster_volume_list = client.cloud.gpu_virtual.clusters.volumes.list(
cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
project_id=1,
region_id=7,
)
print(gpu_virtual_cluster_volume_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"),
)
gpuVirtualClusterVolumeList, err := client.Cloud.GPUVirtual.Clusters.Volumes.List(
context.TODO(),
"1aaaab48-10d0-46d9-80cc-85209284ceb4",
cloud.GPUVirtualClusterVolumeListParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(7),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", gpuVirtualClusterVolumeList.Count)
}curl --request GET \
--url https://api.gcore.com/cloud/v3/gpu/virtual/{project_id}/{region_id}/clusters/{cluster_id}/volumes \
--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}/volumes', 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}/volumes",
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}/volumes")
.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}/volumes")
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": [
{
"bootable": false,
"created_at": "2025-03-17T13:22:23Z",
"id": "b6e58490-58d3-451c-bb77-4178157c98b2",
"name": "my-volume",
"root_fs": false,
"server_id": "ded40aad-505c-463b-aa59-8f5f455d1b6f",
"size": 100,
"tags": [
{
"key": "task_id",
"read_only": true,
"value": "d74c2bb9-cea7-4b23-a009-2f13518ae66d"
}
],
"type": "standard"
}
]
}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
Example:
1
Region ID
Example:
7
Cluster unique identifier
Example:
"1aaaab48-10d0-46d9-80cc-85209284ceb4"
Was this page helpful?
⌘I