You are viewing an older version. Click here to view the latest

Rest API documentation

Creates a cluster using auto deploy or manual mode

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the cluster belongs to

Request Body
POST /v4/{projectId}/clusters
Responses application/json
200

OK, if cluster create request was submitted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Upgrade a cluster, identified by the uuid

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cloud provider account belongs to

Query String
typestring

Type of upgrade minor or patch

forceboolean

(optional)Forcefully upgrade cluster to version. Default is false.

Request Body
objectobject
batchUpgradePercentnumber

Number between 1-100 which represents the percent of worker nodes to upgrade in parallel at once during an upgrade

batchUpgradeNodesarray[string]

List of worker nodes uuids to upgrade in parallel at once during an upgrade

containerRuntimestring

(optional) Container runtime for this cluster. Valid values: [docker, containerd]

addonOperatorImageTagstring

(optional) addon operator image tag for this cluster.

addonVersionsobject
corednsstring

coredns version

dashboardstring

dashboard version

dns-autoscalerstring

dns-autoscaler version

kubevirtstring

kubevirt version

luigistring

luigi version

metal3string

metal3 version

metallbstring

metallb version

metricsserverstring

metricsserver version

monitoringstring

monitoring version

profileagentstring

profileagent version

cluster-autoscaler-awsstring

cluster-autoscaler-aws version

cluster-autoscaler-azurestring

cluster-autoscaler-azure version

POST /v4/{project_uuid}/clusters/{uuid}/upgrade
Copy
Responses application/json
200

OK, if upgrade request is successfully issued

No response body
403

Unauthorized to perform this operation

Response
Copy

Delete all cluster addons for a PMK cluster as specified by the cluster UUID

Auth
Headers
X-Auth-Tokenstring
Path Params
clusterIdstring

UUID of the cluster

projectIdstring

UUID of the project the cluster belongs to

DELETE /v4/{projectId}/clusters/{clusterId}/addons
Copy
Responses application/json
200

OK, if clusteraddons delete request was submitted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Provides a list of addon version for pf9-kube role on a cluster.

Auth
Headers
X-Auth-Tokenstring
Path Params
clusterIdstring

UUID of the cluster

projectIdstring

UUID of the project the cluster belongs to

GET /v4/{projectId}/clusters/{clusterId}/addonversions
Copy
Responses application/json
200

OK, List of addon versions.

No response body
Response
Copy

Provides a list of supported pf9-kube roles for a cluster.

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the cluster belongs to

GET /v4/{projectId}/clusters/supportedRoleVersions
Copy
Responses application/json
200

OK, List of supported roles versions.

No response body
Response
Copy

Get the list of clusters currently setup in PMK

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the cluster belongs to

GET /v4/{project_uuid}/clusters
Copy
Responses application/json
200

OK

403

unauthorized to perform this operation

Response
Copy

Get details of a cluster

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cluster belongs to

GET /v4/{project_uuid}/clusters/{uuid}
Copy
Responses application/json
200

OK

403

unauthorized to perform this operation

Response
Copy

Update the properties of a cluster specified by the cluster_uuid

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cluster belongs to

Request Body
PUT /v4/{project_uuid}/clusters/{uuid}
Copy
Responses application/json
200

OK, if cluster upgrade request was submitted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Delete a cluster from PMK as specified by the cluster UUID

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cluster belongs to

DELETE /v4/{project_uuid}/clusters/{uuid}
Copy
Responses application/json
200

OK, if cluster delete request was submitted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Get nodes of a cluster

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cluster belongs to

GET /v4/{project_uuid}/clusters/{uuid}/nodes
Copy
Responses application/json
200

OK

cloudProviderTypestring

Type of cloud provider, such as local or aws used to create the cluster

clusterNamestring

Name of the cluster the node belongs to

clusterUuidstring

UUID of the cluster the node belongs to

namestring

Host name of the node

uuidstring

UUID of the node

api_respondinginteger

1 indicates the API server on this node is running. 0 otherwise. Applicable only if isMaster is 1

primaryIpstring

IP address of the node

statusstring

Status of the node. States include “ok”, ”converging”, “failed”. These states indicate the current state of kubernetes setup on the host.

isMasterinteger

1 if this node is a master of a custer. 0 otherwise.

nodePoolNamestring

Name of the node pool, the node belongs to

nodePoolUuidstring

UUID of the node pool, the node belongs to

projectIdstring

UUID of the project the node belongs to

403

unauthorized to perform this operation

Response
Copy

Get the kubeconfig blob for the specific cluster

Auth
Headers
X-Auth-Tokenstring
Path Params
cluster_uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cluster belongs to

Query String
force_cert_authboolean

If true, generates certificate based kubeconfig. Default is false.

GET /v4/{project_uuid}/kubeconfig/{cluster_uuid}
Copy
Responses application/octet-stream
200

The response is a blob sent with the Content-Type ‘application/octet-stream’

No response body
403

Unauthorized to perform this operation

Response
Copy

Generate token to be used by web cli

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cluster belongs to

POST /v4/{project_uuid}/webcli/{uuid}
Copy
Responses application/json
200

