The following document describes the v2 api for the scheduler.
Tip |
---|
For the V1 API, please refer to MultiCloud K8s-Plugin-service API |
Projects API
Projects API
The project allows Projects are new concept that has been introduced in the v2 api. They allow multi-tenancy in the application from a user perspective.
...
Code Block |
---|
language | bash |
---|
title | POST |
---|
linenumbers | true |
---|
|
POST
URL: /v2/projectprojects
POST BODY:
{
"name": "Name of Project" //must be unique
"description": "<description>"
}
RETURN STATUS: 201
RETURN BODY:
{
name: "name of the project"
} |
...
Code Block |
---|
language | bash |
---|
title | GET, DELETE |
---|
linenumbers | true |
---|
|
GET
URL: /v2/projectprojects/{project-name}
RETURN STATUS: 200
RETURN BODY:
{
"name": "Name of Project" //must be unique
"description": "<description>"
}
DELETE
URL: /v2/projectprojects/{project-name}
RETURN STATUS: 204 |
Resource Bundle API
The resource bundle API is now keyed off the Project API
Composite Application API
Composite Application names Resource Bundle Names and Versions 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
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projectprojects/{project-name}/rbcomposite-apps
POST BODY:
{
"rb-name": "test-rbdef<name>",
"rb-versiondescription": "v1<description>",
"descriptionversion": "testing<version resourceof bundlethe definitioncomposite apiapp>",
}
RETURN STATUS: 201
RETURN BODY: { "rb-name": "test-rbdef<name>",
"rb-versiondescription": "v1<description>",
"description": "testing resource bundle definition api",} |
GET, DELETE
GET, DELETE
Code Block |
---|
Code Block |
---|
language | js |
---|
title | GET, DELETE |
---|
linenumbers | true |
---|
|
GET
URL: /v2/projectprojects/{project-name}/rbcomposite-apps/{rbcomposite-app-name}/{rb-version}
RETURN STATUS: 200
RETURN BODY:
{
"rb-name": "test-rbdef<name>",
"rb-versiondescription": "v1<description>",
"descriptionversion": "testing<version resourceof bundlethe definitioncomposite apiapp>"
}
DELETE
URL: /v2/projectprojects/{project-name}/rbcomposite-apps/{rbcomposite-app-name}/{rb-version}
RETURN STATUS: 204 |
Profile API
The Profile API is now keyed off the new rb API based on projects
Profile names are unique within a resource bundle and version.
Changes with respect to V1 API:
- rb-name, rb-version is removed as it is part of the path
- release-name is removed as profile-name will be used
- kubernetes-version is removed as that is no longer in the scope of the profile
POST
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/profile
POST BODY:
{
"profile-name": "test-rbdef",
"namespace": "onap", //Kubernetes namespace to install the charts in
"description": "testing resource bundle definition api",
}
RETURN STATUS: 201
RETURN BODY:
{
"rb-name": "test-rbdef",
"rb-version": "v1",
"profile-name": "test-rbdef",
"namespace": "v1",
"description": "testing resource bundle definition api"
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | GET, DELETE |
---|
linenumbers | true |
---|
|
GET
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/profile/{profile-name}
RETURN STATUS: 200
RETURN BODY:
{
"rb-name": "test-rbdef",
"rb-version": "v1",
"profile-name": "test-rbdef",
"namespace": "v1",
"description": "testing resource bundle definition api"
}
DELETE
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/profile/{profile-name}
RETURN STATUS: 204 |
Intent Group API
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
Adding applications to composite app
Format of the Helm chart for the application wrapped in tar.gz
> cd vagrant /tests/vnfs/testrb/helm
> find vault-consul-dev
vault-consul-dev
vault-consul-dev /Chart .yaml
vault-consul-dev /values .yaml
vault-consul-dev /templates
vault-consul-dev /templates/service .yaml
vault-consul-dev /templates/deployment .yaml
vault-consul-dev /charts
vault-consul-dev /charts/common/values .yaml
vault-consul-dev /charts/common/templates/_service .tpl
vault-consul-dev /charts/common/templates/_repository .tpl
vault-consul-dev /charts/common/templates/_name .tpl
vault-consul-dev /charts/common/templates/_namespace .tpl
vault-consul-dev /charts/common/templates
vault-consul-dev /charts/common/Chart .yaml
vault-consul-dev /charts/common
> tar -cf vault-consul-dev. tar vault-consul-dev
> gzip vault-consul-dev. tar
|
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.
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/apps
POST BODY:
{
"app-name": "<name>", // Name of the application
"description": "<description>"
}
RETURN STATUS: 201
RETURN BODY: { "name": "<name>",
"description": "<description>"} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | GET, DELETE |
---|
linenumbers | true |
---|
|
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/apps/{app-name}
RETURN STATUS: 200
RETURN BODY:
{
"name": "<name>",
"description": "<description>"
}
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: 204 |
Profile 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
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{verison}/profiles
POST BODY:
{
"profile-name": "test",
"description": "<description>",
}
RETURN STATUS: 201
RETURN BODY:
{
"profile-name": "test",
"description": "<description>",
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | GET, DELETE |
---|
linenumbers | true |
---|
|
GET
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/profiles/{profile-name}
RETURN STATUS: 200
RETURN BODY:
{
"name": "test",
"description": "<description>"
}
DELETE
URL: /v2/projects/{project-name}/composite-apps/{app-name}/{app-version}/profiles/{profile-name}
RETURN STATUS: 204 |
Adding 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 2 3 4 5 6 7 8 9 10 11 12 13 | > cd vagrant /tests/vnfs/testrb/helm/profile
> find .
manifest.yaml
override_values.yaml
testfol
testfol /subdir
testfol /subdir/deployment .yaml
> cd profile
> tar -cf profile. tar *
> gzip profile. tar
> mv profile. tar .gz ../
|
The manifest file contains the following:
manifest.yaml
1 2 3 4 5 6 7 | ---
version: v1
type:
values: "values_override.yaml"
configresource:
- filepath : testfol/subdir/deployment.yaml
chartpath: vault-consul-dev/templates/deployment.yaml
|
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.
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{verison}/profiles/{profile-name}/apps
POST BODY:
{
"app-name": "test", // Must match the name given in composite-apps/apps API
"description": "<description>"
}
Multipart request containg tar.gz of the profile
RETURN STATUS: 201
RETURN BODY:
{
"app-name": "test",
"description": "<description>"
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | GET, DELETE |
---|
linenumbers | true |
---|
|
GET
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/profiles/{profile-name}
RETURN STATUS: 200
RETURN BODY:
{
"profile-name": "test",
"description": "testing resource bundle definition api"
}
Multipart response containing the tar.gz of the profile
DELETE
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/profiles/{profile-name}
RETURN STATUS: 204 |
Generic 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
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intents
POST BODY:
{
"generic-placement-intent-name":"intent-1",
"description": "<description>",
"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:
{
"intent-name": "intent-1",
"description": "<description>",
"logical-cloud": "logical-cloud-name" |
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intents/{intent-name}
RETURN STATUS: 200
RETURN BODY:
{
"intent-name":"intent-1",
"description": "<description>",
"logical-cloud": "logical-cloud-name"
}
DELETE
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/generic-placement-intent/{intent-name}
RETURN STATUS: 204
|
Adding placement intent for each application in the composite-app
POST
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/apps
POST BODY:
{
"app-name":"name",
"description": "<description>",
"intent":
{
"allOf":[
{
"cluster-name":"edge1"
},
{
"cluster-name":"edge2"
},
{
"anyOf":[
{
"label-name":"east-us1"
},
{
"label-name":"east-us2"
}
]
}
]
}
RETURN STATUS: 201
RETURN BODY:
{
"app-name": "name",
"description": "<description>",
"intent":
{
"allOf":[
|
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/intent-group
POST BODY:
{
"intent-group-name":"intent-group-1",
"description": "<description>"
"group":[
{
"generic":"xyz-generic-placement-intent"
},
{
"hpa "cluster-name":"xyz-hpa-intentedge1"
},
{},
"traffic":"xyz-traffic-intent"
{
}
]
}
RETURN STATUS: 201
RETURN BODY:
{
"intentcluster-name": "intent-group-1",
"description": "Intent Group for Customer1"
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/intent-group/{intent-group-name}
RETURN STATUS: 200
RETURN BODY:
{
"intent-group-name":"intent-group-1",
"description": "<description>"
"group":[
edge2"
},
{
"anyOf":[
{
"genericlabel-name":"xyz-generic-placement-intent"
east-us1"
},
{
"hpa":"xyz-hpa-intent"{
},
{
"trafficlabel-name":"xyzeast-traffic-intentus2"
}
]
}
DELETE
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/intent-group/{intent-group-name}
RETURN STATUS: 204
|
Generic 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 using during instantiation.
...
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/apps
RETURN STATUS: 200
RETURN BODY:
{
"applications": /v2/project/{project-name}/rb/{rb-name}/{rb-version}/generic-placement-intent
POST BODY:
{
"intent-name":"intent-1",
"description": "<description>"
"applications":[
[
{
"name":"app1",
"anyOf":[
{
"cluster-name":"edge1"
},
{
"cluster-name":"edge2"
}
]
},
{
"name":"app1app2",
"anyOfallOf":[
{
"cluster-name":"edge1"
},
{
"cluster-name":"edge2"
}
]
},
},
{
"name":"app3",
"allOf":[
{
{
"cluster-name":"app2edge1",
"allOf":[ },
{
"cluster-name":"edge1edge2"
},
{
"cluster-nameanyOf":"edge2"[
}
{
]
},
{
"label-name":"app3east-us1",
"allOf":[
},
{
"clusterlabel-name":"edge1east-us2"
},
{}
"cluster-name":"edge2"]
},
{]
}
"anyOf":[
{
"label-name":"east-us1"
},
]
}
GET
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/apps/{apps-name}
RETURN STATUS: 200
RETURN BODY:
{
"app-name": "name",
"description": "<description>",
"intent":
{
"allOf":[
{
{
"labelcluster-name":"east-us2edge1"
},
}{
]"cluster-name":"edge2"
},
] {
}
]
}
RETURN STATUS: 201
RETURN BODY:
{
"intent-name": "intent-1",anyOf":[
"description": "Intent-1 for Customer1"
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/generic-placement-intent/{intent-name}
RETURN STATUS: 200
RETURN BODY:
{
"intent {
"label-name":"intenteast-1us1",
"description": "<description>",
"applications":[
{
"name":"app1"},
"anyOf":[
{
{
"clusterlabel-name":"edge1east-us2"
},
{]
"cluster-name":"edge2"
}
]
},
{
"name":"app2",
"allOf":[
{
"cluster-name":"edge1"
},
{
"cluster-name":"edge2"
}
]
},
{
"name":"app3",
"allOf":[
{
"cluster-name":"edge1"
},
{
"cluster-name":"edge2"
},
{
"anyOf":[
{
"label-name":"east-us1"
},
}
]
}
}
DELETE
URL: /v2/project/{project-name}/composite-apps/{composite-app-name}/{version}/generic-placement-intent/{intent-name}/apps/{apps-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
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups
POST BODY:
{
"deployment-intent-group-name":"<intent-group-name>",
"profile": "<profile-name>",
"version": "<version of the deployment>"
"description": "<description>"
}
RETURN STATUS: 201
RETURN BODY:
{
"deployment-intent-group-name": "<intent-group-name>",
"description": "<description>"
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}
RETURN STATUS: 200
RETURN BODY:
{
"deployment-intent-group-name":"<intent-group-name>",
"profile": "<profile-name>",
"version": "<version of the deployment>"
"description": "<description>"
}
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
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/intents
POST BODY:
{
"intent-name":"<name>",
"description": "<description>"
"intent":
{
"label-name"generic":"east-us2"
}xyz-generic-placement-intent"
}
}
RETURN STATUS: 201
RETURN BODY:
{
]"intent-name": "intent-group-1",
"description": "Intent Group for Customer1"
}"intent":
{
]
}
]
}
DELETE
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/ "generic":"xyz-generic-placement-intent/{intent-name}
RETURN STATUS: 204
|
Instantiation API
Instantiation API is now based on the Profile API instead of having its own URL root.
POST
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/projects/{project-name}/{projectcomposite-apps/{composite-app-name}/rb/{rb-name}/{rb-version}/profile/{profile-name}/instantiate
POST BODY:
{
"name": <name>
"description": <description>,
"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
"intent-group": "intent-group-name", //name of intent-group to use for collecting intents which will be used during instantiation
//override-values overrides values from the helm charts and allows for instantiation time
//variable overrides.
"override-values": [
{"sub-app-name1":[{"imageRepository":"registry.hub.docker.com"}]},
{"sub-app-name2":[{"imageRepository":"registry.hub.docker.com"}]}
]
{version}/deployment-intent-groups/{deployment-intent-group-name}/intents/{intent-name}
{
"intent-name": "intent-group-1",
"description": "Intent Group for Customer1"
"intent":
{
"generic":"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-placement-intent":"hpa-placement-intent-name"
},
{
"traffic-intent":"traffic-intent-name"
}
]
}
DELETE
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/intents/{intent-name}
RETURN STATUS: 201204
RETURN BODY:
{
"id": "laughing_robinson",
"name": "my-name",
"rb-name": "test-rbdef",
"rb-version": "v1",
"profile-name": "test-rbdef",
"intent-group": "intent-group-1"
"logical-cloud": "kud",
"namespace": "testinstallns",
"resources": [
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo"
},
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
|
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
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/projects/{project-name}/composite-apps/{composite-app-name}/{version}/deployment-intent-groups/{deployment-intent-group-name}/initantiate
POST BODY:
{
"name": <name>
"description": <description>,
//override-values overrides values from the helm charts and allows for instantiation time
//variable overrides.
"override-values": [
{"app-name":[{"imageRepository":"registry.hub.docker.com"}]},
{"app-name":[{"imageRepository":"registry.hub.docker.com"}]}
]
}
RETURN STATUS: 201
RETURN BODY:
{
"name": <name>
"description": <description>,
//override-values overrides values from the helm charts and allows for instantiation time
//variable overrides.
"override-values": [
{"app-name":[{"imageRepository":"registry.hub.docker.com"}]},
"Name{"app-name":[{"imageRepository": "mongo-read"
"registry.hub.docker.com"}]}
}
]
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | GET, DELETE |
---|
linenumbers | true |
---|
|
GET
URL: /v2/projectprojects/{project-name}/rbcomposite-apps/{rbcomposite-app-name}/{rb-version}/profiledeployment-intent-groups/{profiledeployment-intent-group-name}/instantiate/{instance-namestatus
POST BODY:
{
"name": <name>
}
RETURN STATUS: 200201
RETURN BODY:
{
"name": "<name>
"description": <description>,
"id": "laughing_robinson",
"rbcomposite-app-name": "test-rbdef",
"rbcomposite-app-version": "v1",
"profile-name": "test-rbdef",
"cloudRegionintent-group": "kud","intent-group-1"
"namespace": "testinstallns",
"resources": [
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"cluster-name": "cluster1",
"Name": "mongo",
"status": "Running"
},
{
"GVK": {
"Group": "",
,
"Version": "v1",
"Kind": "Service"
},
"Versioncluster-name": "v1cluster2",
"KindName": "Service"
}mongo-read",
"Namestatus": "mongo-readTerminated"
}
]
}
DELETE
URL: /v2/projectprojects/{project-name}/rbcomposite-apps/{rbcomposite-app-name}/{rb-version}/profiledeployment-intent-groups/{profiledeployment-intent-group-name}/instantiate/{instance-name}
RETURN STATUS: 204destroy
POST BODY:
{
"name": <name>
}
RETURN STATUS: 201
RETURN BODY:
{
"name": <name>
} |
Cluster Registration API
API to support Reachability for a Kubernetes Cloud. This API will be used to upload configuration information for the cluster
POST
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/cluster-registrationclusters
POST BODY:
{
“cluster-name” : “<name>”, // Must be unique
"description": <description>
}
RETURN STATUS: 201
RETURN BODY:
{
“cluster-name” : “<name>”, // Must be unique
"description": <description>
} |
...
#Using a json file containing content as above;
curl -i -F "metadata=<jsonfile;type=application/json" -F file=@/home/user/.kube/config -X POST http: // NODE_IP:PORT/v2/cluster-registrationclusters
|
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/cluster-registrationclusters/{cluster-name}
RETURN STATUS: 200
RETURN BODY:
{
“cluster-name” : “<name>”, // Must be unique across
"description": <description>
}
DELETE
URL: /v2/cluster-registerationclusters/{cluster-name}
RETURN STATUS: 204
|
Add Label to a cluster
POST
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/cluster-registration/{cluster-name}/labellabels
POST BODY:
{
“label-name” : “<label>”
}
RETURN STATUS: 201
RETURN BODY:
{
“label-name” : “<label>”
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/cluster-registrationclusters/{cluster-name}/labellabels/<label>
RETURN STATUS: 200
RETURN BODY:
{
“label-name” : “<label>”
}
DELETE
URL: /v2/cluster-registerationclusters/{cluster-name}/labellabels/<label>
RETURN STATUS: 204
|
...
Add property to a cluster without the need for change to the API.
POST
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/cluster-registrationclusters/{cluster-name}/kv-pairpairs
POST BODY:
{
"kv":[
{
"key1":"val1"
},
{
"key2":"val2"
}
]
}
RETURN STATUS: 201
RETURN BODY:
{
"kv":[
{
"key1":"val1"
},
{
"key2":"val2"
}
]
} |
GET, DELETE
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/cluster-registrationclusters/{cluster-name}/kv-pairpairs/<key>
RETURN STATUS: 200
RETURN BODY:
{
"key1":"val1"
}
DELETE
URL: /v2/cluster-registerationclusters/{cluster-name}/kv-pairpairs/<key>
RETURN STATUS: 204
|
...