Plan an operation (dry run)
POST
/api/v1/clusters/{id}/operations
const url = 'http://localhost:8080/api/v1/clusters/example/operations';const options = { method: 'POST', headers: { cookie: 'brokerium_session=<brokerium_session>', 'X-Brokerium-Request': '1', 'Content-Type': 'application/json' }, body: '{"type":"rebalance","params":{}}'};
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/example/operations \ --header 'Content-Type: application/json' \ --header 'X-Brokerium-Request: 1' \ --cookie brokerium_session=<brokerium_session> \ --data '{ "type": "rebalance", "params": {} }'Role: operator. Returns a planned operation with its plan and steps. Nothing changes
in the cluster until the operation is confirmed. Plans expire after 15 minutes.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Header Parameters
Section titled “Header Parameters”X-Brokerium-Request
required
string
Required on every non-GET request.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
type
required
string
params
Parameters of the operation type, see OperationParams.
object
Responses
Section titled “Responses”Planned operation.
Media typeapplication/json
object
id
string
clusterId
string
type
string
status
string
summary
string
params
object
plan
object
summary
string
warnings
Array<string>
irreversible
boolean
moves
Array<object>
object
topic
string
partition
integer
from
Array<integer>
to
Array<integer>
sizeBytes
integer format: int64
replicaMoves
integer
leaderChange
boolean
before
object
brokers
Array<object>
object
id
integer
rack
string
replicas
integer
leaders
integer
dataBytes
integer format: int64
bytesInPerSec
number
excluded
boolean
replicaSpread
integer
leaderSpread
integer
dataSpreadBytes
integer format: int64
score
number
after
object
brokers
Array<object>
object
id
integer
rack
string
replicas
integer
leaders
integer
dataBytes
integer format: int64
bytesInPerSec
number
excluded
boolean
replicaSpread
integer
leaderSpread
integer
dataSpreadBytes
integer format: int64
score
number
dataToMoveBytes
integer format: int64
details
object
irreversible
boolean
currentStep
integer
requestedAction
string
error
string
createdBy
string
createdAt
string format: date-time
startedAt
string | null format: date-time
finishedAt
string | null format: date-time
updatedAt
string format: date-time
steps
Array<object>
object
index
integer
name
string
kind
string
args
alwaysRun
boolean
status
string
detail
error
string
startedAt
string | null format: date-time
finishedAt
string | null format: date-time
Example
{ "status": "planned", "steps": [ { "status": "pending" } ]}Error.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Error.
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.