OK

tokenstring

Web cli token

403

Unauthorized to perform this operation

Response
Copy

Attach nodes to a cluster. In a manual deployed cluster, nodes can be added to a cluster using this API. If the cluster has no masters, multiple masters can be attached simultaneously.

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cluster belongs to

Request Body
arrayarray[object]
uuidstring

UUID of the node

isMasterboolean

true if the node should be attached as master, false otherwise.

POST /v4/{project_uuid}/clusters/{uuid}/attach
Copy
Responses application/json
200

OK, if the node get attached to the cluster

No response body
403

Unauthorized to perform this operation

Response
Copy

Detach nodes from a cluster. In a manual deployed cluster, nodes can be removed from a cluster using this API.

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

project_uuidstring

UUID of the project the cluster belongs to

Request Body
arrayarray[object]
uuidstring

UUID of the node

isMasterboolean

true if the node should be attached as master, false otherwise.

POST /v4/{project_uuid}/clusters/{uuid}/detach
Copy
Responses application/json
200

OK, if the node get attached to the cluster

No response body
403

Unauthorized to perform this operation

Response
Copy

Get all supported cluster addon versions for a PMK cluster as specified by the cluster UUID

Auth
Headers
X-Auth-Tokenstring
Path Params
clusterIdstring

UUID of the cluster

projectIdstring

UUID of the project the cluster belongs to

DELETE /v4/{projectId}/clusters/{clusterId}/suppotedaddonversions
Copy
Responses application/json
200

OK, if supported addon versions are fetched successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Get all supported addon-operator tags for a PMK cluster as specified by the cluster UUID

Auth
Headers
X-Auth-Tokenstring
Path Params
clusterIdstring

UUID of the cluster

projectIdstring

UUID of the project the cluster belongs to

DELETE /v4/{projectId}/clusters/{clusterId}/supportedaddonoperatorversions
Copy
Responses application/json
200

OK, if supported addon-operator versions are fetched successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Provides a list of all the external clusters available to be added to management plane

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the cluster belongs to

GET /v4/{projectId}/externalClusters/discover
Copy
Responses application/json
200

OK, List of external clusters.

No response body
Response
Copy

Registers an external cluster

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the cluster belongs to

Request Body
objectobject
idstring

An unique cluster idenfier

providerstring

Name of the external K8S cluster provider service

cloudProviderIDstring

UUID of a cloud provider in PF9

providerDetailsobject

A dynamic field to include cloud specific parameters. For example, for EKS, we need the region to be able to register a cluster

POST /v4/{projectId}/externalClusters/register
Copy
Responses application/json
200

OK, if cluster create request was submitted successfully

No response body
403

Unauthorized to perform this operation

404

Cluster could not be founds

409

Cluster already registered

Response
Copy

Deregister an external cluster

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the cluster belongs to

POST /v4/{projectId}/externalClusters/:clusterID/deregister
Copy
Responses application/json
200

OK, if cluster create request was submitted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Get the deployment YAML for a private external cluster

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the cluster belongs to

GET /v4/{projectId}/externalClusters/:clusterID/deploymentYAML
Copy
Responses application/octet-stream
200

OK, if cluster create request was submitted successfully

No response body
403

Unauthorized to perform this operation

404

Cluster or the cluster agent could not be found

Response
Copy

List all the nodes in a project identified by the project UUID

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the node belongs to

GET /v4/{project_uuid}/nodes
Copy
Responses application/json
200

OK

arrayarray
cloudProviderTypestring

Type of cloud provider, such as local or aws used to create the cluster

clusterNamestring

Name of the cluster the node belongs to

clusterUuidstring

UUID of the cluster the node belongs to

namestring

Host name of the node

uuidstring

UUID of the node

api_respondinginteger

1 indicates the API server on this node is running. 0 otherwise. Applicable only if isMaster is 1

primaryIpstring

IP address of the node

statusstring

Status of the node. States include “ok”, ”converging”, “failed”. These states indicate the current state of kubernetes setup on the host.

isMasterinteger

1 if this node is a master of a custer. 0 otherwise.

nodePoolNamestring

Name of the node pool, the node belongs to

nodePoolUuidstring

UUID of the node pool, the node belongs to

projectIdstring

UUID of the project the node belongs to

403

unauthorized to perform this operation

Response
Copy

Get details of a specific node in project, identified by the UUID

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the node

project_uuidstring

UUID of the project the node belongs to

GET /v4/{project_uuid}/nodes/{uuid}
Copy
Responses application/json
200

OK

cloudProviderTypestring

Type of cloud provider, such as local or aws used to create the cluster

clusterNamestring

Name of the cluster the node belongs to

clusterUuidstring

UUID of the cluster the node belongs to

namestring

Host name of the node

uuidstring

UUID of the node

api_respondinginteger

1 indicates the API server on this node is running. 0 otherwise. Applicable only if isMaster is 1

primaryIpstring

IP address of the node

statusstring

Status of the node. States include “ok”, ”converging”, “failed”. These states indicate the current state of kubernetes setup on the host.

isMasterinteger

