Update a cluster profile
const url = 'http://localhost:8080/api/v1/clusters/example';const options = { method: 'PATCH', 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 PATCH \ --url http://localhost:8080/api/v1/clusters/example \ --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. Omitted fields keep their values; secrets are write-only. settings is merged key by key into the saved settings, and null removes a key. Changing the provider to docker needs a server that offers Docker clusters, otherwise 409 docker_unavailable.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path 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”Updated.
object
object
object
object
Provider settings, for example Kafka version and port base of Docker clusters.
object
object
object
Actions available for this cluster; the dashboard shows only these.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Consumer, classic, share or streams
Example
{ "cluster": { "provider": "external", "flavor": "apache", "security": { "protocol": "PLAINTEXT", "saslMechanism": "" } }, "health": { "status": "ok", "issues": [ { "severity": "critical" } ] }, "snapshot": { "quorum": { "voters": [ { "role": "leader" } ], "observers": [ { "role": "leader" } ] } }}Error.
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}Error.
object
object
Example generated
{ "error": { "code": "example", "message": "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.