V2 API Specification
- 1 Projects API
- 1.1 POST
- 1.1.1 POST
- 1.2 GET, DELETE
- 1.2.1 GET, DELETE
- 1.2.2 GET, DELETE
- 1.1 POST
- 2 Composite Application API
- 2.1.1 POST
- 2.1.1.1 POST
- 2.1.2 GET, DELETE
- 2.1.2.1 GET, DELETE
- 2.1.1 POST
- 2.2 Adding applications to composite app
- 2.2.1 POST
- 2.2.1.1 POST
- 2.2.2 GET, DELETE
- 2.2.2.1 GET, DELETE
- 2.2.1 POST
- 3 Profile API
- 3.1.1 POST
- 3.1.1.1 POST
- 3.1.2 GET, DELETE
- 3.1.2.1 GET, DELETE
- 3.1.1 POST
- 3.2 Adding profile per application
- 3.2.1 POST
- 3.2.1.1 POST
- 3.2.2 GET, DELETE
- 3.2.2.1 GET, DELETE
- 3.2.1 POST
- 4 Generic Placement Intent API
- 4.1.1 POST
- 4.1.1.1 POST
- 4.1.2 GET, DELETE
- 4.1.2.1 Get, Delete
- 4.1.1 POST
- 4.2 Adding placement intent for each application in the composite-app
- 4.2.1 POST
- 4.2.1.1 POST
- 4.2.2 GET, DELETE
- 4.2.2.1 Get, Delete
- 4.2.1 POST
- 5 Deployment Intent Group API
- 5.1.1 POST
- 5.1.1.1 POST
- 5.1.2 GET, DELETE
- 5.1.2.1 Get, Delete
- 5.1.1 POST
- 5.2 Adding intents to an Intent group
- 5.2.1 POST
- 5.2.1.1 POST
- 5.2.2 GET, DELETE
- 5.2.2.1 Get, Delete
- 5.2.1 POST
- 6 Instantiation, Destroy, Status API
- 7 Cluster Registration API
- 7.1.1 POST
- 7.1.1.1 POST
- 7.1.1.2 Get, Delete
- 7.1.2 POST
- 7.1.2.1 POST
- 7.1.2.2 Get, Delete
- 7.1.1 POST
- 7.2 Add Label to a cluster
- 7.2.1 POST
- 7.2.1.1 POST
- 7.2.2 GET, DELETE
- 7.2.2.1 Get, Delete
- 7.2.1 POST
- 7.3 Add key-value pair to a cluster
- 7.3.1 POST
- 7.3.1.1 POST
- 7.3.2 GET, DELETE
- 7.3.2.1 Get, Delete
- 7.3.1 POST
- 8 Orchestrator Controller Registration API
- 8.1 POST
- 8.1.1 POST
- 8.2 GET, DELETE
- 8.2.1 GET, DELETE
- 8.2.2 POST
- 8.1 POST
Projects API
The project allows multi-tenancy in the application from a user perspective.
POST
POST
POST
URL: /v2/projects
POST BODY:
{
"metadata": {
"name": "<name>",
"description": "<description>",
"userData1": "<user data>",
"userData2": "<user data>"
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata": {
"name": ""<name>",
"description": "<description>",
"userData1": "<user data>",
"userData2": "<user data>"
}
}GET, DELETE
GET, DELETE
GET
URL: /v2/projects/{project-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata": {
"name": "<name>",
"description": "<description>",
"userData1": "<user data>",
"userData2": "<user data>"
}
}
DELETE
URL: /v2/projects/{project-name}
RETURN STATUS: 204
GET, DELETE
GET
URL: /v2/projects/{project-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata": {
"name": "<name>",
"description": "<description>",
"userData1": "<user data>",
"userData2": "<user data>"
}
}
DELETE
URL: /v2/projects/{project-name}
RETURN STATUS: 204
Composite Application API
Composite Application names are unique within a Project. Composite application resource represents a collection of applications and each application is represented by helm charts. Each Helm chart is wrapped in tar.gz format.
POST
POST
URL: /v2/projects/{project-name}/composite-apps
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"version":"<version of the composite app>"
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"version":"<version of the composite app>"
}
}GET, DELETE
GET, DELETE
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"version":"<version of the composite app>"
}
}
DELETE
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}
RETURN STATUS: 204Adding applications to composite app
Format of the Helm chart for the application wrapped in tar.gz
|
POST
This POST is a multipart POST. With the POST body containing the data about the application and the tar.gz uploaded in multipart form.
POST
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/apps
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}GET, DELETE
GET, DELETE
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/apps/{app-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
Multipart response containing the tar.gz of the Helm chart for the app
DELETE
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/apps/{app-name}
RETURN STATUS: 204Profile API
Once the definitions for applications are created, profiles are created to customize the applications. Later on, they are instantiated in Kubernetes by the instantiation API.
POST
POST
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{verison}/composite-profiles
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}GET, DELETE
GET, DELETE
GET
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/composite-profiles/{composite-profile-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
DELETE
URL: /v2/projects/{project-name}/composite-apps/{app-name}/{app-version}/composite-profiles/{composite-profile-name}
RETURN STATUS: 204Adding profile per application
A per application profile contains the following:
manifest.yaml
Contains the details for the profile and everything contained within
A HELM values override yaml file.
It can have any name as long as it matches the corresponding entry in the manifest.yaml
Any number of files organized in a folder structure
All these files should have a corresponding entry in manifest.yaml file
Sample Profile is described below:
Create the profile artifact
Creating a Profile Artifact
1 |
|
The manifest file contains the following:
manifest.yaml
1 |
|
POST
This POST is a multipart POST. With the POST body containing the data about the profile and the profile tar.gz uploaded in multipart form.
POST
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{verison}/composite-profiles/{composite-profile-name}/profiles
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"app-name": "<name>", // Must match the name given in composite-apps/apps API
}
}
Multipart request containg tar.gz of the profile
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"app-name": "<name>", // Must match the name given in composite-apps/apps API
}
}GET, DELETE
GET, DELETE
GET
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/composite-profiles/{composite-profile-name}/profiles/{profile-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"app-name": "<name>", // Must match the name given in composite-apps/apps API
}
}
Multipart response containing the tar.gz of the profile
GET (Query)
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/composite-profiles/{composite-profile-name}/profiles?app-name=<app-name>
RETURN STATUS: 200
RETURN BODY:
{
"app-name": "<name>"
}
Multipart response containing the tar.gz of the profile
DELETE
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/composite-profiles/{composite-profile-name}/profiles/{profile-name}
RETURN STATUS: 204Generic Placement Intent API
Generic Placement Intent API is used to create generic placement intents for sub-applications in an application. Intent created using this API will be added to an Intent Group for use during instantiation.
POST
POST
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intents
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"logical-cloud": "logical-cloud-name" //name of logical cloud to use for instantiation. The DCM API will provide the list of clusters that are part of the logical-cloud
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"logical-cloud": "logical-cloud-name" //name of logical cloud to use for instantiation. The DCM API will provide the list of clusters that are part of the logical-cloud
}
}GET, DELETE
Get, Delete
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intents/{intent-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"logical-cloud": "logical-cloud-name" //name of logical cloud to use for instantiation. The DCM API will provide the list of clusters that are part of the logical-cloud
}
}
DELETE
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intents/{intent-name}
RETURN STATUS: 204
Adding placement intent for each application in the composite-app
POST
POST
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/app-intents
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"app-name":"name",
"intent":{
"allOf":[
{
"provider-name":"aws"
"cluster-name":"edge1"
},
{
"provider-name":"aws"
"cluster-name":"edge2"
},
{
"anyOf":[
{
"provider-name":"aws"
"cluster-label-name":"east-us1"
},
{
"provider-name":"aws"
"cluster-label-name":"east-us2"
}
]
}
]
}
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"app-name":"name",
"intent":{
"allOf":[
{
"provider-name":"aws"
"cluster-name":"edge1"
},
{
"provider-name":"aws"
"cluster-name":"edge2"
},
{
"anyOf":[
{
"provider-name":"aws"
"cluster-label-name":"east-us1"
},
{
"provider-name":"aws"
"cluster-label-name":"east-us2"
}
]
}
]
}
}
}GET, DELETE
Get, Delete
GET
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/app-intents
RETURN STATUS: 200
RETURN BODY:
{
"applications":[
{
"name":"app1",
"anyOf":[
{
"provider-name":"aws"
"cluster-name":"edge1"
},
{
"provider-name":"aws"
"cluster-name":"edge2"
}
]
},
{
"name":"app2",
"allOf":[
{
"provider-name":"aws"
"cluster-name":"edge1"
},
{
"provider-name":"aws"
"cluster-name":"edge2"
}
]
},
{
"name":"app3",
"allOf":[
{
"provider-name":"aws"
"cluster-name":"edge1"
},
{
"provider-name":"aws"
"cluster-name":"edge2"
},
{
"anyOf":[
{
"provider-name":"aws"
"cluster-label-name":"east-us1"
},
{
"provider-name":"aws"
"cluster-label-name":"east-us2"
}
]
}
]
}
]
}
GET
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/app-intents/{intent-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"app-name":"name",
"intent":{
"allOf":[
{
"provider-name":"aws"
"cluster-name":"edge1"
},
{
"provider-name":"aws"
"cluster-name":"edge2"
},
{
"anyOf":[
{
"provider-name":"aws"
"cluster-label-name":"east-us1"
},
{
"provider-name":"aws"
"cluster-label-name":"east-us2"
}
]
}
]
}
}
}
GET (Query)
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/app-intents?app-name=<app-name>
RETURN STATUS: 200
RETURN BODY:
{
"intent":{
"allOf":[
{
"provider-name":"aws"
"cluster-name":"edge1"
},
{
"provider-name":"aws"
"cluster-name":"edge2"
},
{
"anyOf":[
{
"provider-name":"aws"
"cluster-label-name":"east-us1"
},
{
"provider-name":"aws"
"cluster-label-name":"east-us2"
}
]
}
]
}
}
DELETE
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/apps-intents/{intent-name}
RETURN STATUS: 204
Deployment Intent Group API
Deployment Intent Group API is used to create Intent Groups that can then will be used at instantiation time. Some intents that can be part of an Intent Group are Generic Placement Intent, HPA Intent, and traffic controller Intent.
POST
POST
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"profile":"<profile-name>",
"version":"<version of the deployment>",
"override-values":[
{
"app-name":"<name>",
"values":[
{
"imageRepository":"registry.hub.docker.com"
}
]
},
{
"app-name":"<name>",
"values":[
{
"imageRepository":"registry.hub.docker.com"
}
]
}
]
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"profile":"<profile-name>",
"version":"<version of the deployment>",
"override-values":[
{
"app-name":"<name>",
"values":[
{
"imageRepository":"registry.hub.docker.com"
}
]
},
{
"app-name":"<name>",
"values":[
{
"imageRepository":"registry.hub.docker.com"
}
]
}
]
}
}GET, DELETE
Get, Delete
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"profile":"<profile-name>",
"version":"<version of the deployment>",
"status": "approved", // approved or not-approved
"override-values":[
{
"app-name":"<name>",
"values":
{
"imageRepository":"registry.hub.docker.com",
"another_key":"another_value"
}
},
{
"app-name":"<name>",
"values":
{
"imageRepository":"registry.hub.docker.com",
"another_key":"another_value"
}
}
]
}
}
DELETE
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}
RETURN STATUS: 204
Adding intents to an Intent group
POST
POST
URL: v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/intents
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"intent":{
"generic-placement-intent":"xyz-generic-placement-intent"
}
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"intent":{
"generic-placement-intent":"xyz-generic-placement-intent"
}
}
}GET, DELETE
Get, Delete
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/intents/{intent-name}
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"intent":{
"generic-placement-intent":"xyz-generic-placement-intent"
}
}
}
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/intents
RETURN STATUS: 200
RETURN BODY:
{
"intent":[
{
"generic-placement-intent":"generic-placement-intent-name"
},
{
"hpa":"hpa-placement-intent-name"
},
{
"traffic":"traffic-intent-name"
}
]
}
GET (Query)
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/intents?intent=<intent>
{
"generic-placement-intent":"xyz-generic-placement-intent"
}
DELETE
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/intents/{intent-name}
RETURN STATUS: 204
Instantiation, Destroy, Status API
Instantiation API to instantiate composite app based on intent-group. Destroy API deletes the app and Status API returns the resources
POST
POST
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/approve
POST BODY:
{
}
RETURN STATUS: 201
RETURN BODY:
{
}
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/instantiate
POST BODY:
{
}
RETURN STATUS: 201
RETURN BODY:
{
}
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/destroy
POST BODY:
{
}
RETURN STATUS: 201
RETURN BODY:
{
}
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/status
POST BODY:
{
}
RETURN STATUS: 201
RETURN BODY:
{
"name": "<name>",
"composite-app-name": "test-app",
"composite-app-version": "v1",
"profile-name": "test-app-profile",
"intent-group": "intent-group-1"
"namespace": "testinstallns",
"resources":
[
{
"app-name": "collectd",
"clusters": [
{
"name": "cluster1",
"resources": [
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo",
"status": "Running"
},
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo-read",
"status": "Terminated"
}
]
}
]
}
]
Status Queries:
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/status?output=<output-type>&app=<app-name>&cluster=<cluster-name>&resource=<resource-name>
output-type can be small or full.
Query can be a combination of the app, cluster and resources.
Cluster Registration API
API to support Reachability for a Kubernetes Cloud. This API will be used to upload configuration information for the cluster
POST
POST
URL: /v2/cluster-providers
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
GET, DELETE
Get, Delete
GET
URL: /v2/cluster-providers/{provider-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
DELETE
URL: /v2/cluster-providers/{provider-name}
RETURN STATUS: 204
POST
This POST is a multipart POST. With the POST body containing the data about the cluster and the kubeconfig uploaded in multipart form.
POST
URL: /v2/cluster-providers/{provider-name}/clusters
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
GET, DELETE
Get, Delete
GET
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
}
}
DELETE
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}
RETURN STATUS: 204
Add Label to a cluster
POST
POST
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}/labels
POST BODY:
{
“label-name” : “<label>”
}
RETURN STATUS: 201
RETURN BODY:
{
“label-name” : “<label>”
}GET, DELETE
Get, Delete
GET
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}/labels/<label>
RETURN STATUS: 200
RETURN BODY:
{
“label-name” : “<label>”
}
GET (Query)
URL: /v2/cluster-providers/{provider-name}/clusters?label=<label>
RETURN STATUS: 200
RETURN BODY:
[<list of clusters>]
DELETE
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}/labels/<label>
RETURN STATUS: 204
Add key-value pair to a cluster
Add property to a cluster without the need for change to the API.
POST
POST
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}/kv-pairs
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"kv":[
{
"key1":"val1"
},
{
"key2":"val2"
}
]
}
}
RETURN STATUS: 201
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"kv":[
{
"key1":"val1"
},
{
"key2":"val2"
}
]
}
}GET, DELETE
Get, Delete
GET
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}/kv-pairs/<name>
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"kv":[
{
"key1":"val1"
},
{
"key2":"val2"
}
]
}
}
GET (Query)
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}/kv-pairs/<name>?key=<key>
RETURN STATUS: 200
RETURN BODY:
{
"value": "<value>"
}
DELETE
URL: /v2/cluster-providers/{provider-name}/clusters/{cluster-name}/kv-pairs/<name>
RETURN STATUS: 204
Orchestrator Controller Registration API
This API allows controllers to register themselves as gRPC servers consumed by the orchestrator.
POST
POST
POST/PUT
URL: /v2/controllers
POST BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"host": "10.7.100.4",
"port": 9029,
"type": "<type of controller>, // placement, action are 2 types supported
"priority": 2
}
}GET, DELETE
GET, DELETE
GET
URL: /v2/controllers/{controller-name}
RETURN STATUS: 200
RETURN BODY:
{
"metadata":{
"name":"<name>",
"description":"<description>",
"userData1":"<user data>",
"userData2":"<user data>"
},
"spec":{
"host": "10.7.100.4",
"port": 9029,
"type": "<type of controller>,
"priority": 2
}
}
DELETE
URL: /v2/controllers/{controller-name}
RETURN STATUS: 204Example CURL Command:
POST
curl -X GET "http://10.7.100.1:9015/v2/controllers/hpa-placement-controller" -H "accept: */*" -H "Content-Type: application/json"
curl -X DELETE "http://10.7.100.1:9015/v2/controllers/hpa-placement-controller" -H "accept: */*"