Skip to main content
Version: Next

Brokers

Available API Paths


/api/projects/{projectId}/brokers/{brokerId}

The following methods are available for this path:

GET

Returns info about project broker specified by passed broker id.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
brokerIdpathstringA broker id
Responses

Status Description Response Content or Scheme
200 A broker info object.
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"
}
}

DELETE

Deletes project broker specified by passed broker id.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
brokerIdpathstringA broker id
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"
}
}
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"
}
}

/api/projects/{projectId}/brokers

The following methods are available for this path:

GET

Returns a list of all currently available brokers in specified project.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
Responses

Status Description Response Content or Scheme
200 A list of project brokers.
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"
}
}

/api/projects/{projectId}/brokers/{brokerId}/connect

The following methods are available for this path:

GET

Tries to connect to specified broker

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
brokerIdpathstringA broker id
Responses

Status Description Response Content or Scheme
200 Information about connected broker.
{
"id": {
"type": "string"
},
"url": {
"type": "string"
},
"name": {
"type": "string"
},
"project_id": {
"type": "string"
},
"sysTopics": {
"type": "object",
"properties": {
"topics": {
"type": "object"
},
"date": {
"type": "number"
}
},
"required": [
"topics",
"date"
]
},
"sysTopicsHistory": {
"type": "array",
"items": {
"type": "object",
"properties": {
"topics": {
"type": "object"
},
"date": {
"type": "number"
}
},
"required": [
"topics",
"date"
]
}
},
"isConnected": {
"type": "boolean"
},
"licenseInfo": {
"type": "object",
"properties": {
"plan": {
"type": "string"
},
"edition": {
"type": "string"
},
"issuedBy": {
"type": "string"
},
"issuedTo": {
"type": "string"
},
"validSince": {
"type": "number"
},
"validUntil": {
"type": "number"
},
"features": {
"type": "array",
"items": {
"type": "string"
},
"description": "List containing all available features"
}
},
"required": [
"plan",
"edition",
"issuedBy",
"issuedTo",
"validSince",
"validUntil",
"features"
],
"additionalProperties": false
}
}
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"
}
}

/api/projects/{projectId}/brokers/{brokerId}/license

The following methods are available for this path:

GET

Get broker license

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
brokerIdpathstringA broker id
Responses

Status Description Response Content or Scheme
200 The license object as defined by broker.
{
"plan": {
"type": "string"
},
"edition": {
"type": "string"
},
"issuedBy": {
"type": "string"
},
"issuedTo": {
"type": "string"
},
"validSince": {
"type": "number"
},
"validUntil": {
"type": "number"
},
"features": {
"type": "array",
"items": {
"type": "string"
},
"description": "List containing all available features"
}
}
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"
}
}

/api/projects/{projectId}/brokers/{brokerId}/listeners

The following methods are available for this path:

GET

Gets all broker listeners as defined in mosquitto config along with a list of certificates currently attached to them.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
brokerIdpathstringA broker id
Responses

Status Description Response Content or Scheme
200 A list containing currently defined broker listeners.
{
"id": {
"type": "number",
"title": "BrokerListenerTarget.id"
},
"port": {
"type": "number",
"title": "BrokerListenerTarget.port"
},
"bindAddress": {
"type": "string",
"title": "BrokerListenerTarget.bindAddress"
},
"tls": {
"type": "boolean",
"title": "tls"
},
"protocol": {
"type": "string",
"title": "protocol"
},
"requireCertificate": {
"type": "boolean",
"title": "requireCertificate"
},
"certs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"certificate_id": {
"type": "string"
},
"name": {
"type": "string"
},
"filename": {
"type": "string"
}
},
"required": [
"certificate_id",
"name",
"filename"
],
"additionalProperties": false
}
}
}
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"
}
}

/api/projects/{projectId}/brokers/{brokerId}/publish

The following methods are available for this path:

POST

Publishes a message

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
brokerIdpathstringA broker id
Request Body

Name Location Type Description
body body object Properties:

{
"topic": {
"type": "string"
},
"payload": {
"type": "string"
}
}
Responses

Status Description Response Content or Scheme
200 The topic the message was published to.
{
"topic": {
"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"
}
}
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"
}
}