1 if this node is a master of a custer. 0 otherwise.

nodePoolNamestring

Name of the node pool, the node belongs to

nodePoolUuidstring

UUID of the node pool, the node belongs to

projectIdstring

UUID of the project the node belongs to

403

unauthorized to perform this operation

Response
Copy

Updates the properties of the node specified by the node UUID

Currently, only the cluster property for a node can be modified and its primary usage is to detach a node from a cluster. The node, if needed, can be reattached to another cluster by using the cluster’s attach API

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the node

project_uuidstring

UUID of the project the nodes belongs to

Request Body
objectobject
clusterUuidstring

Value of this field must be set to null to detach the node

PUT /v4/{project_uuid}/nodes/{uuid}
Copy
Responses application/json
200

OK, if the node gets deattached from the cluster

No response body
403

Unauthorized to perform this operation

Response
Copy

Get the list of the cloud provider accounts currently setup in a project identified by project UUID

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the cloud provider belongs to

GET /v4/{project_uuid}/cloudProviders
Copy
Responses application/json
200

OK

arrayarray
namestring

Name of the cloud provider account

uuidstring

UUID of the cloud provider account

typestring

Type of the cloud provider account

nodePoolUuidstring

UUID of the associated node pool

403

unauthorized to perform this operation

Response
Copy

Add a cloud provider account

Note that by default, there is one “local” cloud provider, which is used for building clusters manually. Currently, AWS is the only supported cloudProvider, other than the “local” provider.

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the cloud provider account belongs to

Request Body
objectobject
namestring

Name of the cloud provider account

typestring

Type of the cloud provider account

keystring

Cloud access key

secretstring

Cloud secret key

POST /v4/{project_uuid}/cloudProviders
Copy
Responses application/json
200

OK, if the cloud provider gets created successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Get all available cloud provider types, in a project identified by project UUID

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the cloud provider belongs to

GET /v4/{project_uuid}/cloudProvider/types
Copy
Responses application/json
200

OK

typestring

Cloud provider type. Examples are 'aws','local'

403

unauthorized to perform this operation

Response
Copy

Get the details for cloud provider account identified by the account_uuid

This is applicable only for public cloud providers

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cloud provider

project_uuidstring

UUID of the project the cloud provider belongs to

GET /v4/{project_uuid}/cloudProviders/{uuid}
Copy
Responses application/json
200

OK

Regionsarray

Regions belonging to the provider

Endpointstring

endpoint of the region

RegionNamestring

name of the region

403

unauthorized to perform this operation

Response
Copy

Delete a cloud provider account specified by account uuid

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cloud provider

project_uuidstring

UUID of the project the cloud provider account belongs to

DELETE /v4/{project_uuid}/cloudProviders/{uuid}
Copy
Responses application/json
200

OK, if the cloud provider gets deleted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Get the details for a region in a particular cloud provider account identified by the account_uuid

This is applicable only for public cloud providers

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cloud provider

regionidstring

Name of the region

project_uuidstring

UUID of the project the cloud provider belongs to

GET /v4/{project_uuid}/cloudProviders/{uuid}/region/{regionid}
Copy
Responses application/json
200

OK

azsarray[object]

The list of availability zones in the region

domainsarray[object]

The list of hosting domains

flavorsarray[object]

The list of instance flavors supported in the region

keyPairsarray[object]

The list of ssh key pairs in the region

operatingSystemsarray[object]

The list of operating systems available in the region

vpcsarray[object]

The list of virtual private networks available in the region

403

unauthorized to perform this operation

Response
Copy

Add ssh key to a cloud provider region

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cloud provider

regionidstring

Name of the region

project_uuidstring

UUID of the project the cloud provider belongs to

Request Body application/json
objectobject
namestring

Name of the key

keystring

Contents of the key

POST /v4/{project_uuid}/cloudProviders/{uuid}/region/{regionid}/sshKey
Copy
Responses application/json
200

OK

No response body
400

Key is not in valid OpenSSH public key format

403

unauthorized to perform this operation

Response
Copy

Validate a cloud provider account

Validate a cloud provider credentials before adding it

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the cloud provider account belongs to

Request Body
objectobject
namestring

Name of the cloud provider account

typestring

Type of the cloud provider account

keystring

Cloud access key

secretstring

Cloud secret key

POST /v4/{project_uuid}/cloudProviders/validate
Copy
Responses application/json
200

OK, if the cloud provider gets created successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Update a cloud provider account specified by account uuid

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cloud provider

Request Body
objectobject
namestring

Name of the cloud provider account

keystring

Cloud access key

secretstring

Cloud secret key

PUT /v4/cloudProviders/{uuid}
Copy
Responses application/json
200

OK, if the cloud provider gets upddated successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Get details of all node pools

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the node pool belongs to

GET /v4/{project_uuid}/nodePools
Copy
Responses application/json
200

OK

arrayarray
namestring

Name of the node pool

uuidstring

UUID of the node pool

cloudProviderUuidstring

UUID of the associated cloud provider

cloudProviderNamestring

Name of the associated cloud provider

403

unauthorized to perform this operation

Response
Copy