Skip to main content

Function: clusterRequest()

function clusterRequest(
path: string,
params: ClusterRequestParams,
queryParams?: QueryParameters): Promise<any>

Sends a request to the backend. If the cluster is required in the params parameter, it will be used as a request to the respective Kubernetes server.

Parameters

ParameterTypeDescription
pathstringThe path to the API endpoint.
paramsClusterRequestParamsOptional parameters for the request.
queryParams?QueryParametersOptional query parameters for the k8s request.

Returns

Promise<any>

A Promise that resolves to the JSON response from the API server.

Throws

An ApiError if the response status is not ok.

Defined in

src/lib/k8s/api/v1/clusterRequests.ts:122