https://rancher.com/ logo
Title
b

bitter-tailor-6977

05/17/2023, 7:13 AM
Hi all, i need a Longhorn API, from where i can get details of volumes… i have the api of volume -
<http://longhorn-backend.longhorn-system.svc.cluster.local:9500/v1/volumes>
but it need the pv names …in my case i need the details from pvc name eg.,
<http://longhorn-backend.longhorn-system.svc.cluster.local:9500/v1/pvc/pvc-name>
any api with call directly pvc and share the details ?
b

billowy-painting-56466

05/17/2023, 8:52 AM
Longhorn doesn't have an API for the PVCs. Maybe you can try using the Kubernetes API endpoint
https://<kubernetes-api-server>/api/v1/namespaces/<namespace>/persistentvolumeclaims/<pvc-name>
.
b

bitter-tailor-6977

05/18/2023, 2:37 PM
Okay cool