API REFERENCE

Persistent Volumes API

List Kubernetes persistent volume claims with storage class, capacity, access modes, and per-volume cost details via the Kubeadapt API.

The persistent volumes endpoint returns storage details and cost data for PersistentVolumeClaims across your clusters.

Required scope: persistent_volumes:read

List Persistent Volumes

text
GET /v1/persistent-volumes

Returns a paginated list of persistent volumes across your organization.

Query Parameters

ParameterTypeDefaultDescription
cluster_idstringFilter by cluster ID
namespacestringFilter by namespace
storage_classstringFilter by storage class name
limitinteger100Number of results to return (1 to 500)
offsetinteger0Number of results to skip

Example Request

bash
curl -H "Authorization: Bearer ka_your_api_key" \ "https://public-api.kubeadapt.io/v1/persistent-volumes?cluster_id=cls-abc123&storage_class=gp3"

Example Response

json
{ "persistent_volumes": [ { "id": "pv-abc001", "name": "data-postgres-0", "cluster_id": "cls-abc123", "cluster_name": "prod-us-east", "namespace": "production", "pvc_name": "data-postgres-0", "storage_class": "gp3", "capacity_gb": 100.0, "access_modes": ["ReadWriteOnce"], "volume_type": "gp3", "zone": "us-east-1a", "hourly_cost": 0.011 }, { "id": "pv-abc002", "name": "data-redis-0", "cluster_id": "cls-abc123", "cluster_name": "prod-us-east", "namespace": "production", "pvc_name": "data-redis-0", "storage_class": "gp3", "capacity_gb": 20.0, "access_modes": ["ReadWriteOnce"], "volume_type": "gp3", "zone": "us-east-1a", "hourly_cost": 0.0022 } ], "total": 18, "summary": { "total_capacity_gb": 1240.0, "total_hourly_cost": 0.1364 } }

Response Fields

FieldTypeDescription
idstringPersistent volume identifier
namestringPersistentVolume name
cluster_idstringCluster this volume belongs to
cluster_namestringCluster display name
namespacestringKubernetes namespace
pvc_namestringPersistentVolumeClaim name bound to this volume
storage_classstringKubernetes storage class
capacity_gbfloatProvisioned capacity in GB
access_modesarrayKubernetes access modes (e.g., ["ReadWriteOnce"], ["ReadWriteMany"])
volume_typestringUnderlying volume type (e.g., gp3, io1)
zonestringAvailability zone where the volume is provisioned
hourly_costfloatEstimated hourly cost in USD

Summary Fields

The summary object in the response contains aggregate totals for the filtered result set:

FieldTypeDescription
total_capacity_gbfloatTotal provisioned storage in GB
total_hourly_costfloatTotal hourly cost across all returned volumes