Kubernetes clusters
Get kubernetes cluster persistent volume
Returns persistent volume details for a specific kubernetes cluster for the tenant selected by the X-CostGraph-Tenant-ID header
GET
/
api
/
v1
/
tenant
/
clusters
/
{cluster_id}
/
persistent-volumes
/
{pv_id}
Get kubernetes cluster persistent volume
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id} \
--header 'Authorization: <api-key>' \
--header 'X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}"
headers = {
"X-CostGraph-Tenant-ID": "<x-costgraph-tenant-id>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-CostGraph-Tenant-ID': '<x-costgraph-tenant-id>', Authorization: '<api-key>'}
};
fetch('https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}', 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.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}",
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>",
"X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>"
],
]);
$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.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}")
.header("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CostGraph-Tenant-ID"] = '<x-costgraph-tenant-id>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": {
"access_modes": [
"<string>"
],
"claims": 123,
"created_at": "<string>",
"current_spend": 123,
"disk_id": "<string>",
"id": "<string>",
"iops": {
"cost": 123,
"cost_per_month": 123,
"provisioned": 123,
"recommendation": "<string>",
"recommended_ratio": 123,
"urgency": "<string>",
"used": 123,
"used_percent": 123,
"recommended_cost": 123,
"recommended_provision": 123,
"savings": 123
},
"node": "<string>",
"phase": "<string>",
"provider": "<string>",
"provisioner": "<string>",
"reclaim_policy": "<string>",
"storage": {
"cost": 123,
"cost_per_month": 123,
"provisioned": 123,
"recommendation": "<string>",
"recommended_ratio": 123,
"urgency": "<string>",
"used": 123,
"used_percent": 123,
"recommended_cost": 123,
"recommended_provision": 123,
"savings": 123
},
"storage_class": "<string>",
"throughput": {
"cost": 123,
"cost_per_month": 123,
"provisioned": 123,
"recommendation": "<string>",
"recommended_ratio": 123,
"urgency": "<string>",
"used": 123,
"used_percent": 123,
"recommended_cost": 123,
"recommended_provision": 123,
"savings": 123
},
"urgency": "<string>",
"volume": "<string>",
"worst_action": "<string>",
"zone": "<string>",
"pinned_by": "api",
"pricing_id": "<string>",
"pricing_pinned": true,
"pricing_pins": {},
"pricing_provider": "<string>",
"recommended_spend": 123,
"savings": 123,
"savings_percent": 123
}
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}Authorizations
Enter "Bearer {token}"
Headers
Tenant ID
Path Parameters
Kubernetes cluster ID
Persistent volume ID
Was this page helpful?
⌘I
Get kubernetes cluster persistent volume
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id} \
--header 'Authorization: <api-key>' \
--header 'X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}"
headers = {
"X-CostGraph-Tenant-ID": "<x-costgraph-tenant-id>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-CostGraph-Tenant-ID': '<x-costgraph-tenant-id>', Authorization: '<api-key>'}
};
fetch('https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}', 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.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}",
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>",
"X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>"
],
]);
$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.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}")
.header("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/clusters/{cluster_id}/persistent-volumes/{pv_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CostGraph-Tenant-ID"] = '<x-costgraph-tenant-id>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": {
"access_modes": [
"<string>"
],
"claims": 123,
"created_at": "<string>",
"current_spend": 123,
"disk_id": "<string>",
"id": "<string>",
"iops": {
"cost": 123,
"cost_per_month": 123,
"provisioned": 123,
"recommendation": "<string>",
"recommended_ratio": 123,
"urgency": "<string>",
"used": 123,
"used_percent": 123,
"recommended_cost": 123,
"recommended_provision": 123,
"savings": 123
},
"node": "<string>",
"phase": "<string>",
"provider": "<string>",
"provisioner": "<string>",
"reclaim_policy": "<string>",
"storage": {
"cost": 123,
"cost_per_month": 123,
"provisioned": 123,
"recommendation": "<string>",
"recommended_ratio": 123,
"urgency": "<string>",
"used": 123,
"used_percent": 123,
"recommended_cost": 123,
"recommended_provision": 123,
"savings": 123
},
"storage_class": "<string>",
"throughput": {
"cost": 123,
"cost_per_month": 123,
"provisioned": 123,
"recommendation": "<string>",
"recommended_ratio": 123,
"urgency": "<string>",
"used": 123,
"used_percent": 123,
"recommended_cost": 123,
"recommended_provision": 123,
"savings": 123
},
"urgency": "<string>",
"volume": "<string>",
"worst_action": "<string>",
"zone": "<string>",
"pinned_by": "api",
"pricing_id": "<string>",
"pricing_pinned": true,
"pricing_pins": {},
"pricing_provider": "<string>",
"recommended_spend": 123,
"savings": 123,
"savings_percent": 123
}
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}