Rest API documentation

Get the list of clusters currently setup in PMK

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the cluster belongs to

GET /v4/{projectId}/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
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

projectIdstring

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
POST /v4/{projectId}/clusters/{uuid}/upgrade
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.

objectobject
metricsserverstring

metricsserver version used for the cluster

metallbstring

metallb version used for the cluster if applicable

dashboardstring

ks8 dashboard version used for the cluster if applicable

cnistring

cni version used for the cluster

luigistring

luigi version used for the cluster if applicable

kustomizestring

kustomize version used for the cluster

calicostring

calico version used for the cluster if applicable

kubevirtaddonstring

kubevirtaddon version used for the cluster if applicable

monitoringstring

monitoring version used for the cluster if applicable

kubernetesstring

kubernetes version used for the cluster

corednsstring

coredns version used for the cluster

cascapistring

cascapi version used for the cluster if applicable

flannelstring

flannel version used for the cluster if applicable

profileagentstring

profileagent version used for the cluster if applicable

metal3string

metal3 version used for the cluster if applicable

casazurestring

casazure version used for the cluster if applicable

etcdstring

etcd version used for the cluster

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.

objectobject
countinteger

Number of supported role versions

rolesarray[object]

List of supported role versions

uuidstring

UUID of the role

k8sMajorVersioninteger

major version of k8s for roleversion

k8sMinorVersioninteger

minor version of k8s for roleversion

k8sPatchVersioninteger

patch version of k8s for roleversion

pf9PatchVersioninteger

patch version of pf9 for roleversion

roleVersionstring

full version of the role

addonsDetailsstring

addons details containing names with their versions

metadatastring

metadata for the roleversion

supportedstring

shows the role is supported

Response
Copy

Get details of a cluster

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

projectIdstring

UUID of the project the cluster belongs to

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

OK

403

unauthorized to perform this operation

Update the properties of a cluster specified by the cluster_uuid

Auth
Headers
X-Auth-Tokenstring
Path Params
uuidstring

UUID of the cluster

projectIdstring

UUID of the project the cluster belongs to

Request Body
PUT /v4/{projectId}/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

projectIdstring

UUID of the project the cluster belongs to

DELETE /v4/{projectId}/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

projectIdstring

UUID of the project the cluster belongs to

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

OK

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

projectIdstring

UUID of the project the cluster belongs to

Query String
force_cert_authboolean

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

GET /v4/{projectId}/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

projectIdstring

UUID of the project the cluster belongs to

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

OK

objectobject
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

projectIdstring

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/{projectId}/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

projectIdstring

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/{projectId}/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 kubelet config

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the clusters belongs to

GET /v4/{projectId}/kubeletconfig
Copy
Responses application/json
200

OK

objectobject
sampleKubeletConfigobject
workerstring

Base64 encoded string of the sample kubelet config for worker nodes

masterstring

Base64 encoded string of the sample kubelet config for master nodes

customKubeletConfigarray[object]
clusterIdstring

Id of the cluster to which the config belongs

configarray[object]
configNamestring

Name of the configmap

configDatastring

Base64 encoded string of the kubelet config

rolestring

Role of the node for which the config is to be applied

nodeIpsarray[string]

List of IPs of the nodes for which the config is to be applied

applyAllboolean

Set to true if config is to be applied to all nodes

403

unauthorized to perform this operation

Response
Copy

Update the properties of kubelet config

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the clusters belongs to

Request Body
arrayarray[object]
clusterIdstring

Id of the cluster to which the config belongs

configarray[object]
configNamestring

Name of the configmap

configDatastring

Base64 encoded string of the kubelet config

rolestring

Role of the node for which the config is to be applied

nodeIpsarray[string]

List of IPs of the nodes for which the config is to be applied

applyAllboolean

Set to true if config is to be applied to all nodes

PUT /v4/{projectId}/kubeletconfig
Copy
Responses application/json
200

OK, if update request was submitted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Creates kubelet config for a cluster as configmap in sunpike

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the clusters belongs to

Request Body
arrayarray[object]
clusterIdstring

Id of the cluster to which the config belongs

configarray[object]
configNamestring

Name of the configmap

configDatastring

Base64 encoded string of the kubelet config

rolestring

Role of the node for which the config is to be applied

nodeIpsarray[string]

List of IPs of the nodes for which the config is to be applied

applyAllboolean

Set to true if config is to be applied to all nodes

POST /v4/{projectId}/kubeletconfig
Copy
Responses application/json
200

OK, if create request was submitted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Delete the kubelet config configmap

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project clusters belongs to

Request Body
arrayarray[object]
clusterIdstring

Id of the cluster to which the config belongs

configarray[string]

List of config names to be deleted

DELETE /v4/{projectId}/kubeletconfig
Copy
Responses application/json
200

OK, if delete request was submitted successfully

No response body
403

Unauthorized to perform this operation

Response
Copy

Update network backend and container cidr field post CNI migration

Auth
Headers
X-Auth-Tokenstring
Path Params
projectIdstring

UUID of the project the cluster belongs to

uuidstring

UUID of the cluster

Request Body
objectobject
networkPluginstring

Network backend to use for container networking post-migration(currently only cilium migration is supported)

containersCidrstring

CIDR used for container IP addresses

PUT /v4/{projectId}/clusters/{uuid}/update_cni_on_migration
Copy
Responses application/json
200

OK, if cluster upgrade request was submitted successfully

No response body
401

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
projectIdstring

UUID of the project the node belongs to

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

OK

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

projectIdstring

UUID of the project the node belongs to

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

OK

objectobject
namestring

Host name of the node

uuidstring

UUID of the node

primaryIpstring

IP address of the node

nodePoolNamestring

Name of the node pool, the node belongs to

nodePoolUuidstring

UUID of the node pool, the node belongs to

cloudProviderTypestring

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

cloudProviderUuidstring

UUID of the cloud provider used to create the cluster

cloudInstanceIdstring

UUID of the cloud instance used to create the cluster

clusterNamestring

Name of the cluster the node belongs to

clusterUuidstring

UUID of the cluster the node belongs to

projectIdstring

UUID of the project the node belongs to

actualKubeRoleVersionstring

actual version of the kube role on the node

clusterKubeRoleVersionstring

Kube version of the cluster the node belongs to

isMasterinteger

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

api_respondinginteger

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

statusstring

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

masterlessinteger

1 indicates the node is a masterless node. 0 otherwise

startKubeinteger

1 indicates kube to be installed on the node . 0 otherwise

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

projectIdstring

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/{projectId}/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
projectIdstring

UUID of the project the cloud provider belongs to

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

OK

arrayarray[object]
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
projectIdstring

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/{projectId}/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
projectIdstring

UUID of the project the cloud provider belongs to

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

OK

objectobject
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

projectIdstring

UUID of the project the cloud provider belongs to

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

OK

objectobject
Regionsarray[object]

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

projectIdstring

UUID of the project the cloud provider account belongs to

DELETE /v4/{projectId}/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

projectIdstring

UUID of the project the cloud provider belongs to

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

OK

objectobject
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

projectIdstring

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/{projectId}/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
projectIdstring

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/{projectId}/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
projectIdstring

UUID of the project the node pool belongs to

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

OK

arrayarray[object]
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

User Role Cache

Sync/Update the qbert tenant user role cache for a user by user id

Auth
Headers
X-Auth-Tokenstring
Path Params
useridstring

Userid of the User for which the sync is required

PUT /v4/users/{userid}
Copy
Responses application/json
200

OK, if the cache gets synced/updated successfully

No response body
Response
Copy