Skip to main content
Version: Next

Certificates

Available API Paths


/api/projects/{projectId}/certificates

The following methods are available for this path:

GET
Viewer

Return a list of certificates in the specified project. Optionally filter to certificates deployed on a broker by passing brokerId.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
brokerIdquerystringIf set, return only certificates deployed on the specified broker.
filenamequerystringReturn the certificate with the specified filename. When set, the response is a single-element array and other list parameters are ignored. If brokerId is also set, the certificate must be deployed on that broker.
Responses

Status Description Response Content or Scheme
200 A list of project certificates.
{
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"filename": {
"type": "string"
},
"brokers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"ha": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"ha"
],
"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"
}
}
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
Admin

Add a new certificate to the specified project.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
Request Body

Name Location Type Description
body body object Properties:

{
"name": {
"type": "string"
},
"filename": {
"type": "string",
"minLength": 1
},
"cert": {
"type": "string",
"minLength": 10
}
}
Responses

Status Description Response Content or Scheme
200 The id of the newly added certificate.
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}/certificates/{certificateId}

The following methods are available for this path:

PUT
Editor

Update a certificate in the specified project. Only undeployed certificates can be updated. Any combination of name, filename, and cert content may be provided.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
certificateIdpathstringA certificate id
Request Body

Name Location Type Description
body body object Properties:

{
"name": {
"type": "string"
},
"filename": {
"type": "string",
"minLength": 1
},
"cert": {
"type": "string",
"minLength": 10
}
}
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"
}
}

DELETE
Admin

Delete a certificate from the specified project. The request fails if the certificate is currently deployed on a broker.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
certificateIdpathstringA certificate 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"
}
}
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}/certificates/{certificateId}/deploy

The following methods are available for this path:

POST
Editor

Deploy an existing project certificate to one or more brokers. For each broker, specify the TLS listeners the certificate should be deployed to by port and optional bind address.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
certificateIdpathstringA certificate id
Request Body

Name Location Type Description
body body object Properties:

{
"brokers": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"brokerId": {
"type": "string"
},
"listeners": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"port": {
"type": "integer"
},
"bindAddress": {
"type": "string"
}
},
"required": [
"port"
],
"additionalProperties": false
}
}
},
"required": [
"brokerId",
"listeners"
],
"additionalProperties": false
}
}
}
Responses

Status Description Response Content or Scheme
200 Deployment result for each requested broker.
{
"brokerId": {
"type": "string"
},
"error": {
"type": "string"
},
"succeed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"port": {
"type": "integer"
},
"bindAddress": {
"type": "string"
}
},
"required": [
"port"
]
}
},
"failed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"port": {
"type": "integer"
},
"bindAddress": {
"type": "string"
},
"error": {
"type": "string"
}
},
"required": [
"port",
"error"
]
}
}
}
400 Bad request error, mostly that means provided data is invalid
{
"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"
}
}
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}/certificates/{certificateId}/undeploy

The following methods are available for this path:

POST
Editor

Undeploy an existing project certificate from one or more brokers. For each broker, specify the TLS listeners the certificate should be removed from by port and optional bind address. The certificate remains in the project.

Parameters

NameLocationTypeDescription
projectIdpathstringA project id
certificateIdpathstringA certificate id
Request Body

Name Location Type Description
body body object Properties:

{
"brokers": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"brokerId": {
"type": "string"
},
"listeners": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"port": {
"type": "integer"
},
"bindAddress": {
"type": "string"
}
},
"required": [
"port"
],
"additionalProperties": false
}
}
},
"required": [
"brokerId",
"listeners"
],
"additionalProperties": false
}
}
}
Responses

Status Description Response Content or Scheme
200 Undeployment result for each requested broker.
{
"brokerId": {
"type": "string"
},
"error": {
"type": "string"
},
"succeed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"port": {
"type": "integer"
},
"bindAddress": {
"type": "string"
}
},
"required": [
"port"
]
}
},
"failed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"port": {
"type": "integer"
},
"bindAddress": {
"type": "string"
},
"error": {
"type": "string"
}
},
"required": [
"port",
"error"
]
}
}
}
400 Bad request error, mostly that means provided data is invalid
{
"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"
}
}
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"
}
}