Skip to content

Test a connection profile without saving it

POST
/api/v1/clusters/test
curl --request POST \
--url http://localhost:8080/api/v1/clusters/test \
--header 'Content-Type: application/json' \
--header 'X-Brokerium-Request: 1' \
--cookie brokerium_session=<brokerium_session> \
--data '{ "name": "example", "provider": "external", "flavor": "apache", "bootstrapServers": [ "example" ], "security": { "protocol": "PLAINTEXT", "saslMechanism": "", "username": "example", "tlsServerName": "example", "tlsInsecureSkipVerify": true, "tlsCaCertPem": "example", "awsRegion": "example" }, "secrets": { "password": "example", "tlsClientCertPem": "example", "tlsClientKeyPem": "example", "awsAccessKeyId": "example", "awsSecretAccessKey": "example", "awsSessionToken": "example", "oauthToken": "example" }, "labels": { "additionalProperty": "example" }, "settings": { "brokerHeap": "-Xms1g -Xmx1g", "racks": null }, "skipTest": true }'

Role: operator.

X-Brokerium-Request
required
string
Allowed value: 1

Required on every non-GET request.

Media typeapplication/json
object
name
string
provider
string
Allowed values: external agent docker strimzi
flavor
string
Allowed values: apache msk confluent-cloud aiven
bootstrapServers
Array<string>
security
object
protocol
required
string
Allowed values: PLAINTEXT SSL SASL_PLAINTEXT SASL_SSL
saslMechanism
string
Allowed values: "" PLAIN SCRAM-SHA-256 SCRAM-SHA-512 AWS_MSK_IAM OAUTHBEARER
username
string
tlsServerName
string
tlsInsecureSkipVerify
boolean
tlsCaCertPem
string
awsRegion
string
secrets

Write-only; stored encrypted and never returned.

object
password
string format: password
tlsClientCertPem
string
tlsClientKeyPem
string
awsAccessKeyId
string
awsSecretAccessKey
string
awsSessionToken
string
oauthToken
string
labels
object
key
additional properties
string
settings

Provider settings. On update the given keys are merged into the saved settings: other keys keep their values and null removes a key. Brokerium checks the keys it reads, in the merged settings: brokerHeap and controllerHeap (only -Xms<size> and -Xmx<size>), kafkaVersion (a release such as 4.4.0), quorum (static or dynamic), replicationFactor and minIsr (whole numbers of at least 1, minIsr at most the replication factor, 3 when not set), racks (rack names of at most 64 letters, digits, ., _ and -) and portBase (0, or 1024 to 64536 for Docker clusters, whose nodes publish ports up to the base + 999). Other keys are kept as given.

object
skipTest
boolean

Test result (also for failed connections).

Media typeapplication/json
object
ok
required
boolean
clusterId
string
brokers
required
integer
error
string

Example generated

{
"ok": true,
"clusterId": "example",
"brokers": 1,
"error": "example"
}

Apache®, Apache Kafka® and Kafka® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Brokerium is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.