...
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/profile/{profile-name}/instanceinstantiate
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", "sub-app-name1"}
"{imageRepository: "registry.hub.docker.com"
}]
}
RETURN STATUS: 201
RETURN BODY:
{
"id": "laughing_robinson",
"rb-name": "test-rbdef",
"rb-version": "v1",
"profile-name": "test-rbdef",
"cloudRegion": "kud",
"namespace": "testinstallns",
"resources": [
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo"
},
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo-read"
}
]
} |
...
Code Block |
---|
language | js |
---|
title | GET, DELETE |
---|
linenumbers | true |
---|
|
GET
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/profile/{profile-name}/instance/{instance-idname}
RETURN STATUS: 200
RETURN BODY:
{
"id": "laughing_robinson",
"rb-name": "test-rbdef",
"rb-version": "v1",
"profile-name": "test-rbdef",
"cloudRegion": "kud",
"namespace": "testinstallns",
"resources": [
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo"
},
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo-read"
}
]
}
DELETE
URL: /v2/project/{project-name}/rb/{rb-name}/{rb-version}/profile/{profile-name}/instance/{instance-idname}
RETURN STATUS: 204 |
Cluster Registration API
...
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/cluster-registration
POST BODY:
{
“cloud “cluster-region”name” : “<name>”, “<name>” // Must be unique
“cloud-owner” : “<owner>”,
}
RETURN STATUS: 201
RETURN BODY:
{
“cloud“cluster-region”name” : “<name>”, “<name>” // Must be unique
“cloud-owner” : “<owner>”,
} |
This is a multipart upload and here is how you do the POST for this.
...
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
URL: /v2/cluster-registration/{cloudcluster-region-name}/label
POST BODY:
{
“label-name” : “<label>”
}
RETURN STATUS: 201
RETURN BODY:
{
“label-name” : “<label>”
} |
...
Add key-value pair to a cluster
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-registration/{cloud-regioncluster-name}/kv-pair
POST BODY:
{
"kv":[
{
"key1":"val1"
},
{
"key2":"val2"
}
]
}
RETURN STATUS: 201
RETURN BODY:
{
"kv":[
{
"key1":"val1"
},
{
"key2":"val2"
}
]
} |
...
Code Block |
---|
language | js |
---|
title | POST |
---|
linenumbers | true |
---|
|
GET
URL: /v2/cluster-registration/{cloud-regioncluster-name}/kv-pair/<key>
RETURN STATUS: 200
RETURN BODY:
{
"key1":"val1"
}
DELETE
URL: /v2/cluster-registeration/{cloud-region-name}/kv-pair/<key>
RETURN STATUS: 204
|
...