Test a connection profile without saving it
const url = 'http://localhost:8080/api/v1/clusters/test';const options = { method: 'POST', headers: { cookie: 'brokerium_session=<brokerium_session>', 'X-Brokerium-Request': '1', 'Content-Type': 'application/json' }, body: '{"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}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Required on every non-GET request.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Write-only; stored encrypted and never returned.
object
object
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
Responses
Section titled “Responses”Test result (also for failed connections).
object
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.