Cloudera Documentation

Cruise Control API

Default

addBroker

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


/add_broker

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/add_broker?brokerid=&dryrun=&throttle_added_broker=&allow_capacity_estimation=&goals=&concurrent_partition_movements_per_broker=&max_partition_movements_in_cluster=&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=&fast_mode="
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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 generate proposals.
        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 brokers.
        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 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.addBroker(brokerid, dryrun, throttleAddedBroker, allowCapacityEstimation, goals, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode);
            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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 generate proposals.
        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 brokers.
        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 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.addBroker(brokerid, dryrun, throttleAddedBroker, allowCapacityEstimation, goals, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode);
            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 *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (optional)
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 generate proposals. (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 brokers. (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 2-step verification. (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 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)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

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

// Move partitions to the specified brokers, according to the specified goals.
[apiInstance addBrokerWith:brokerid
    dryrun:dryrun
    throttleAddedBroker:throttleAddedBroker
    allowCapacityEstimation:allowCapacityEstimation
    goals:goals
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    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
    fastMode:fastMode
              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.
  'maxPartitionMovementsInCluster': 56, // {{Integer}} Change upper bound of ongoing inter broker partition movements in cluster.
  '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 generate proposals.
  '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 brokers.
  '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 2-step verification.
  '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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'fastMode': true // {{Boolean}} True to compute proposals in fast mode, false otherwise
};
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 maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional) 
            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 generate proposals. (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 brokers. (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 2-step verification. (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 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) 
            var fastMode = true;  // Boolean | True to compute proposals in fast mode, false otherwise (optional)  (default to true)

            try
            {
                // Move partitions to the specified brokers, according to the specified goals.
                OptimizationResult result = apiInstance.addBroker(brokerid, dryrun, throttleAddedBroker, allowCapacityEstimation, goals, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode);
                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.
$maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
$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 generate proposals.
$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 brokers.
$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 2-step verification.
$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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise

try {
    $result = $api_instance->addBroker($brokerid, $dryrun, $throttleAddedBroker, $allowCapacityEstimation, $goals, $concurrentPartitionMovementsPerBroker, $maxPartitionMovementsInCluster, $concurrentLeaderMovements, $json, $skipHardGoalCheck, $excludedTopics, $kafkaAssigner, $useReadyDefaultGoals, $verbose, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $replicaMovementStrategies, $executionProgressCheckIntervalMs, $stopOngoingExecution, $reason, $reviewId, $dataFrom, $replicationThrottle, $getResponseSchema, $doAs, $fastMode);
    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 $maxPartitionMovementsInCluster = 56; # Integer | Change upper bound of ongoing inter broker partition movements in cluster.
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 generate proposals.
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 brokers.
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 2-step verification.
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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $fastMode = true; # Boolean | True to compute proposals in fast mode, false otherwise

eval { 
    my $result = $api_instance->addBroker(brokerid => $brokerid, dryrun => $dryrun, throttleAddedBroker => $throttleAddedBroker, allowCapacityEstimation => $allowCapacityEstimation, goals => $goals, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster => $maxPartitionMovementsInCluster, 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, fastMode => $fastMode);
    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)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional)
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 generate proposals. (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 brokers. (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 2-step verification. (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 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)
fastMode = true # Boolean | True to compute proposals in fast mode, false otherwise (optional) (default to true)

try: 
    # Move partitions to the specified brokers, according to the specified goals.
    api_response = api_instance.add_broker(brokerid, dryrun=dryrun, throttleAddedBroker=throttleAddedBroker, allowCapacityEstimation=allowCapacityEstimation, goals=goals, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster=maxPartitionMovementsInCluster, 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, fastMode=fastMode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->addBroker: %s\n" % e)

Parameters

Query parameters
Name Description
brokerid*
array[Integer]
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.
max_partition_movements_in_cluster
Integer (int32)
Change upper bound of ongoing inter broker partition movements in cluster.
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 generate proposals.
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 brokers.
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 2-step verification.
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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
fast_mode
Boolean
True to compute proposals in fast mode, false otherwise

Responses

Status: 200 - Successful add brokers response.

Status: 202 - Add brokers in progress.

Status: default - Error response.


admin

Dynamically change some configs of Cruise Control.


/admin

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/admin?disable_self_healing_for=&enable_self_healing_for=&concurrent_partition_movements_per_broker=&max_partition_movements_in_cluster=&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=&disable_concurrency_adjuster_for=&enable_concurrency_adjuster_for=&min_isr_based_concurrency_adjustment=&reason="
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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 2-step verification.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        array[String] disableConcurrencyAdjusterFor = ; // array[String] | Disable concurrency adjuster for given concurrency types.
        array[String] enableConcurrencyAdjusterFor = ; // array[String] | Enable concurrency adjuster for given concurrency types.
        Boolean minIsrBasedConcurrencyAdjustment = true; // Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment
        String reason = reason_example; // String | Reason for request.
        try {
            AdminResult result = apiInstance.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs, reviewId, json, getResponseSchema, doAs, disableConcurrencyAdjusterFor, enableConcurrencyAdjusterFor, minIsrBasedConcurrencyAdjustment, reason);
            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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 2-step verification.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        array[String] disableConcurrencyAdjusterFor = ; // array[String] | Disable concurrency adjuster for given concurrency types.
        array[String] enableConcurrencyAdjusterFor = ; // array[String] | Enable concurrency adjuster for given concurrency types.
        Boolean minIsrBasedConcurrencyAdjustment = true; // Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment
        String reason = reason_example; // String | Reason for request.
        try {
            AdminResult result = apiInstance.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs, reviewId, json, getResponseSchema, doAs, disableConcurrencyAdjusterFor, enableConcurrencyAdjusterFor, minIsrBasedConcurrencyAdjustment, reason);
            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 *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (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 2-step verification. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return 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)
array[String] *disableConcurrencyAdjusterFor = ; // Disable concurrency adjuster for given concurrency types. (optional)
array[String] *enableConcurrencyAdjusterFor = ; // Enable concurrency adjuster for given concurrency types. (optional)
Boolean *minIsrBasedConcurrencyAdjustment = true; // Whether to enable (true) or disable (false) MinISR-based concurrency adjustment (optional)
String *reason = reason_example; // Reason for request. (optional)

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

// Dynamically change some configs of Cruise Control.
[apiInstance adminWith:disableSelfHealingFor
    enableSelfHealingFor:enableSelfHealingFor
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    concurrentIntraBrokerPartitionMovements:concurrentIntraBrokerPartitionMovements
    concurrentLeaderMovements:concurrentLeaderMovements
    dropRecentlyRemovedBrokers:dropRecentlyRemovedBrokers
    dropRecentlyDemotedBrokers:dropRecentlyDemotedBrokers
    executionProgressCheckIntervalMs:executionProgressCheckIntervalMs
    reviewId:reviewId
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
    disableConcurrencyAdjusterFor:disableConcurrencyAdjusterFor
    enableConcurrencyAdjusterFor:enableConcurrencyAdjusterFor
    minIsrBasedConcurrencyAdjustment:minIsrBasedConcurrencyAdjustment
    reason:reason
              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.
  'maxPartitionMovementsInCluster': 56, // {{Integer}} Change upper bound of ongoing inter broker partition movements in cluster.
  '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 2-step verification.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'disableConcurrencyAdjusterFor': , // {{array[String]}} Disable concurrency adjuster for given concurrency types.
  'enableConcurrencyAdjusterFor': , // {{array[String]}} Enable concurrency adjuster for given concurrency types.
  'minIsrBasedConcurrencyAdjustment': true, // {{Boolean}} Whether to enable (true) or disable (false) MinISR-based concurrency adjustment
  'reason': reason_example // {{String}} Reason for request.
};
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 maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (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 2-step verification. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return 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) 
            var disableConcurrencyAdjusterFor = new array[String](); // array[String] | Disable concurrency adjuster for given concurrency types. (optional) 
            var enableConcurrencyAdjusterFor = new array[String](); // array[String] | Enable concurrency adjuster for given concurrency types. (optional) 
            var minIsrBasedConcurrencyAdjustment = true;  // Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment (optional) 
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Dynamically change some configs of Cruise Control.
                AdminResult result = apiInstance.admin(disableSelfHealingFor, enableSelfHealingFor, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs, reviewId, json, getResponseSchema, doAs, disableConcurrencyAdjusterFor, enableConcurrencyAdjusterFor, minIsrBasedConcurrencyAdjustment, reason);
                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.
$maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
$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 2-step verification.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$disableConcurrencyAdjusterFor = ; // array[String] | Disable concurrency adjuster for given concurrency types.
$enableConcurrencyAdjusterFor = ; // array[String] | Enable concurrency adjuster for given concurrency types.
$minIsrBasedConcurrencyAdjustment = true; // Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment
$reason = reason_example; // String | Reason for request.

try {
    $result = $api_instance->admin($disableSelfHealingFor, $enableSelfHealingFor, $concurrentPartitionMovementsPerBroker, $maxPartitionMovementsInCluster, $concurrentIntraBrokerPartitionMovements, $concurrentLeaderMovements, $dropRecentlyRemovedBrokers, $dropRecentlyDemotedBrokers, $executionProgressCheckIntervalMs, $reviewId, $json, $getResponseSchema, $doAs, $disableConcurrencyAdjusterFor, $enableConcurrencyAdjusterFor, $minIsrBasedConcurrencyAdjustment, $reason);
    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 $maxPartitionMovementsInCluster = 56; # Integer | Change upper bound of ongoing inter broker partition movements in cluster.
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 2-step verification.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $disableConcurrencyAdjusterFor = []; # array[String] | Disable concurrency adjuster for given concurrency types.
my $enableConcurrencyAdjusterFor = []; # array[String] | Enable concurrency adjuster for given concurrency types.
my $minIsrBasedConcurrencyAdjustment = true; # Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment
my $reason = reason_example; # String | Reason for request.

eval { 
    my $result = $api_instance->admin(disableSelfHealingFor => $disableSelfHealingFor, enableSelfHealingFor => $enableSelfHealingFor, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster => $maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements => $concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements => $concurrentLeaderMovements, dropRecentlyRemovedBrokers => $dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers => $dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs => $executionProgressCheckIntervalMs, reviewId => $reviewId, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs, disableConcurrencyAdjusterFor => $disableConcurrencyAdjusterFor, enableConcurrencyAdjusterFor => $enableConcurrencyAdjusterFor, minIsrBasedConcurrencyAdjustment => $minIsrBasedConcurrencyAdjustment, reason => $reason);
    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)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (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 2-step verification. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return 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)
disableConcurrencyAdjusterFor =  # array[String] | Disable concurrency adjuster for given concurrency types. (optional)
enableConcurrencyAdjusterFor =  # array[String] | Enable concurrency adjuster for given concurrency types. (optional)
minIsrBasedConcurrencyAdjustment = true # Boolean | Whether to enable (true) or disable (false) MinISR-based concurrency adjustment (optional)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Dynamically change some configs of Cruise Control.
    api_response = api_instance.admin(disableSelfHealingFor=disableSelfHealingFor, enableSelfHealingFor=enableSelfHealingFor, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster=maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements=concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements=concurrentLeaderMovements, dropRecentlyRemovedBrokers=dropRecentlyRemovedBrokers, dropRecentlyDemotedBrokers=dropRecentlyDemotedBrokers, executionProgressCheckIntervalMs=executionProgressCheckIntervalMs, reviewId=reviewId, json=json, getResponseSchema=getResponseSchema, doAs=doAs, disableConcurrencyAdjusterFor=disableConcurrencyAdjusterFor, enableConcurrencyAdjusterFor=enableConcurrencyAdjusterFor, minIsrBasedConcurrencyAdjustment=minIsrBasedConcurrencyAdjustment, reason=reason)
    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.
max_partition_movements_in_cluster
Integer (int32)
Change upper bound of ongoing inter broker partition movements in cluster.
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 2-step verification.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
disable_concurrency_adjuster_for
array[String]
Disable concurrency adjuster for given concurrency types.
enable_concurrency_adjuster_for
array[String]
Enable concurrency adjuster for given concurrency types.
min_isr_based_concurrency_adjustment
Boolean
Whether to enable (true) or disable (false) MinISR-based concurrency adjustment
reason
String
Reason for request.

Responses

Status: 200 - Successful admin response.

Status: default - Error response.


bootstrap

Bootstrap Cruise Control.


/bootstrap

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/bootstrap?start=&end=&clearmetrics=&developer_mode=&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 | Whether to clear the collected metric samples during bootstrap.
        Boolean developerMode = true; // Boolean | Whether to run the request in developer mode.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return 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, developerMode, 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 | Whether to clear the collected metric samples during bootstrap.
        Boolean developerMode = true; // Boolean | Whether to run the request in developer mode.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return 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, developerMode, 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; // Whether to clear the collected metric samples during bootstrap. (optional) (default to false)
Boolean *developerMode = true; // Whether to run the request in developer mode. (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 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 Cruise Control.
[apiInstance bootstrapWith:start
    end:end
    clearmetrics:clearmetrics
    developerMode:developerMode
    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}} Whether to clear the collected metric samples during bootstrap.
  'developerMode': true, // {{Boolean}} Whether to run the request in developer mode.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return 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 | Whether to clear the collected metric samples during bootstrap. (optional)  (default to false)
            var developerMode = true;  // Boolean | Whether to run the request in developer mode. (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 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 Cruise Control.
                BootstrapResult result = apiInstance.bootstrap(start, end, clearmetrics, developerMode, 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 | Whether to clear the collected metric samples during bootstrap.
$developerMode = true; // Boolean | Whether to run the request in developer mode.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return 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, $developerMode, $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 | Whether to clear the collected metric samples during bootstrap.
my $developerMode = true; # Boolean | Whether to run the request in developer mode.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return 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, developerMode => $developerMode, 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 | Whether to clear the collected metric samples during bootstrap. (optional) (default to false)
developerMode = true # Boolean | Whether to run the request in developer mode. (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 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 Cruise Control.
    api_response = api_instance.bootstrap(start=start, end=end, clearmetrics=clearmetrics, developerMode=developerMode, 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
Whether to clear the collected metric samples during bootstrap.
developer_mode
Boolean
Whether to run the request in developer mode.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return 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.


demoteBroker

Demote specified brokers.


/demote_broker

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/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 brokers.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        map[String, array[String]] brokeridAndLogdirs = ; // map[String, array[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 2-step verification.
        Boolean getResponseSchema = true; // Boolean | Whether to return 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 brokers.
        array[String] replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
        map[String, array[String]] brokeridAndLogdirs = ; // map[String, array[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 2-step verification.
        Boolean getResponseSchema = true; // Boolean | Whether to return 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 true)
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 brokers. (optional) (default to false)
array[String] *replicaMovementStrategies = ; // Replica movement strategies to use. (optional)
map[String, array[String]] *brokeridAndLogdirs = ; // 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 2-step verification. (optional)
Boolean *getResponseSchema = true; // Whether to return 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];

// Demote specified brokers.
[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 brokers.
  'replicaMovementStrategies': , // {{array[String]}} Replica movement strategies to use.
  'brokeridAndLogdirs': , // {{map[String, array[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 2-step verification.
  'getResponseSchema': true, // {{Boolean}} Whether to return 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 true)
            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 brokers. (optional)  (default to false)
            var replicaMovementStrategies = new array[String](); // array[String] | Replica movement strategies to use. (optional) 
            var brokeridAndLogdirs = new map[String, array[String]](); // map[String, array[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 2-step verification. (optional) 
            var getResponseSchema = true;  // Boolean | Whether to return 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
            {
                // Demote specified brokers.
                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 brokers.
$replicaMovementStrategies = ; // array[String] | Replica movement strategies to use.
$brokeridAndLogdirs = ; // map[String, array[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 2-step verification.
$getResponseSchema = true; // Boolean | Whether to return 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 brokers.
my $replicaMovementStrategies = []; # array[String] | Replica movement strategies to use.
my $brokeridAndLogdirs = ; # map[String, array[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 2-step verification.
my $getResponseSchema = true; # Boolean | Whether to return 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 true)
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 brokers. (optional) (default to false)
replicaMovementStrategies =  # array[String] | Replica movement strategies to use. (optional)
brokeridAndLogdirs =  # map[String, array[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 2-step verification. (optional)
getResponseSchema = true # Boolean | Whether to return 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: 
    # Demote specified brokers.
    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 brokers.
replica_movement_strategies
array[String]
Replica movement strategies to use.
brokerid_and_logdirs
map[String, array[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 2-step verification.
get_response_schema
Boolean
Whether to return 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: 202 - Demote brokers in progress.

Status: default - Error response.


fixOfflineReplicas

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


/fix_offline_replicas

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/fix_offline_replicas?dryrun=&goals=&allow_capacity_estimation=&concurrent_partition_movements_per_broker=&max_partition_movements_in_cluster=&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=&fast_mode="
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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 brokers.
        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 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.fixOfflineReplicas(dryrun, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, stopOngoingExecution, getResponseSchema, doAs, fastMode);
            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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 brokers.
        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 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.fixOfflineReplicas(dryrun, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, stopOngoingExecution, getResponseSchema, doAs, fastMode);
            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 *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 2-step verification. (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 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)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

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

// Fix offline replicas by moving currently offline replicas to healthy brokers.
[apiInstance fixOfflineReplicasWith:dryrun
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    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
    fastMode:fastMode
              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.
  'maxPartitionMovementsInCluster': 56, // {{Integer}} Change upper bound of ongoing inter broker partition movements in cluster.
  '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 brokers.
  '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 2-step verification.
  '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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'fastMode': true // {{Boolean}} True to compute proposals in fast mode, false otherwise
};
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 maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 2-step verification. (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 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) 
            var fastMode = true;  // Boolean | True to compute proposals in fast mode, false otherwise (optional)  (default to true)

            try
            {
                // Fix offline replicas by moving currently offline replicas to healthy brokers.
                OptimizationResult result = apiInstance.fixOfflineReplicas(dryrun, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, stopOngoingExecution, getResponseSchema, doAs, fastMode);
                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.
$maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
$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 brokers.
$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 2-step verification.
$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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise

try {
    $result = $api_instance->fixOfflineReplicas($dryrun, $goals, $allowCapacityEstimation, $concurrentPartitionMovementsPerBroker, $maxPartitionMovementsInCluster, $concurrentLeaderMovements, $json, $skipHardGoalCheck, $excludedTopics, $useReadyDefaultGoals, $dataFrom, $verbose, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $replicaMovementStrategies, $reviewId, $replicationThrottle, $executionProgressCheckIntervalMs, $reason, $stopOngoingExecution, $getResponseSchema, $doAs, $fastMode);
    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 $maxPartitionMovementsInCluster = 56; # Integer | Change upper bound of ongoing inter broker partition movements in cluster.
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 brokers.
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 2-step verification.
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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $fastMode = true; # Boolean | True to compute proposals in fast mode, false otherwise

eval { 
    my $result = $api_instance->fixOfflineReplicas(dryrun => $dryrun, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster => $maxPartitionMovementsInCluster, 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, fastMode => $fastMode);
    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)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 2-step verification. (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 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)
fastMode = true # Boolean | True to compute proposals in fast mode, false otherwise (optional) (default to true)

try: 
    # Fix offline replicas by moving currently offline replicas to healthy brokers.
    api_response = api_instance.fix_offline_replicas(dryrun=dryrun, goals=goals, allowCapacityEstimation=allowCapacityEstimation, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster=maxPartitionMovementsInCluster, 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, fastMode=fastMode)
    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.
max_partition_movements_in_cluster
Integer (int32)
Change upper bound of ongoing inter broker partition movements in cluster.
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 brokers.
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 2-step verification.
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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
fast_mode
Boolean
True to compute proposals in fast mode, false otherwise

Responses

Status: 200 - Successful rebalance response.

Status: 202 - Fix in progress.

Status: default - Error response.


kafkaClusterState

Retrive the current Kafka cluster state.


/kafka_cluster_state

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/kafka_cluster_state?topic=&verbose=&json=&get_response_schema=&doAs=&reason="
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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            KafkaClusterState result = apiInstance.kafkaClusterState(topic, verbose, json, getResponseSchema, doAs, reason);
            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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            KafkaClusterState result = apiInstance.kafkaClusterState(topic, verbose, json, getResponseSchema, doAs, reason);
            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 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)
String *reason = reason_example; // Reason for request. (optional)

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

// Retrive the current Kafka cluster state.
[apiInstance kafkaClusterStateWith:topic
    verbose:verbose
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
    reason:reason
              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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'reason': reason_example // {{String}} Reason for request.
};
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 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) 
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Retrive the current Kafka cluster state.
                KafkaClusterState result = apiInstance.kafkaClusterState(topic, verbose, json, getResponseSchema, doAs, reason);
                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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$reason = reason_example; // String | Reason for request.

try {
    $result = $api_instance->kafkaClusterState($topic, $verbose, $json, $getResponseSchema, $doAs, $reason);
    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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $reason = reason_example; # String | Reason for request.

eval { 
    my $result = $api_instance->kafkaClusterState(topic => $topic, verbose => $verbose, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs, reason => $reason);
    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 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)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Retrive the current Kafka cluster state.
    api_response = api_instance.kafka_cluster_state(topic=topic, verbose=verbose, json=json, getResponseSchema=getResponseSchema, doAs=doAs, reason=reason)
    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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
reason
String
Reason for request.

Responses

Status: 200 - Current Kafka cluster state.

Status: default - Error response.


load

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


/load

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/load?start=&end=&time=&allow_capacity_estimation=&json=&populate_disk_info=&capacity_only=&get_response_schema=&doAs=&reason="
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 capacityOnly = true; // Boolean | Whether show only the cluster capacity or the utilization, as well.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            BrokerStats result = apiInstance.load(start, end, time, allowCapacityEstimation, json, populateDiskInfo, capacityOnly, getResponseSchema, doAs, reason);
            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 capacityOnly = true; // Boolean | Whether show only the cluster capacity or the utilization, as well.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            BrokerStats result = apiInstance.load(start, end, time, allowCapacityEstimation, json, populateDiskInfo, capacityOnly, getResponseSchema, doAs, reason);
            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 *capacityOnly = true; // Whether show only the cluster capacity or the utilization, as well. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return 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)
String *reason = reason_example; // Reason for request. (optional)

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

// Get the cluster load once Cruise Control Load Monitor is running.
[apiInstance loadWith:start
    end:end
    time:time
    allowCapacityEstimation:allowCapacityEstimation
    json:json
    populateDiskInfo:populateDiskInfo
    capacityOnly:capacityOnly
    getResponseSchema:getResponseSchema
    doAs:doAs
    reason:reason
              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.
  'capacityOnly': true, // {{Boolean}} Whether show only the cluster capacity or the utilization, as well.
  'getResponseSchema': true, // {{Boolean}} Whether to return JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'reason': reason_example // {{String}} Reason for request.
};
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 capacityOnly = true;  // Boolean | Whether show only the cluster capacity or the utilization, as well. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return 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) 
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Get the cluster load once Cruise Control Load Monitor is running.
                BrokerStats result = apiInstance.load(start, end, time, allowCapacityEstimation, json, populateDiskInfo, capacityOnly, getResponseSchema, doAs, reason);
                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.
$capacityOnly = true; // Boolean | Whether show only the cluster capacity or the utilization, as well.
$getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$reason = reason_example; // String | Reason for request.

try {
    $result = $api_instance->load($start, $end, $time, $allowCapacityEstimation, $json, $populateDiskInfo, $capacityOnly, $getResponseSchema, $doAs, $reason);
    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 $capacityOnly = true; # Boolean | Whether show only the cluster capacity or the utilization, as well.
my $getResponseSchema = true; # Boolean | Whether to return JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $reason = reason_example; # String | Reason for request.

eval { 
    my $result = $api_instance->load(start => $start, end => $end, time => $time, allowCapacityEstimation => $allowCapacityEstimation, json => $json, populateDiskInfo => $populateDiskInfo, capacityOnly => $capacityOnly, getResponseSchema => $getResponseSchema, doAs => $doAs, reason => $reason);
    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)
capacityOnly = true # Boolean | Whether show only the cluster capacity or the utilization, as well. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return 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)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Get the cluster load once Cruise Control Load Monitor is running.
    api_response = api_instance.load(start=start, end=end, time=time, allowCapacityEstimation=allowCapacityEstimation, json=json, populateDiskInfo=populateDiskInfo, capacityOnly=capacityOnly, getResponseSchema=getResponseSchema, doAs=doAs, reason=reason)
    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.
capacity_only
Boolean
Whether show only the cluster capacity or the utilization, as well.
get_response_schema
Boolean
Whether to return JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
reason
String
Reason for request.

Responses

Status: 200 - Successful load from valid partitions response.

Status: default - Error response.


partitionload

Get the resource load for each partition.


/partition_load

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/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=&reason="
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.
        partition partition = ; // partition | 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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            PartitionLoadState result = apiInstance.partitionload(resource, start, end, entries, topic, partition, minValidPartitionRatio, allowCapacityEstimation, maxLoad, avgLoad, brokerid, json, getResponseSchema, doAs, reason);
            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.
        partition partition = ; // partition | 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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            PartitionLoadState result = apiInstance.partitionload(resource, start, end, entries, topic, partition, minValidPartitionRatio, allowCapacityEstimation, maxLoad, avgLoad, brokerid, json, getResponseSchema, doAs, reason);
            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)
partition *partition = ; // 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 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)
String *reason = reason_example; // Reason for request. (optional)

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

// Get the resource load for each partition.
[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
    reason:reason
              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}} 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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'reason': reason_example // {{String}} Reason for request.
};
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 = new partition(); // partition | 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 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) 
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Get the resource load for each partition.
                PartitionLoadState result = apiInstance.partitionload(resource, start, end, entries, topic, partition, minValidPartitionRatio, allowCapacityEstimation, maxLoad, avgLoad, brokerid, json, getResponseSchema, doAs, reason);
                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 | 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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$reason = reason_example; // String | Reason for request.

try {
    $result = $api_instance->partitionload($resource, $start, $end, $entries, $topic, $partition, $minValidPartitionRatio, $allowCapacityEstimation, $maxLoad, $avgLoad, $brokerid, $json, $getResponseSchema, $doAs, $reason);
    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 | 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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $reason = reason_example; # String | Reason for request.

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, reason => $reason);
    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 | 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 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)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Get the resource load for each partition.
    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, reason=reason)
    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
partition
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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
reason
String
Reason for request.

Responses

Status: 200 - Successful partition load state response.

Status: 202 - Partition load state fetch in progress.

Status: default - Error response.


pauseSampling

Pause metric sampling.


/pause_sampling

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/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 2-step verification.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return 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 2-step verification.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return 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 2-step verification. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return 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];

// Pause metric sampling.
[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 2-step verification.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return 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 2-step verification. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return 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
            {
                // Pause metric sampling.
                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 2-step verification.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return 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 2-step verification.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return 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 2-step verification. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return 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: 
    # Pause metric sampling.
    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 2-step verification.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return 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.


permissions

Get the permissions of a user specified as a query parameter


/permissions

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/permissions?json=&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 json = true; // Boolean | Whether to return in JSON format or not.
        String reason = reason_example; // String | Reason for request.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            UserPermissions result = apiInstance.permissions(json, reason, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#permissions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        String reason = reason_example; // String | Reason for request.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        try {
            UserPermissions result = apiInstance.permissions(json, reason, getResponseSchema, doAs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#permissions");
            e.printStackTrace();
        }
    }
}
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
String *reason = reason_example; // Reason for request. (optional)
Boolean *getResponseSchema = true; // Whether to return 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 permissions of a user specified as a query parameter
[apiInstance permissionsWith:json
    reason:reason
    getResponseSchema:getResponseSchema
    doAs:doAs
              completionHandler: ^(UserPermissions 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 = { 
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'reason': reason_example, // {{String}} Reason for request.
  'getResponseSchema': true, // {{Boolean}} Whether to return 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.permissions(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var reason = reason_example;  // String | Reason for request. (optional) 
            var getResponseSchema = true;  // Boolean | Whether to return 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 permissions of a user specified as a query parameter
                UserPermissions result = apiInstance.permissions(json, reason, getResponseSchema, doAs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.permissions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$json = true; // Boolean | Whether to return in JSON format or not.
$reason = reason_example; // String | Reason for request.
$getResponseSchema = true; // Boolean | Whether to return 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->permissions($json, $reason, $getResponseSchema, $doAs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->permissions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $json = true; # Boolean | Whether to return in JSON format or not.
my $reason = reason_example; # String | Reason for request.
my $getResponseSchema = true; # Boolean | Whether to return 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->permissions(json => $json, reason => $reason, getResponseSchema => $getResponseSchema, doAs => $doAs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->permissions: $@\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()
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
reason = reason_example # String | Reason for request. (optional)
getResponseSchema = true # Boolean | Whether to return 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 permissions of a user specified as a query parameter
    api_response = api_instance.permissions(json=json, reason=reason, getResponseSchema=getResponseSchema, doAs=doAs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->permissions: %s\n" % e)

Parameters

Query parameters
Name Description
json
Boolean
Whether to return in JSON format or not.
reason
String
Reason for request.
get_response_schema
Boolean
Whether to return JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.

Responses

Status: 200 - Successful permissions response.

Status: 202 - Permissions querying in progress.

Status: default - Error response.


proposals

Get current proposals.


/proposals

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/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=&fast_mode=&reason="
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 to use Kafka assigner mode to generate proposals.
        array[Integer] destinationBrokerIds = ; // array[Integer] | Specify brokers to move replicas to.
        Boolean ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
        Boolean rebalanceDisk = true; // Boolean | whether to balance load between disks within brokers (requires JBOD Kafka deployment).
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to use only ready goals to generate proposals.
        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 to allow broker capacity to be estimated.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
        Boolean json = true; // Boolean | Return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        String reason = reason_example; // String | Reason for request.
        try {
            OptimizationResult result = apiInstance.proposals(kafkaAssigner, destinationBrokerIds, ignoreProposalCache, rebalanceDisk, dataFrom, useReadyDefaultGoals, excludedTopics, excludeRecentlyRemovedBrokers, goals, allowCapacityEstimation, verbose, excludeRecentlyDemotedBrokers, json, getResponseSchema, doAs, fastMode, reason);
            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 to use Kafka assigner mode to generate proposals.
        array[Integer] destinationBrokerIds = ; // array[Integer] | Specify brokers to move replicas to.
        Boolean ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
        Boolean rebalanceDisk = true; // Boolean | whether to balance load between disks within brokers (requires JBOD Kafka deployment).
        String dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
        Boolean useReadyDefaultGoals = true; // Boolean | Whether to use only ready goals to generate proposals.
        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 to allow broker capacity to be estimated.
        Boolean verbose = true; // Boolean | Return detailed state information.
        Boolean excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
        Boolean json = true; // Boolean | Return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        String reason = reason_example; // String | Reason for request.
        try {
            OptimizationResult result = apiInstance.proposals(kafkaAssigner, destinationBrokerIds, ignoreProposalCache, rebalanceDisk, dataFrom, useReadyDefaultGoals, excludedTopics, excludeRecentlyRemovedBrokers, goals, allowCapacityEstimation, verbose, excludeRecentlyDemotedBrokers, json, getResponseSchema, doAs, fastMode, reason);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#proposals");
            e.printStackTrace();
        }
    }
}
Boolean *kafkaAssigner = true; // Whether to use Kafka assigner mode to generate proposals. (optional) (default to false)
array[Integer] *destinationBrokerIds = ; // Specify brokers to move replicas to. (optional)
Boolean *ignoreProposalCache = true; // Whether to ignore the cached proposal or not. (optional) (default to false)
Boolean *rebalanceDisk = true; // whether to balance load between disks within brokers (requires JBOD Kafka deployment). (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 *useReadyDefaultGoals = true; // Whether to use only ready goals to generate proposals. (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 to 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 to allow leader replicas to be moved to recently demoted brokers. (optional) (default to false)
Boolean *json = true; // Return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return 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)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)
String *reason = reason_example; // Reason for request. (optional)

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

// Get current 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
    fastMode:fastMode
    reason:reason
              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 to use Kafka assigner mode to generate proposals.
  'destinationBrokerIds': , // {{array[Integer]}} Specify brokers to move replicas to.
  'ignoreProposalCache': true, // {{Boolean}} Whether to ignore the cached proposal or not.
  'rebalanceDisk': true, // {{Boolean}} whether to balance load between disks within brokers (requires JBOD Kafka deployment).
  'dataFrom': dataFrom_example, // {{String}} Whether to calculate proposal from available valid partitions or valid windows.
  'useReadyDefaultGoals': true, // {{Boolean}} Whether to use only ready goals to generate proposals.
  '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 to allow broker capacity to be estimated.
  'verbose': true, // {{Boolean}} Return detailed state information.
  'excludeRecentlyDemotedBrokers': true, // {{Boolean}} Whether to allow leader replicas to be moved to recently demoted brokers.
  'json': true, // {{Boolean}} Return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'fastMode': true, // {{Boolean}} True to compute proposals in fast mode, false otherwise
  'reason': reason_example // {{String}} Reason for request.
};
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 to use Kafka assigner mode to generate proposals. (optional)  (default to false)
            var destinationBrokerIds = new array[Integer](); // array[Integer] | Specify brokers to move replicas to. (optional) 
            var ignoreProposalCache = true;  // Boolean | Whether to ignore the cached proposal or not. (optional)  (default to false)
            var rebalanceDisk = true;  // Boolean | whether to balance load between disks within brokers (requires JBOD Kafka deployment). (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 useReadyDefaultGoals = true;  // Boolean | Whether to use only ready goals to generate proposals. (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 to 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 to allow leader replicas to be moved to recently demoted brokers. (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 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) 
            var fastMode = true;  // Boolean | True to compute proposals in fast mode, false otherwise (optional)  (default to true)
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Get current proposals.
                OptimizationResult result = apiInstance.proposals(kafkaAssigner, destinationBrokerIds, ignoreProposalCache, rebalanceDisk, dataFrom, useReadyDefaultGoals, excludedTopics, excludeRecentlyRemovedBrokers, goals, allowCapacityEstimation, verbose, excludeRecentlyDemotedBrokers, json, getResponseSchema, doAs, fastMode, reason);
                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 to use Kafka assigner mode to generate proposals.
$destinationBrokerIds = ; // array[Integer] | Specify brokers to move replicas to.
$ignoreProposalCache = true; // Boolean | Whether to ignore the cached proposal or not.
$rebalanceDisk = true; // Boolean | whether to balance load between disks within brokers (requires JBOD Kafka deployment).
$dataFrom = dataFrom_example; // String | Whether to calculate proposal from available valid partitions or valid windows.
$useReadyDefaultGoals = true; // Boolean | Whether to use only ready goals to generate proposals.
$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 to allow broker capacity to be estimated.
$verbose = true; // Boolean | Return detailed state information.
$excludeRecentlyDemotedBrokers = true; // Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
$json = true; // Boolean | Return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
$reason = reason_example; // String | Reason for request.

try {
    $result = $api_instance->proposals($kafkaAssigner, $destinationBrokerIds, $ignoreProposalCache, $rebalanceDisk, $dataFrom, $useReadyDefaultGoals, $excludedTopics, $excludeRecentlyRemovedBrokers, $goals, $allowCapacityEstimation, $verbose, $excludeRecentlyDemotedBrokers, $json, $getResponseSchema, $doAs, $fastMode, $reason);
    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 to use Kafka assigner mode to generate proposals.
my $destinationBrokerIds = []; # array[Integer] | Specify brokers to move replicas to.
my $ignoreProposalCache = true; # Boolean | Whether to ignore the cached proposal or not.
my $rebalanceDisk = true; # Boolean | whether to balance load between disks within brokers (requires JBOD Kafka deployment).
my $dataFrom = dataFrom_example; # String | Whether to calculate proposal from available valid partitions or valid windows.
my $useReadyDefaultGoals = true; # Boolean | Whether to use only ready goals to generate proposals.
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 to allow broker capacity to be estimated.
my $verbose = true; # Boolean | Return detailed state information.
my $excludeRecentlyDemotedBrokers = true; # Boolean | Whether to allow leader replicas to be moved to recently demoted brokers.
my $json = true; # Boolean | Return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $fastMode = true; # Boolean | True to compute proposals in fast mode, false otherwise
my $reason = reason_example; # String | Reason for request.

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, fastMode => $fastMode, reason => $reason);
    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 to use Kafka assigner mode to generate proposals. (optional) (default to false)
destinationBrokerIds =  # array[Integer] | Specify brokers to move replicas to. (optional)
ignoreProposalCache = true # Boolean | Whether to ignore the cached proposal or not. (optional) (default to false)
rebalanceDisk = true # Boolean | whether to balance load between disks within brokers (requires JBOD Kafka deployment). (optional) (default to false)
dataFrom = dataFrom_example # String | Whether to calculate proposal from available valid partitions or valid windows. (optional) (default to VALID_WINDOWS)
useReadyDefaultGoals = true # Boolean | Whether to use only ready goals to generate proposals. (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 to 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 to allow leader replicas to be moved to recently demoted brokers. (optional) (default to false)
json = true # Boolean | Return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return 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)
fastMode = true # Boolean | True to compute proposals in fast mode, false otherwise (optional) (default to true)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Get current 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, fastMode=fastMode, reason=reason)
    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 to use Kafka assigner mode to generate proposals.
destination_broker_ids
array[Integer] (int32)
Specify brokers to move replicas to.
ignore_proposal_cache
Boolean
Whether to ignore the cached proposal or not.
rebalance_disk
Boolean
whether to balance load between disks within brokers (requires JBOD Kafka deployment).
data_from
String
Whether to calculate proposal from available valid partitions or valid windows.
use_ready_default_goals
Boolean
Whether to use only ready goals to generate proposals.
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 to allow broker capacity to be estimated.
verbose
Boolean
Return detailed state information.
exclude_recently_demoted_brokers
Boolean
Whether to allow leader replicas to be moved to recently demoted brokers.
json
Boolean
Return in JSON format or not.
get_response_schema
Boolean
Whether to return JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
fast_mode
Boolean
True to compute proposals in fast mode, false otherwise
reason
String
Reason for request.

Responses

Status: 200 - Successful optimization proposals response.

Status: 202 - Optimization proposals generation in progress.

Status: default - Error response.


rebalance

Rebalance a Kafka cluster based on goals.


/rebalance

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/rebalance?dryrun=&goals=&allow_capacity_estimation=&stop_ongoing_execution=&concurrent_partition_movements_per_broker=&max_partition_movements_in_cluster=&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=&fast_mode="
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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 brokers.
        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 generate proposals.
        Boolean rebalanceDisk = true; // Boolean | Whether to balance load between disks within brokers (requires JBOD Kafka deployment).
        Integer reviewId = 56; // Integer | Review id for 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.rebalance(dryrun, goals, allowCapacityEstimation, stopOngoingExecution, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, ignoreProposalCache, destinationBrokerIds, kafkaAssigner, rebalanceDisk, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, getResponseSchema, doAs, fastMode);
            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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 brokers.
        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 generate proposals.
        Boolean rebalanceDisk = true; // Boolean | Whether to balance load between disks within brokers (requires JBOD Kafka deployment).
        Integer reviewId = 56; // Integer | Review id for 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.rebalance(dryrun, goals, allowCapacityEstimation, stopOngoingExecution, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, ignoreProposalCache, destinationBrokerIds, kafkaAssigner, rebalanceDisk, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, getResponseSchema, doAs, fastMode);
            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 *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 generate proposals. (optional) (default to false)
Boolean *rebalanceDisk = true; // Whether to balance load between disks within brokers (requires JBOD Kafka deployment). (optional) (default to false)
Integer *reviewId = 56; // Review id for 2-step verification. (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 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)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

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

// Rebalance a Kafka cluster based on goals.
[apiInstance rebalanceWith:dryrun
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    stopOngoingExecution:stopOngoingExecution
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    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
    fastMode:fastMode
              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.
  'maxPartitionMovementsInCluster': 56, // {{Integer}} Change upper bound of ongoing inter broker partition movements in cluster.
  '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 brokers.
  '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 generate proposals.
  'rebalanceDisk': true, // {{Boolean}} Whether to balance load between disks within brokers (requires JBOD Kafka deployment).
  'reviewId': 56, // {{Integer}} Review id for 2-step verification.
  '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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'fastMode': true // {{Boolean}} True to compute proposals in fast mode, false otherwise
};
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 maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 generate proposals. (optional)  (default to false)
            var rebalanceDisk = true;  // Boolean | Whether to balance load between disks within brokers (requires JBOD Kafka deployment). (optional)  (default to false)
            var reviewId = 56;  // Integer | Review id for 2-step verification. (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 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) 
            var fastMode = true;  // Boolean | True to compute proposals in fast mode, false otherwise (optional)  (default to true)

            try
            {
                // Rebalance a Kafka cluster based on goals.
                OptimizationResult result = apiInstance.rebalance(dryrun, goals, allowCapacityEstimation, stopOngoingExecution, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentIntraBrokerPartitionMovements, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, useReadyDefaultGoals, dataFrom, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, ignoreProposalCache, destinationBrokerIds, kafkaAssigner, rebalanceDisk, reviewId, replicationThrottle, executionProgressCheckIntervalMs, reason, getResponseSchema, doAs, fastMode);
                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.
$maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
$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 brokers.
$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 generate proposals.
$rebalanceDisk = true; // Boolean | Whether to balance load between disks within brokers (requires JBOD Kafka deployment).
$reviewId = 56; // Integer | Review id for 2-step verification.
$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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise

try {
    $result = $api_instance->rebalance($dryrun, $goals, $allowCapacityEstimation, $stopOngoingExecution, $concurrentPartitionMovementsPerBroker, $maxPartitionMovementsInCluster, $concurrentIntraBrokerPartitionMovements, $concurrentLeaderMovements, $json, $skipHardGoalCheck, $excludedTopics, $useReadyDefaultGoals, $dataFrom, $verbose, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $replicaMovementStrategies, $ignoreProposalCache, $destinationBrokerIds, $kafkaAssigner, $rebalanceDisk, $reviewId, $replicationThrottle, $executionProgressCheckIntervalMs, $reason, $getResponseSchema, $doAs, $fastMode);
    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 $maxPartitionMovementsInCluster = 56; # Integer | Change upper bound of ongoing inter broker partition movements in cluster.
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 brokers.
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 generate proposals.
my $rebalanceDisk = true; # Boolean | Whether to balance load between disks within brokers (requires JBOD Kafka deployment).
my $reviewId = 56; # Integer | Review id for 2-step verification.
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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $fastMode = true; # Boolean | True to compute proposals in fast mode, false otherwise

eval { 
    my $result = $api_instance->rebalance(dryrun => $dryrun, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, stopOngoingExecution => $stopOngoingExecution, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster => $maxPartitionMovementsInCluster, 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, fastMode => $fastMode);
    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)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 generate proposals. (optional) (default to false)
rebalanceDisk = true # Boolean | Whether to balance load between disks within brokers (requires JBOD Kafka deployment). (optional) (default to false)
reviewId = 56 # Integer | Review id for 2-step verification. (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 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)
fastMode = true # Boolean | True to compute proposals in fast mode, false otherwise (optional) (default to true)

try: 
    # Rebalance a Kafka cluster based on goals.
    api_response = api_instance.rebalance(dryrun=dryrun, goals=goals, allowCapacityEstimation=allowCapacityEstimation, stopOngoingExecution=stopOngoingExecution, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster=maxPartitionMovementsInCluster, 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, fastMode=fastMode)
    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.
max_partition_movements_in_cluster
Integer (int32)
Change upper bound of ongoing inter broker partition movements in cluster.
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 brokers.
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 generate proposals.
rebalance_disk
Boolean
Whether to balance load between disks within brokers (requires JBOD Kafka deployment).
review_id
Integer (int32)
Review id for 2-step verification.
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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
fast_mode
Boolean
True to compute proposals in fast mode, false otherwise

Responses

Status: 200 - Successful rebalance response.

Status: 202 - Rebalancing in progress.

Status: default - Error response.


removeBroker

Remove/decomission specified brokers.


/remove_broker

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/remove_broker?brokerid=&dryrun=&throttle_removed_broker=&goals=&allow_capacity_estimation=&concurrent_partition_movements_per_broker=&max_partition_movements_in_cluster=&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=&fast_mode="
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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 generate proposals.
        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 brokers.
        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 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.removeBroker(brokerid, dryrun, throttleRemovedBroker, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, destinationBrokerIds, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode);
            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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 generate proposals.
        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 brokers.
        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 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.removeBroker(brokerid, dryrun, throttleRemovedBroker, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, destinationBrokerIds, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode);
            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 *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (optional)
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 generate proposals. (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 brokers. (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 2-step verification. (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 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)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

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

// Remove/decomission specified brokers.
[apiInstance removeBrokerWith:brokerid
    dryrun:dryrun
    throttleRemovedBroker:throttleRemovedBroker
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    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
    fastMode:fastMode
              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.
  'maxPartitionMovementsInCluster': 56, // {{Integer}} Change upper bound of ongoing inter broker partition movements in cluster.
  '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 generate proposals.
  '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 brokers.
  '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 2-step verification.
  '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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'fastMode': true // {{Boolean}} True to compute proposals in fast mode, false otherwise
};
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 maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional) 
            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 generate proposals. (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 brokers. (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 2-step verification. (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 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) 
            var fastMode = true;  // Boolean | True to compute proposals in fast mode, false otherwise (optional)  (default to true)

            try
            {
                // Remove/decomission specified brokers.
                OptimizationResult result = apiInstance.removeBroker(brokerid, dryrun, throttleRemovedBroker, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, json, skipHardGoalCheck, excludedTopics, kafkaAssigner, useReadyDefaultGoals, verbose, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, replicaMovementStrategies, destinationBrokerIds, executionProgressCheckIntervalMs, stopOngoingExecution, reason, reviewId, dataFrom, replicationThrottle, getResponseSchema, doAs, fastMode);
                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.
$maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
$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 generate proposals.
$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 brokers.
$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 2-step verification.
$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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise

try {
    $result = $api_instance->removeBroker($brokerid, $dryrun, $throttleRemovedBroker, $goals, $allowCapacityEstimation, $concurrentPartitionMovementsPerBroker, $maxPartitionMovementsInCluster, $concurrentLeaderMovements, $json, $skipHardGoalCheck, $excludedTopics, $kafkaAssigner, $useReadyDefaultGoals, $verbose, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $replicaMovementStrategies, $destinationBrokerIds, $executionProgressCheckIntervalMs, $stopOngoingExecution, $reason, $reviewId, $dataFrom, $replicationThrottle, $getResponseSchema, $doAs, $fastMode);
    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 $maxPartitionMovementsInCluster = 56; # Integer | Change upper bound of ongoing inter broker partition movements in cluster.
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 generate proposals.
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 brokers.
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 2-step verification.
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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $fastMode = true; # Boolean | True to compute proposals in fast mode, false otherwise

eval { 
    my $result = $api_instance->removeBroker(brokerid => $brokerid, dryrun => $dryrun, throttleRemovedBroker => $throttleRemovedBroker, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster => $maxPartitionMovementsInCluster, 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, fastMode => $fastMode);
    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)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (optional)
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 generate proposals. (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 brokers. (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 2-step verification. (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 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)
fastMode = true # Boolean | True to compute proposals in fast mode, false otherwise (optional) (default to true)

try: 
    # Remove/decomission specified brokers.
    api_response = api_instance.remove_broker(brokerid, dryrun=dryrun, throttleRemovedBroker=throttleRemovedBroker, goals=goals, allowCapacityEstimation=allowCapacityEstimation, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster=maxPartitionMovementsInCluster, 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, fastMode=fastMode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->removeBroker: %s\n" % e)

Parameters

Query parameters
Name Description
brokerid*
array[Integer]
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.
max_partition_movements_in_cluster
Integer (int32)
Change upper bound of ongoing inter broker partition movements in cluster.
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 generate proposals.
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 brokers.
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]
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 2-step verification.
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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
fast_mode
Boolean
True to compute proposals in fast mode, false otherwise

Responses

Status: 200 - Successful add brokers response.

Status: 202 - Add brokers in progress.

Status: default - Error response.


resumeSampling

Resume metric sampling.


/resume_sampling

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/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 2-step verification.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return 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 2-step verification.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return 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 2-step verification. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return 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];

// Resume metric sampling.
[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 2-step verification.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return 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 2-step verification. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return 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
            {
                // Resume metric sampling.
                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 2-step verification.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return 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 2-step verification.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return 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 2-step verification. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return 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: 
    # Resume metric sampling.
    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 2-step verification.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return 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

Reivew pending Cruise Control requests.


/review

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/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 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 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 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];

// Reivew pending Cruise Control requests.
[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 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 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
            {
                // Reivew pending Cruise Control requests.
                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 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 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 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: 
    # Reivew pending Cruise Control requests.
    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 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

Check review status of Cruise Control requests.


/review_board

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/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 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 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 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];

// Check review status of Cruise Control requests.
[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 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 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
            {
                // Check review status of Cruise Control requests.
                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 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 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 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: 
    # Check review status of Cruise Control requests.
    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 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.


rightsize

Manually invoke provisioner rightsizing of the cluster.


/rightsize

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/rightsize?num_brokers_to_add=&partition_count=&topic=&doAs=&get_response_schema=&json=&reason="
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();
        Integer numBrokersToAdd = 56; // Integer | The difference in broker count to rightsize towards.
        Integer partitionCount = 56; // Integer | The target number of partitions to rightsize towards.
        String topic = topic_example; // String | Regular expression to specify subject topics.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        String reason = reason_example; // String | Reason for request.
        try {
            RightsizeResult result = apiInstance.rightsize(numBrokersToAdd, partitionCount, topic, doAs, getResponseSchema, json, reason);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#rightsize");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer numBrokersToAdd = 56; // Integer | The difference in broker count to rightsize towards.
        Integer partitionCount = 56; // Integer | The target number of partitions to rightsize towards.
        String topic = topic_example; // String | Regular expression to specify subject topics.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        String reason = reason_example; // String | Reason for request.
        try {
            RightsizeResult result = apiInstance.rightsize(numBrokersToAdd, partitionCount, topic, doAs, getResponseSchema, json, reason);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#rightsize");
            e.printStackTrace();
        }
    }
}
Integer *numBrokersToAdd = 56; // The difference in broker count to rightsize towards. (optional)
Integer *partitionCount = 56; // The target number of partitions to rightsize towards. (optional)
String *topic = topic_example; // Regular expression to specify subject topics. (optional)
String *doAs = doAs_example; // The user specified by a trusted proxy in that authentication model. (optional)
Boolean *getResponseSchema = true; // Whether to return JSON schema in response header or not. (optional) (default to false)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
String *reason = reason_example; // Reason for request. (optional)

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

// Manually invoke provisioner rightsizing of the cluster.
[apiInstance rightsizeWith:numBrokersToAdd
    partitionCount:partitionCount
    topic:topic
    doAs:doAs
    getResponseSchema:getResponseSchema
    json:json
    reason:reason
              completionHandler: ^(RightsizeResult 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 = { 
  'numBrokersToAdd': 56, // {{Integer}} The difference in broker count to rightsize towards.
  'partitionCount': 56, // {{Integer}} The target number of partitions to rightsize towards.
  'topic': topic_example, // {{String}} Regular expression to specify subject topics.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'getResponseSchema': true, // {{Boolean}} Whether to return JSON schema in response header or not.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'reason': reason_example // {{String}} Reason for request.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rightsize(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var numBrokersToAdd = 56;  // Integer | The difference in broker count to rightsize towards. (optional) 
            var partitionCount = 56;  // Integer | The target number of partitions to rightsize towards. (optional) 
            var topic = topic_example;  // String | Regular expression to specify subject topics. (optional) 
            var doAs = doAs_example;  // String | The user specified by a trusted proxy in that authentication model. (optional) 
            var getResponseSchema = true;  // Boolean | Whether to return JSON schema in response header or not. (optional)  (default to false)
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Manually invoke provisioner rightsizing of the cluster.
                RightsizeResult result = apiInstance.rightsize(numBrokersToAdd, partitionCount, topic, doAs, getResponseSchema, json, reason);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.rightsize: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$numBrokersToAdd = 56; // Integer | The difference in broker count to rightsize towards.
$partitionCount = 56; // Integer | The target number of partitions to rightsize towards.
$topic = topic_example; // String | Regular expression to specify subject topics.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
$json = true; // Boolean | Whether to return in JSON format or not.
$reason = reason_example; // String | Reason for request.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $numBrokersToAdd = 56; # Integer | The difference in broker count to rightsize towards.
my $partitionCount = 56; # Integer | The target number of partitions to rightsize towards.
my $topic = topic_example; # String | Regular expression to specify subject topics.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $getResponseSchema = true; # Boolean | Whether to return JSON schema in response header or not.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $reason = reason_example; # String | Reason for request.

eval { 
    my $result = $api_instance->rightsize(numBrokersToAdd => $numBrokersToAdd, partitionCount => $partitionCount, topic => $topic, doAs => $doAs, getResponseSchema => $getResponseSchema, json => $json, reason => $reason);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->rightsize: $@\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()
numBrokersToAdd = 56 # Integer | The difference in broker count to rightsize towards. (optional)
partitionCount = 56 # Integer | The target number of partitions to rightsize towards. (optional)
topic = topic_example # String | Regular expression to specify subject topics. (optional)
doAs = doAs_example # String | The user specified by a trusted proxy in that authentication model. (optional)
getResponseSchema = true # Boolean | Whether to return JSON schema in response header or not. (optional) (default to false)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Manually invoke provisioner rightsizing of the cluster.
    api_response = api_instance.rightsize(numBrokersToAdd=numBrokersToAdd, partitionCount=partitionCount, topic=topic, doAs=doAs, getResponseSchema=getResponseSchema, json=json, reason=reason)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->rightsize: %s\n" % e)

Parameters

Query parameters
Name Description
num_brokers_to_add
Integer (int32)
The difference in broker count to rightsize towards.
partition_count
Integer (int32)
The target number of partitions to rightsize towards.
topic
String
Regular expression to specify subject topics.
doAs
String
The user specified by a trusted proxy in that authentication model.
get_response_schema
Boolean
Whether to return JSON schema in response header or not.
json
Boolean
Whether to return in JSON format or not.
reason
String
Reason for request.

Responses

Status: 200 - Successful rightsize response.

Status: default - Error response.


state

Get the state of cruise control.


/state

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/state?substates=&json=&verbose=&super_verbose=&get_response_schema=&doAs=&reason="
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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            CruiseControlState result = apiInstance.state(substates, json, verbose, superVerbose, getResponseSchema, doAs, reason);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#state");
            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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            CruiseControlState result = apiInstance.state(substates, json, verbose, superVerbose, getResponseSchema, doAs, reason);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#state");
            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) (default to false)
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 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)
String *reason = reason_example; // Reason for request. (optional)

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

// Get the state of cruise control.
[apiInstance stateWith:substates
    json:json
    verbose:verbose
    superVerbose:superVerbose
    getResponseSchema:getResponseSchema
    doAs:doAs
    reason:reason
              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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'reason': reason_example // {{String}} Reason for request.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.state(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class stateExample
    {
        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)  (default to false)
            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 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) 
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Get the state of cruise control.
                CruiseControlState result = apiInstance.state(substates, json, verbose, superVerbose, getResponseSchema, doAs, reason);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.state: " + 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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$reason = reason_example; // String | Reason for request.

try {
    $result = $api_instance->state($substates, $json, $verbose, $superVerbose, $getResponseSchema, $doAs, $reason);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->state: ', $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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $reason = reason_example; # String | Reason for request.

eval { 
    my $result = $api_instance->state(substates => $substates, json => $json, verbose => $verbose, superVerbose => $superVerbose, getResponseSchema => $getResponseSchema, doAs => $doAs, reason => $reason);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->state: $@\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) (default to false)
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 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)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Get the state of cruise control.
    api_response = api_instance.state(substates=substates, json=json, verbose=verbose, superVerbose=superVerbose, getResponseSchema=getResponseSchema, doAs=doAs, reason=reason)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->state: %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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
reason
String
Reason for request.

Responses

Status: 200 - Successful state response.

Status: 202 - State querying in progress.

Status: default - Error response.


stopProposalExecution

Stop ongoing execution in Cruise Control.


/stop_proposal_execution

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/stop_proposal_execution?force_stop=&stop_external_agent=&review_id=&json=&get_response_schema=&doAs=&reason="
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.
        Boolean stopExternalAgent = true; // Boolean | If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above.
        Integer reviewId = 56; // Integer | Review id for 2-step verification.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            StopProposalResult result = apiInstance.stopProposalExecution(forceStop, stopExternalAgent, reviewId, json, getResponseSchema, doAs, reason);
            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.
        Boolean stopExternalAgent = true; // Boolean | If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above.
        Integer reviewId = 56; // Integer | Review id for 2-step verification.
        Boolean json = true; // Boolean | Whether to return in JSON format or not.
        Boolean getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            StopProposalResult result = apiInstance.stopProposalExecution(forceStop, stopExternalAgent, reviewId, json, getResponseSchema, doAs, reason);
            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)
Boolean *stopExternalAgent = true; // If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above. (optional) (default to true)
Integer *reviewId = 56; // Review id for 2-step verification. (optional)
Boolean *json = true; // Whether to return in JSON format or not. (optional) (default to false)
Boolean *getResponseSchema = true; // Whether to return 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)
String *reason = reason_example; // Reason for request. (optional)

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

// Stop ongoing execution in Cruise Control.
[apiInstance stopProposalExecutionWith:forceStop
    stopExternalAgent:stopExternalAgent
    reviewId:reviewId
    json:json
    getResponseSchema:getResponseSchema
    doAs:doAs
    reason:reason
              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.
  'stopExternalAgent': true, // {{Boolean}} If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above.
  'reviewId': 56, // {{Integer}} Review id for 2-step verification.
  'json': true, // {{Boolean}} Whether to return in JSON format or not.
  'getResponseSchema': true, // {{Boolean}} Whether to return JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'reason': reason_example // {{String}} Reason for request.
};
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 stopExternalAgent = true;  // Boolean | If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above. (optional)  (default to true)
            var reviewId = 56;  // Integer | Review id for 2-step verification. (optional) 
            var json = true;  // Boolean | Whether to return in JSON format or not. (optional)  (default to false)
            var getResponseSchema = true;  // Boolean | Whether to return 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) 
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Stop ongoing execution in Cruise Control.
                StopProposalResult result = apiInstance.stopProposalExecution(forceStop, stopExternalAgent, reviewId, json, getResponseSchema, doAs, reason);
                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.
$stopExternalAgent = true; // Boolean | If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above.
$reviewId = 56; // Integer | Review id for 2-step verification.
$json = true; // Boolean | Whether to return in JSON format or not.
$getResponseSchema = true; // Boolean | Whether to return JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$reason = reason_example; // String | Reason for request.

try {
    $result = $api_instance->stopProposalExecution($forceStop, $stopExternalAgent, $reviewId, $json, $getResponseSchema, $doAs, $reason);
    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 $stopExternalAgent = true; # Boolean | If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above.
my $reviewId = 56; # Integer | Review id for 2-step verification.
my $json = true; # Boolean | Whether to return in JSON format or not.
my $getResponseSchema = true; # Boolean | Whether to return JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $reason = reason_example; # String | Reason for request.

eval { 
    my $result = $api_instance->stopProposalExecution(forceStop => $forceStop, stopExternalAgent => $stopExternalAgent, reviewId => $reviewId, json => $json, getResponseSchema => $getResponseSchema, doAs => $doAs, reason => $reason);
    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)
stopExternalAgent = true # Boolean | If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above. (optional) (default to true)
reviewId = 56 # Integer | Review id for 2-step verification. (optional)
json = true # Boolean | Whether to return in JSON format or not. (optional) (default to false)
getResponseSchema = true # Boolean | Whether to return 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)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Stop ongoing execution in Cruise Control.
    api_response = api_instance.stop_proposal_execution(forceStop=forceStop, stopExternalAgent=stopExternalAgent, reviewId=reviewId, json=json, getResponseSchema=getResponseSchema, doAs=doAs, reason=reason)
    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.
stop_external_agent
Boolean
If true, stop any ongoing execution even if it is started by an external agent. If false, only stop execution started by the current CC instance. This parameter would only be honored with Kafka 2.4 or above.
review_id
Integer (int32)
Review id for 2-step verification.
json
Boolean
Whether to return in JSON format or not.
get_response_schema
Boolean
Whether to return JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
reason
String
Reason for request.

Responses

Status: 200 - Successful admin response.

Status: default - Error response.


topicConfiguration

Change the configuration of a topic


/topic_configuration

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/topic_configuration?dryrun=&topic=&replication_factor=&data_from=&goals=&allow_capacity_estimation=&concurrent_partition_movements_per_broker=&max_partition_movements_in_cluster=&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=&fast_mode="
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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 brokers.
        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 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.topicConfiguration(dryrun, topic, replicationFactor, dataFrom, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, skipHardGoalCheck, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, excludedTopics, executionProgressCheckIntervalMs, reason, replicaMovementStrategies, replicationThrottle, json, reviewId, skipRackAwarenessCheck, stopOngoingExecution, useReadyDefaultGoals, verbose, getResponseSchema, doAs, fastMode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#topicConfiguration");
            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 maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
        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 brokers.
        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 2-step verification.
        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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        Boolean fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise
        try {
            OptimizationResult result = apiInstance.topicConfiguration(dryrun, topic, replicationFactor, dataFrom, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, skipHardGoalCheck, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, excludedTopics, executionProgressCheckIntervalMs, reason, replicaMovementStrategies, replicationThrottle, json, reviewId, skipRackAwarenessCheck, stopOngoingExecution, useReadyDefaultGoals, verbose, getResponseSchema, doAs, fastMode);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#topicConfiguration");
            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 *maxPartitionMovementsInCluster = 56; // Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 2-step verification. (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 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)
Boolean *fastMode = true; // True to compute proposals in fast mode, false otherwise (optional) (default to true)

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

// Change the configuration of a topic
[apiInstance topicConfigurationWith:dryrun
    topic:topic
    replicationFactor:replicationFactor
    dataFrom:dataFrom
    goals:goals
    allowCapacityEstimation:allowCapacityEstimation
    concurrentPartitionMovementsPerBroker:concurrentPartitionMovementsPerBroker
    maxPartitionMovementsInCluster:maxPartitionMovementsInCluster
    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
    fastMode:fastMode
              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.
  'maxPartitionMovementsInCluster': 56, // {{Integer}} Change upper bound of ongoing inter broker partition movements in cluster.
  '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 brokers.
  '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 2-step verification.
  '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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'fastMode': true // {{Boolean}} True to compute proposals in fast mode, false otherwise
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.topicConfiguration(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class topicConfigurationExample
    {
        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 maxPartitionMovementsInCluster = 56;  // Integer | Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 2-step verification. (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 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) 
            var fastMode = true;  // Boolean | True to compute proposals in fast mode, false otherwise (optional)  (default to true)

            try
            {
                // Change the configuration of a topic
                OptimizationResult result = apiInstance.topicConfiguration(dryrun, topic, replicationFactor, dataFrom, goals, allowCapacityEstimation, concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster, concurrentLeaderMovements, skipHardGoalCheck, excludeRecentlyDemotedBrokers, excludeRecentlyRemovedBrokers, excludedTopics, executionProgressCheckIntervalMs, reason, replicaMovementStrategies, replicationThrottle, json, reviewId, skipRackAwarenessCheck, stopOngoingExecution, useReadyDefaultGoals, verbose, getResponseSchema, doAs, fastMode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.topicConfiguration: " + 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.
$maxPartitionMovementsInCluster = 56; // Integer | Change upper bound of ongoing inter broker partition movements in cluster.
$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 brokers.
$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 2-step verification.
$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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$fastMode = true; // Boolean | True to compute proposals in fast mode, false otherwise

try {
    $result = $api_instance->topicConfiguration($dryrun, $topic, $replicationFactor, $dataFrom, $goals, $allowCapacityEstimation, $concurrentPartitionMovementsPerBroker, $maxPartitionMovementsInCluster, $concurrentLeaderMovements, $skipHardGoalCheck, $excludeRecentlyDemotedBrokers, $excludeRecentlyRemovedBrokers, $excludedTopics, $executionProgressCheckIntervalMs, $reason, $replicaMovementStrategies, $replicationThrottle, $json, $reviewId, $skipRackAwarenessCheck, $stopOngoingExecution, $useReadyDefaultGoals, $verbose, $getResponseSchema, $doAs, $fastMode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->topicConfiguration: ', $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 $maxPartitionMovementsInCluster = 56; # Integer | Change upper bound of ongoing inter broker partition movements in cluster.
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 brokers.
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 2-step verification.
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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $fastMode = true; # Boolean | True to compute proposals in fast mode, false otherwise

eval { 
    my $result = $api_instance->topicConfiguration(dryrun => $dryrun, topic => $topic, replicationFactor => $replicationFactor, dataFrom => $dataFrom, goals => $goals, allowCapacityEstimation => $allowCapacityEstimation, concurrentPartitionMovementsPerBroker => $concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster => $maxPartitionMovementsInCluster, 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, fastMode => $fastMode);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->topicConfiguration: $@\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)
maxPartitionMovementsInCluster = 56 # Integer | Change upper bound of ongoing inter broker partition movements in cluster. (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 brokers. (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 2-step verification. (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 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)
fastMode = true # Boolean | True to compute proposals in fast mode, false otherwise (optional) (default to true)

try: 
    # Change the configuration of a topic
    api_response = api_instance.topic_configuration(dryrun=dryrun, topic=topic, replicationFactor=replicationFactor, dataFrom=dataFrom, goals=goals, allowCapacityEstimation=allowCapacityEstimation, concurrentPartitionMovementsPerBroker=concurrentPartitionMovementsPerBroker, maxPartitionMovementsInCluster=maxPartitionMovementsInCluster, 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, fastMode=fastMode)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->topicConfiguration: %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.
max_partition_movements_in_cluster
Integer (int32)
Change upper bound of ongoing inter broker partition movements in cluster.
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 brokers.
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 2-step verification.
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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
fast_mode
Boolean
True to compute proposals in fast mode, false otherwise

Responses

Status: 200 - Successful topic configuration response.

Status: 202 - Topic configuration in progress.

Status: default - Error response.


train

Train Cruise Control to better model broker cpu usage.


/train

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/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 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 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 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 Cruise Control to better model broker cpu usage.
[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 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 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 Cruise Control to better model broker cpu usage.
                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 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 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 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 Cruise Control to better model broker cpu usage.
    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 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.


userTasks

Get the recent user tasks from cruise control.


/user_tasks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/{urlPrefix}/user_tasks?client_ids=&endpoints=&entries=&types=&user_task_ids=&json=&fetch_completed_task=&get_response_schema=&doAs=&reason="
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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            UserTaskState result = apiInstance.userTasks(clientIds, endpoints, entries, types, userTaskIds, json, fetchCompletedTask, getResponseSchema, doAs, reason);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#userTasks");
            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 JSON schema in response header or not.
        String doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
        String reason = reason_example; // String | Reason for request.
        try {
            UserTaskState result = apiInstance.userTasks(clientIds, endpoints, entries, types, userTaskIds, json, fetchCompletedTask, getResponseSchema, doAs, reason);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#userTasks");
            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 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)
String *reason = reason_example; // Reason for request. (optional)

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

// Get the recent user tasks from cruise control.
[apiInstance userTasksWith:clientIds
    endpoints:endpoints
    entries:entries
    types:types
    userTaskIds:userTaskIds
    json:json
    fetchCompletedTask:fetchCompletedTask
    getResponseSchema:getResponseSchema
    doAs:doAs
    reason:reason
              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 JSON schema in response header or not.
  'doAs': doAs_example, // {{String}} The user specified by a trusted proxy in that authentication model.
  'reason': reason_example // {{String}} Reason for request.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.userTasks(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class userTasksExample
    {
        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 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) 
            var reason = reason_example;  // String | Reason for request. (optional) 

            try
            {
                // Get the recent user tasks from cruise control.
                UserTaskState result = apiInstance.userTasks(clientIds, endpoints, entries, types, userTaskIds, json, fetchCompletedTask, getResponseSchema, doAs, reason);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.userTasks: " + 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 JSON schema in response header or not.
$doAs = doAs_example; // String | The user specified by a trusted proxy in that authentication model.
$reason = reason_example; // String | Reason for request.

try {
    $result = $api_instance->userTasks($clientIds, $endpoints, $entries, $types, $userTaskIds, $json, $fetchCompletedTask, $getResponseSchema, $doAs, $reason);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->userTasks: ', $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 JSON schema in response header or not.
my $doAs = doAs_example; # String | The user specified by a trusted proxy in that authentication model.
my $reason = reason_example; # String | Reason for request.

eval { 
    my $result = $api_instance->userTasks(clientIds => $clientIds, endpoints => $endpoints, entries => $entries, types => $types, userTaskIds => $userTaskIds, json => $json, fetchCompletedTask => $fetchCompletedTask, getResponseSchema => $getResponseSchema, doAs => $doAs, reason => $reason);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->userTasks: $@\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 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)
reason = reason_example # String | Reason for request. (optional)

try: 
    # Get the recent user tasks from cruise control.
    api_response = api_instance.user_tasks(clientIds=clientIds, endpoints=endpoints, entries=entries, types=types, userTaskIds=userTaskIds, json=json, fetchCompletedTask=fetchCompletedTask, getResponseSchema=getResponseSchema, doAs=doAs, reason=reason)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->userTasks: %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 JSON schema in response header or not.
doAs
String
The user specified by a trusted proxy in that authentication model.
reason
String
Reason for request.

Responses

Status: 200 - User tasks state response.

Status: default - Error response.