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

Rest API documentation

Server
<account>.platform9.net
Server Variables

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 /v3/{project_uuid}/nodes
Copy
Responses application/json
200

OK

arrayarray
actualKubeRoleVersionstring

Kube version of the node

cloudInstanceIdstring

cloud instance id of the node

cloudProviderTypestring

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

cloudProviderUuidstring

UUID of the cloud provider

clusterNamestring

Name of the cluster the node belongs to

clusterUuidstring

UUID of the cluster the node belongs to

clusterKubeRoleVersionstring

Kube role version of the cluster

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

startKubeinteger

Indicates whether Kube has started (1 to indicate active and 0 otherwise)

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 cluster. 0 otherwise

masterlessinteger
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 /v3/{project_uuid}/nodes/{uuid}
Copy
Responses application/json
200

OK

actualKubeRoleVersionstring

Kube version of the node

cloudInstanceIdstring

cloud instance id of the node

cloudProviderTypestring

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

cloudProviderUuidstring

UUID of the cloud provider

clusterNamestring

Name of the cluster the node belongs to

clusterUuidstring

UUID of the cluster the node belongs to

clusterKubeRoleVersionstring

Kube role version of the cluster

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

startKubeinteger

Indicates whether Kube has started (1 to indicate active and 0 otherwise)

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 cluster. 0 otherwise

masterlessinteger
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 /v3/{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 /v3/{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

nodePoolNamestring

Name of the associated node pool

projectIDstring

UUID of the cloud provider

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, the supported cloudProviders are AWS,Azure,GCP 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 /v3/{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 /v3/{project_uuid}/cloudProvider/types
Copy
Responses application/json
200

OK

typestring

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

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 /v3/{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

OptInStatusstring

Indicates whether opt-in is required or not

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 /v3/{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 /v3/{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 /v3/{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 /v3/{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 /v1/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 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 /v3/{project_uuid}/clusters
Copy
Responses application/json
200

OK

403

unauthorized to perform this operation

Response
Copy

Creates a cluster using auto deploy or manual mode

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the cluster belongs to

Request Body
POST /v3/{project_uuid}/clusters
Responses application/json
200

OK, if cluster create request was submitted successfully

No response body
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 /v3/{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 /v3/{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 /v3/{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 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 /v3/{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 /v3/{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 /v3/{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 /v3/{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

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

Request Body
objectobject
batchUpgradePercentnumber

Number between 1-100 which represents the percent of worker nodes 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 /v3/{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

Restart PMK service on all nodes in 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

POST /v3/{project_uuid}/clusters/{uuid}/restart
Copy
Responses application/json
200

OK, if restart request is successfully issued

No response body
403

Unauthorized to perform this operation

Response
Copy

Restart PMK service on all worker nodes in 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

POST /v3/{project_uuid}/clusters/{uuid}/restartWorkers
Copy
Responses application/json
200

OK, if restart request is successfully issued

No response body
403

Unauthorized to perform this operation

Response
Copy

Restart PMK service on all master nodes in 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

POST /v3/{project_uuid}/clusters/{uuid}/restartMasters
Copy
Responses application/json
200

OK, if restart request is successfully issued

No response body
403

Unauthorized to perform this operation

Response
Copy

Get list of nodes on which PMK service is getting restarted

Auth
Headers
X-Auth-Tokenstring
Path Params
project_uuidstring

UUID of the project the cloud provider account belongs to

GET /v3/{project_uuid}/currentRollingRestarts
Copy
Responses application/json
200

OK

arrayarray
namestring

UUID of the node

runStateboolean

True if the node is up

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 /v3/{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