Skip to main content

Resource API

KubeVision uses one cluster-scoped CRUD route family for built-in Kubernetes resources and discovered custom resources:

MethodPathOperation
GET/clusters/:id/resources/:resourceList
GET/clusters/:id/resources/:resource/:nameGet
POST/clusters/:id/resources/:resourceCreate
PUT/clusters/:id/resources/:resource/:nameReplace/update
PATCH/clusters/:id/resources/:resource/:namePatch
DELETE/clusters/:id/resources/:resource/:nameDelete

All paths on this page are relative to /api/v1. For namespaced resources, pass the namespace using the request format accepted by the web client (the list endpoint uses query parameters and manifests carry metadata.namespace). Use lowercase plural resource names such as pods, deployments, or the plural name of a CRD.

For Pod list and detail requests, add includeMetrics=true to include current CPU and memory usage, per-container usage, requests, and limits. KubeVision reads metrics.k8s.io/v1beta1; when Metrics Server is unavailable, the resource request still succeeds and returns metricsStatus: "unavailable" without a metrics object.

Dry Run

MethodPathOperation
POST/clusters/:id/resources/:resource/dry-runPreview create
PUT/clusters/:id/resources/:resource/:name/dry-runPreview update

The body is the same manifest used by the corresponding write operation. A dry run asks the Kubernetes API server to validate the operation without persisting it and returns the resulting preview/diff.

Workload Actions

MethodPathSupported resources
PUT/clusters/:id/namespaces/:namespace/:kind/:name/scaleDeployment, StatefulSet, ReplicaSet
POST/clusters/:id/namespaces/:namespace/:kind/:name/restartDeployment, StatefulSet, DaemonSet
GET/clusters/:id/namespaces/:namespace/deployments/:name/historyDeployment
POST/clusters/:id/namespaces/:namespace/deployments/:name/rollbackDeployment

Batch Operations

MethodPathDescription
POST/clusters/:id/resources/batch-deleteDelete selected resources
POST/clusters/:id/batch-restartRestart selected workloads

Each item is authorized independently. A mixed batch can therefore contain both successful and failed results.

Discovery and Views

MethodPathDescription
GET/clusters/:id/searchSearch resources in one cluster
GET/clusters/:id/overviewCluster overview data
GET/clusters/:id/quota-summaryResource quota summary
GET/clusters/:id/crdsList discovered CRDs
POST/clusters/:id/crds/refreshRefresh CRD discovery
GET/clusters/:id/namespaces/:namespace/topologyNamespace topology

The search endpoint is cluster-scoped; it is not /api/v1/search.