Cloudera Documentation

Cruise Control API

Default

addBroker

addBroker

Move partitions to the specified brokers, according to the specified goals.


/kafkacruisecontrol/add_broker

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/add_broker?brokerid=&dryrun=&throttle_added_broker=&allow_capacity_estimation=&goals=&concurrent_partition_movements_per_broker=&concurrent_leader_movements=&json=&skip_hard_goal_check=&excluded_topics=&kafka_assigner=&use_ready_default_goals=&verbose=&exclude_recently_demoted_brokers=&exclude_recently_removed_brokers=&replica_movement_strategies=&execution_progress_check_interval_ms=&stop_ongoing_execution=&reason=&review_id=&data_from=&replication_throttle=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] brokerid = ; // array[Integer] | List of target broker ids.
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        Boolean throttleAddedBroker = true; // Boolean | Whether to throttle the added broker.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        String reason = reason_example; // String | Reason for request.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.addBroker(brokerid, dryrun, throttleAddedBroker, allowCapacityEstimation, goals, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#addBroker");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] brokerid = ; // array[Integer] | List of target broker ids.
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        Boolean throttleAddedBroker = true; // Boolean | Whether to throttle the added broker.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        String reason = reason_example; // String | Reason for request.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.addBroker(brokerid, dryrun, throttleAddedBroker, allowCapacityEstimation, goals, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#addBroker");
            e.printStackTrace();
        }
    }
}
array[Integer] *brokerid = ; // List of target broker ids.
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
Boolean *throttleAddedBroker = true; // Whether to throttle the added broker. (optional) (default to true)
Boolean *allowCapacityEstimation = true; // Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to true)
array[String] *goals = ; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
Integer *concurrentPartitionMovementsPerBroker = 56; // The upper bound of ongoing replica movements going into/out of each broker. (optional) (default to 5)
Integer *concurrentLeaderMovements = 56; // The upper bound of ongoing leadership movements. (optional) (default to 1000)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *skipHardGoalCheck = true; // Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
String *excludedTopics = excludedTopics_example; // Specify topic whose partition is excluded from replica movement. (optional)
Boolean *kafkaAssigner = true; // Whether to use Kafka assigner mode to general proposal. (optional) (default to false)
Boolean *useReadyDefaultGoals = true; // Whether to only use ready goals to generate proposal. (optional) (default to false)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *excludeRecentlyDemotedBrokers = true; // Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
Boolean *excludeRecentlyRemovedBrokers = true; // Whether to allow replicas to be moved to recently removed broker. (optional) (default to false)
array[String] *replicaMovementStrategies = ; // Replica movement strategies to use. (optional)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional)
Boolean *stopOngoingExecution = true; // Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
String *reason = reason_example; // Reason for request. (optional)
Integer *reviewId = 56; // Review id for 2FA. (optional)
String *dataFrom = dataFrom_example; // Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// addBroker
[apiInstance addBrokerWith:brokerid
    dryrun:dryrun
    throttleAddedBroker:throttleAddedBroker
    allowCapacityEstimation:allowCapacityEstimation
    goals:goals
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    concurrentLeaderMovements:concurrentLeaderMovements
    json:json
    skipHardGoalCheck:skipHardGoalCheck
    excludedTopics:excludedTopics
    kafkaAssigner:kafkaAssigner
    useReadyDefaultGoals:useReadyDefaultGoals
    verbose:verbose
    excludeRecentlyDemotedBrokers:excludeRecentlyDemotedBrokers
    excludeRecentlyRemovedBrokers:excludeRecentlyRemovedBrokers
    replicaMovementStrategies:replicaMovementStrategies
    executionProgressCheckIntervalMs:executionProgressCheckIntervalMs
    stopOngoingExecution:stopOngoingExecution
    reason:reason
    reviewId:reviewId
    dataFrom:dataFrom
    replicationThrottle:replicationThrottle
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(OptimizationResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var brokerid = ; // {{array[Integer]}} List of target broker ids.
var opts = { 
  'dryrun': true, // {{Boolean}} Whether to dry-run the request or not.
  'throttleAddedBroker': true, // {{Boolean}} Whether to throttle the added broker.
  'allowCapacityEstimation': true, // {{Boolean}} Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
  'goals': , // {{array[String]}} List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
  'concurrentPartitionMovementsPerBroker': 56, // {{Integer}} The upper bound of ongoing replica movements going into/out of each broker.
  'concurrentLeaderMovements': 56, // {{Integer}} The upper bound of ongoing leadership movements.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'skipHardGoalCheck': true, // {{Boolean}} Whether to allow hard goals be skipped in proposal generation.
  'excludedTopics': excludedTopics_example, // {{String}} Specify topic whose partition is excluded from replica movement.
  'kafkaAssigner': true, // {{Boolean}} Whether to use Kafka assigner mode to general proposal.
  'useReadyDefaultGoals': true, // {{Boolean}} Whether to only use ready goals to generate proposal.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'excludeRecentlyDemotedBrokers': true, // {{Boolean}} Whether to allow leader replicas to be moved to recently demoted broker.
  'excludeRecentlyRemovedBrokers': true, // {{Boolean}} Whether to allow replicas to be moved to recently removed broker.
  'replicaMovementStrategies': , // {{array[String]}} Replica movement strategies to use.
  'executionProgressCheckIntervalMs': 789, // {{Long}} Execution progress check interval in milliseconds.
  'stopOngoingExecution': true, // {{Boolean}} Whether to stop the ongoing execution (if any) and start executing the given request.
  'reason': reason_example, // {{String}} Reason for request.
  'reviewId': 56, // {{Integer}} Review id for 2FA.
  'dataFrom': dataFrom_example, // {{String}} Whether to calculate proposal from available valid partitions or valid windows.
  'replicationThrottle': 789, // {{Long}} Upper bound on the bandwidth in bytes per second used to move replicas.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addBroker(brokerid, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addBrokerExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var brokerid = new array[Integer](); // array[Integer] | List of target broker ids.
            var dryrun = true;  // Boolean | Whether to dry-run the request or not. (optional)  (default to true)
            var throttleAddedBroker = true;  // Boolean | Whether to throttle the added broker. (optional)  (default to true)
            var allowCapacityEstimation = true;  // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional)  (default to true)
            var goals = new array[String](); // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) 
            var concurrentPartitionMovementsPerBroker = 56;  // Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional)  (default to 5)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of ongoing leadership movements. (optional)  (default to 1000)
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var skipHardGoalCheck = true;  // Boolean | Whether to allow hard goals be skipped in proposal generation. (optional)  (default to false)
            var excludedTopics = excludedTopics_example;  // String | Specify topic whose partition is excluded from replica movement. (optional) 
            var kafkaAssigner = true;  // Boolean | Whether to use Kafka assigner mode to general proposal. (optional)  (default to false)
            var useReadyDefaultGoals = true;  // Boolean | Whether to only use ready goals to generate proposal. (optional)  (default to false)
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var excludeRecentlyDemotedBrokers = true;  // Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional)  (default to false)
            var excludeRecentlyRemovedBrokers = true;  // Boolean | Whether to allow replicas to be moved to recently removed broker. (optional)  (default to false)
            var replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use. (optional) 
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional) 
            var stopOngoingExecution = true;  // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional)  (default to false)
            var reason = reason_example;  // String | Reason for request. (optional) 
            var reviewId = 56;  // Integer | Review id for 2FA. (optional) 
            var dataFrom = dataFrom_example;  // String | Whether to calculate proposal from available valid partitions or valid windows. (optional)  (default to VALID_WINDOWS)
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) 
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // addBroker
                OptimizationResult result = apiInstance.addBroker(brokerid, dryrun, throttleAddedBroker, allowCapacityEstimation, goals, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.addBroker: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$brokerid = ; // array[Integer] | List of target broker ids.
$dryrun = true; // Boolean | Whether to dry-run the request or not.
$throttleAddedBroker = true; // Boolean | Whether to throttle the added broker.
$allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
$goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
$concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
$concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
$json = true; // Boolean | Whether to return in JSON format or not.
$skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
$excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
$kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
$useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
$verbose = true; // Boolean | Return detailed state information.
$excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
$excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
$replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
$executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
$stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
$reason = reason_example; // String | Reason for request.
$reviewId = 56; // Integer | Review id for 2FA.
$dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
$replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->addBroker($brokerid, $dryrun, $throttleAddedBroker, $allowCapacityEstimation, $goals, $concurrentPartitionMovementsPerBroker, $concurrentLeaderMovements, $json, $skipHardGoalCheck, $excludedTopics, $kafkaAssigner, $useReadyDefaultGoals, $verbose, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $replicaMovementStrategies, $executionProgressCheckIntervalMs, $stopOngoingExecution, $reason, $reviewId, $dataFrom, $replicationThrottle, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->addBroker: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $brokerid = []; # array[Integer] | List of target broker ids.
my $dryrun = true; # Boolean | Whether to dry-run the request or not.
my $throttleAddedBroker = true; # Boolean | Whether to throttle the added broker.
my $allowCapacityEstimation = true; # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
my $goals = []; # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
my $concurrentPartitionMovementsPerBroker = 56; # Integer | The upper bound of ongoing replica movements going into/out of each broker.
my $concurrentLeaderMovements = 56; # Integer | The upper bound of ongoing leadership movements.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $skipHardGoalCheck = true; # Boolean | Whether to allow hard goals be skipped in proposal generation.
my $excludedTopics = excludedTopics_example; # String | Specify topic whose partition is excluded from replica movement.
my $kafkaAssigner = true; # Boolean | Whether to use Kafka assigner mode to general proposal.
my $useReadyDefaultGoals = true; # Boolean | Whether to only use ready goals to generate proposal.
my $verbose = true; # Boolean | Return detailed state information.
my $excludeRecentlyDemotedBrokers = true; # Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
my $excludeRecentlyRemovedBrokers = true; # Boolean | Whether to allow replicas to be moved to recently removed broker.
my $replicaMovementStrategies = []; # array[String] | Replica movement strategies to use.
my $executionProgressCheckIntervalMs = 789; # Long | Execution progress check interval in milliseconds.
my $stopOngoingExecution = true; # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
my $reason = reason_example; # String | Reason for request.
my $reviewId = 56; # Integer | Review id for 2FA.
my $dataFrom = dataFrom_example; # String | Whether to calculate proposal from available valid partitions or valid windows.
my $replicationThrottle = 789; # Long | Upper bound on the bandwidth in bytes per second used to move replicas.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->addBroker(brokerid => $brokerid, dryrun => $dryrun, throttleAddedBroker => $throttleAddedBroker, allowCapacityEstimation => $allowCapacityEstimation, goals => $goals, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, concurrentLeaderMovements => $concurrentLeaderMovements, json => $json, skipHardGoalCheck => $skipHardGoalCheck, excludedTopics => $excludedTopics, kafkaAssigner => $kafkaAssigner, useReadyDefaultGoals => $useReadyDefaultGoals, verbose => $verbose, excludeRecentlyDemotedBrokers => $excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers => $excludeRecentlyRemovedBrokers, replicaMovementStrategies => $replicaMovementStrategies, executionProgressCheckIntervalMs => $executionProgressCheckIntervalMs, stopOngoingExecution => $stopOngoingExecution, reason => $reason, reviewId => $reviewId, dataFrom => $dataFrom, replicationThrottle => $replicationThrottle, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->addBroker: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
brokerid =  # array[Integer] | List of target broker ids.
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
throttleAddedBroker = true # Boolean | Whether to throttle the added broker. (optional) (default to true)
allowCapacityEstimation = true # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to true)
goals =  # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
concurrentPartitionMovementsPerBroker = 56 # Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional) (default to 5)
concurrentLeaderMovements = 56 # Integer | The upper bound of ongoing leadership movements. (optional) (default to 1000)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
skipHardGoalCheck = true # Boolean | Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
excludedTopics = excludedTopics_example # String | Specify topic whose partition is excluded from replica movement. (optional)
kafkaAssigner = true # Boolean | Whether to use Kafka assigner mode to general proposal. (optional) (default to false)
useReadyDefaultGoals = true # Boolean | Whether to only use ready goals to generate proposal. (optional) (default to false)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
excludeRecentlyDemotedBrokers = true # Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
excludeRecentlyRemovedBrokers = true # Boolean | Whether to allow replicas to be moved to recently removed broker. (optional) (default to false)
replicaMovementStrategies =  # array[String] | Replica movement strategies to use. (optional)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional)
stopOngoingExecution = true # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
reason = reason_example # String | Reason for request. (optional)
reviewId = 56 # Integer | Review id for 2FA. (optional)
dataFrom = dataFrom_example # String | Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # addBroker
    api_response = api_instance.add_broker(brokerid, dryrun=dryrun, throttleAddedBroker=throttleAddedBroker, allowCapacityEstimation=allowCapacityEstimation, goals=goals, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, concurrentLeaderMovements=concurrentLeaderMovements, json=json, skipHardGoalCheck=skipHardGoalCheck, excludedTopics=excludedTopics, kafkaAssigner=kafkaAssigner, useReadyDefaultGoals=useReadyDefaultGoals, verbose=verbose, excludeRecentlyDemotedBrokers=excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers=excludeRecentlyRemovedBrokers, replicaMovementStrategies=replicaMovementStrategies, executionProgressCheckIntervalMs=executionProgressCheckIntervalMs, stopOngoingExecution=stopOngoingExecution, reason=reason, reviewId=reviewId, dataFrom=dataFrom, replicationThrottle=replicationThrottle, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->addBroker: %s\n" % e)

Parameters

Query parameters
Name Description
brokerid*
array[Integer] (int32)
List of target broker ids.
Required
dryrun
Boolean
Whether to dry-run the request or not.
throttle_added_broker
Boolean
Whether to throttle the added broker.
allow_capacity_estimation
Boolean
Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
goals
array[String]
List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
concurrent_partition_movements_per_broker
Integer (int32)
The upper bound of ongoing replica movements going into/out of each broker.
concurrent_leader_movements
Integer (int32)
The upper bound of ongoing leadership movements.
json
Boolean
Whether to return in JSON format or not.
skip_hard_goal_check
Boolean
Whether to allow hard goals be skipped in proposal generation.
excluded_topics
String
Specify topic whose partition is excluded from replica movement.
kafka_assigner
Boolean
Whether to use Kafka assigner mode to general proposal.
use_ready_default_goals
Boolean
Whether to only use ready goals to generate proposal.
verbose
Boolean
Return detailed state information.
exclude_recently_demoted_brokers
Boolean
Whether to allow leader replicas to be moved to recently demoted broker.
exclude_recently_removed_brokers
Boolean
Whether to allow replicas to be moved to recently removed broker.
replica_movement_strategies
array[String]
Replica movement strategies to use.
execution_progress_check_interval_ms
Long (int64)
Execution progress check interval in milliseconds.
stop_ongoing_execution
Boolean
Whether to stop the ongoing execution (if any) and start executing the given request.
reason
String
Reason for request.
review_id
Integer (int32)
Review id for 2FA.
data_from
String
Whether to calculate proposal from available valid partitions or valid windows.
replication_throttle
Long (int64)
Upper bound on the bandwidth in bytes per second used to move replicas.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful add brokers response.

Status: default - Error response.


admin

admin

Dynamically change some configs of Cruise Control.


/kafkacruisecontrol/admin

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/admin?disable_self_healing_for=&enable_self_healing_for=&concurrent_partition_movements_per_broker=&concurrent_intra_broker_partition_movements=&concurrent_leader_movements=&drop_recently_removed_brokers=&drop_recently_demoted_brokers=&execution_progress_check_interval_ms=&review_id=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        array[String] disableSelfHealingFor = ; // array[String] | Disable self-healing for certain anomaly types.
        array[String] enableSelfHealingFor = ; // array[String] | Enable self-healing for certain anomaly types.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | Change upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentIntraBrokerPartitionMovements = 56; // Integer | Change upper bound of ongoing replica movements between disks within each broker.
        Integer concurrentLeaderMovements = 56; // Integer | Change upper bound of ongoing leadership movements.
        array[Integer] dropRecentlyRemovedBrokers = ; // array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
        array[Integer] dropRecentlyDemotedBrokers = ; // array[Integer] | Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers.
        Long executionProgressCheckIntervalMs = 789; // Long | Change execution progress check interval in milliseconds.
        Integer reviewId = 56; // Integer | Review id for 2FA
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            AdminResult result = apiInstance.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs, reviewId, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#admin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[String] disableSelfHealingFor = ; // array[String] | Disable self-healing for certain anomaly types.
        array[String] enableSelfHealingFor = ; // array[String] | Enable self-healing for certain anomaly types.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | Change upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentIntraBrokerPartitionMovements = 56; // Integer | Change upper bound of ongoing replica movements between disks within each broker.
        Integer concurrentLeaderMovements = 56; // Integer | Change upper bound of ongoing leadership movements.
        array[Integer] dropRecentlyRemovedBrokers = ; // array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
        array[Integer] dropRecentlyDemotedBrokers = ; // array[Integer] | Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers.
        Long executionProgressCheckIntervalMs = 789; // Long | Change execution progress check interval in milliseconds.
        Integer reviewId = 56; // Integer | Review id for 2FA
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            AdminResult result = apiInstance.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs, reviewId, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#admin");
            e.printStackTrace();
        }
    }
}
array[String] *disableSelfHealingFor = ; // Disable self-healing for certain anomaly types. (optional)
array[String] *enableSelfHealingFor = ; // Enable self-healing for certain anomaly types. (optional)
Integer *concurrentPartitionMovementsPerBroker = 56; // Change upper bound of ongoing replica movements going into/out of each broker. (optional)
Integer *concurrentIntraBrokerPartitionMovements = 56; // Change upper bound of ongoing replica movements between disks within each broker. (optional)
Integer *concurrentLeaderMovements = 56; // Change upper bound of ongoing leadership movements. (optional)
array[Integer] *dropRecentlyRemovedBrokers = ; // Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers. (optional)
array[Integer] *dropRecentlyDemotedBrokers = ; // Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers. (optional)
Long *executionProgressCheckIntervalMs = 789; // Change execution progress check interval in milliseconds. (optional)
Integer *reviewId = 56; // Review id for 2FA (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// admin
[apiInstance adminWith:disableSelfHealingFor
    enableSelfHealingFor:enableSelfHealingFor
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    concurrentIntraBrokerPartitionMovements:concurrentIntraBrokerPartitionMovements
    concurrentLeaderMovements:concurrentLeaderMovements
    dropRecentlyRemovedBrokers:dropRecentlyRemovedBrokers
    dropRecentlyDemotedBrokers:dropRecentlyDemotedBrokers
    executionProgressCheckIntervalMs:executionProgressCheckIntervalMs
    reviewId:reviewId
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(AdminResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'disableSelfHealingFor': , // {{array[String]}} Disable self-healing for certain anomaly types.
  'enableSelfHealingFor': , // {{array[String]}} Enable self-healing for certain anomaly types.
  'concurrentPartitionMovementsPerBroker': 56, // {{Integer}} Change upper bound of ongoing replica movements going into/out of each broker.
  'concurrentIntraBrokerPartitionMovements': 56, // {{Integer}} Change upper bound of ongoing replica movements between disks within each broker.
  'concurrentLeaderMovements': 56, // {{Integer}} Change upper bound of ongoing leadership movements.
  'dropRecentlyRemovedBrokers': , // {{array[Integer]}} Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
  'dropRecentlyDemotedBrokers': , // {{array[Integer]}} Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers.
  'executionProgressCheckIntervalMs': 789, // {{Long}} Change execution progress check interval in milliseconds.
  'reviewId': 56, // {{Integer}} Review id for 2FA
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.admin(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class adminExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var disableSelfHealingFor = new array[String](); // array[String] | Disable self-healing for certain anomaly types. (optional) 
            var enableSelfHealingFor = new array[String](); // array[String] | Enable self-healing for certain anomaly types. (optional) 
            var concurrentPartitionMovementsPerBroker = 56;  // Integer | Change upper bound of ongoing replica movements going into/out of each broker. (optional) 
            var concurrentIntraBrokerPartitionMovements = 56;  // Integer | Change upper bound of ongoing replica movements between disks within each broker. (optional) 
            var concurrentLeaderMovements = 56;  // Integer | Change upper bound of ongoing leadership movements. (optional) 
            var dropRecentlyRemovedBrokers = new array[Integer](); // array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers. (optional) 
            var dropRecentlyDemotedBrokers = new array[Integer](); // array[Integer] | Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers. (optional) 
            var executionProgressCheckIntervalMs = 789;  // Long | Change execution progress check interval in milliseconds. (optional) 
            var reviewId = 56;  // Integer | Review id for 2FA (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // admin
                AdminResult result = apiInstance.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs, reviewId, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.admin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$disableSelfHealingFor = ; // array[String] | Disable self-healing for certain anomaly types.
$enableSelfHealingFor = ; // array[String] | Enable self-healing for certain anomaly types.
$concurrentPartitionMovementsPerBroker = 56; // Integer | Change upper bound of ongoing replica movements going into/out of each broker.
$concurrentIntraBrokerPartitionMovements = 56; // Integer | Change upper bound of ongoing replica movements between disks within each broker.
$concurrentLeaderMovements = 56; // Integer | Change upper bound of ongoing leadership movements.
$dropRecentlyRemovedBrokers = ; // array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
$dropRecentlyDemotedBrokers = ; // array[Integer] | Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers.
$executionProgressCheckIntervalMs = 789; // Long | Change execution progress check interval in milliseconds.
$reviewId = 56; // Integer | Review id for 2FA
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->admin($disableSelfHealingFor, $enableSelfHealingFor, $concurrentPartitionMovementsPerBroker, $concurrentIntraBrokerPartitionMovements, $concurrentLeaderMovements, $dropRecentlyRemovedBrokers, $dropRecentlyDemotedBrokers, $executionProgressCheckIntervalMs, $reviewId, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->admin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $disableSelfHealingFor = []; # array[String] | Disable self-healing for certain anomaly types.
my $enableSelfHealingFor = []; # array[String] | Enable self-healing for certain anomaly types.
my $concurrentPartitionMovementsPerBroker = 56; # Integer | Change upper bound of ongoing replica movements going into/out of each broker.
my $concurrentIntraBrokerPartitionMovements = 56; # Integer | Change upper bound of ongoing replica movements between disks within each broker.
my $concurrentLeaderMovements = 56; # Integer | Change upper bound of ongoing leadership movements.
my $dropRecentlyRemovedBrokers = []; # array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
my $dropRecentlyDemotedBrokers = []; # array[Integer] | Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers.
my $executionProgressCheckIntervalMs = 789; # Long | Change execution progress check interval in milliseconds.
my $reviewId = 56; # Integer | Review id for 2FA
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->admin(disableSelfHealingFor => $disableSelfHealingFor, enableSelfHealingFor => $enableSelfHealingFor, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements => $concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements => $concurrentLeaderMovements, dropRecentlyRemovedBrokers => $dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers => $dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs => $executionProgressCheckIntervalMs, reviewId => $reviewId, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->admin: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
disableSelfHealingFor =  # array[String] | Disable self-healing for certain anomaly types. (optional)
enableSelfHealingFor =  # array[String] | Enable self-healing for certain anomaly types. (optional)
concurrentPartitionMovementsPerBroker = 56 # Integer | Change upper bound of ongoing replica movements going into/out of each broker. (optional)
concurrentIntraBrokerPartitionMovements = 56 # Integer | Change upper bound of ongoing replica movements between disks within each broker. (optional)
concurrentLeaderMovements = 56 # Integer | Change upper bound of ongoing leadership movements. (optional)
dropRecentlyRemovedBrokers =  # array[Integer] | Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers. (optional)
dropRecentlyDemotedBrokers =  # array[Integer] | Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers. (optional)
executionProgressCheckIntervalMs = 789 # Long | Change execution progress check interval in milliseconds. (optional)
reviewId = 56 # Integer | Review id for 2FA (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # admin
    api_response = api_instance.admin(disableSelfHealingFor=disableSelfHealingFor, enableSelfHealingFor=enableSelfHealingFor, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements=concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements=concurrentLeaderMovements, dropRecentlyRemovedBrokers=dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers=dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs=executionProgressCheckIntervalMs, reviewId=reviewId, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->admin: %s\n" % e)

Parameters

Query parameters
Name Description
disable_self_healing_for
array[String]
Disable self-healing for certain anomaly types.
enable_self_healing_for
array[String]
Enable self-healing for certain anomaly types.
concurrent_partition_movements_per_broker
Integer (int32)
Change upper bound of ongoing replica movements going into/out of each broker.
concurrent_intra_broker_partition_movements
Integer (int32)
Change upper bound of ongoing replica movements between disks within each broker.
concurrent_leader_movements
Integer (int32)
Change upper bound of ongoing leadership movements.
drop_recently_removed_brokers
array[Integer] (int32)
Drop broker ids from recently removed broker list so that Cruise Control can move replicas to these brokers.
drop_recently_demoted_brokers
array[Integer] (int32)
Drop broker ids from recently demoted broker list so that Cruise Control can move leader replicas or to transfer replica leadership to these brokers.
execution_progress_check_interval_ms
Long (int64)
Change execution progress check interval in milliseconds.
review_id
Integer (int32)
Review id for 2FA
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful admin response.

Status: default - Error response.


bootstrap

bootstrap

Bootstrap Cruise Control.


/kafkacruisecontrol/bootstrap

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/bootstrap?start=&end=&clearmetrics=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Long start = 789; // Long | Timestamp in millisecond of earliest metrics sample to load during bootstrap.
        Long end = 789; // Long | Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified.
        Boolean clearmetrics = true; // Boolean | Whethere clear the collected metrics sample during bootstrap.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            BootstrapResult result = apiInstance.bootstrap(start, end, clearmetrics, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#bootstrap");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Long start = 789; // Long | Timestamp in millisecond of earliest metrics sample to load during bootstrap.
        Long end = 789; // Long | Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified.
        Boolean clearmetrics = true; // Boolean | Whethere clear the collected metrics sample during bootstrap.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            BootstrapResult result = apiInstance.bootstrap(start, end, clearmetrics, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#bootstrap");
            e.printStackTrace();
        }
    }
}
Long *start = 789; // Timestamp in millisecond of earliest metrics sample to load during bootstrap. (optional) (default to -1)
Long *end = 789; // Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified. (optional)
Boolean *clearmetrics = true; // Whethere clear the collected metrics sample during bootstrap. (optional) (default to false)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// bootstrap
[apiInstance bootstrapWith:start
    end:end
    clearmetrics:clearmetrics
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(BootstrapResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'start': 789, // {{Long}} Timestamp in millisecond of earliest metrics sample to load during bootstrap.
  'end': 789, // {{Long}} Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified.
  'clearmetrics': true, // {{Boolean}} Whethere clear the collected metrics sample during bootstrap.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.bootstrap(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class bootstrapExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var start = 789;  // Long | Timestamp in millisecond of earliest metrics sample to load during bootstrap. (optional)  (default to -1)
            var end = 789;  // Long | Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified. (optional) 
            var clearmetrics = true;  // Boolean | Whethere clear the collected metrics sample during bootstrap. (optional)  (default to false)
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // bootstrap
                BootstrapResult result = apiInstance.bootstrap(start, end, clearmetrics, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.bootstrap: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$start = 789; // Long | Timestamp in millisecond of earliest metrics sample to load during bootstrap.
$end = 789; // Long | Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified.
$clearmetrics = true; // Boolean | Whethere clear the collected metrics sample during bootstrap.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->bootstrap($start, $end, $clearmetrics, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->bootstrap: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $start = 789; # Long | Timestamp in millisecond of earliest metrics sample to load during bootstrap.
my $end = 789; # Long | Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified.
my $clearmetrics = true; # Boolean | Whethere clear the collected metrics sample during bootstrap.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->bootstrap(start => $start, end => $end, clearmetrics => $clearmetrics, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->bootstrap: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
start = 789 # Long | Timestamp in millisecond of earliest metrics sample to load during bootstrap. (optional) (default to -1)
end = 789 # Long | Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified. (optional)
clearmetrics = true # Boolean | Whethere clear the collected metrics sample during bootstrap. (optional) (default to false)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # bootstrap
    api_response = api_instance.bootstrap(start=start, end=end, clearmetrics=clearmetrics, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->bootstrap: %s\n" % e)

Parameters

Query parameters
Name Description
start
Long (int64)
Timestamp in millisecond of earliest metrics sample to load during bootstrap.
end
Long (int64)
Timestamp in millisecond of latest metrics sample to load during bootstrap, current time will be used if this parameter is not specified.
clearmetrics
Boolean
Whethere clear the collected metrics sample during bootstrap.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful admin response.

Status: default - Error response.


changetheconfigurationofatopic

Change the configuration of a topic

Change the configuration of a topic


/kafkacruisecontrol/topic_configuration

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/topic_configuration?dryrun=&topic=&replication_factor=&data_from=&goals=&allow_capacity_estimation=&concurrent_partition_movements_per_broker=&concurrent_leader_movements=&skip_hard_goal_check=&exclude_recently_demoted_brokers=&exclude_recently_removed_brokers=&excluded_topics=&execution_progress_check_interval_ms=&reason=&replica_movement_strategies=&replication_throttle=&json=&review_id=&skip_rack_awareness_check=&stop_ongoing_execution=&use_ready_default_goals=&verbose=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        String topic = topic_example; // String | Regular expression to specify subject topics.
        Integer replicationFactor = 56; // Integer | Target replication factor.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        String reason = reason_example; // String | Reason for request.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        String reviewId = reviewId_example; // String | Review id for 2FA.
        Boolean skipRackAwarenessCheck = true; // Boolean | Whether to allow rack awareness check to be skipped.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.changetheconfigurationofatopic(dryrun, topic, replicationFactor, dataFrom, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, skipHardGoalCheck, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, excludedTopics, executionProgressCheckIntervalMs, reason, replicaMovementStrategies, replicationThrottle, json, reviewId, skipRackAwarenessCheck, stopOngoingExecution, useReadyDefaultGoals, verbose, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#changetheconfigurationofatopic");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        String topic = topic_example; // String | Regular expression to specify subject topics.
        Integer replicationFactor = 56; // Integer | Target replication factor.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        String reason = reason_example; // String | Reason for request.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        String reviewId = reviewId_example; // String | Review id for 2FA.
        Boolean skipRackAwarenessCheck = true; // Boolean | Whether to allow rack awareness check to be skipped.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.changetheconfigurationofatopic(dryrun, topic, replicationFactor, dataFrom, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, skipHardGoalCheck, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, excludedTopics, executionProgressCheckIntervalMs, reason, replicaMovementStrategies, replicationThrottle, json, reviewId, skipRackAwarenessCheck, stopOngoingExecution, useReadyDefaultGoals, verbose, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#changetheconfigurationofatopic");
            e.printStackTrace();
        }
    }
}
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
String *topic = topic_example; // Regular expression to specify subject topics. (optional)
Integer *replicationFactor = 56; // Target replication factor. (optional)
String *dataFrom = dataFrom_example; // Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
array[String] *goals = ; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
Boolean *allowCapacityEstimation = true; // Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to false)
Integer *concurrentPartitionMovementsPerBroker = 56; // The upper bound of ongoing replica movements going into/out of each broker. (optional)
Integer *concurrentLeaderMovements = 56; // The upper bound of ongoing leadership movements. (optional)
Boolean *skipHardGoalCheck = true; // Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
Boolean *excludeRecentlyDemotedBrokers = true; // Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
Boolean *excludeRecentlyRemovedBrokers = true; // Whether to allow replicas to be moved to recently removed broker. (optional) (default to false)
String *excludedTopics = excludedTopics_example; // Specify topic whose partition is excluded from replica movement. (optional)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional)
String *reason = reason_example; // Reason for request. (optional)
array[String] *replicaMovementStrategies = ; // Replica movement strategies to use. (optional)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
String *reviewId = reviewId_example; // Review id for 2FA. (optional)
Boolean *skipRackAwarenessCheck = true; // Whether to allow rack awareness check to be skipped. (optional) (default to false)
Boolean *stopOngoingExecution = true; // Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
Boolean *useReadyDefaultGoals = true; // Whether to only use ready goals to generate proposal. (optional) (default to false)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Change the configuration of a topic
[apiInstance changetheconfigurationofatopicWith:dryrun
    topic:topic
    replicationFactor:replicationFactor
    dataFrom:dataFrom
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    concurrentLeaderMovements:concurrentLeaderMovements
    skipHardGoalCheck:skipHardGoalCheck
    excludeRecentlyDemotedBrokers:excludeRecentlyDemotedBrokers
    excludeRecentlyRemovedBrokers:excludeRecentlyRemovedBrokers
    excludedTopics:excludedTopics
    executionProgressCheckIntervalMs:executionProgressCheckIntervalMs
    reason:reason
    replicaMovementStrategies:replicaMovementStrategies
    replicationThrottle:replicationThrottle
    json:json
    reviewId:reviewId
    skipRackAwarenessCheck:skipRackAwarenessCheck
    stopOngoingExecution:stopOngoingExecution
    useReadyDefaultGoals:useReadyDefaultGoals
    verbose:verbose
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(OptimizationResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'dryrun': true, // {{Boolean}} Whether to dry-run the request or not.
  'topic': topic_example, // {{String}} Regular expression to specify subject topics.
  'replicationFactor': 56, // {{Integer}} Target replication factor.
  'dataFrom': dataFrom_example, // {{String}} Whether to calculate proposal from available valid partitions or valid windows.
  'goals': , // {{array[String]}} List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
  'allowCapacityEstimation': true, // {{Boolean}} Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
  'concurrentPartitionMovementsPerBroker': 56, // {{Integer}} The upper bound of ongoing replica movements going into/out of each broker.
  'concurrentLeaderMovements': 56, // {{Integer}} The upper bound of ongoing leadership movements.
  'skipHardGoalCheck': true, // {{Boolean}} Whether to allow hard goals be skipped in proposal generation.
  'excludeRecentlyDemotedBrokers': true, // {{Boolean}} Whether to allow leader replicas to be moved to recently demoted broker.
  'excludeRecentlyRemovedBrokers': true, // {{Boolean}} Whether to allow replicas to be moved to recently removed broker.
  'excludedTopics': excludedTopics_example, // {{String}} Specify topic whose partition is excluded from replica movement.
  'executionProgressCheckIntervalMs': 789, // {{Long}} Execution progress check interval in milliseconds.
  'reason': reason_example, // {{String}} Reason for request.
  'replicaMovementStrategies': , // {{array[String]}} Replica movement strategies to use.
  'replicationThrottle': 789, // {{Long}} Upper bound on the bandwidth in bytes per second used to move replicas.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'reviewId': reviewId_example, // {{String}} Review id for 2FA.
  'skipRackAwarenessCheck': true, // {{Boolean}} Whether to allow rack awareness check to be skipped.
  'stopOngoingExecution': true, // {{Boolean}} Whether to stop the ongoing execution (if any) and start executing the given request.
  'useReadyDefaultGoals': true, // {{Boolean}} Whether to only use ready goals to generate proposal.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.changetheconfigurationofatopic(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class changetheconfigurationofatopicExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var dryrun = true;  // Boolean | Whether to dry-run the request or not. (optional)  (default to true)
            var topic = topic_example;  // String | Regular expression to specify subject topics. (optional) 
            var replicationFactor = 56;  // Integer | Target replication factor. (optional) 
            var dataFrom = dataFrom_example;  // String | Whether to calculate proposal from available valid partitions or valid windows. (optional)  (default to VALID_WINDOWS)
            var goals = new array[String](); // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) 
            var allowCapacityEstimation = true;  // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional)  (default to false)
            var concurrentPartitionMovementsPerBroker = 56;  // Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional) 
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of ongoing leadership movements. (optional) 
            var skipHardGoalCheck = true;  // Boolean | Whether to allow hard goals be skipped in proposal generation. (optional)  (default to false)
            var excludeRecentlyDemotedBrokers = true;  // Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional)  (default to false)
            var excludeRecentlyRemovedBrokers = true;  // Boolean | Whether to allow replicas to be moved to recently removed broker. (optional)  (default to false)
            var excludedTopics = excludedTopics_example;  // String | Specify topic whose partition is excluded from replica movement. (optional) 
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional) 
            var reason = reason_example;  // String | Reason for request. (optional) 
            var replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use. (optional) 
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var reviewId = reviewId_example;  // String | Review id for 2FA. (optional) 
            var skipRackAwarenessCheck = true;  // Boolean | Whether to allow rack awareness check to be skipped. (optional)  (default to false)
            var stopOngoingExecution = true;  // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional)  (default to false)
            var useReadyDefaultGoals = true;  // Boolean | Whether to only use ready goals to generate proposal. (optional)  (default to false)
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // Change the configuration of a topic
                OptimizationResult result = apiInstance.changetheconfigurationofatopic(dryrun, topic, replicationFactor, dataFrom, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, skipHardGoalCheck, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, excludedTopics, executionProgressCheckIntervalMs, reason, replicaMovementStrategies, replicationThrottle, json, reviewId, skipRackAwarenessCheck, stopOngoingExecution, useReadyDefaultGoals, verbose, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.changetheconfigurationofatopic: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$dryrun = true; // Boolean | Whether to dry-run the request or not.
$topic = topic_example; // String | Regular expression to specify subject topics.
$replicationFactor = 56; // Integer | Target replication factor.
$dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
$goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
$allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
$concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
$concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
$skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
$excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
$excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
$excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
$executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
$reason = reason_example; // String | Reason for request.
$replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
$replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
$json = true; // Boolean | Whether to return in JSON format or not.
$reviewId = reviewId_example; // String | Review id for 2FA.
$skipRackAwarenessCheck = true; // Boolean | Whether to allow rack awareness check to be skipped.
$stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
$useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
$verbose = true; // Boolean | Return detailed state information.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->changetheconfigurationofatopic($dryrun, $topic, $replicationFactor, $dataFrom, $goals, $allowCapacityEstimation, $concurrentPartitionMovementsPerBroker, $concurrentLeaderMovements, $skipHardGoalCheck, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $excludedTopics, $executionProgressCheckIntervalMs, $reason, $replicaMovementStrategies, $replicationThrottle, $json, $reviewId, $skipRackAwarenessCheck, $stopOngoingExecution, $useReadyDefaultGoals, $verbose, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->changetheconfigurationofatopic: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $dryrun = true; # Boolean | Whether to dry-run the request or not.
my $topic = topic_example; # String | Regular expression to specify subject topics.
my $replicationFactor = 56; # Integer | Target replication factor.
my $dataFrom = dataFrom_example; # String | Whether to calculate proposal from available valid partitions or valid windows.
my $goals = []; # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
my $allowCapacityEstimation = true; # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
my $concurrentPartitionMovementsPerBroker = 56; # Integer | The upper bound of ongoing replica movements going into/out of each broker.
my $concurrentLeaderMovements = 56; # Integer | The upper bound of ongoing leadership movements.
my $skipHardGoalCheck = true; # Boolean | Whether to allow hard goals be skipped in proposal generation.
my $excludeRecentlyDemotedBrokers = true; # Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
my $excludeRecentlyRemovedBrokers = true; # Boolean | Whether to allow replicas to be moved to recently removed broker.
my $excludedTopics = excludedTopics_example; # String | Specify topic whose partition is excluded from replica movement.
my $executionProgressCheckIntervalMs = 789; # Long | Execution progress check interval in milliseconds.
my $reason = reason_example; # String | Reason for request.
my $replicaMovementStrategies = []; # array[String] | Replica movement strategies to use.
my $replicationThrottle = 789; # Long | Upper bound on the bandwidth in bytes per second used to move replicas.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $reviewId = reviewId_example; # String | Review id for 2FA.
my $skipRackAwarenessCheck = true; # Boolean | Whether to allow rack awareness check to be skipped.
my $stopOngoingExecution = true; # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
my $useReadyDefaultGoals = true; # Boolean | Whether to only use ready goals to generate proposal.
my $verbose = true; # Boolean | Return detailed state information.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->changetheconfigurationofatopic(dryrun => $dryrun, topic => $topic, replicationFactor => $replicationFactor, dataFrom => $dataFrom, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, concurrentLeaderMovements => $concurrentLeaderMovements, skipHardGoalCheck => $skipHardGoalCheck, excludeRecentlyDemotedBrokers => $excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers => $excludeRecentlyRemovedBrokers, excludedTopics => $excludedTopics, executionProgressCheckIntervalMs => $executionProgressCheckIntervalMs, reason => $reason, replicaMovementStrategies => $replicaMovementStrategies, replicationThrottle => $replicationThrottle, json => $json, reviewId => $reviewId, skipRackAwarenessCheck => $skipRackAwarenessCheck, stopOngoingExecution => $stopOngoingExecution, useReadyDefaultGoals => $useReadyDefaultGoals, verbose => $verbose, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->changetheconfigurationofatopic: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
topic = topic_example # String | Regular expression to specify subject topics. (optional)
replicationFactor = 56 # Integer | Target replication factor. (optional)
dataFrom = dataFrom_example # String | Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
goals =  # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
allowCapacityEstimation = true # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to false)
concurrentPartitionMovementsPerBroker = 56 # Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional)
concurrentLeaderMovements = 56 # Integer | The upper bound of ongoing leadership movements. (optional)
skipHardGoalCheck = true # Boolean | Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
excludeRecentlyDemotedBrokers = true # Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
excludeRecentlyRemovedBrokers = true # Boolean | Whether to allow replicas to be moved to recently removed broker. (optional) (default to false)
excludedTopics = excludedTopics_example # String | Specify topic whose partition is excluded from replica movement. (optional)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional)
reason = reason_example # String | Reason for request. (optional)
replicaMovementStrategies =  # array[String] | Replica movement strategies to use. (optional)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
reviewId = reviewId_example # String | Review id for 2FA. (optional)
skipRackAwarenessCheck = true # Boolean | Whether to allow rack awareness check to be skipped. (optional) (default to false)
stopOngoingExecution = true # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
useReadyDefaultGoals = true # Boolean | Whether to only use ready goals to generate proposal. (optional) (default to false)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # Change the configuration of a topic
    api_response = api_instance.changetheconfigurationofatopic(dryrun=dryrun, topic=topic, replicationFactor=replicationFactor, dataFrom=dataFrom, goals=goals, allowCapacityEstimation=allowCapacityEstimation, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, concurrentLeaderMovements=concurrentLeaderMovements, skipHardGoalCheck=skipHardGoalCheck, excludeRecentlyDemotedBrokers=excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers=excludeRecentlyRemovedBrokers, excludedTopics=excludedTopics, executionProgressCheckIntervalMs=executionProgressCheckIntervalMs, reason=reason, replicaMovementStrategies=replicaMovementStrategies, replicationThrottle=replicationThrottle, json=json, reviewId=reviewId, skipRackAwarenessCheck=skipRackAwarenessCheck, stopOngoingExecution=stopOngoingExecution, useReadyDefaultGoals=useReadyDefaultGoals, verbose=verbose, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->changetheconfigurationofatopic: %s\n" % e)

Parameters

Query parameters
Name Description
dryrun
Boolean
Whether to dry-run the request or not.
topic
String
Regular expression to specify subject topics.
replication_factor
Integer (int32)
Target replication factor.
data_from
String
Whether to calculate proposal from available valid partitions or valid windows.
goals
array[String]
List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
allow_capacity_estimation
Boolean
Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
concurrent_partition_movements_per_broker
Integer (int32)
The upper bound of ongoing replica movements going into/out of each broker.
concurrent_leader_movements
Integer (int32)
The upper bound of ongoing leadership movements.
skip_hard_goal_check
Boolean
Whether to allow hard goals be skipped in proposal generation.
exclude_recently_demoted_brokers
Boolean
Whether to allow leader replicas to be moved to recently demoted broker.
exclude_recently_removed_brokers
Boolean
Whether to allow replicas to be moved to recently removed broker.
excluded_topics
String
Specify topic whose partition is excluded from replica movement.
execution_progress_check_interval_ms
Long (int64)
Execution progress check interval in milliseconds.
reason
String
Reason for request.
replica_movement_strategies
array[String]
Replica movement strategies to use.
replication_throttle
Long (int64)
Upper bound on the bandwidth in bytes per second used to move replicas.
json
Boolean
Whether to return in JSON format or not.
review_id
String
Review id for 2FA.
skip_rack_awareness_check
Boolean
Whether to allow rack awareness check to be skipped.
stop_ongoing_execution
Boolean
Whether to stop the ongoing execution (if any) and start executing the given request.
use_ready_default_goals
Boolean
Whether to only use ready goals to generate proposal.
verbose
Boolean
Return detailed state information.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful topic configuration response.

Status: default - Error response.


demoteBroker

demoteBroker

Demote specified brokers.


/kafkacruisecontrol/demote_broker

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/demote_broker?brokerid=&dryrun=&concurrent_leader_movements=&allow_capacity_estimation=&json=&skip_urp_demotion=&exclude_follower_demotion=&verbose=&exclude_recently_demoted_brokers=&replica_movement_strategies=&brokerid_and_logdirs=&replication_throttle=&reason=&execution_progress_check_interval_ms=&stop_ongoing_execution=&review_id=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] brokerid = ; // array[Integer] | List of target broker ids.
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipUrpDemotion = true; // Boolean | Whether to operate on partitions which are currently under-replicated.
        Boolean excludeFollowerDemotion = true; // Boolean | Whether to operate on partitions which only have follower replicas on the specified broker(s).
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        String brokeridAndLogdirs = brokeridAndLogdirs_example; // String | List of broker id and logdir pair to be demoted in the cluster.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        String reason = reason_example; // String | Reason for request.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.demoteBroker(brokerid, dryrun, concurrentLeaderMovements, allowCapacityEstimation, json, skipUrpDemotion, excludeFollowerDemotion, verbose, excludeRecentlyDemotedBrokers, replicaMovementStrategies, brokeridAndLogdirs, replicationThrottle, reason, executionProgressCheckIntervalMs, stopOngoingExecution, reviewId, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#demoteBroker");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] brokerid = ; // array[Integer] | List of target broker ids.
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipUrpDemotion = true; // Boolean | Whether to operate on partitions which are currently under-replicated.
        Boolean excludeFollowerDemotion = true; // Boolean | Whether to operate on partitions which only have follower replicas on the specified broker(s).
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        String brokeridAndLogdirs = brokeridAndLogdirs_example; // String | List of broker id and logdir pair to be demoted in the cluster.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        String reason = reason_example; // String | Reason for request.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.demoteBroker(brokerid, dryrun, concurrentLeaderMovements, allowCapacityEstimation, json, skipUrpDemotion, excludeFollowerDemotion, verbose, excludeRecentlyDemotedBrokers, replicaMovementStrategies, brokeridAndLogdirs, replicationThrottle, reason, executionProgressCheckIntervalMs, stopOngoingExecution, reviewId, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#demoteBroker");
            e.printStackTrace();
        }
    }
}
array[Integer] *brokerid = ; // List of target broker ids.
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
Integer *concurrentLeaderMovements = 56; // The upper bound of ongoing leadership movements. (optional) (default to 1000)
Boolean *allowCapacityEstimation = true; // Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to true)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *skipUrpDemotion = true; // Whether to operate on partitions which are currently under-replicated. (optional) (default to false)
Boolean *excludeFollowerDemotion = true; // Whether to operate on partitions which only have follower replicas on the specified broker(s). (optional) (default to true)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *excludeRecentlyDemotedBrokers = true; // Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
array[String] *replicaMovementStrategies = ; // Replica movement strategies to use. (optional)
String *brokeridAndLogdirs = brokeridAndLogdirs_example; // List of broker id and logdir pair to be demoted in the cluster. (optional)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
String *reason = reason_example; // Reason for request. (optional)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional)
Boolean *stopOngoingExecution = true; // Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
Integer *reviewId = 56; // Review id for 2FA. (optional)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// demoteBroker
[apiInstance demoteBrokerWith:brokerid
    dryrun:dryrun
    concurrentLeaderMovements:concurrentLeaderMovements
    allowCapacityEstimation:allowCapacityEstimation
    json:json
    skipUrpDemotion:skipUrpDemotion
    excludeFollowerDemotion:excludeFollowerDemotion
    verbose:verbose
    excludeRecentlyDemotedBrokers:excludeRecentlyDemotedBrokers
    replicaMovementStrategies:replicaMovementStrategies
    brokeridAndLogdirs:brokeridAndLogdirs
    replicationThrottle:replicationThrottle
    reason:reason
    executionProgressCheckIntervalMs:executionProgressCheckIntervalMs
    stopOngoingExecution:stopOngoingExecution
    reviewId:reviewId
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(OptimizationResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var brokerid = ; // {{array[Integer]}} List of target broker ids.
var opts = { 
  'dryrun': true, // {{Boolean}} Whether to dry-run the request or not.
  'concurrentLeaderMovements': 56, // {{Integer}} The upper bound of ongoing leadership movements.
  'allowCapacityEstimation': true, // {{Boolean}} Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'skipUrpDemotion': true, // {{Boolean}} Whether to operate on partitions which are currently under-replicated.
  'excludeFollowerDemotion': true, // {{Boolean}} Whether to operate on partitions which only have follower replicas on the specified broker(s).
  'verbose': true, // {{Boolean}} Return detailed state information.
  'excludeRecentlyDemotedBrokers': true, // {{Boolean}} Whether to allow leader replicas to be moved to recently demoted broker.
  'replicaMovementStrategies': , // {{array[String]}} Replica movement strategies to use.
  'brokeridAndLogdirs': brokeridAndLogdirs_example, // {{String}} List of broker id and logdir pair to be demoted in the cluster.
  'replicationThrottle': 789, // {{Long}} Upper bound on the bandwidth in bytes per second used to move replicas.
  'reason': reason_example, // {{String}} Reason for request.
  'executionProgressCheckIntervalMs': 789, // {{Long}} Execution progress check interval in milliseconds.
  'stopOngoingExecution': true, // {{Boolean}} Whether to stop the ongoing execution (if any) and start executing the given request.
  'reviewId': 56, // {{Integer}} Review id for 2FA.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.demoteBroker(brokerid, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class demoteBrokerExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var brokerid = new array[Integer](); // array[Integer] | List of target broker ids.
            var dryrun = true;  // Boolean | Whether to dry-run the request or not. (optional)  (default to true)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of ongoing leadership movements. (optional)  (default to 1000)
            var allowCapacityEstimation = true;  // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional)  (default to true)
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var skipUrpDemotion = true;  // Boolean | Whether to operate on partitions which are currently under-replicated. (optional)  (default to false)
            var excludeFollowerDemotion = true;  // Boolean | Whether to operate on partitions which only have follower replicas on the specified broker(s). (optional)  (default to true)
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var excludeRecentlyDemotedBrokers = true;  // Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional)  (default to false)
            var replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use. (optional) 
            var brokeridAndLogdirs = brokeridAndLogdirs_example;  // String | List of broker id and logdir pair to be demoted in the cluster. (optional) 
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) 
            var reason = reason_example;  // String | Reason for request. (optional) 
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional) 
            var stopOngoingExecution = true;  // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional)  (default to false)
            var reviewId = 56;  // Integer | Review id for 2FA. (optional) 
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // demoteBroker
                OptimizationResult result = apiInstance.demoteBroker(brokerid, dryrun, concurrentLeaderMovements, allowCapacityEstimation, json, skipUrpDemotion, excludeFollowerDemotion, verbose, excludeRecentlyDemotedBrokers, replicaMovementStrategies, brokeridAndLogdirs, replicationThrottle, reason, executionProgressCheckIntervalMs, stopOngoingExecution, reviewId, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.demoteBroker: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$brokerid = ; // array[Integer] | List of target broker ids.
$dryrun = true; // Boolean | Whether to dry-run the request or not.
$concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
$allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
$json = true; // Boolean | Whether to return in JSON format or not.
$skipUrpDemotion = true; // Boolean | Whether to operate on partitions which are currently under-replicated.
$excludeFollowerDemotion = true; // Boolean | Whether to operate on partitions which only have follower replicas on the specified broker(s).
$verbose = true; // Boolean | Return detailed state information.
$excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
$replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
$brokeridAndLogdirs = brokeridAndLogdirs_example; // String | List of broker id and logdir pair to be demoted in the cluster.
$replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
$reason = reason_example; // String | Reason for request.
$executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
$stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
$reviewId = 56; // Integer | Review id for 2FA.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->demoteBroker($brokerid, $dryrun, $concurrentLeaderMovements, $allowCapacityEstimation, $json, $skipUrpDemotion, $excludeFollowerDemotion, $verbose, $excludeRecentlyDemotedBrokers, $replicaMovementStrategies, $brokeridAndLogdirs, $replicationThrottle, $reason, $executionProgressCheckIntervalMs, $stopOngoingExecution, $reviewId, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->demoteBroker: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $brokerid = []; # array[Integer] | List of target broker ids.
my $dryrun = true; # Boolean | Whether to dry-run the request or not.
my $concurrentLeaderMovements = 56; # Integer | The upper bound of ongoing leadership movements.
my $allowCapacityEstimation = true; # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $skipUrpDemotion = true; # Boolean | Whether to operate on partitions which are currently under-replicated.
my $excludeFollowerDemotion = true; # Boolean | Whether to operate on partitions which only have follower replicas on the specified broker(s).
my $verbose = true; # Boolean | Return detailed state information.
my $excludeRecentlyDemotedBrokers = true; # Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
my $replicaMovementStrategies = []; # array[String] | Replica movement strategies to use.
my $brokeridAndLogdirs = brokeridAndLogdirs_example; # String | List of broker id and logdir pair to be demoted in the cluster.
my $replicationThrottle = 789; # Long | Upper bound on the bandwidth in bytes per second used to move replicas.
my $reason = reason_example; # String | Reason for request.
my $executionProgressCheckIntervalMs = 789; # Long | Execution progress check interval in milliseconds.
my $stopOngoingExecution = true; # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
my $reviewId = 56; # Integer | Review id for 2FA.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->demoteBroker(brokerid => $brokerid, dryrun => $dryrun, concurrentLeaderMovements => $concurrentLeaderMovements, allowCapacityEstimation => $allowCapacityEstimation, json => $json, skipUrpDemotion => $skipUrpDemotion, excludeFollowerDemotion => $excludeFollowerDemotion, verbose => $verbose, excludeRecentlyDemotedBrokers => $excludeRecentlyDemotedBrokers, replicaMovementStrategies => $replicaMovementStrategies, brokeridAndLogdirs => $brokeridAndLogdirs, replicationThrottle => $replicationThrottle, reason => $reason, executionProgressCheckIntervalMs => $executionProgressCheckIntervalMs, stopOngoingExecution => $stopOngoingExecution, reviewId => $reviewId, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->demoteBroker: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
brokerid =  # array[Integer] | List of target broker ids.
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
concurrentLeaderMovements = 56 # Integer | The upper bound of ongoing leadership movements. (optional) (default to 1000)
allowCapacityEstimation = true # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to true)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
skipUrpDemotion = true # Boolean | Whether to operate on partitions which are currently under-replicated. (optional) (default to false)
excludeFollowerDemotion = true # Boolean | Whether to operate on partitions which only have follower replicas on the specified broker(s). (optional) (default to true)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
excludeRecentlyDemotedBrokers = true # Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
replicaMovementStrategies =  # array[String] | Replica movement strategies to use. (optional)
brokeridAndLogdirs = brokeridAndLogdirs_example # String | List of broker id and logdir pair to be demoted in the cluster. (optional)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
reason = reason_example # String | Reason for request. (optional)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional)
stopOngoingExecution = true # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
reviewId = 56 # Integer | Review id for 2FA. (optional)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # demoteBroker
    api_response = api_instance.demote_broker(brokerid, dryrun=dryrun, concurrentLeaderMovements=concurrentLeaderMovements, allowCapacityEstimation=allowCapacityEstimation, json=json, skipUrpDemotion=skipUrpDemotion, excludeFollowerDemotion=excludeFollowerDemotion, verbose=verbose, excludeRecentlyDemotedBrokers=excludeRecentlyDemotedBrokers, replicaMovementStrategies=replicaMovementStrategies, brokeridAndLogdirs=brokeridAndLogdirs, replicationThrottle=replicationThrottle, reason=reason, executionProgressCheckIntervalMs=executionProgressCheckIntervalMs, stopOngoingExecution=stopOngoingExecution, reviewId=reviewId, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->demoteBroker: %s\n" % e)

Parameters

Query parameters
Name Description
brokerid*
array[Integer] (int32)
List of target broker ids.
Required
dryrun
Boolean
Whether to dry-run the request or not.
concurrent_leader_movements
Integer (int32)
The upper bound of ongoing leadership movements.
allow_capacity_estimation
Boolean
Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
json
Boolean
Whether to return in JSON format or not.
skip_urp_demotion
Boolean
Whether to operate on partitions which are currently under-replicated.
exclude_follower_demotion
Boolean
Whether to operate on partitions which only have follower replicas on the specified broker(s).
verbose
Boolean
Return detailed state information.
exclude_recently_demoted_brokers
Boolean
Whether to allow leader replicas to be moved to recently demoted broker.
replica_movement_strategies
array[String]
Replica movement strategies to use.
brokerid_and_logdirs
String
List of broker id and logdir pair to be demoted in the cluster.
replication_throttle
Long (int64)
Upper bound on the bandwidth in bytes per second used to move replicas.
reason
String
Reason for request.
execution_progress_check_interval_ms
Long (int64)
Execution progress check interval in milliseconds.
stop_ongoing_execution
Boolean
Whether to stop the ongoing execution (if any) and start executing the given request.
review_id
Integer (int32)
Review id for 2FA.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful demote brokers response.

Status: default - Error response.


fixOfflineReplicas

fixOfflineReplicas

Fix offline replicas by moving currently offline replicas to healthy brokers.


/kafkacruisecontrol/fix_offline_replicas

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/fix_offline_replicas?dryrun=&goals=&allow_capacity_estimation=&concurrent_partition_movements_per_broker=&concurrent_leader_movements=&json=&skip_hard_goal_check=&excluded_topics=&use_ready_default_goals=&data_from=&verbose=&exclude_recently_demoted_brokers=&exclude_recently_removed_brokers=&replica_movement_strategies=&review_id=&replication_throttle=&execution_progress_check_interval_ms=&reason=&stop_ongoing_execution=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether dry-run the request or not.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently removed broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        Integer reviewId = 56; // Integer | Review id for 2FA
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        String reason = reason_example; // String | Reason for request.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.fixOfflineReplicas(dryrun, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, stopOngoingExecution, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#fixOfflineReplicas");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether dry-run the request or not.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently removed broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        Integer reviewId = 56; // Integer | Review id for 2FA
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        String reason = reason_example; // String | Reason for request.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.fixOfflineReplicas(dryrun, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, stopOngoingExecution, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#fixOfflineReplicas");
            e.printStackTrace();
        }
    }
}
Boolean *dryrun = true; // Whether dry-run the request or not. (optional) (default to true)
array[String] *goals = ; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
Boolean *allowCapacityEstimation = true; // Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to false)
Integer *concurrentPartitionMovementsPerBroker = 56; // The upper bound of ongoing replica movements going into/out of each broker. (optional)
Integer *concurrentLeaderMovements = 56; // The upper bound of ongoing leadership movements. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *skipHardGoalCheck = true; // Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
String *excludedTopics = excludedTopics_example; // Specify topic whose partition is excluded from replica movement. (optional)
Boolean *useReadyDefaultGoals = true; // Whether to only use ready goals to generate proposal. (optional) (default to false)
String *dataFrom = dataFrom_example; // Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *excludeRecentlyDemotedBrokers = true; // Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
Boolean *excludeRecentlyRemovedBrokers = true; // Whether to allow leader replicas to be moved to recently removed broker. (optional) (default to true)
array[String] *replicaMovementStrategies = ; // Replica movement strategies to use. (optional)
Integer *reviewId = 56; // Review id for 2FA (optional)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional)
String *reason = reason_example; // Reason for request. (optional)
Boolean *stopOngoingExecution = true; // Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// fixOfflineReplicas
[apiInstance fixOfflineReplicasWith:dryrun
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    concurrentLeaderMovements:concurrentLeaderMovements
    json:json
    skipHardGoalCheck:skipHardGoalCheck
    excludedTopics:excludedTopics
    useReadyDefaultGoals:useReadyDefaultGoals
    dataFrom:dataFrom
    verbose:verbose
    excludeRecentlyDemotedBrokers:excludeRecentlyDemotedBrokers
    excludeRecentlyRemovedBrokers:excludeRecentlyRemovedBrokers
    replicaMovementStrategies:replicaMovementStrategies
    reviewId:reviewId
    replicationThrottle:replicationThrottle
    executionProgressCheckIntervalMs:executionProgressCheckIntervalMs
    reason:reason
    stopOngoingExecution:stopOngoingExecution
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(OptimizationResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'dryrun': true, // {{Boolean}} Whether dry-run the request or not.
  'goals': , // {{array[String]}} List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
  'allowCapacityEstimation': true, // {{Boolean}} Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
  'concurrentPartitionMovementsPerBroker': 56, // {{Integer}} The upper bound of ongoing replica movements going into/out of each broker.
  'concurrentLeaderMovements': 56, // {{Integer}} The upper bound of ongoing leadership movements.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'skipHardGoalCheck': true, // {{Boolean}} Whether to allow hard goals be skipped in proposal generation.
  'excludedTopics': excludedTopics_example, // {{String}} Specify topic whose partition is excluded from replica movement.
  'useReadyDefaultGoals': true, // {{Boolean}} Whether to only use ready goals to generate proposal.
  'dataFrom': dataFrom_example, // {{String}} Whether to calculate proposal from available valid partitions or valid windows.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'excludeRecentlyDemotedBrokers': true, // {{Boolean}} Whether to allow leader replicas to be moved to recently demoted broker.
  'excludeRecentlyRemovedBrokers': true, // {{Boolean}} Whether to allow leader replicas to be moved to recently removed broker.
  'replicaMovementStrategies': , // {{array[String]}} Replica movement strategies to use.
  'reviewId': 56, // {{Integer}} Review id for 2FA
  'replicationThrottle': 789, // {{Long}} Upper bound on the bandwidth in bytes per second used to move replicas.
  'executionProgressCheckIntervalMs': 789, // {{Long}} Execution progress check interval in milliseconds.
  'reason': reason_example, // {{String}} Reason for request.
  'stopOngoingExecution': true, // {{Boolean}} Whether to stop the ongoing execution (if any) and start executing the given request.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.fixOfflineReplicas(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class fixOfflineReplicasExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var dryrun = true;  // Boolean | Whether dry-run the request or not. (optional)  (default to true)
            var goals = new array[String](); // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) 
            var allowCapacityEstimation = true;  // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional)  (default to false)
            var concurrentPartitionMovementsPerBroker = 56;  // Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional) 
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of ongoing leadership movements. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var skipHardGoalCheck = true;  // Boolean | Whether to allow hard goals be skipped in proposal generation. (optional)  (default to false)
            var excludedTopics = excludedTopics_example;  // String | Specify topic whose partition is excluded from replica movement. (optional) 
            var useReadyDefaultGoals = true;  // Boolean | Whether to only use ready goals to generate proposal. (optional)  (default to false)
            var dataFrom = dataFrom_example;  // String | Whether to calculate proposal from available valid partitions or valid windows. (optional)  (default to VALID_WINDOWS)
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var excludeRecentlyDemotedBrokers = true;  // Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional)  (default to false)
            var excludeRecentlyRemovedBrokers = true;  // Boolean | Whether to allow leader replicas to be moved to recently removed broker. (optional)  (default to true)
            var replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use. (optional) 
            var reviewId = 56;  // Integer | Review id for 2FA (optional) 
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) 
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional) 
            var reason = reason_example;  // String | Reason for request. (optional) 
            var stopOngoingExecution = true;  // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // fixOfflineReplicas
                OptimizationResult result = apiInstance.fixOfflineReplicas(dryrun, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, stopOngoingExecution, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.fixOfflineReplicas: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$dryrun = true; // Boolean | Whether dry-run the request or not.
$goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
$allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
$concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
$concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
$json = true; // Boolean | Whether to return in JSON format or not.
$skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
$excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
$useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
$dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
$verbose = true; // Boolean | Return detailed state information.
$excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
$excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently removed broker.
$replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
$reviewId = 56; // Integer | Review id for 2FA
$replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
$executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
$reason = reason_example; // String | Reason for request.
$stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->fixOfflineReplicas($dryrun, $goals, $allowCapacityEstimation, $concurrentPartitionMovementsPerBroker, $concurrentLeaderMovements, $json, $skipHardGoalCheck, $excludedTopics, $useReadyDefaultGoals, $dataFrom, $verbose, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $replicaMovementStrategies, $reviewId, $replicationThrottle, $executionProgressCheckIntervalMs, $reason, $stopOngoingExecution, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->fixOfflineReplicas: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $dryrun = true; # Boolean | Whether dry-run the request or not.
my $goals = []; # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
my $allowCapacityEstimation = true; # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
my $concurrentPartitionMovementsPerBroker = 56; # Integer | The upper bound of ongoing replica movements going into/out of each broker.
my $concurrentLeaderMovements = 56; # Integer | The upper bound of ongoing leadership movements.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $skipHardGoalCheck = true; # Boolean | Whether to allow hard goals be skipped in proposal generation.
my $excludedTopics = excludedTopics_example; # String | Specify topic whose partition is excluded from replica movement.
my $useReadyDefaultGoals = true; # Boolean | Whether to only use ready goals to generate proposal.
my $dataFrom = dataFrom_example; # String | Whether to calculate proposal from available valid partitions or valid windows.
my $verbose = true; # Boolean | Return detailed state information.
my $excludeRecentlyDemotedBrokers = true; # Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
my $excludeRecentlyRemovedBrokers = true; # Boolean | Whether to allow leader replicas to be moved to recently removed broker.
my $replicaMovementStrategies = []; # array[String] | Replica movement strategies to use.
my $reviewId = 56; # Integer | Review id for 2FA
my $replicationThrottle = 789; # Long | Upper bound on the bandwidth in bytes per second used to move replicas.
my $executionProgressCheckIntervalMs = 789; # Long | Execution progress check interval in milliseconds.
my $reason = reason_example; # String | Reason for request.
my $stopOngoingExecution = true; # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->fixOfflineReplicas(dryrun => $dryrun, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, concurrentLeaderMovements => $concurrentLeaderMovements, json => $json, skipHardGoalCheck => $skipHardGoalCheck, excludedTopics => $excludedTopics, useReadyDefaultGoals => $useReadyDefaultGoals, dataFrom => $dataFrom, verbose => $verbose, excludeRecentlyDemotedBrokers => $excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers => $excludeRecentlyRemovedBrokers, replicaMovementStrategies => $replicaMovementStrategies, reviewId => $reviewId, replicationThrottle => $replicationThrottle, executionProgressCheckIntervalMs => $executionProgressCheckIntervalMs, reason => $reason, stopOngoingExecution => $stopOngoingExecution, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->fixOfflineReplicas: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
dryrun = true # Boolean | Whether dry-run the request or not. (optional) (default to true)
goals =  # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
allowCapacityEstimation = true # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to false)
concurrentPartitionMovementsPerBroker = 56 # Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional)
concurrentLeaderMovements = 56 # Integer | The upper bound of ongoing leadership movements. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
skipHardGoalCheck = true # Boolean | Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
excludedTopics = excludedTopics_example # String | Specify topic whose partition is excluded from replica movement. (optional)
useReadyDefaultGoals = true # Boolean | Whether to only use ready goals to generate proposal. (optional) (default to false)
dataFrom = dataFrom_example # String | Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
excludeRecentlyDemotedBrokers = true # Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
excludeRecentlyRemovedBrokers = true # Boolean | Whether to allow leader replicas to be moved to recently removed broker. (optional) (default to true)
replicaMovementStrategies =  # array[String] | Replica movement strategies to use. (optional)
reviewId = 56 # Integer | Review id for 2FA (optional)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional)
reason = reason_example # String | Reason for request. (optional)
stopOngoingExecution = true # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # fixOfflineReplicas
    api_response = api_instance.fix_offline_replicas(dryrun=dryrun, goals=goals, allowCapacityEstimation=allowCapacityEstimation, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, concurrentLeaderMovements=concurrentLeaderMovements, json=json, skipHardGoalCheck=skipHardGoalCheck, excludedTopics=excludedTopics, useReadyDefaultGoals=useReadyDefaultGoals, dataFrom=dataFrom, verbose=verbose, excludeRecentlyDemotedBrokers=excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers=excludeRecentlyRemovedBrokers, replicaMovementStrategies=replicaMovementStrategies, reviewId=reviewId, replicationThrottle=replicationThrottle, executionProgressCheckIntervalMs=executionProgressCheckIntervalMs, reason=reason, stopOngoingExecution=stopOngoingExecution, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->fixOfflineReplicas: %s\n" % e)

Parameters

Query parameters
Name Description
dryrun
Boolean
Whether dry-run the request or not.
goals
array[String]
List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
allow_capacity_estimation
Boolean
Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
concurrent_partition_movements_per_broker
Integer (int32)
The upper bound of ongoing replica movements going into/out of each broker.
concurrent_leader_movements
Integer (int32)
The upper bound of ongoing leadership movements.
json
Boolean
Whether to return in JSON format or not.
skip_hard_goal_check
Boolean
Whether to allow hard goals be skipped in proposal generation.
excluded_topics
String
Specify topic whose partition is excluded from replica movement.
use_ready_default_goals
Boolean
Whether to only use ready goals to generate proposal.
data_from
String
Whether to calculate proposal from available valid partitions or valid windows.
verbose
Boolean
Return detailed state information.
exclude_recently_demoted_brokers
Boolean
Whether to allow leader replicas to be moved to recently demoted broker.
exclude_recently_removed_brokers
Boolean
Whether to allow leader replicas to be moved to recently removed broker.
replica_movement_strategies
array[String]
Replica movement strategies to use.
review_id
Integer (int32)
Review id for 2FA
replication_throttle
Long (int64)
Upper bound on the bandwidth in bytes per second used to move replicas.
execution_progress_check_interval_ms
Long (int64)
Execution progress check interval in milliseconds.
reason
String
Reason for request.
stop_ongoing_execution
Boolean
Whether to stop the ongoing execution (if any) and start executing the given request.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful rebalance response.

Status: default - Error response.


gettherecentusertasksfromcruisecontrol.

Get the recent user tasks from cruise control.

Get the recent user tasks from cruise control.


/kafkacruisecontrol/user_tasks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/user_tasks?client_ids=&endpoints=&entries=&types=&user_task_ids=&json=&fetch_completed_task=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String clientIds = clientIds_example; // String | Comma separated IP addresses to filter the task results Cruise Control report.
        String endpoints = endpoints_example; // String | Comma separated endpoints to filter the task results Cruise Control report.
        Long entries = 789; // Long | The number of entries to show in the response.
        String types = types_example; // String | Comma separated HTTP request types to filter the task results Cruise Control report.
        String userTaskIds = userTaskIds_example; // String | Comma separated UUIDs to filter the task results Cruise Control report.
        Boolean json = true; // Boolean | If true, cruise-control's response is in JSON format.
        Boolean fetchCompletedTask = true; // Boolean | Whether return the original request's final response.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            UserTaskState result = apiInstance.gettherecentusertasksfromcruisecontrol.(clientIds, endpoints, entries, types, userTaskIds, json, fetchCompletedTask, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#gettherecentusertasksfromcruisecontrol.");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String clientIds = clientIds_example; // String | Comma separated IP addresses to filter the task results Cruise Control report.
        String endpoints = endpoints_example; // String | Comma separated endpoints to filter the task results Cruise Control report.
        Long entries = 789; // Long | The number of entries to show in the response.
        String types = types_example; // String | Comma separated HTTP request types to filter the task results Cruise Control report.
        String userTaskIds = userTaskIds_example; // String | Comma separated UUIDs to filter the task results Cruise Control report.
        Boolean json = true; // Boolean | If true, cruise-control's response is in JSON format.
        Boolean fetchCompletedTask = true; // Boolean | Whether return the original request's final response.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            UserTaskState result = apiInstance.gettherecentusertasksfromcruisecontrol.(clientIds, endpoints, entries, types, userTaskIds, json, fetchCompletedTask, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#gettherecentusertasksfromcruisecontrol.");
            e.printStackTrace();
        }
    }
}
String *clientIds = clientIds_example; // Comma separated IP addresses to filter the task results Cruise Control report. (optional)
String *endpoints = endpoints_example; // Comma separated endpoints to filter the task results Cruise Control report. (optional)
Long *entries = 789; // The number of entries to show in the response. (optional)
String *types = types_example; // Comma separated HTTP request types to filter the task results Cruise Control report. (optional)
String *userTaskIds = userTaskIds_example; // Comma separated UUIDs to filter the task results Cruise Control report. (optional)
Boolean *json = true; // If true, cruise-control's response is in JSON format. (optional) (default to false)
Boolean *fetchCompletedTask = true; // Whether return the original request's final response. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get the recent user tasks from cruise control.
[apiInstance gettherecentusertasksfromcruisecontrol.With:clientIds
    endpoints:endpoints
    entries:entries
    types:types
    userTaskIds:userTaskIds
    json:json
    fetchCompletedTask:fetchCompletedTask
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(UserTaskState output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'clientIds': clientIds_example, // {{String}} Comma separated IP addresses to filter the task results Cruise Control report.
  'endpoints': endpoints_example, // {{String}} Comma separated endpoints to filter the task results Cruise Control report.
  'entries': 789, // {{Long}} The number of entries to show in the response.
  'types': types_example, // {{String}} Comma separated HTTP request types to filter the task results Cruise Control report.
  'userTaskIds': userTaskIds_example, // {{String}} Comma separated UUIDs to filter the task results Cruise Control report.
  'json': true, // {{Boolean}} If true, cruise-control's response is in JSON format.
  'fetchCompletedTask': true, // {{Boolean}} Whether return the original request's final response.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.gettherecentusertasksfromcruisecontrol.(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class gettherecentusertasksfromcruisecontrol.Example
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var clientIds = clientIds_example;  // String | Comma separated IP addresses to filter the task results Cruise Control report. (optional) 
            var endpoints = endpoints_example;  // String | Comma separated endpoints to filter the task results Cruise Control report. (optional) 
            var entries = 789;  // Long | The number of entries to show in the response. (optional) 
            var types = types_example;  // String | Comma separated HTTP request types to filter the task results Cruise Control report. (optional) 
            var userTaskIds = userTaskIds_example;  // String | Comma separated UUIDs to filter the task results Cruise Control report. (optional) 
            var json = true;  // Boolean | If true, cruise-control's response is in JSON format. (optional)  (default to false)
            var fetchCompletedTask = true;  // Boolean | Whether return the original request's final response. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // Get the recent user tasks from cruise control.
                UserTaskState result = apiInstance.gettherecentusertasksfromcruisecontrol.(clientIds, endpoints, entries, types, userTaskIds, json, fetchCompletedTask, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.gettherecentusertasksfromcruisecontrol.: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$clientIds = clientIds_example; // String | Comma separated IP addresses to filter the task results Cruise Control report.
$endpoints = endpoints_example; // String | Comma separated endpoints to filter the task results Cruise Control report.
$entries = 789; // Long | The number of entries to show in the response.
$types = types_example; // String | Comma separated HTTP request types to filter the task results Cruise Control report.
$userTaskIds = userTaskIds_example; // String | Comma separated UUIDs to filter the task results Cruise Control report.
$json = true; // Boolean | If true, cruise-control's response is in JSON format.
$fetchCompletedTask = true; // Boolean | Whether return the original request's final response.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->gettherecentusertasksfromcruisecontrol.($clientIds, $endpoints, $entries, $types, $userTaskIds, $json, $fetchCompletedTask, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->gettherecentusertasksfromcruisecontrol.: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $clientIds = clientIds_example; # String | Comma separated IP addresses to filter the task results Cruise Control report.
my $endpoints = endpoints_example; # String | Comma separated endpoints to filter the task results Cruise Control report.
my $entries = 789; # Long | The number of entries to show in the response.
my $types = types_example; # String | Comma separated HTTP request types to filter the task results Cruise Control report.
my $userTaskIds = userTaskIds_example; # String | Comma separated UUIDs to filter the task results Cruise Control report.
my $json = true; # Boolean | If true, cruise-control's response is in JSON format.
my $fetchCompletedTask = true; # Boolean | Whether return the original request's final response.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->gettherecentusertasksfromcruisecontrol.(clientIds => $clientIds, endpoints => $endpoints, entries => $entries, types => $types, userTaskIds => $userTaskIds, json => $json, fetchCompletedTask => $fetchCompletedTask, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->gettherecentusertasksfromcruisecontrol.: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
clientIds = clientIds_example # String | Comma separated IP addresses to filter the task results Cruise Control report. (optional)
endpoints = endpoints_example # String | Comma separated endpoints to filter the task results Cruise Control report. (optional)
entries = 789 # Long | The number of entries to show in the response. (optional)
types = types_example # String | Comma separated HTTP request types to filter the task results Cruise Control report. (optional)
userTaskIds = userTaskIds_example # String | Comma separated UUIDs to filter the task results Cruise Control report. (optional)
json = true # Boolean | If true, cruise-control's response is in JSON format. (optional) (default to false)
fetchCompletedTask = true # Boolean | Whether return the original request's final response. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # Get the recent user tasks from cruise control.
    api_response = api_instance.gettherecentusertasksfromcruisecontrol/(clientIds=clientIds, endpoints=endpoints, entries=entries, types=types, userTaskIds=userTaskIds, json=json, fetchCompletedTask=fetchCompletedTask, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->gettherecentusertasksfromcruisecontrol.: %s\n" % e)

Parameters

Query parameters
Name Description
client_ids
String
Comma separated IP addresses to filter the task results Cruise Control report.
endpoints
String
Comma separated endpoints to filter the task results Cruise Control report.
entries
Long (int64)
The number of entries to show in the response.
types
String
Comma separated HTTP request types to filter the task results Cruise Control report.
user_task_ids
String
Comma separated UUIDs to filter the task results Cruise Control report.
json
Boolean
If true, cruise-control's response is in JSON format.
fetch_completed_task
Boolean
Whether return the original request's final response.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - User tasks state response.

Status: default - Error response.


getthestateofcruisecontrol.

Get the state of cruise control.

Get the state of cruise control.


/kafkacruisecontrol/state

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/state?substates=&json=&verbose=&super_verbose=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        array[String] substates = ; // array[String] | The substates for which to retrieve state from cruise-control.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean superVerbose = true; // Boolean | Return super-verbose state information.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            CruiseControlState result = apiInstance.getthestateofcruisecontrol.(substates, json, verbose, superVerbose, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getthestateofcruisecontrol.");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[String] substates = ; // array[String] | The substates for which to retrieve state from cruise-control.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean superVerbose = true; // Boolean | Return super-verbose state information.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            CruiseControlState result = apiInstance.getthestateofcruisecontrol.(substates, json, verbose, superVerbose, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getthestateofcruisecontrol.");
            e.printStackTrace();
        }
    }
}
array[String] *substates = ; // The substates for which to retrieve state from cruise-control. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *superVerbose = true; // Return super-verbose state information. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get the state of cruise control.
[apiInstance getthestateofcruisecontrol.With:substates
    json:json
    verbose:verbose
    superVerbose:superVerbose
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(CruiseControlState output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'substates': , // {{array[String]}} The substates for which to retrieve state from cruise-control.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'superVerbose': true, // {{Boolean}} Return super-verbose state information.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getthestateofcruisecontrol.(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getthestateofcruisecontrol.Example
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var substates = new array[String](); // array[String] | The substates for which to retrieve state from cruise-control. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional) 
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var superVerbose = true;  // Boolean | Return super-verbose state information. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // Get the state of cruise control.
                CruiseControlState result = apiInstance.getthestateofcruisecontrol.(substates, json, verbose, superVerbose, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getthestateofcruisecontrol.: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$substates = ; // array[String] | The substates for which to retrieve state from cruise-control.
$json = true; // Boolean | Whether to return in JSON format or not.
$verbose = true; // Boolean | Return detailed state information.
$superVerbose = true; // Boolean | Return super-verbose state information.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->getthestateofcruisecontrol.($substates, $json, $verbose, $superVerbose, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getthestateofcruisecontrol.: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $substates = []; # array[String] | The substates for which to retrieve state from cruise-control.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $verbose = true; # Boolean | Return detailed state information.
my $superVerbose = true; # Boolean | Return super-verbose state information.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->getthestateofcruisecontrol.(substates => $substates, json => $json, verbose => $verbose, superVerbose => $superVerbose, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getthestateofcruisecontrol.: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
substates =  # array[String] | The substates for which to retrieve state from cruise-control. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
superVerbose = true # Boolean | Return super-verbose state information. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # Get the state of cruise control.
    api_response = api_instance.getthestateofcruisecontrol/(substates=substates, json=json, verbose=verbose, superVerbose=superVerbose, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getthestateofcruisecontrol.: %s\n" % e)

Parameters

Query parameters
Name Description
substates
array[String]
The substates for which to retrieve state from cruise-control.
json
Boolean
Whether to return in JSON format or not.
verbose
Boolean
Return detailed state information.
super_verbose
Boolean
Return super-verbose state information.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful state response.

Status: default - Error response.


kafkaClusterState

kafkaClusterState

Retrive the current Kafka cluster state.


/kafkacruisecontrol/kafka_cluster_state

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/kafka_cluster_state?topic=&verbose=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String topic = topic_example; // String | Topic regex to filter partition information in response.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            KafkaClusterState result = apiInstance.kafkaClusterState(topic, verbose, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#kafkaClusterState");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String topic = topic_example; // String | Topic regex to filter partition information in response.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            KafkaClusterState result = apiInstance.kafkaClusterState(topic, verbose, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#kafkaClusterState");
            e.printStackTrace();
        }
    }
}
String *topic = topic_example; // Topic regex to filter partition information in response. (optional)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// kafkaClusterState
[apiInstance kafkaClusterStateWith:topic
    verbose:verbose
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(KafkaClusterState output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'topic': topic_example, // {{String}} Topic regex to filter partition information in response.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.kafkaClusterState(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class kafkaClusterStateExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var topic = topic_example;  // String | Topic regex to filter partition information in response. (optional) 
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // kafkaClusterState
                KafkaClusterState result = apiInstance.kafkaClusterState(topic, verbose, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.kafkaClusterState: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$topic = topic_example; // String | Topic regex to filter partition information in response.
$verbose = true; // Boolean | Return detailed state information.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->kafkaClusterState($topic, $verbose, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->kafkaClusterState: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $topic = topic_example; # String | Topic regex to filter partition information in response.
my $verbose = true; # Boolean | Return detailed state information.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->kafkaClusterState(topic => $topic, verbose => $verbose, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->kafkaClusterState: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
topic = topic_example # String | Topic regex to filter partition information in response. (optional)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # kafkaClusterState
    api_response = api_instance.kafka_cluster_state(topic=topic, verbose=verbose, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->kafkaClusterState: %s\n" % e)

Parameters

Query parameters
Name Description
topic
String
Topic regex to filter partition information in response.
verbose
Boolean
Return detailed state information.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Current Kafka cluster state.

Status: default - Error response.


load

load

Get the cluster load once Cruise Control Load Monitor is running.


/kafkacruisecontrol/load

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/load?start=&end=&time=&allow_capacity_estimation=&json=&populate_disk_info=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Long start = 789; // Long | Start time of the cluster load. Default is time of earliest valid window.
        Long end = 789; // Long | End time of the cluster load. Default is current system time.
        Long time = 789; // Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean populateDiskInfo = true; // Boolean | Whether show the load of each disk of broker.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            BrokerStats result = apiInstance.load(start, end, time, allowCapacityEstimation, json, populateDiskInfo, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#load");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Long start = 789; // Long | Start time of the cluster load. Default is time of earliest valid window.
        Long end = 789; // Long | End time of the cluster load. Default is current system time.
        Long time = 789; // Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean populateDiskInfo = true; // Boolean | Whether show the load of each disk of broker.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            BrokerStats result = apiInstance.load(start, end, time, allowCapacityEstimation, json, populateDiskInfo, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#load");
            e.printStackTrace();
        }
    }
}
Long *start = 789; // Start time of the cluster load. Default is time of earliest valid window. (optional) (default to -1)
Long *end = 789; // End time of the cluster load. Default is current system time. (optional)
Long *time = 789; // End time of the clutser load. Default is current system time, mutually exclusive with end parameter. (optional)
Boolean *allowCapacityEstimation = true; // Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to true)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *populateDiskInfo = true; // Whether show the load of each disk of broker. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// load
[apiInstance loadWith:start
    end:end
    time:time
    allowCapacityEstimation:allowCapacityEstimation
    json:json
    populateDiskInfo:populateDiskInfo
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(BrokerStats output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'start': 789, // {{Long}} Start time of the cluster load. Default is time of earliest valid window.
  'end': 789, // {{Long}} End time of the cluster load. Default is current system time.
  'time': 789, // {{Long}} End time of the clutser load. Default is current system time, mutually exclusive with end parameter.
  'allowCapacityEstimation': true, // {{Boolean}} Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'populateDiskInfo': true, // {{Boolean}} Whether show the load of each disk of broker.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.load(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class loadExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var start = 789;  // Long | Start time of the cluster load. Default is time of earliest valid window. (optional)  (default to -1)
            var end = 789;  // Long | End time of the cluster load. Default is current system time. (optional) 
            var time = 789;  // Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter. (optional) 
            var allowCapacityEstimation = true;  // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional)  (default to true)
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var populateDiskInfo = true;  // Boolean | Whether show the load of each disk of broker. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // load
                BrokerStats result = apiInstance.load(start, end, time, allowCapacityEstimation, json, populateDiskInfo, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.load: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$start = 789; // Long | Start time of the cluster load. Default is time of earliest valid window.
$end = 789; // Long | End time of the cluster load. Default is current system time.
$time = 789; // Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter.
$allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
$json = true; // Boolean | Whether to return in JSON format or not.
$populateDiskInfo = true; // Boolean | Whether show the load of each disk of broker.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->load($start, $end, $time, $allowCapacityEstimation, $json, $populateDiskInfo, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->load: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $start = 789; # Long | Start time of the cluster load. Default is time of earliest valid window.
my $end = 789; # Long | End time of the cluster load. Default is current system time.
my $time = 789; # Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter.
my $allowCapacityEstimation = true; # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $populateDiskInfo = true; # Boolean | Whether show the load of each disk of broker.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->load(start => $start, end => $end, time => $time, allowCapacityEstimation => $allowCapacityEstimation, json => $json, populateDiskInfo => $populateDiskInfo, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->load: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
start = 789 # Long | Start time of the cluster load. Default is time of earliest valid window. (optional) (default to -1)
end = 789 # Long | End time of the cluster load. Default is current system time. (optional)
time = 789 # Long | End time of the clutser load. Default is current system time, mutually exclusive with end parameter. (optional)
allowCapacityEstimation = true # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to true)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
populateDiskInfo = true # Boolean | Whether show the load of each disk of broker. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # load
    api_response = api_instance.load(start=start, end=end, time=time, allowCapacityEstimation=allowCapacityEstimation, json=json, populateDiskInfo=populateDiskInfo, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->load: %s\n" % e)

Parameters

Query parameters
Name Description
start
Long (int64)
Start time of the cluster load. Default is time of earliest valid window.
end
Long (int64)
End time of the cluster load. Default is current system time.
time
Long (int64)
End time of the clutser load. Default is current system time, mutually exclusive with end parameter.
allow_capacity_estimation
Boolean
Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
json
Boolean
Whether to return in JSON format or not.
populate_disk_info
Boolean
Whether show the load of each disk of broker.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful load from valid partitions response.

Status: default - Error response.


partitionload

partitionload

Get the resource load for each partition.


/kafkacruisecontrol/partition_load

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/partition_load?resource=&start=&end=&entries=&topic=&partition=&min_valid_partition_ratio=&allow_capacity_estimation=&max_load=&avg_load=&brokerid=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String resource = resource_example; // String | The host and broker-level resource by which to sort the cruise-control response.
        Long start = 789; // Long | The timestamp in millisecond of the earliest metric sample use to generate load.
        Long end = 789; // Long | The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified.
        Integer entries = 56; // Integer | The number of entries to show in the response.
        String topic = topic_example; // String | A regular expression used to filter the partition load returned based on topic.
        String partition = partition_example; // String | The partition or partition range to filter partition load returned.
        Double minValidPartitionRatio = 1.2; // Double | The minimum required ratio of partition load data completeness.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Boolean maxLoad = true; // Boolean | If true, the maximum load is returned.
        Boolean avgLoad = true; // Boolean | If true, the average load is returned.
        array[Integer] brokerid = ; // array[Integer] | Set of broker ids used to filter partition load returned.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            PartitionLoadState result = apiInstance.partitionload(resource, start, end, entries, topic, partition, minValidPartitionRatio, allowCapacityEstimation, maxLoad, avgLoad, brokerid, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#partitionload");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String resource = resource_example; // String | The host and broker-level resource by which to sort the cruise-control response.
        Long start = 789; // Long | The timestamp in millisecond of the earliest metric sample use to generate load.
        Long end = 789; // Long | The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified.
        Integer entries = 56; // Integer | The number of entries to show in the response.
        String topic = topic_example; // String | A regular expression used to filter the partition load returned based on topic.
        String partition = partition_example; // String | The partition or partition range to filter partition load returned.
        Double minValidPartitionRatio = 1.2; // Double | The minimum required ratio of partition load data completeness.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Boolean maxLoad = true; // Boolean | If true, the maximum load is returned.
        Boolean avgLoad = true; // Boolean | If true, the average load is returned.
        array[Integer] brokerid = ; // array[Integer] | Set of broker ids used to filter partition load returned.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            PartitionLoadState result = apiInstance.partitionload(resource, start, end, entries, topic, partition, minValidPartitionRatio, allowCapacityEstimation, maxLoad, avgLoad, brokerid, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#partitionload");
            e.printStackTrace();
        }
    }
}
String *resource = resource_example; // The host and broker-level resource by which to sort the cruise-control response. (optional) (default to disk)
Long *start = 789; // The timestamp in millisecond of the earliest metric sample use to generate load. (optional) (default to -1)
Long *end = 789; // The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified. (optional)
Integer *entries = 56; // The number of entries to show in the response. (optional) (default to 2147483647)
String *topic = topic_example; // A regular expression used to filter the partition load returned based on topic. (optional)
String *partition = partition_example; // The partition or partition range to filter partition load returned. (optional)
Double *minValidPartitionRatio = 1.2; // The minimum required ratio of partition load data completeness. (optional) (default to 0.98)
Boolean *allowCapacityEstimation = true; // Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to false)
Boolean *maxLoad = true; // If true, the maximum load is returned. (optional) (default to false)
Boolean *avgLoad = true; // If true, the average load is returned. (optional) (default to false)
array[Integer] *brokerid = ; // Set of broker ids used to filter partition load returned. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// partitionload
[apiInstance partitionloadWith:resource
    start:start
    end:end
    entries:entries
    topic:topic
    partition:partition
    minValidPartitionRatio:minValidPartitionRatio
    allowCapacityEstimation:allowCapacityEstimation
    maxLoad:maxLoad
    avgLoad:avgLoad
    brokerid:brokerid
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(PartitionLoadState output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'resource': resource_example, // {{String}} The host and broker-level resource by which to sort the cruise-control response.
  'start': 789, // {{Long}} The timestamp in millisecond of the earliest metric sample use to generate load.
  'end': 789, // {{Long}} The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified.
  'entries': 56, // {{Integer}} The number of entries to show in the response.
  'topic': topic_example, // {{String}} A regular expression used to filter the partition load returned based on topic.
  'partition': partition_example, // {{String}} The partition or partition range to filter partition load returned.
  'minValidPartitionRatio': 1.2, // {{Double}} The minimum required ratio of partition load data completeness.
  'allowCapacityEstimation': true, // {{Boolean}} Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
  'maxLoad': true, // {{Boolean}} If true, the maximum load is returned.
  'avgLoad': true, // {{Boolean}} If true, the average load is returned.
  'brokerid': , // {{array[Integer]}} Set of broker ids used to filter partition load returned.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.partitionload(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class partitionloadExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var resource = resource_example;  // String | The host and broker-level resource by which to sort the cruise-control response. (optional)  (default to disk)
            var start = 789;  // Long | The timestamp in millisecond of the earliest metric sample use to generate load. (optional)  (default to -1)
            var end = 789;  // Long | The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified. (optional) 
            var entries = 56;  // Integer | The number of entries to show in the response. (optional)  (default to 2147483647)
            var topic = topic_example;  // String | A regular expression used to filter the partition load returned based on topic. (optional) 
            var partition = partition_example;  // String | The partition or partition range to filter partition load returned. (optional) 
            var minValidPartitionRatio = 1.2;  // Double | The minimum required ratio of partition load data completeness. (optional)  (default to 0.98)
            var allowCapacityEstimation = true;  // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional)  (default to false)
            var maxLoad = true;  // Boolean | If true, the maximum load is returned. (optional)  (default to false)
            var avgLoad = true;  // Boolean | If true, the average load is returned. (optional)  (default to false)
            var brokerid = new array[Integer](); // array[Integer] | Set of broker ids used to filter partition load returned. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // partitionload
                PartitionLoadState result = apiInstance.partitionload(resource, start, end, entries, topic, partition, minValidPartitionRatio, allowCapacityEstimation, maxLoad, avgLoad, brokerid, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.partitionload: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$resource = resource_example; // String | The host and broker-level resource by which to sort the cruise-control response.
$start = 789; // Long | The timestamp in millisecond of the earliest metric sample use to generate load.
$end = 789; // Long | The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified.
$entries = 56; // Integer | The number of entries to show in the response.
$topic = topic_example; // String | A regular expression used to filter the partition load returned based on topic.
$partition = partition_example; // String | The partition or partition range to filter partition load returned.
$minValidPartitionRatio = 1.2; // Double | The minimum required ratio of partition load data completeness.
$allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
$maxLoad = true; // Boolean | If true, the maximum load is returned.
$avgLoad = true; // Boolean | If true, the average load is returned.
$brokerid = ; // array[Integer] | Set of broker ids used to filter partition load returned.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->partitionload($resource, $start, $end, $entries, $topic, $partition, $minValidPartitionRatio, $allowCapacityEstimation, $maxLoad, $avgLoad, $brokerid, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->partitionload: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $resource = resource_example; # String | The host and broker-level resource by which to sort the cruise-control response.
my $start = 789; # Long | The timestamp in millisecond of the earliest metric sample use to generate load.
my $end = 789; # Long | The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified.
my $entries = 56; # Integer | The number of entries to show in the response.
my $topic = topic_example; # String | A regular expression used to filter the partition load returned based on topic.
my $partition = partition_example; # String | The partition or partition range to filter partition load returned.
my $minValidPartitionRatio = 1.2; # Double | The minimum required ratio of partition load data completeness.
my $allowCapacityEstimation = true; # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
my $maxLoad = true; # Boolean | If true, the maximum load is returned.
my $avgLoad = true; # Boolean | If true, the average load is returned.
my $brokerid = []; # array[Integer] | Set of broker ids used to filter partition load returned.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->partitionload(resource => $resource, start => $start, end => $end, entries => $entries, topic => $topic, partition => $partition, minValidPartitionRatio => $minValidPartitionRatio, allowCapacityEstimation => $allowCapacityEstimation, maxLoad => $maxLoad, avgLoad => $avgLoad, brokerid => $brokerid, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->partitionload: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
resource = resource_example # String | The host and broker-level resource by which to sort the cruise-control response. (optional) (default to disk)
start = 789 # Long | The timestamp in millisecond of the earliest metric sample use to generate load. (optional) (default to -1)
end = 789 # Long | The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified. (optional)
entries = 56 # Integer | The number of entries to show in the response. (optional) (default to 2147483647)
topic = topic_example # String | A regular expression used to filter the partition load returned based on topic. (optional)
partition = partition_example # String | The partition or partition range to filter partition load returned. (optional)
minValidPartitionRatio = 1.2 # Double | The minimum required ratio of partition load data completeness. (optional) (default to 0.98)
allowCapacityEstimation = true # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to false)
maxLoad = true # Boolean | If true, the maximum load is returned. (optional) (default to false)
avgLoad = true # Boolean | If true, the average load is returned. (optional) (default to false)
brokerid =  # array[Integer] | Set of broker ids used to filter partition load returned. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # partitionload
    api_response = api_instance.partitionload(resource=resource, start=start, end=end, entries=entries, topic=topic, partition=partition, minValidPartitionRatio=minValidPartitionRatio, allowCapacityEstimation=allowCapacityEstimation, maxLoad=maxLoad, avgLoad=avgLoad, brokerid=brokerid, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->partitionload: %s\n" % e)

Parameters

Query parameters
Name Description
resource
String
The host and broker-level resource by which to sort the cruise-control response.
start
Long (int64)
The timestamp in millisecond of the earliest metric sample use to generate load.
end
Long (int64)
The timestamp in millisecond of the latest metric sample use to generate load, current time will be used if this parameter is not specified.
entries
Integer (int32)
The number of entries to show in the response.
topic
String
A regular expression used to filter the partition load returned based on topic.
partition
String
The partition or partition range to filter partition load returned.
min_valid_partition_ratio
Double (double)
The minimum required ratio of partition load data completeness.
allow_capacity_estimation
Boolean
Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
max_load
Boolean
If true, the maximum load is returned.
avg_load
Boolean
If true, the average load is returned.
brokerid
array[Integer] (int32)
Set of broker ids used to filter partition load returned.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful partition load state response.

Status: default - Error response.


pauseSampling

pauseSampling

Pause metric sampling.


/kafkacruisecontrol/pause_sampling

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/pause_sampling?reason=&review_id=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String reason = reason_example; // String | Reason for request.
        Integer reviewId = 56; // Integer | Review id for 2FA
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            PauseSamplingResult result = apiInstance.pauseSampling(reason, reviewId, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pauseSampling");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String reason = reason_example; // String | Reason for request.
        Integer reviewId = 56; // Integer | Review id for 2FA
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            PauseSamplingResult result = apiInstance.pauseSampling(reason, reviewId, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#pauseSampling");
            e.printStackTrace();
        }
    }
}
String *reason = reason_example; // Reason for request. (optional)
Integer *reviewId = 56; // Review id for 2FA (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// pauseSampling
[apiInstance pauseSamplingWith:reason
    reviewId:reviewId
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(PauseSamplingResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'reason': reason_example, // {{String}} Reason for request.
  'reviewId': 56, // {{Integer}} Review id for 2FA
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.pauseSampling(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pauseSamplingExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var reason = reason_example;  // String | Reason for request. (optional) 
            var reviewId = 56;  // Integer | Review id for 2FA (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // pauseSampling
                PauseSamplingResult result = apiInstance.pauseSampling(reason, reviewId, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.pauseSampling: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$reason = reason_example; // String | Reason for request.
$reviewId = 56; // Integer | Review id for 2FA
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->pauseSampling($reason, $reviewId, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->pauseSampling: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $reason = reason_example; # String | Reason for request.
my $reviewId = 56; # Integer | Review id for 2FA
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->pauseSampling(reason => $reason, reviewId => $reviewId, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->pauseSampling: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
reason = reason_example # String | Reason for request. (optional)
reviewId = 56 # Integer | Review id for 2FA (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # pauseSampling
    api_response = api_instance.pause_sampling(reason=reason, reviewId=reviewId, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->pauseSampling: %s\n" % e)

Parameters

Query parameters
Name Description
reason
String
Reason for request.
review_id
Integer (int32)
Review id for 2FA
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful execution response.

Status: default - Error response.


proposals

proposals

Get current proposals.


/kafkacruisecontrol/proposals

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/proposals?kafka_assigner=&destination_broker_ids=&ignore_proposal_cache=&rebalance_disk=&data_from=&use_ready_default_goals=&excluded_topics=&exclude_recently_removed_brokers=&goals=&allow_capacity_estimation=&verbose=&exclude_recently_demoted_brokers=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Boolean kafkaAssigner = true; // Boolean | Whether use Kafka assigner mode to general proposal.
        array[Integer] destinationBrokerIds = ; // array[Integer] | Specify brokers to move replicas to.
        Boolean ignoreProposalCache = true; // Boolean | Whether ignore the cached proposal or not.
        Boolean rebalanceDisk = true; // Boolean | Whether balance load between disks within each broker or between brokers in cluster.
        String dataFrom = dataFrom_example; // String | Whether calculating proposal from available valid partitions or valid windows.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether only using ready goals to generate proposal.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether allow replicas to be moved to recently removed broker.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether allow broker capacity to be estimated.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether allow leader replicas to be moved to recently demoted broker.
        Boolean json = true; // Boolean | Return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.proposals(kafkaAssigner, destinationBrokerIds, ignoreProposalCache, rebalanceDisk, dataFrom, useReadyDefaultGoals, excludedTopics, excludeRecentlyRemovedBrokers, goals, allowCapacityEstimation, verbose, excludeRecentlyDemotedBrokers, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#proposals");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Boolean kafkaAssigner = true; // Boolean | Whether use Kafka assigner mode to general proposal.
        array[Integer] destinationBrokerIds = ; // array[Integer] | Specify brokers to move replicas to.
        Boolean ignoreProposalCache = true; // Boolean | Whether ignore the cached proposal or not.
        Boolean rebalanceDisk = true; // Boolean | Whether balance load between disks within each broker or between brokers in cluster.
        String dataFrom = dataFrom_example; // String | Whether calculating proposal from available valid partitions or valid windows.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether only using ready goals to generate proposal.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether allow replicas to be moved to recently removed broker.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether allow broker capacity to be estimated.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether allow leader replicas to be moved to recently demoted broker.
        Boolean json = true; // Boolean | Return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.proposals(kafkaAssigner, destinationBrokerIds, ignoreProposalCache, rebalanceDisk, dataFrom, useReadyDefaultGoals, excludedTopics, excludeRecentlyRemovedBrokers, goals, allowCapacityEstimation, verbose, excludeRecentlyDemotedBrokers, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#proposals");
            e.printStackTrace();
        }
    }
}
Boolean *kafkaAssigner = true; // Whether use Kafka assigner mode to general proposal. (optional) (default to false)
array[Integer] *destinationBrokerIds = ; // Specify brokers to move replicas to. (optional)
Boolean *ignoreProposalCache = true; // Whether ignore the cached proposal or not. (optional) (default to false)
Boolean *rebalanceDisk = true; // Whether balance load between disks within each broker or between brokers in cluster. (optional) (default to false)
String *dataFrom = dataFrom_example; // Whether calculating proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
Boolean *useReadyDefaultGoals = true; // Whether only using ready goals to generate proposal. (optional) (default to false)
String *excludedTopics = excludedTopics_example; // Specify topic whose partition is excluded from replica movement. (optional)
Boolean *excludeRecentlyRemovedBrokers = true; // Whether allow replicas to be moved to recently removed broker. (optional) (default to false)
array[String] *goals = ; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
Boolean *allowCapacityEstimation = true; // Whether allow broker capacity to be estimated. (optional) (default to true)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *excludeRecentlyDemotedBrokers = true; // Whether allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
Boolean *json = true; // Return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// proposals
[apiInstance proposalsWith:kafkaAssigner
    destinationBrokerIds:destinationBrokerIds
    ignoreProposalCache:ignoreProposalCache
    rebalanceDisk:rebalanceDisk
    dataFrom:dataFrom
    useReadyDefaultGoals:useReadyDefaultGoals
    excludedTopics:excludedTopics
    excludeRecentlyRemovedBrokers:excludeRecentlyRemovedBrokers
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    verbose:verbose
    excludeRecentlyDemotedBrokers:excludeRecentlyDemotedBrokers
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(OptimizationResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'kafkaAssigner': true, // {{Boolean}} Whether use Kafka assigner mode to general proposal.
  'destinationBrokerIds': , // {{array[Integer]}} Specify brokers to move replicas to.
  'ignoreProposalCache': true, // {{Boolean}} Whether ignore the cached proposal or not.
  'rebalanceDisk': true, // {{Boolean}} Whether balance load between disks within each broker or between brokers in cluster.
  'dataFrom': dataFrom_example, // {{String}} Whether calculating proposal from available valid partitions or valid windows.
  'useReadyDefaultGoals': true, // {{Boolean}} Whether only using ready goals to generate proposal.
  'excludedTopics': excludedTopics_example, // {{String}} Specify topic whose partition is excluded from replica movement.
  'excludeRecentlyRemovedBrokers': true, // {{Boolean}} Whether allow replicas to be moved to recently removed broker.
  'goals': , // {{array[String]}} List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
  'allowCapacityEstimation': true, // {{Boolean}} Whether allow broker capacity to be estimated.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'excludeRecentlyDemotedBrokers': true, // {{Boolean}} Whether allow leader replicas to be moved to recently demoted broker.
  'json': true, // {{Boolean}} Return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.proposals(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class proposalsExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var kafkaAssigner = true;  // Boolean | Whether use Kafka assigner mode to general proposal. (optional)  (default to false)
            var destinationBrokerIds = new array[Integer](); // array[Integer] | Specify brokers to move replicas to. (optional) 
            var ignoreProposalCache = true;  // Boolean | Whether ignore the cached proposal or not. (optional)  (default to false)
            var rebalanceDisk = true;  // Boolean | Whether balance load between disks within each broker or between brokers in cluster. (optional)  (default to false)
            var dataFrom = dataFrom_example;  // String | Whether calculating proposal from available valid partitions or valid windows. (optional)  (default to VALID_WINDOWS)
            var useReadyDefaultGoals = true;  // Boolean | Whether only using ready goals to generate proposal. (optional)  (default to false)
            var excludedTopics = excludedTopics_example;  // String | Specify topic whose partition is excluded from replica movement. (optional) 
            var excludeRecentlyRemovedBrokers = true;  // Boolean | Whether allow replicas to be moved to recently removed broker. (optional)  (default to false)
            var goals = new array[String](); // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) 
            var allowCapacityEstimation = true;  // Boolean | Whether allow broker capacity to be estimated. (optional)  (default to true)
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var excludeRecentlyDemotedBrokers = true;  // Boolean | Whether allow leader replicas to be moved to recently demoted broker. (optional)  (default to false)
            var json = true;  // Boolean | Return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // proposals
                OptimizationResult result = apiInstance.proposals(kafkaAssigner, destinationBrokerIds, ignoreProposalCache, rebalanceDisk, dataFrom, useReadyDefaultGoals, excludedTopics, excludeRecentlyRemovedBrokers, goals, allowCapacityEstimation, verbose, excludeRecentlyDemotedBrokers, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.proposals: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$kafkaAssigner = true; // Boolean | Whether use Kafka assigner mode to general proposal.
$destinationBrokerIds = ; // array[Integer] | Specify brokers to move replicas to.
$ignoreProposalCache = true; // Boolean | Whether ignore the cached proposal or not.
$rebalanceDisk = true; // Boolean | Whether balance load between disks within each broker or between brokers in cluster.
$dataFrom = dataFrom_example; // String | Whether calculating proposal from available valid partitions or valid windows.
$useReadyDefaultGoals = true; // Boolean | Whether only using ready goals to generate proposal.
$excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
$excludeRecentlyRemovedBrokers = true; // Boolean | Whether allow replicas to be moved to recently removed broker.
$goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
$allowCapacityEstimation = true; // Boolean | Whether allow broker capacity to be estimated.
$verbose = true; // Boolean | Return detailed state information.
$excludeRecentlyDemotedBrokers = true; // Boolean | Whether allow leader replicas to be moved to recently demoted broker.
$json = true; // Boolean | Return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->proposals($kafkaAssigner, $destinationBrokerIds, $ignoreProposalCache, $rebalanceDisk, $dataFrom, $useReadyDefaultGoals, $excludedTopics, $excludeRecentlyRemovedBrokers, $goals, $allowCapacityEstimation, $verbose, $excludeRecentlyDemotedBrokers, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->proposals: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $kafkaAssigner = true; # Boolean | Whether use Kafka assigner mode to general proposal.
my $destinationBrokerIds = []; # array[Integer] | Specify brokers to move replicas to.
my $ignoreProposalCache = true; # Boolean | Whether ignore the cached proposal or not.
my $rebalanceDisk = true; # Boolean | Whether balance load between disks within each broker or between brokers in cluster.
my $dataFrom = dataFrom_example; # String | Whether calculating proposal from available valid partitions or valid windows.
my $useReadyDefaultGoals = true; # Boolean | Whether only using ready goals to generate proposal.
my $excludedTopics = excludedTopics_example; # String | Specify topic whose partition is excluded from replica movement.
my $excludeRecentlyRemovedBrokers = true; # Boolean | Whether allow replicas to be moved to recently removed broker.
my $goals = []; # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
my $allowCapacityEstimation = true; # Boolean | Whether allow broker capacity to be estimated.
my $verbose = true; # Boolean | Return detailed state information.
my $excludeRecentlyDemotedBrokers = true; # Boolean | Whether allow leader replicas to be moved to recently demoted broker.
my $json = true; # Boolean | Return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->proposals(kafkaAssigner => $kafkaAssigner, destinationBrokerIds => $destinationBrokerIds, ignoreProposalCache => $ignoreProposalCache, rebalanceDisk => $rebalanceDisk, dataFrom => $dataFrom, useReadyDefaultGoals => $useReadyDefaultGoals, excludedTopics => $excludedTopics, excludeRecentlyRemovedBrokers => $excludeRecentlyRemovedBrokers, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, verbose => $verbose, excludeRecentlyDemotedBrokers => $excludeRecentlyDemotedBrokers, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->proposals: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
kafkaAssigner = true # Boolean | Whether use Kafka assigner mode to general proposal. (optional) (default to false)
destinationBrokerIds =  # array[Integer] | Specify brokers to move replicas to. (optional)
ignoreProposalCache = true # Boolean | Whether ignore the cached proposal or not. (optional) (default to false)
rebalanceDisk = true # Boolean | Whether balance load between disks within each broker or between brokers in cluster. (optional) (default to false)
dataFrom = dataFrom_example # String | Whether calculating proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
useReadyDefaultGoals = true # Boolean | Whether only using ready goals to generate proposal. (optional) (default to false)
excludedTopics = excludedTopics_example # String | Specify topic whose partition is excluded from replica movement. (optional)
excludeRecentlyRemovedBrokers = true # Boolean | Whether allow replicas to be moved to recently removed broker. (optional) (default to false)
goals =  # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
allowCapacityEstimation = true # Boolean | Whether allow broker capacity to be estimated. (optional) (default to true)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
excludeRecentlyDemotedBrokers = true # Boolean | Whether allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
json = true # Boolean | Return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # proposals
    api_response = api_instance.proposals(kafkaAssigner=kafkaAssigner, destinationBrokerIds=destinationBrokerIds, ignoreProposalCache=ignoreProposalCache, rebalanceDisk=rebalanceDisk, dataFrom=dataFrom, useReadyDefaultGoals=useReadyDefaultGoals, excludedTopics=excludedTopics, excludeRecentlyRemovedBrokers=excludeRecentlyRemovedBrokers, goals=goals, allowCapacityEstimation=allowCapacityEstimation, verbose=verbose, excludeRecentlyDemotedBrokers=excludeRecentlyDemotedBrokers, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->proposals: %s\n" % e)

Parameters

Query parameters
Name Description
kafka_assigner
Boolean
Whether use Kafka assigner mode to general proposal.
destination_broker_ids
array[Integer] (int32)
Specify brokers to move replicas to.
ignore_proposal_cache
Boolean
Whether ignore the cached proposal or not.
rebalance_disk
Boolean
Whether balance load between disks within each broker or between brokers in cluster.
data_from
String
Whether calculating proposal from available valid partitions or valid windows.
use_ready_default_goals
Boolean
Whether only using ready goals to generate proposal.
excluded_topics
String
Specify topic whose partition is excluded from replica movement.
exclude_recently_removed_brokers
Boolean
Whether allow replicas to be moved to recently removed broker.
goals
array[String]
List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
allow_capacity_estimation
Boolean
Whether allow broker capacity to be estimated.
verbose
Boolean
Return detailed state information.
exclude_recently_demoted_brokers
Boolean
Whether allow leader replicas to be moved to recently demoted broker.
json
Boolean
Return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful optimization proposals response.

Status: default - Error response.


rebalance

rebalance

Rebalance a Kafka cluster based on goals.


/kafkacruisecontrol/rebalance

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/rebalance?dryrun=&goals=&allow_capacity_estimation=&stop_ongoing_execution=&concurrent_partition_movements_per_broker=&concurrent_intra_broker_partition_movements=&concurrent_leader_movements=&json=&skip_hard_goal_check=&excluded_topics=&use_ready_default_goals=&data_from=&verbose=&exclude_recently_demoted_brokers=&exclude_recently_removed_brokers=&replica_movement_strategies=&ignore_proposal_cache=&destination_broker_ids=&kafka_assigner=&rebalance_disk=&review_id=&replication_throttle=&execution_progress_check_interval_ms=&reason=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentIntraBrokerPartitionMovements = 56; // Integer | The upper bound of ongoing replica movements between disks within each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        Boolean ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
        array[String] destinationBrokerIds = ; // array[String] | Specify the destination brokers for partitions to move replicas to.
        Boolean kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
        Boolean rebalanceDisk = true; // Boolean | Whether to balance load between brokers or between disks within broker.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        String reason = reason_example; // String | Reason for request.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.rebalance(dryrun, goals, allowCapacityEstimation, stopOngoingExecution, concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, ignoreProposalCache, destinationBrokerIds, kafkaAssigner, rebalanceDisk, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#rebalance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentIntraBrokerPartitionMovements = 56; // Integer | The upper bound of ongoing replica movements between disks within each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        Boolean ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
        array[String] destinationBrokerIds = ; // array[String] | Specify the destination brokers for partitions to move replicas to.
        Boolean kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
        Boolean rebalanceDisk = true; // Boolean | Whether to balance load between brokers or between disks within broker.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        String reason = reason_example; // String | Reason for request.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.rebalance(dryrun, goals, allowCapacityEstimation, stopOngoingExecution, concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, ignoreProposalCache, destinationBrokerIds, kafkaAssigner, rebalanceDisk, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#rebalance");
            e.printStackTrace();
        }
    }
}
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
array[String] *goals = ; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
Boolean *allowCapacityEstimation = true; // Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to false)
Boolean *stopOngoingExecution = true; // Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
Integer *concurrentPartitionMovementsPerBroker = 56; // The upper bound of ongoing replica movements going into/out of each broker. (optional)
Integer *concurrentIntraBrokerPartitionMovements = 56; // The upper bound of ongoing replica movements between disks within each broker. (optional)
Integer *concurrentLeaderMovements = 56; // The upper bound of ongoing leadership movements. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *skipHardGoalCheck = true; // Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
String *excludedTopics = excludedTopics_example; // Specify topic whose partition is excluded from replica movement. (optional)
Boolean *useReadyDefaultGoals = true; // Whether to only use ready goals to generate proposal. (optional) (default to false)
String *dataFrom = dataFrom_example; // Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *excludeRecentlyDemotedBrokers = true; // Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
Boolean *excludeRecentlyRemovedBrokers = true; // Whether to allow replicas to be moved to recently removed broker. (optional) (default to true)
array[String] *replicaMovementStrategies = ; // Replica movement strategies to use. (optional)
Boolean *ignoreProposalCache = true; // Whether to ignore the cached proposal or not. (optional) (default to false)
array[String] *destinationBrokerIds = ; // Specify the destination brokers for partitions to move replicas to. (optional)
Boolean *kafkaAssigner = true; // Whether to use Kafka assigner mode to general proposal. (optional) (default to false)
Boolean *rebalanceDisk = true; // Whether to balance load between brokers or between disks within broker. (optional) (default to false)
Integer *reviewId = 56; // Review id for 2FA. (optional)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional)
String *reason = reason_example; // Reason for request. (optional)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// rebalance
[apiInstance rebalanceWith:dryrun
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    stopOngoingExecution:stopOngoingExecution
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    concurrentIntraBrokerPartitionMovements:concurrentIntraBrokerPartitionMovements
    concurrentLeaderMovements:concurrentLeaderMovements
    json:json
    skipHardGoalCheck:skipHardGoalCheck
    excludedTopics:excludedTopics
    useReadyDefaultGoals:useReadyDefaultGoals
    dataFrom:dataFrom
    verbose:verbose
    excludeRecentlyDemotedBrokers:excludeRecentlyDemotedBrokers
    excludeRecentlyRemovedBrokers:excludeRecentlyRemovedBrokers
    replicaMovementStrategies:replicaMovementStrategies
    ignoreProposalCache:ignoreProposalCache
    destinationBrokerIds:destinationBrokerIds
    kafkaAssigner:kafkaAssigner
    rebalanceDisk:rebalanceDisk
    reviewId:reviewId
    replicationThrottle:replicationThrottle
    executionProgressCheckIntervalMs:executionProgressCheckIntervalMs
    reason:reason
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(OptimizationResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'dryrun': true, // {{Boolean}} Whether to dry-run the request or not.
  'goals': , // {{array[String]}} List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
  'allowCapacityEstimation': true, // {{Boolean}} Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
  'stopOngoingExecution': true, // {{Boolean}} Whether to stop the ongoing execution (if any) and start executing the given request.
  'concurrentPartitionMovementsPerBroker': 56, // {{Integer}} The upper bound of ongoing replica movements going into/out of each broker.
  'concurrentIntraBrokerPartitionMovements': 56, // {{Integer}} The upper bound of ongoing replica movements between disks within each broker.
  'concurrentLeaderMovements': 56, // {{Integer}} The upper bound of ongoing leadership movements.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'skipHardGoalCheck': true, // {{Boolean}} Whether to allow hard goals be skipped in proposal generation.
  'excludedTopics': excludedTopics_example, // {{String}} Specify topic whose partition is excluded from replica movement.
  'useReadyDefaultGoals': true, // {{Boolean}} Whether to only use ready goals to generate proposal.
  'dataFrom': dataFrom_example, // {{String}} Whether to calculate proposal from available valid partitions or valid windows.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'excludeRecentlyDemotedBrokers': true, // {{Boolean}} Whether to allow leader replicas to be moved to recently demoted broker.
  'excludeRecentlyRemovedBrokers': true, // {{Boolean}} Whether to allow replicas to be moved to recently removed broker.
  'replicaMovementStrategies': , // {{array[String]}} Replica movement strategies to use.
  'ignoreProposalCache': true, // {{Boolean}} Whether to ignore the cached proposal or not.
  'destinationBrokerIds': , // {{array[String]}} Specify the destination brokers for partitions to move replicas to.
  'kafkaAssigner': true, // {{Boolean}} Whether to use Kafka assigner mode to general proposal.
  'rebalanceDisk': true, // {{Boolean}} Whether to balance load between brokers or between disks within broker.
  'reviewId': 56, // {{Integer}} Review id for 2FA.
  'replicationThrottle': 789, // {{Long}} Upper bound on the bandwidth in bytes per second used to move replicas.
  'executionProgressCheckIntervalMs': 789, // {{Long}} Execution progress check interval in milliseconds.
  'reason': reason_example, // {{String}} Reason for request.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rebalance(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class rebalanceExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var dryrun = true;  // Boolean | Whether to dry-run the request or not. (optional)  (default to true)
            var goals = new array[String](); // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) 
            var allowCapacityEstimation = true;  // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional)  (default to false)
            var stopOngoingExecution = true;  // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional)  (default to false)
            var concurrentPartitionMovementsPerBroker = 56;  // Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional) 
            var concurrentIntraBrokerPartitionMovements = 56;  // Integer | The upper bound of ongoing replica movements between disks within each broker. (optional) 
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of ongoing leadership movements. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var skipHardGoalCheck = true;  // Boolean | Whether to allow hard goals be skipped in proposal generation. (optional)  (default to false)
            var excludedTopics = excludedTopics_example;  // String | Specify topic whose partition is excluded from replica movement. (optional) 
            var useReadyDefaultGoals = true;  // Boolean | Whether to only use ready goals to generate proposal. (optional)  (default to false)
            var dataFrom = dataFrom_example;  // String | Whether to calculate proposal from available valid partitions or valid windows. (optional)  (default to VALID_WINDOWS)
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var excludeRecentlyDemotedBrokers = true;  // Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional)  (default to false)
            var excludeRecentlyRemovedBrokers = true;  // Boolean | Whether to allow replicas to be moved to recently removed broker. (optional)  (default to true)
            var replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use. (optional) 
            var ignoreProposalCache = true;  // Boolean | Whether to ignore the cached proposal or not. (optional)  (default to false)
            var destinationBrokerIds = new array[String](); // array[String] | Specify the destination brokers for partitions to move replicas to. (optional) 
            var kafkaAssigner = true;  // Boolean | Whether to use Kafka assigner mode to general proposal. (optional)  (default to false)
            var rebalanceDisk = true;  // Boolean | Whether to balance load between brokers or between disks within broker. (optional)  (default to false)
            var reviewId = 56;  // Integer | Review id for 2FA. (optional) 
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) 
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional) 
            var reason = reason_example;  // String | Reason for request. (optional) 
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // rebalance
                OptimizationResult result = apiInstance.rebalance(dryrun, goals, allowCapacityEstimation, stopOngoingExecution, concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, ignoreProposalCache, destinationBrokerIds, kafkaAssigner, rebalanceDisk, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.rebalance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$dryrun = true; // Boolean | Whether to dry-run the request or not.
$goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
$allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
$stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
$concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
$concurrentIntraBrokerPartitionMovements = 56; // Integer | The upper bound of ongoing replica movements between disks within each broker.
$concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
$json = true; // Boolean | Whether to return in JSON format or not.
$skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
$excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
$useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
$dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
$verbose = true; // Boolean | Return detailed state information.
$excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
$excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
$replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
$ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
$destinationBrokerIds = ; // array[String] | Specify the destination brokers for partitions to move replicas to.
$kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
$rebalanceDisk = true; // Boolean | Whether to balance load between brokers or between disks within broker.
$reviewId = 56; // Integer | Review id for 2FA.
$replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
$executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
$reason = reason_example; // String | Reason for request.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->rebalance($dryrun, $goals, $allowCapacityEstimation, $stopOngoingExecution, $concurrentPartitionMovementsPerBroker, $concurrentIntraBrokerPartitionMovements, $concurrentLeaderMovements, $json, $skipHardGoalCheck, $excludedTopics, $useReadyDefaultGoals, $dataFrom, $verbose, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $replicaMovementStrategies, $ignoreProposalCache, $destinationBrokerIds, $kafkaAssigner, $rebalanceDisk, $reviewId, $replicationThrottle, $executionProgressCheckIntervalMs, $reason, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->rebalance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $dryrun = true; # Boolean | Whether to dry-run the request or not.
my $goals = []; # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
my $allowCapacityEstimation = true; # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
my $stopOngoingExecution = true; # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
my $concurrentPartitionMovementsPerBroker = 56; # Integer | The upper bound of ongoing replica movements going into/out of each broker.
my $concurrentIntraBrokerPartitionMovements = 56; # Integer | The upper bound of ongoing replica movements between disks within each broker.
my $concurrentLeaderMovements = 56; # Integer | The upper bound of ongoing leadership movements.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $skipHardGoalCheck = true; # Boolean | Whether to allow hard goals be skipped in proposal generation.
my $excludedTopics = excludedTopics_example; # String | Specify topic whose partition is excluded from replica movement.
my $useReadyDefaultGoals = true; # Boolean | Whether to only use ready goals to generate proposal.
my $dataFrom = dataFrom_example; # String | Whether to calculate proposal from available valid partitions or valid windows.
my $verbose = true; # Boolean | Return detailed state information.
my $excludeRecentlyDemotedBrokers = true; # Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
my $excludeRecentlyRemovedBrokers = true; # Boolean | Whether to allow replicas to be moved to recently removed broker.
my $replicaMovementStrategies = []; # array[String] | Replica movement strategies to use.
my $ignoreProposalCache = true; # Boolean | Whether to ignore the cached proposal or not.
my $destinationBrokerIds = []; # array[String] | Specify the destination brokers for partitions to move replicas to.
my $kafkaAssigner = true; # Boolean | Whether to use Kafka assigner mode to general proposal.
my $rebalanceDisk = true; # Boolean | Whether to balance load between brokers or between disks within broker.
my $reviewId = 56; # Integer | Review id for 2FA.
my $replicationThrottle = 789; # Long | Upper bound on the bandwidth in bytes per second used to move replicas.
my $executionProgressCheckIntervalMs = 789; # Long | Execution progress check interval in milliseconds.
my $reason = reason_example; # String | Reason for request.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->rebalance(dryrun => $dryrun, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, stopOngoingExecution => $stopOngoingExecution, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements => $concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements => $concurrentLeaderMovements, json => $json, skipHardGoalCheck => $skipHardGoalCheck, excludedTopics => $excludedTopics, useReadyDefaultGoals => $useReadyDefaultGoals, dataFrom => $dataFrom, verbose => $verbose, excludeRecentlyDemotedBrokers => $excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers => $excludeRecentlyRemovedBrokers, replicaMovementStrategies => $replicaMovementStrategies, ignoreProposalCache => $ignoreProposalCache, destinationBrokerIds => $destinationBrokerIds, kafkaAssigner => $kafkaAssigner, rebalanceDisk => $rebalanceDisk, reviewId => $reviewId, replicationThrottle => $replicationThrottle, executionProgressCheckIntervalMs => $executionProgressCheckIntervalMs, reason => $reason, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->rebalance: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
goals =  # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
allowCapacityEstimation = true # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to false)
stopOngoingExecution = true # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
concurrentPartitionMovementsPerBroker = 56 # Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional)
concurrentIntraBrokerPartitionMovements = 56 # Integer | The upper bound of ongoing replica movements between disks within each broker. (optional)
concurrentLeaderMovements = 56 # Integer | The upper bound of ongoing leadership movements. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
skipHardGoalCheck = true # Boolean | Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
excludedTopics = excludedTopics_example # String | Specify topic whose partition is excluded from replica movement. (optional)
useReadyDefaultGoals = true # Boolean | Whether to only use ready goals to generate proposal. (optional) (default to false)
dataFrom = dataFrom_example # String | Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
excludeRecentlyDemotedBrokers = true # Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
excludeRecentlyRemovedBrokers = true # Boolean | Whether to allow replicas to be moved to recently removed broker. (optional) (default to true)
replicaMovementStrategies =  # array[String] | Replica movement strategies to use. (optional)
ignoreProposalCache = true # Boolean | Whether to ignore the cached proposal or not. (optional) (default to false)
destinationBrokerIds =  # array[String] | Specify the destination brokers for partitions to move replicas to. (optional)
kafkaAssigner = true # Boolean | Whether to use Kafka assigner mode to general proposal. (optional) (default to false)
rebalanceDisk = true # Boolean | Whether to balance load between brokers or between disks within broker. (optional) (default to false)
reviewId = 56 # Integer | Review id for 2FA. (optional)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional)
reason = reason_example # String | Reason for request. (optional)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # rebalance
    api_response = api_instance.rebalance(dryrun=dryrun, goals=goals, allowCapacityEstimation=allowCapacityEstimation, stopOngoingExecution=stopOngoingExecution, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, concurrentIntraBrokerPartitionMovements=concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements=concurrentLeaderMovements, json=json, skipHardGoalCheck=skipHardGoalCheck, excludedTopics=excludedTopics, useReadyDefaultGoals=useReadyDefaultGoals, dataFrom=dataFrom, verbose=verbose, excludeRecentlyDemotedBrokers=excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers=excludeRecentlyRemovedBrokers, replicaMovementStrategies=replicaMovementStrategies, ignoreProposalCache=ignoreProposalCache, destinationBrokerIds=destinationBrokerIds, kafkaAssigner=kafkaAssigner, rebalanceDisk=rebalanceDisk, reviewId=reviewId, replicationThrottle=replicationThrottle, executionProgressCheckIntervalMs=executionProgressCheckIntervalMs, reason=reason, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->rebalance: %s\n" % e)

Parameters

Query parameters
Name Description
dryrun
Boolean
Whether to dry-run the request or not.
goals
array[String]
List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
allow_capacity_estimation
Boolean
Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
stop_ongoing_execution
Boolean
Whether to stop the ongoing execution (if any) and start executing the given request.
concurrent_partition_movements_per_broker
Integer (int32)
The upper bound of ongoing replica movements going into/out of each broker.
concurrent_intra_broker_partition_movements
Integer (int32)
The upper bound of ongoing replica movements between disks within each broker.
concurrent_leader_movements
Integer (int32)
The upper bound of ongoing leadership movements.
json
Boolean
Whether to return in JSON format or not.
skip_hard_goal_check
Boolean
Whether to allow hard goals be skipped in proposal generation.
excluded_topics
String
Specify topic whose partition is excluded from replica movement.
use_ready_default_goals
Boolean
Whether to only use ready goals to generate proposal.
data_from
String
Whether to calculate proposal from available valid partitions or valid windows.
verbose
Boolean
Return detailed state information.
exclude_recently_demoted_brokers
Boolean
Whether to allow leader replicas to be moved to recently demoted broker.
exclude_recently_removed_brokers
Boolean
Whether to allow replicas to be moved to recently removed broker.
replica_movement_strategies
array[String]
Replica movement strategies to use.
ignore_proposal_cache
Boolean
Whether to ignore the cached proposal or not.
destination_broker_ids
array[String]
Specify the destination brokers for partitions to move replicas to.
kafka_assigner
Boolean
Whether to use Kafka assigner mode to general proposal.
rebalance_disk
Boolean
Whether to balance load between brokers or between disks within broker.
review_id
Integer (int32)
Review id for 2FA.
replication_throttle
Long (int64)
Upper bound on the bandwidth in bytes per second used to move replicas.
execution_progress_check_interval_ms
Long (int64)
Execution progress check interval in milliseconds.
reason
String
Reason for request.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful rebalance response.

Status: default - Error response.


removeBroker

removeBroker

Remove/decomission specified brokers.


/kafkacruisecontrol/remove_broker

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/remove_broker?brokerid=&dryrun=&throttle_removed_broker=&goals=&allow_capacity_estimation=&concurrent_partition_movements_per_broker=&concurrent_leader_movements=&json=&skip_hard_goal_check=&excluded_topics=&kafka_assigner=&use_ready_default_goals=&verbose=&exclude_recently_demoted_brokers=&exclude_recently_removed_brokers=&replica_movement_strategies=&destination_broker_ids=&execution_progress_check_interval_ms=&stop_ongoing_execution=&reason=&review_id=&data_from=&replication_throttle=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] brokerid = ; // array[Integer] | List of target broker ids.
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        Boolean throttleRemovedBroker = true; // Boolean | Whether to throttle the added broker.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        array[Integer] destinationBrokerIds = ; // array[Integer] | Comma-separated and/or space-separated list of broker IDs.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        String reason = reason_example; // String | Reason for request.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.removeBroker(brokerid, dryrun, throttleRemovedBroker, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, destinationBrokerIds, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#removeBroker");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] brokerid = ; // array[Integer] | List of target broker ids.
        Boolean dryrun = true; // Boolean | Whether to dry-run the request or not.
        Boolean throttleRemovedBroker = true; // Boolean | Whether to throttle the added broker.
        array[String] goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
        Boolean allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
        Integer concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
        Integer concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
        String excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
        Boolean kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
        Boolean excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        array[Integer] destinationBrokerIds = ; // array[Integer] | Comma-separated and/or space-separated list of broker IDs.
        Long executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
        Boolean stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
        String reason = reason_example; // String | Reason for request.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Long replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            OptimizationResult result = apiInstance.removeBroker(brokerid, dryrun, throttleRemovedBroker, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, destinationBrokerIds, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#removeBroker");
            e.printStackTrace();
        }
    }
}
array[Integer] *brokerid = ; // List of target broker ids.
Boolean *dryrun = true; // Whether to dry-run the request or not. (optional) (default to true)
Boolean *throttleRemovedBroker = true; // Whether to throttle the added broker. (optional) (default to true)
array[String] *goals = ; // List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
Boolean *allowCapacityEstimation = true; // Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to true)
Integer *concurrentPartitionMovementsPerBroker = 56; // The upper bound of ongoing replica movements going into/out of each broker. (optional) (default to 5)
Integer *concurrentLeaderMovements = 56; // The upper bound of ongoing leadership movements. (optional) (default to 1000)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *skipHardGoalCheck = true; // Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
String *excludedTopics = excludedTopics_example; // Specify topic whose partition is excluded from replica movement. (optional)
Boolean *kafkaAssigner = true; // Whether to use Kafka assigner mode to general proposal. (optional) (default to false)
Boolean *useReadyDefaultGoals = true; // Whether to only use ready goals to generate proposal. (optional) (default to false)
Boolean *verbose = true; // Return detailed state information. (optional) (default to false)
Boolean *excludeRecentlyDemotedBrokers = true; // Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
Boolean *excludeRecentlyRemovedBrokers = true; // Whether to allow replicas to be moved to recently removed broker. (optional) (default to false)
array[String] *replicaMovementStrategies = ; // Replica movement strategies to use. (optional)
array[Integer] *destinationBrokerIds = ; // Comma-separated and/or space-separated list of broker IDs. (optional)
Long *executionProgressCheckIntervalMs = 789; // Execution progress check interval in milliseconds. (optional)
Boolean *stopOngoingExecution = true; // Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
String *reason = reason_example; // Reason for request. (optional)
Integer *reviewId = 56; // Review id for 2FA. (optional)
String *dataFrom = dataFrom_example; // Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
Long *replicationThrottle = 789; // Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// removeBroker
[apiInstance removeBrokerWith:brokerid
    dryrun:dryrun
    throttleRemovedBroker:throttleRemovedBroker
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    concurrentLeaderMovements:concurrentLeaderMovements
    json:json
    skipHardGoalCheck:skipHardGoalCheck
    excludedTopics:excludedTopics
    kafkaAssigner:kafkaAssigner
    useReadyDefaultGoals:useReadyDefaultGoals
    verbose:verbose
    excludeRecentlyDemotedBrokers:excludeRecentlyDemotedBrokers
    excludeRecentlyRemovedBrokers:excludeRecentlyRemovedBrokers
    replicaMovementStrategies:replicaMovementStrategies
    destinationBrokerIds:destinationBrokerIds
    executionProgressCheckIntervalMs:executionProgressCheckIntervalMs
    stopOngoingExecution:stopOngoingExecution
    reason:reason
    reviewId:reviewId
    dataFrom:dataFrom
    replicationThrottle:replicationThrottle
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(OptimizationResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var brokerid = ; // {{array[Integer]}} List of target broker ids.
var opts = { 
  'dryrun': true, // {{Boolean}} Whether to dry-run the request or not.
  'throttleRemovedBroker': true, // {{Boolean}} Whether to throttle the added broker.
  'goals': , // {{array[String]}} List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
  'allowCapacityEstimation': true, // {{Boolean}} Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
  'concurrentPartitionMovementsPerBroker': 56, // {{Integer}} The upper bound of ongoing replica movements going into/out of each broker.
  'concurrentLeaderMovements': 56, // {{Integer}} The upper bound of ongoing leadership movements.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'skipHardGoalCheck': true, // {{Boolean}} Whether to allow hard goals be skipped in proposal generation.
  'excludedTopics': excludedTopics_example, // {{String}} Specify topic whose partition is excluded from replica movement.
  'kafkaAssigner': true, // {{Boolean}} Whether to use Kafka assigner mode to general proposal.
  'useReadyDefaultGoals': true, // {{Boolean}} Whether to only use ready goals to generate proposal.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'excludeRecentlyDemotedBrokers': true, // {{Boolean}} Whether to allow leader replicas to be moved to recently demoted broker.
  'excludeRecentlyRemovedBrokers': true, // {{Boolean}} Whether to allow replicas to be moved to recently removed broker.
  'replicaMovementStrategies': , // {{array[String]}} Replica movement strategies to use.
  'destinationBrokerIds': , // {{array[Integer]}} Comma-separated and/or space-separated list of broker IDs.
  'executionProgressCheckIntervalMs': 789, // {{Long}} Execution progress check interval in milliseconds.
  'stopOngoingExecution': true, // {{Boolean}} Whether to stop the ongoing execution (if any) and start executing the given request.
  'reason': reason_example, // {{String}} Reason for request.
  'reviewId': 56, // {{Integer}} Review id for 2FA.
  'dataFrom': dataFrom_example, // {{String}} Whether to calculate proposal from available valid partitions or valid windows.
  'replicationThrottle': 789, // {{Long}} Upper bound on the bandwidth in bytes per second used to move replicas.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.removeBroker(brokerid, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class removeBrokerExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var brokerid = new array[Integer](); // array[Integer] | List of target broker ids.
            var dryrun = true;  // Boolean | Whether to dry-run the request or not. (optional)  (default to true)
            var throttleRemovedBroker = true;  // Boolean | Whether to throttle the added broker. (optional)  (default to true)
            var goals = new array[String](); // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional) 
            var allowCapacityEstimation = true;  // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional)  (default to true)
            var concurrentPartitionMovementsPerBroker = 56;  // Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional)  (default to 5)
            var concurrentLeaderMovements = 56;  // Integer | The upper bound of ongoing leadership movements. (optional)  (default to 1000)
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var skipHardGoalCheck = true;  // Boolean | Whether to allow hard goals be skipped in proposal generation. (optional)  (default to false)
            var excludedTopics = excludedTopics_example;  // String | Specify topic whose partition is excluded from replica movement. (optional) 
            var kafkaAssigner = true;  // Boolean | Whether to use Kafka assigner mode to general proposal. (optional)  (default to false)
            var useReadyDefaultGoals = true;  // Boolean | Whether to only use ready goals to generate proposal. (optional)  (default to false)
            var verbose = true;  // Boolean | Return detailed state information. (optional)  (default to false)
            var excludeRecentlyDemotedBrokers = true;  // Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional)  (default to false)
            var excludeRecentlyRemovedBrokers = true;  // Boolean | Whether to allow replicas to be moved to recently removed broker. (optional)  (default to false)
            var replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use. (optional) 
            var destinationBrokerIds = new array[Integer](); // array[Integer] | Comma-separated and/or space-separated list of broker IDs. (optional) 
            var executionProgressCheckIntervalMs = 789;  // Long | Execution progress check interval in milliseconds. (optional) 
            var stopOngoingExecution = true;  // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional)  (default to false)
            var reason = reason_example;  // String | Reason for request. (optional) 
            var reviewId = 56;  // Integer | Review id for 2FA. (optional) 
            var dataFrom = dataFrom_example;  // String | Whether to calculate proposal from available valid partitions or valid windows. (optional)  (default to VALID_WINDOWS)
            var replicationThrottle = 789;  // Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional) 
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // removeBroker
                OptimizationResult result = apiInstance.removeBroker(brokerid, dryrun, throttleRemovedBroker, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, destinationBrokerIds, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.removeBroker: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$brokerid = ; // array[Integer] | List of target broker ids.
$dryrun = true; // Boolean | Whether to dry-run the request or not.
$throttleRemovedBroker = true; // Boolean | Whether to throttle the added broker.
$goals = ; // array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
$allowCapacityEstimation = true; // Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
$concurrentPartitionMovementsPerBroker = 56; // Integer | The upper bound of ongoing replica movements going into/out of each broker.
$concurrentLeaderMovements = 56; // Integer | The upper bound of ongoing leadership movements.
$json = true; // Boolean | Whether to return in JSON format or not.
$skipHardGoalCheck = true; // Boolean | Whether to allow hard goals be skipped in proposal generation.
$excludedTopics = excludedTopics_example; // String | Specify topic whose partition is excluded from replica movement.
$kafkaAssigner = true; // Boolean | Whether to use Kafka assigner mode to general proposal.
$useReadyDefaultGoals = true; // Boolean | Whether to only use ready goals to generate proposal.
$verbose = true; // Boolean | Return detailed state information.
$excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
$excludeRecentlyRemovedBrokers = true; // Boolean | Whether to allow replicas to be moved to recently removed broker.
$replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
$destinationBrokerIds = ; // array[Integer] | Comma-separated and/or space-separated list of broker IDs.
$executionProgressCheckIntervalMs = 789; // Long | Execution progress check interval in milliseconds.
$stopOngoingExecution = true; // Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
$reason = reason_example; // String | Reason for request.
$reviewId = 56; // Integer | Review id for 2FA.
$dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
$replicationThrottle = 789; // Long | Upper bound on the bandwidth in bytes per second used to move replicas.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->removeBroker($brokerid, $dryrun, $throttleRemovedBroker, $goals, $allowCapacityEstimation, $concurrentPartitionMovementsPerBroker, $concurrentLeaderMovements, $json, $skipHardGoalCheck, $excludedTopics, $kafkaAssigner, $useReadyDefaultGoals, $verbose, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $replicaMovementStrategies, $destinationBrokerIds, $executionProgressCheckIntervalMs, $stopOngoingExecution, $reason, $reviewId, $dataFrom, $replicationThrottle, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->removeBroker: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $brokerid = []; # array[Integer] | List of target broker ids.
my $dryrun = true; # Boolean | Whether to dry-run the request or not.
my $throttleRemovedBroker = true; # Boolean | Whether to throttle the added broker.
my $goals = []; # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
my $allowCapacityEstimation = true; # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
my $concurrentPartitionMovementsPerBroker = 56; # Integer | The upper bound of ongoing replica movements going into/out of each broker.
my $concurrentLeaderMovements = 56; # Integer | The upper bound of ongoing leadership movements.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $skipHardGoalCheck = true; # Boolean | Whether to allow hard goals be skipped in proposal generation.
my $excludedTopics = excludedTopics_example; # String | Specify topic whose partition is excluded from replica movement.
my $kafkaAssigner = true; # Boolean | Whether to use Kafka assigner mode to general proposal.
my $useReadyDefaultGoals = true; # Boolean | Whether to only use ready goals to generate proposal.
my $verbose = true; # Boolean | Return detailed state information.
my $excludeRecentlyDemotedBrokers = true; # Boolean | Whether to allow leader replicas to be moved to recently demoted broker.
my $excludeRecentlyRemovedBrokers = true; # Boolean | Whether to allow replicas to be moved to recently removed broker.
my $replicaMovementStrategies = []; # array[String] | Replica movement strategies to use.
my $destinationBrokerIds = []; # array[Integer] | Comma-separated and/or space-separated list of broker IDs.
my $executionProgressCheckIntervalMs = 789; # Long | Execution progress check interval in milliseconds.
my $stopOngoingExecution = true; # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request.
my $reason = reason_example; # String | Reason for request.
my $reviewId = 56; # Integer | Review id for 2FA.
my $dataFrom = dataFrom_example; # String | Whether to calculate proposal from available valid partitions or valid windows.
my $replicationThrottle = 789; # Long | Upper bound on the bandwidth in bytes per second used to move replicas.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->removeBroker(brokerid => $brokerid, dryrun => $dryrun, throttleRemovedBroker => $throttleRemovedBroker, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, concurrentLeaderMovements => $concurrentLeaderMovements, json => $json, skipHardGoalCheck => $skipHardGoalCheck, excludedTopics => $excludedTopics, kafkaAssigner => $kafkaAssigner, useReadyDefaultGoals => $useReadyDefaultGoals, verbose => $verbose, excludeRecentlyDemotedBrokers => $excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers => $excludeRecentlyRemovedBrokers, replicaMovementStrategies => $replicaMovementStrategies, destinationBrokerIds => $destinationBrokerIds, executionProgressCheckIntervalMs => $executionProgressCheckIntervalMs, stopOngoingExecution => $stopOngoingExecution, reason => $reason, reviewId => $reviewId, dataFrom => $dataFrom, replicationThrottle => $replicationThrottle, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->removeBroker: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
brokerid =  # array[Integer] | List of target broker ids.
dryrun = true # Boolean | Whether to dry-run the request or not. (optional) (default to true)
throttleRemovedBroker = true # Boolean | Whether to throttle the added broker. (optional) (default to true)
goals =  # array[String] | List of goals used to generate proposal, the default goals will be used if this parameter is not specified. (optional)
allowCapacityEstimation = true # Boolean | Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information. (optional) (default to true)
concurrentPartitionMovementsPerBroker = 56 # Integer | The upper bound of ongoing replica movements going into/out of each broker. (optional) (default to 5)
concurrentLeaderMovements = 56 # Integer | The upper bound of ongoing leadership movements. (optional) (default to 1000)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
skipHardGoalCheck = true # Boolean | Whether to allow hard goals be skipped in proposal generation. (optional) (default to false)
excludedTopics = excludedTopics_example # String | Specify topic whose partition is excluded from replica movement. (optional)
kafkaAssigner = true # Boolean | Whether to use Kafka assigner mode to general proposal. (optional) (default to false)
useReadyDefaultGoals = true # Boolean | Whether to only use ready goals to generate proposal. (optional) (default to false)
verbose = true # Boolean | Return detailed state information. (optional) (default to false)
excludeRecentlyDemotedBrokers = true # Boolean | Whether to allow leader replicas to be moved to recently demoted broker. (optional) (default to false)
excludeRecentlyRemovedBrokers = true # Boolean | Whether to allow replicas to be moved to recently removed broker. (optional) (default to false)
replicaMovementStrategies =  # array[String] | Replica movement strategies to use. (optional)
destinationBrokerIds =  # array[Integer] | Comma-separated and/or space-separated list of broker IDs. (optional)
executionProgressCheckIntervalMs = 789 # Long | Execution progress check interval in milliseconds. (optional)
stopOngoingExecution = true # Boolean | Whether to stop the ongoing execution (if any) and start executing the given request. (optional) (default to false)
reason = reason_example # String | Reason for request. (optional)
reviewId = 56 # Integer | Review id for 2FA. (optional)
dataFrom = dataFrom_example # String | Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
replicationThrottle = 789 # Long | Upper bound on the bandwidth in bytes per second used to move replicas. (optional)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # removeBroker
    api_response = api_instance.remove_broker(brokerid, dryrun=dryrun, throttleRemovedBroker=throttleRemovedBroker, goals=goals, allowCapacityEstimation=allowCapacityEstimation, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, concurrentLeaderMovements=concurrentLeaderMovements, json=json, skipHardGoalCheck=skipHardGoalCheck, excludedTopics=excludedTopics, kafkaAssigner=kafkaAssigner, useReadyDefaultGoals=useReadyDefaultGoals, verbose=verbose, excludeRecentlyDemotedBrokers=excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers=excludeRecentlyRemovedBrokers, replicaMovementStrategies=replicaMovementStrategies, destinationBrokerIds=destinationBrokerIds, executionProgressCheckIntervalMs=executionProgressCheckIntervalMs, stopOngoingExecution=stopOngoingExecution, reason=reason, reviewId=reviewId, dataFrom=dataFrom, replicationThrottle=replicationThrottle, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->removeBroker: %s\n" % e)

Parameters

Query parameters
Name Description
brokerid*
array[Integer] (int32)
List of target broker ids.
Required
dryrun
Boolean
Whether to dry-run the request or not.
throttle_removed_broker
Boolean
Whether to throttle the added broker.
goals
array[String]
List of goals used to generate proposal, the default goals will be used if this parameter is not specified.
allow_capacity_estimation
Boolean
Whether to allow capacity estimation when cruise-control is unable to obtain all per-broker capacity information.
concurrent_partition_movements_per_broker
Integer (int32)
The upper bound of ongoing replica movements going into/out of each broker.
concurrent_leader_movements
Integer (int32)
The upper bound of ongoing leadership movements.
json
Boolean
Whether to return in JSON format or not.
skip_hard_goal_check
Boolean
Whether to allow hard goals be skipped in proposal generation.
excluded_topics
String
Specify topic whose partition is excluded from replica movement.
kafka_assigner
Boolean
Whether to use Kafka assigner mode to general proposal.
use_ready_default_goals
Boolean
Whether to only use ready goals to generate proposal.
verbose
Boolean
Return detailed state information.
exclude_recently_demoted_brokers
Boolean
Whether to allow leader replicas to be moved to recently demoted broker.
exclude_recently_removed_brokers
Boolean
Whether to allow replicas to be moved to recently removed broker.
replica_movement_strategies
array[String]
Replica movement strategies to use.
destination_broker_ids
array[Integer] (int32)
Comma-separated and/or space-separated list of broker IDs.
execution_progress_check_interval_ms
Long (int64)
Execution progress check interval in milliseconds.
stop_ongoing_execution
Boolean
Whether to stop the ongoing execution (if any) and start executing the given request.
reason
String
Reason for request.
review_id
Integer (int32)
Review id for 2FA.
data_from
String
Whether to calculate proposal from available valid partitions or valid windows.
replication_throttle
Long (int64)
Upper bound on the bandwidth in bytes per second used to move replicas.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful add brokers response.

Status: default - Error response.


resumeSampling

resumeSampling

Resume metric sampling.


/kafkacruisecontrol/resume_sampling

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/resume_sampling?reason=&review_id=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String reason = reason_example; // String | Reason for request.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            ResumeSamplingResult result = apiInstance.resumeSampling(reason, reviewId, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#resumeSampling");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String reason = reason_example; // String | Reason for request.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            ResumeSamplingResult result = apiInstance.resumeSampling(reason, reviewId, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#resumeSampling");
            e.printStackTrace();
        }
    }
}
String *reason = reason_example; // Reason for request. (optional)
Integer *reviewId = 56; // Review id for 2FA. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// resumeSampling
[apiInstance resumeSamplingWith:reason
    reviewId:reviewId
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(ResumeSamplingResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'reason': reason_example, // {{String}} Reason for request.
  'reviewId': 56, // {{Integer}} Review id for 2FA.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resumeSampling(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resumeSamplingExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var reason = reason_example;  // String | Reason for request. (optional) 
            var reviewId = 56;  // Integer | Review id for 2FA. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // resumeSampling
                ResumeSamplingResult result = apiInstance.resumeSampling(reason, reviewId, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.resumeSampling: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$reason = reason_example; // String | Reason for request.
$reviewId = 56; // Integer | Review id for 2FA.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->resumeSampling($reason, $reviewId, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->resumeSampling: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $reason = reason_example; # String | Reason for request.
my $reviewId = 56; # Integer | Review id for 2FA.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->resumeSampling(reason => $reason, reviewId => $reviewId, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->resumeSampling: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
reason = reason_example # String | Reason for request. (optional)
reviewId = 56 # Integer | Review id for 2FA. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # resumeSampling
    api_response = api_instance.resume_sampling(reason=reason, reviewId=reviewId, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->resumeSampling: %s\n" % e)

Parameters

Query parameters
Name Description
reason
String
Reason for request.
review_id
Integer (int32)
Review id for 2FA.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful execution response.

Status: default - Error response.


review

review

Reivew pending Cruise Control requests.


/kafkacruisecontrol/review

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/review?approve=&discard=&reason=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] approve = ; // array[Integer] | Approve one or more pending Cruise Control requests.
        array[Integer] discard = ; // array[Integer] | Reject one or more pending Cruise Control requests.
        String reason = reason_example; // String | Reason of approval or rejection.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            ReviewResult result = apiInstance.review(approve, discard, reason, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#review");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] approve = ; // array[Integer] | Approve one or more pending Cruise Control requests.
        array[Integer] discard = ; // array[Integer] | Reject one or more pending Cruise Control requests.
        String reason = reason_example; // String | Reason of approval or rejection.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            ReviewResult result = apiInstance.review(approve, discard, reason, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#review");
            e.printStackTrace();
        }
    }
}
array[Integer] *approve = ; // Approve one or more pending Cruise Control requests. (optional)
array[Integer] *discard = ; // Reject one or more pending Cruise Control requests. (optional)
String *reason = reason_example; // Reason of approval or rejection. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// review
[apiInstance reviewWith:approve
    discard:discard
    reason:reason
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(ReviewResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'approve': , // {{array[Integer]}} Approve one or more pending Cruise Control requests.
  'discard': , // {{array[Integer]}} Reject one or more pending Cruise Control requests.
  'reason': reason_example, // {{String}} Reason of approval or rejection.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.review(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class reviewExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var approve = new array[Integer](); // array[Integer] | Approve one or more pending Cruise Control requests. (optional) 
            var discard = new array[Integer](); // array[Integer] | Reject one or more pending Cruise Control requests. (optional) 
            var reason = reason_example;  // String | Reason of approval or rejection. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // review
                ReviewResult result = apiInstance.review(approve, discard, reason, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.review: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$approve = ; // array[Integer] | Approve one or more pending Cruise Control requests.
$discard = ; // array[Integer] | Reject one or more pending Cruise Control requests.
$reason = reason_example; // String | Reason of approval or rejection.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->review($approve, $discard, $reason, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->review: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $approve = []; # array[Integer] | Approve one or more pending Cruise Control requests.
my $discard = []; # array[Integer] | Reject one or more pending Cruise Control requests.
my $reason = reason_example; # String | Reason of approval or rejection.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->review(approve => $approve, discard => $discard, reason => $reason, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->review: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
approve =  # array[Integer] | Approve one or more pending Cruise Control requests. (optional)
discard =  # array[Integer] | Reject one or more pending Cruise Control requests. (optional)
reason = reason_example # String | Reason of approval or rejection. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # review
    api_response = api_instance.review(approve=approve, discard=discard, reason=reason, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->review: %s\n" % e)

Parameters

Query parameters
Name Description
approve
array[Integer] (int32)
Approve one or more pending Cruise Control requests.
discard
array[Integer] (int32)
Reject one or more pending Cruise Control requests.
reason
String
Reason of approval or rejection.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful review response.

Status: default - Error response.


reviewBoard

reviewBoard

Check review status of Cruise Control requests.


/kafkacruisecontrol/review_board

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/review_board?review_ids=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] reviewIds = ; // array[Integer] | Ids for selected request to check.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            ReviewResult result = apiInstance.reviewBoard(reviewIds, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#reviewBoard");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[Integer] reviewIds = ; // array[Integer] | Ids for selected request to check.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            ReviewResult result = apiInstance.reviewBoard(reviewIds, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#reviewBoard");
            e.printStackTrace();
        }
    }
}
array[Integer] *reviewIds = ; // Ids for selected request to check. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// reviewBoard
[apiInstance reviewBoardWith:reviewIds
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(ReviewResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'reviewIds': , // {{array[Integer]}} Ids for selected request to check.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.reviewBoard(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class reviewBoardExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var reviewIds = new array[Integer](); // array[Integer] | Ids for selected request to check. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // reviewBoard
                ReviewResult result = apiInstance.reviewBoard(reviewIds, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.reviewBoard: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$reviewIds = ; // array[Integer] | Ids for selected request to check.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->reviewBoard($reviewIds, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->reviewBoard: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $reviewIds = []; # array[Integer] | Ids for selected request to check.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->reviewBoard(reviewIds => $reviewIds, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->reviewBoard: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
reviewIds =  # array[Integer] | Ids for selected request to check. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # reviewBoard
    api_response = api_instance.review_board(reviewIds=reviewIds, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->reviewBoard: %s\n" % e)

Parameters

Query parameters
Name Description
review_ids
array[Integer] (int32)
Ids for selected request to check.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful review response.

Status: default - Error response.


stopProposalExecution

stopProposalExecution

Stop ongoing execution in Cruise Control.


/kafkacruisecontrol/stop_proposal_execution

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/stop_proposal_execution?force_stop=&review_id=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Boolean forceStop = true; // Boolean | If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            StopProposalResult result = apiInstance.stopProposalExecution(forceStop, reviewId, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#stopProposalExecution");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Boolean forceStop = true; // Boolean | If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper.
        Integer reviewId = 56; // Integer | Review id for 2FA.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            StopProposalResult result = apiInstance.stopProposalExecution(forceStop, reviewId, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#stopProposalExecution");
            e.printStackTrace();
        }
    }
}
Boolean *forceStop = true; // If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper. (optional) (default to false)
Integer *reviewId = 56; // Review id for 2FA. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to true)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// stopProposalExecution
[apiInstance stopProposalExecutionWith:forceStop
    reviewId:reviewId
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(StopProposalResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'forceStop': true, // {{Boolean}} If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper.
  'reviewId': 56, // {{Integer}} Review id for 2FA.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.stopProposalExecution(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class stopProposalExecutionExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var forceStop = true;  // Boolean | If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper. (optional)  (default to false)
            var reviewId = 56;  // Integer | Review id for 2FA. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to true)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // stopProposalExecution
                StopProposalResult result = apiInstance.stopProposalExecution(forceStop, reviewId, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.stopProposalExecution: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$forceStop = true; // Boolean | If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper.
$reviewId = 56; // Integer | Review id for 2FA.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->stopProposalExecution($forceStop, $reviewId, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->stopProposalExecution: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $forceStop = true; # Boolean | If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper.
my $reviewId = 56; # Integer | Review id for 2FA.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->stopProposalExecution(forceStop => $forceStop, reviewId => $reviewId, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->stopProposalExecution: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
forceStop = true # Boolean | If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper. (optional) (default to false)
reviewId = 56 # Integer | Review id for 2FA. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to true)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # stopProposalExecution
    api_response = api_instance.stop_proposal_execution(forceStop=forceStop, reviewId=reviewId, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->stopProposalExecution: %s\n" % e)

Parameters

Query parameters
Name Description
force_stop
Boolean
If true, stop execution forcefully by deleting the /admin/partition_reassignemt, /preferred_replica_election and /controller zNodes in Zookeeper.
review_id
Integer (int32)
Review id for 2FA.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful admin response.

Status: default - Error response.


train

train

Train Cruise Control to better model broker cpu usage.


/kafkacruisecontrol/train

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://www.example.com//kafkacruisecontrol/train?start=&end=&json=&get_response_schema=&doAs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Long start = 789; // Long | Timestamp in millisecond of earliest metrics sample used to train Cruise Control.
        Long end = 789; // Long | Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            TrainResult result = apiInstance.train(start, end, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#train");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Long start = 789; // Long | Timestamp in millisecond of earliest metrics sample used to train Cruise Control.
        Long end = 789; // Long | Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            TrainResult result = apiInstance.train(start, end, json, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#train");
            e.printStackTrace();
        }
    }
}
Long *start = 789; // Timestamp in millisecond of earliest metrics sample used to train Cruise Control. (optional) (default to -1)
Long *end = 789; // Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return in JSON schema in response header or not. (optional) (default to false)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// train
[apiInstance trainWith:start
    end:end
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(TrainResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CruiseControlApi = require('cruise_control_api');

var api = new CruiseControlApi.DefaultApi()
var opts = { 
  'start': 789, // {{Long}} Timestamp in millisecond of earliest metrics sample used to train Cruise Control.
  'end': 789, // {{Long}} Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return in JSON schema in response header or not.
  'doAs': doAs_example // {{String}} The user specified by a trusted proxy in that authentication model.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.train(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class trainExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var start = 789;  // Long | Timestamp in millisecond of earliest metrics sample used to train Cruise Control. (optional)  (default to -1)
            var end = 789;  // Long | Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return in JSON schema in response header or not. (optional)  (default to false)
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 

            try
            {
                // train
                TrainResult result = apiInstance.train(start, end, json, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.train: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$start = 789; // Long | Timestamp in millisecond of earliest metrics sample used to train Cruise Control.
$end = 789; // Long | Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return in JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.

try {
    $result = $api_instance->train($start, $end, $json, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->train: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $start = 789; # Long | Timestamp in millisecond of earliest metrics sample used to train Cruise Control.
my $end = 789; # Long | Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return in JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.

eval { 
    my $result = $api_instance->train(start => $start, end => $end, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->train: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
start = 789 # Long | Timestamp in millisecond of earliest metrics sample used to train Cruise Control. (optional) (default to -1)
end = 789 # Long | Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return in JSON schema in response header or not. (optional) (default to false)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)

try: 
    # train
    api_response = api_instance.train(start=start, end=end, json=json, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->train: %s\n" % e)

Parameters

Query parameters
Name Description
start
Long (int64)
Timestamp in millisecond of earliest metrics sample used to train Cruise Control.
end
Long (int64)
Timestamp in millisecond of latest metrics sample used to train Cruise Control, current time will be used if this parameter is not specified.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return in JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful train response.

Status: default - Error response.