Skip to main content
Version: Next

Clusters

Available API Paths


/api/projects/{projectId}/clusters/{clusterId}

The following methods are available for this path:

GET

Returns general information about specified cluster.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
clusterIdpathstringA broker id representing the cluster to get the info for
Responses

Status Description Response Content or Scheme
200 General cluster information.
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
403 Request is not allowed error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
404 Resource is not found error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

DELETE

Deletes cluster from project.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
clusterIdpathstringA broker id representing the cluster to get the info for
clusternamequerystringThe name of the cluster to delete.
Responses

Status Description Response Content or Scheme
200 Flag indicating delete was successful or not.
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
403 Request is not allowed error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
404 Resource is not found error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
503 Service unavailable. E.g. if platform is not able to connect to broker
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

/api/projects/{projectId}/clusters/{clusterId}/join

The following methods are available for this path:

PUT

Adds defined node to specified cluster.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
clusterIdpathstringA broker id representing the cluster to add node to.
Request Body

Name Location Type Description
body body object Properties:

{
"broker_id": {
"type": "string"
},
"url": {
"type": "string"
},
"username": {
"type": "string"
},
"client_cert_file": {
"type": "string"
},
"client_key_file": {
"type": "string"
},
"ca_cert_file": {
"type": "string"
},
"nodeid": {
"type": "number"
},
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"port": {
"type": "number"
}
}
Responses

Status Description Response Content or Scheme
204
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
403 Request is not allowed error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
404 Resource is not found error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

/api/projects/{projectId}/clusters/{clusterId}/leave

The following methods are available for this path:

PUT

Removes a node from specified cluster.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
clusterIdpathstringA broker id representing the cluster to remove node from
Request Body

Name Location Type Description
body body object Properties:

{
"broker_id": {
"type": "string"
},
"url": {
"type": "string"
},
"username": {
"type": "string"
},
"client_cert_file": {
"type": "string"
},
"client_key_file": {
"type": "string"
},
"ca_cert_file": {
"type": "string"
},
"nodeid": {
"type": "number"
},
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"port": {
"type": "number"
}
}
Responses

Status Description Response Content or Scheme
204
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
403 Request is not allowed error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
404 Resource is not found error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

/api/projects/{projectId}/clusters

The following methods are available for this path:

GET

Returns a list of all clusters currently defined in specified project.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
Responses

Status Description Response Content or Scheme
200 A list of project clusters.
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
403 Request is not allowed error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
404 Resource is not found error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
405 Method not supported for this resource
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

POST

Creates a new cluster for specified project.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
Request Body

Name Location Type Description
body body object Properties:

{
"clustername": {
"type": "string"
},
"nodes": {
"type": "array",
"items": {
"title": "BrokerNode",
"type": "object",
"properties": {
"broker_id": {
"type": "string"
},
"url": {
"type": "string"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"client_cert_file": {
"type": "string"
},
"client_cert": {
"type": "string"
},
"client_key_file": {
"type": "string"
},
"client_key": {
"type": "string"
},
"ca_cert_file": {
"type": "string"
},
"ca_cert": {
"type": "string"
},
"nodeid": {
"type": "number"
},
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"port": {
"type": "number"
}
},
"required": [
"broker_id",
"url",
"nodeid",
"name",
"address",
"port"
],
"additionalProperties": false
}
},
"syncmode": {
"type": "string",
"enum": [
"hp",
"dynsec",
"full"
]
}
}
Responses

Status Description Response Content or Scheme
200 Info of newly created cluster.
{
"url": {
"type": "string"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"client_cert_file": {
"type": "string"
},
"client_cert": {
"type": "string"
},
"client_key_file": {
"type": "string"
},
"client_key": {
"type": "string"
},
"ca_cert_file": {
"type": "string"
},
"ca_cert": {
"type": "string"
},
"verify_ca_cert": {
"type": "number",
"enum": [
0,
1
]
},
"id": {
"type": "string"
}
}
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
403 Request is not allowed error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

DELETE

Deletes all clusters currently defined in specified project.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
Responses

Status Description Response Content or Scheme
207
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
403 Request is not allowed error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}

/api/projects/{projectId}/clusters/status

The following methods are available for this path:

GET

Returns a list of status information for each cluster defined in project.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
Responses

Status Description Response Content or Scheme
207
401 Unauthorized request error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
403 Request is not allowed error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
404 Resource is not found error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}
500 Internal server error
{
"message": {
"type": "string",
"description": "A descriptive error message"
},
"code": {
"type": "string",
"description": "A textual error code"
},
"status": {
"type": "integer",
"description": "A corresponding HTML status code"
},
"info": {
"type": "object",
"description": "An optional info object containing error dependent information"
}
}