Skip to content

Delete a node

DELETE
/api/v1/nodes/{id}
curl --request DELETE \
--url http://localhost:8080/api/v1/nodes/example \
--header 'X-Brokerium-Request: 1' \
--cookie brokerium_session=<brokerium_session>

Role: operator. Deletes the node and ends the session of its agent, which stops and exits with status 6; its systemd unit does not restart it. Returns the command that removes the agent from the host. Refused, whether the agent is connected or not, while the node runs a broker or a controller of a cluster: decommissioning it (drain-broker with decommission, remove-controller or replace-broker) stops Kafka on the host and releases the node. A combined node, which Brokerium does not decommission, is deleted once its cluster no longer has its Kafka node as a broker, a voter or an observer. Audited as node.delete.

id
required
string
X-Brokerium-Request
required
string
Allowed value: 1

Required on every non-GET request.

Deleted.

Media typeapplication/json
object
uninstallCommand
required

Runs the uninstall script on the host; append --stop-kafka, --remove-kafka and --delete-data as needed.

string

Example generated

{
"uninstallCommand": "example"
}

Error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

node_in_use: the node runs Kafka for a cluster; decommission it first.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

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.