Clusters

Use these endpoints to create, manage and delete Run:ai Kubernetes clusters.

Get a list of clusters.

Retrieve a list of clusters with details.

SecuritybearerAuth
Request
query Parameters
verbosity
string
Default: "full"

response verbosity level.

Enum: "metadata" "full"
Example: verbosity=full
Responses
200

Executed successfully.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/api/v1/clusters
Response samples
application/json
[
  • {
    }
]

Create a cluster.

Use to create a Kubernetes cluster.

SecuritybearerAuth
Request
Request Body schema: application/json
required

The cluster to create.

name
required
string
domain
string
version
string
Responses
201

Created

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

post/api/v1/clusters
Request samples
application/json
{
  • "name": "string",
  • "domain": "string",
  • "version": "string"
}
Response samples
application/json
{
  • "uuid": "A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11",
  • "name": "example",
  • "tenantId": 1001,
  • "domain": "my.company.com",
  • "status": { },
  • "createdAt": "2020-01-01T00:00:00Z",
  • "updatedAt": "2020-01-02T00:00:00Z",
  • "lastLiveness": "2020-01-02T00:00:00Z",
  • "version": "2.15.0"
}

Get cluster by id.

Retrieve cluster details by Universally Unique Identifier (UUID).

SecuritybearerAuth
Request
path Parameters
clusterUuid
required
string <uuid> non-empty

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
verbosity
string
Default: "full"

response verbosity level.

Enum: "metadata" "full"
Example: verbosity=full
Responses
200

Executed successfully.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/api/v1/clusters/{clusterUuid}
Response samples
application/json
{
  • "uuid": "A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11",
  • "name": "example",
  • "tenantId": 1001,
  • "domain": "my.company.com",
  • "status": { },
  • "createdAt": "2020-01-01T00:00:00Z",
  • "updatedAt": "2020-01-02T00:00:00Z",
  • "lastLiveness": "2020-01-02T00:00:00Z",
  • "version": "2.15.0"
}

Delete a cluster by id.

Use to delete a cluster by Universally Unique Identifier (UUID). Will return 202 for success if this api was called on a cluster that its version is >=2.20, and force query param is false or not provided. Will return 204 for success if force query param is true, or if cluster is in a version < 2.20

SecuritybearerAuth
Request
path Parameters
clusterUuid
required
string <uuid> non-empty

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
force
boolean
Default: false

if true will force cluster instant deletion otherwise will start cluster graceful deletion process.

Example: force=true
Responses
202

Accepted.

204

No Content.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

delete/api/v1/clusters/{clusterUuid}
Response samples
application/json
{
  • "code": 202,
  • "message": "Request has been accepted."
}

Update a cluster by id.

Use to update the details of a Kubernetes cluster by Universally Unique Identifier (UUID).

SecuritybearerAuth
Request
path Parameters
clusterUuid
required
string <uuid> non-empty

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
Request Body schema: application/json
required

The cluster details to update

name
required
string
Responses
204

No Content.

400

Bad request.

401

Unauthorized

403

Forbidden

500

unexpected error

503

unexpected error

put/api/v1/clusters/{clusterUuid}
Request samples
application/json
{
  • "name": "string"
}
Response samples
application/json
{
  • "code": 400,
  • "message": "Required parameter is missing"
}

Get the cluster metrics data.

Retrieve the metrics data for a Kubernetes cluster by Universally Unique Identifier (UUID).

SecuritybearerAuth
Request
path Parameters
clusterUuid
required
string <uuid> non-empty

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
start
required
string <date-time>

Start date of time range to fetch data in ISO 8601 timestamp format.

Example: start=2023-06-06T12:09:18.211Z
end
required
string <date-time>

End date of time range to fetch data in ISO 8601 timestamp format.

Example: end=2023-06-07T12:09:18.211Z
numberOfSamples
integer [ 0 .. 1000 ]
Default: 20

The number of samples to take in the specified time range.

Example: numberOfSamples=20
metricType
required
Array of strings (MetricsType)

specifies what data to request

Items Enum: "TOTAL_GPU_NODES" "GPU_UTILIZATION" "GPU_UTILIZATION_DISTRIBUTION" "GPU_MEMORY_UTILIZATION" "CPU_UTILIZATION" "CPU_MEMORY_UTILIZATION" "TOTAL_GPU" "GPU_QUOTA" "ALLOCATED_GPU" "UNALLOCATED_GPU" "AVG_WORKLOAD_WAIT_TIME"
Responses
200

Executed successfully.

207

Partial success.

400

Bad request.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/api/v1/clusters/{clusterUuid}/metrics
Response samples
{
  • "measurements": [
    ]
}

Retrieve the installation instructions of a cluster by ID.

Use to retrieve installation instruction for a cluster by Universally Unique Identifier (UUID). Supports clusters version 2.15 or above.

SecuritybearerAuth
Request
path Parameters
clusterUuid
required
string <uuid> non-empty

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
version
required
string

The cluster version to install

Example: version=2.16
remoteClusterUrl
string

The remote URL of the runai cluster

Example: remoteClusterUrl=https://cluster.runai
Responses
200

Executed successfully.

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/api/v1/clusters/{clusterUuid}/cluster-install-info
Response samples
application/json
{
  • "installationStr": "helm update --update repo/runai-cluster -n runai --set cluster.url=test_cluster",
  • "repositoryName": "runai",
  • "clientSecret": "ABC333DDD"
}

Get cluster installation file by id.

Retrieve the installation values file of a cluster by Retrieve the installation values file of a given cluster by ID. Supports clusters 2.13 and lower.

SecuritybearerAuth
Request
path Parameters
cluster_uuid
required
string <uuid>

Unique identifier of the cluster.

query Parameters
cloud
string

Cloud type identifier.

Enum: "gke" "aws" "aks" "op" "airgapped" "openshift"
clusterip
string

Comma-separated list of IP addresses that provide access to the cluster.

format
string
Default: "yaml"

Format of the output file.

Enum: "json" "yaml"
Responses
200

OK

401

Unauthorized

404

The specified resource was not found

get/v1/k8s/clusters/{cluster_uuid}/installfile
Response samples
application/json
"string"

Get cluster metrics.Deprecated

Get current cluster metrics. If time range query parameters supplied, then historical data will be returned as well. Deprecated - please use api/v1/clusters/{clusterUuid}/metrics

SecuritybearerAuth
Request
path Parameters
clusterUuid
required
string <uuid> non-empty

The Universally Unique Identifier (UUID) of the cluster.

Example: 9f55255e-11ed-47c7-acef-fc4054768dbc
query Parameters
start
string <date-time>

Start of time range to fetch data from in UTC format.

Example: start=2023-06-06 12:09:18.211
end
string <date-time>

End of time range to fetch data from in UTC format.

Example: end=2023-06-07 12:09:18.211
numberOfSamples
integer [ 0 .. 1000 ]
Default: 20

The number of samples to take in the specified time range.

Example: numberOfSamples=20
nodepoolName
string

Filter by unique nodepool name.

Example: nodepoolName=default
Responses
200

A Clusters metrics

401

Unauthorized

403

Forbidden

404

The specified resource was not found

500

unexpected error

503

unexpected error

get/v1/k8s/clusters/{clusterUuid}/metrics
Response samples
application/json
{
  • "metadata": {
    },
  • "current": {
    },
  • "timeRange": {
    }
}